diff --git a/CHANGES.md b/CHANGES.md index 74d4da3..e24fa81 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +## Version 2.20191023.0 (2019-10-23) +* **GA release**: Merchants.ListMerchant is GA for all SDKs. +* **Beta release**: All SDKs support new Locations API endpoint, CreateLocation. +* **Beta release**: All SDKs support exclusion strategies for pricing rules. + + ## Version 2.20190925.0 (2019-09-25) * **GA release**: All SDKs have been updated to support the new Merchants API. @@ -21,7 +27,7 @@ ## Version 2.20190814.1 (2018-08-16) -* **Bug fix**: Removed a currently unsupported API object type +* **Bug fix**: Removed a currentlyunsupported API object type ## Version 2.20190814.0 (2019-08-15) * **New functionality**: All SDKs have been updated to support the Sandbox v2 BETA release diff --git a/README.md b/README.md index f4379f3..ba76fca 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ Class | Method | HTTP request | Description *SquareConnect.LocationsApi* | [**listLocations**](docs/LocationsApi.md#listLocations) | **GET** /v2/locations | ListLocations *SquareConnect.LocationsApi* | [**retrieveLocation**](docs/LocationsApi.md#retrieveLocation) | **GET** /v2/locations/{location_id} | RetrieveLocation *SquareConnect.LocationsApi* | [**updateLocation**](docs/LocationsApi.md#updateLocation) | **PUT** /v2/locations/{location_id} | UpdateLocation +*SquareConnect.MerchantsApi* | [**listMerchants**](docs/MerchantsApi.md#listMerchants) | **GET** /v2/merchants | ListMerchants *SquareConnect.MerchantsApi* | [**retrieveMerchant**](docs/MerchantsApi.md#retrieveMerchant) | **GET** /v2/merchants/{merchant_id} | RetrieveMerchant *SquareConnect.MobileAuthorizationApi* | [**createMobileAuthorizationCode**](docs/MobileAuthorizationApi.md#createMobileAuthorizationCode) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode *SquareConnect.OAuthApi* | [**obtainToken**](docs/OAuthApi.md#obtainToken) | **POST** /oauth2/token | ObtainToken @@ -346,6 +347,7 @@ Class | Method | HTTP request | Description - [SquareConnect.Error](docs/Error.md) - [SquareConnect.ErrorCategory](docs/ErrorCategory.md) - [SquareConnect.ErrorCode](docs/ErrorCode.md) + - [SquareConnect.ExcludeStrategy](docs/ExcludeStrategy.md) - [SquareConnect.GetBreakTypeRequest](docs/GetBreakTypeRequest.md) - [SquareConnect.GetBreakTypeResponse](docs/GetBreakTypeResponse.md) - [SquareConnect.GetEmployeeWageRequest](docs/GetEmployeeWageRequest.md) @@ -381,6 +383,8 @@ Class | Method | HTTP request | Description - [SquareConnect.ListEmployeesResponse](docs/ListEmployeesResponse.md) - [SquareConnect.ListLocationsRequest](docs/ListLocationsRequest.md) - [SquareConnect.ListLocationsResponse](docs/ListLocationsResponse.md) + - [SquareConnect.ListMerchantsRequest](docs/ListMerchantsRequest.md) + - [SquareConnect.ListMerchantsResponse](docs/ListMerchantsResponse.md) - [SquareConnect.ListPaymentRefundsRequest](docs/ListPaymentRefundsRequest.md) - [SquareConnect.ListPaymentRefundsResponse](docs/ListPaymentRefundsResponse.md) - [SquareConnect.ListPaymentsRequest](docs/ListPaymentsRequest.md) diff --git a/docs/AdditionalRecipientReceivable.md b/docs/AdditionalRecipientReceivable.md index a236ae6..68e6a74 100644 --- a/docs/AdditionalRecipientReceivable.md +++ b/docs/AdditionalRecipientReceivable.md @@ -1,6 +1,7 @@ # SquareConnect.AdditionalRecipientReceivable ### Description +**Note: This model is deprecated.** Represents a monetary distribution of part of a [Transaction](#type-transaction)'s amount for Transactions which included additional recipients. The location of this receivable is that same as the one specified in the [AdditionalRecipient](#type-additionalrecipient). diff --git a/docs/AdditionalRecipientReceivableRefund.md b/docs/AdditionalRecipientReceivableRefund.md index 6d1e677..db618af 100644 --- a/docs/AdditionalRecipientReceivableRefund.md +++ b/docs/AdditionalRecipientReceivableRefund.md @@ -1,6 +1,7 @@ # SquareConnect.AdditionalRecipientReceivableRefund ### Description +**Note: This model is deprecated.** A refund of an [AdditionalRecipientReceivable](#type-additionalrecipientreceivable). This includes the ID of the additional recipient receivable associated to this object, as well as a reference to the [Refund](#type-refund) that created this receivable refund. diff --git a/docs/CaptureTransactionRequest.md b/docs/CaptureTransactionRequest.md index bd027e4..90e400b 100644 --- a/docs/CaptureTransactionRequest.md +++ b/docs/CaptureTransactionRequest.md @@ -1,6 +1,7 @@ # SquareConnect.CaptureTransactionRequest ### Description +**Note: This model is deprecated.** Defines the query parameters for calls to the CaptureTransaction endpoint. diff --git a/docs/CaptureTransactionResponse.md b/docs/CaptureTransactionResponse.md index d0da8ae..6fed18d 100644 --- a/docs/CaptureTransactionResponse.md +++ b/docs/CaptureTransactionResponse.md @@ -1,6 +1,7 @@ # SquareConnect.CaptureTransactionResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [CaptureTransaction](#endpoint-capturetransaction) endpoint. diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md index d40af17..4af4436 100644 --- a/docs/CatalogApi.md +++ b/docs/CatalogApi.md @@ -257,7 +257,7 @@ Name | Type | Description | Notes 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`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. +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`, `IMAGE`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. ### Example ```javascript diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index b235b5c..32b3010 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -20,6 +20,6 @@ Name | Type | Description | Notes **variations** | [**[CatalogObject]**](CatalogObject.md) | A list of `CatalogObject`s containing the `CatalogItemVariation`s for this item. Maximum: 250 item variations | [optional] **product_type** | **String** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` or `APPOINTMENTS_SERVICE` 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** | **Boolean** | If `false`, the Square Point of Sale app will present the `CatalogItem`'s details screen immediately, allowing the merchant to choose `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] -**item_options** | [**[CatalogItemOptionForItem]**](CatalogItemOptionForItem.md) | List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options. | [optional] +**item_options** | [**[CatalogItemOptionForItem]**](CatalogItemOptionForItem.md) | List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options. | [optional] [beta] diff --git a/docs/CatalogItemOption.md b/docs/CatalogItemOption.md index b206edd..d24edc8 100644 --- a/docs/CatalogItemOption.md +++ b/docs/CatalogItemOption.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogItemOption ### Description +**Note: This model is in beta.** A group of variations for a [CatalogItem](#type-catalogitem)'s. diff --git a/docs/CatalogItemOptionForItem.md b/docs/CatalogItemOptionForItem.md index 14dceef..562c225 100644 --- a/docs/CatalogItemOptionForItem.md +++ b/docs/CatalogItemOptionForItem.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogItemOptionForItem ### Description +**Note: This model is in beta.** A list of item option values that can be assigned to item variations. For example, a t-shirt item may offer a color option or a size option. diff --git a/docs/CatalogItemOptionValue.md b/docs/CatalogItemOptionValue.md index 0f6a6fb..e3e3c73 100644 --- a/docs/CatalogItemOptionValue.md +++ b/docs/CatalogItemOptionValue.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogItemOptionValue ### Description +**Note: This model is in beta.** An enumerated value that can link a [CatalogItemVariation(#type-catalogitemvariation) to an item option as one of its item option values. @@ -10,7 +11,7 @@ Name | Type | Description | Notes **item_option_id** | **String** | Unique ID of the associated item option. | [optional] **name** | **String** | Name of this item option value. Searchable. | [optional] **description** | **String** | The option value's human-readable description. | [optional] -**color** | **String** | The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \"#ff8d4e85\"). Only displayed if parent Item Option's `show_colors` flag is enabled. value. | [optional] +**color** | **String** | The HTML-supported hex color for the item option (e.g., \"#ff8d4e85\"). Only displayed if `show_colors` is enabled on the parent `ItemOption`. When left unset, `color` defaults to white (\"#ffffff\") when `show_colors` is enabled on the parent `ItemOption`. | [optional] **ordinal** | **Number** | Determines where this option value appears in a list of option values. | [optional] **item_variation_count** | **Number** | The number of [CatalogItemVariation(#type-catalogitemvariation)s that currently make use of this Item Option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent Item Option of this value. Maximum: 100 counts. | [optional] diff --git a/docs/CatalogItemOptionValueForItemVariation.md b/docs/CatalogItemOptionValueForItemVariation.md index 640bcc1..dc23b53 100644 --- a/docs/CatalogItemOptionValueForItemVariation.md +++ b/docs/CatalogItemOptionValueForItemVariation.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogItemOptionValueForItemVariation ### Description +**Note: This model is in beta.** A [CatalogItemOptionValue](#type-catalogitemoptionvalue) links an item variation to an item option as an item option value. For example, a t-shirt item may offer a color option and a size option. An item option value would represent each variation of t-shirt: For example, “Color:Red, Size:Small” or “Color:Blue, Size:Medium”. diff --git a/docs/CatalogItemVariation.md b/docs/CatalogItemVariation.md index bd78357..c9bac7e 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **inventory_alert_threshold** | **Number** | 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** | **String** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional] **service_duration** | **Number** | If the `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] -**item_option_values** | [**[CatalogItemOptionValueForItemVariation]**](CatalogItemOptionValueForItemVariation.md) | List of item option values associated with this item variation. Listed in the same order as the item options of the parent item. | [optional] -**measurement_unit_id** | **String** | 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] +**item_option_values** | [**[CatalogItemOptionValueForItemVariation]**](CatalogItemOptionValueForItemVariation.md) | List of item option values associated with this item variation. Listed in the same order as the item options of the parent item. | [optional] [beta] +**measurement_unit_id** | **String** | 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] [beta] diff --git a/docs/CatalogMeasurementUnit.md b/docs/CatalogMeasurementUnit.md index 0329b26..77eb777 100644 --- a/docs/CatalogMeasurementUnit.md +++ b/docs/CatalogMeasurementUnit.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogMeasurementUnit ### Description +**Note: This model is in beta.** Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. diff --git a/docs/CatalogPricingRule.md b/docs/CatalogPricingRule.md index 9609490..b3cd184 100644 --- a/docs/CatalogPricingRule.md +++ b/docs/CatalogPricingRule.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogPricingRule ### Description +**Note: This model is in beta.** Defines how prices are modified or set for items that match the pricing rule during the active time period. @@ -11,11 +12,12 @@ Name | Type | Description | Notes **time_period_ids** | **[String]** | Unique ID for the `CatalogTimePeriod`s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional] **discount_id** | **String** | Unique ID for the `CatalogDiscount` to take off the price of all matched items. | [optional] **match_products_id** | **String** | Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule matches within the entire cart. | [optional] -**apply_products_id** | **String** | The `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] +**apply_products_id** | **String** | `CatalogProductSet` to apply the pricing to. An apply rule matches within the subset of the cart that fits the match rules (the match set). An apply 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. This field has been deprecated: new pricing rules should prefer the exclude_products_id field. Exclude sets allow better control over quantity ranges and offer more flexibility for which matched items receive a discount. | [optional] [deprecated] **exclude_products_id** | **String** | Identifies the `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** | **String** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] **valid_from_local_time** | **String** | 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** | **String** | Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] **valid_until_local_time** | **String** | 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] +**exclude_strategy** | **String** | If an `exclude_products_id` was given, controls which subset of matched products is excluded from any discounts. See `ExcludeStrategy` for all possible values. Default value: `LEAST_EXPENSIVE` See [ExcludeStrategy](#type-excludestrategy) for possible values | [optional] diff --git a/docs/CatalogProductSet.md b/docs/CatalogProductSet.md index 5e9b265..0452ae4 100644 --- a/docs/CatalogProductSet.md +++ b/docs/CatalogProductSet.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogProductSet ### Description +**Note: This model is in beta.** 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. diff --git a/docs/CatalogQueryItemVariationsForItemOptionValues.md b/docs/CatalogQueryItemVariationsForItemOptionValues.md index 7742ea1..ea7f85a 100644 --- a/docs/CatalogQueryItemVariationsForItemOptionValues.md +++ b/docs/CatalogQueryItemVariationsForItemOptionValues.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogQueryItemVariationsForItemOptionValues ### Description +**Note: This model is in beta.** diff --git a/docs/CatalogQueryItemsForItemOptions.md b/docs/CatalogQueryItemsForItemOptions.md index db77d85..efa0ed4 100644 --- a/docs/CatalogQueryItemsForItemOptions.md +++ b/docs/CatalogQueryItemsForItemOptions.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogQueryItemsForItemOptions ### Description +**Note: This model is in beta.** diff --git a/docs/CatalogTimePeriod.md b/docs/CatalogTimePeriod.md index 2c7086c..1098b3d 100644 --- a/docs/CatalogTimePeriod.md +++ b/docs/CatalogTimePeriod.md @@ -1,6 +1,7 @@ # SquareConnect.CatalogTimePeriod ### Description +**Note: This model is in beta.** Represents a time period - either a single period or a repeating period. diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index f0ac40d..7f07596 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -1,6 +1,7 @@ # SquareConnect.ChargeRequest ### Description +**Note: This model is deprecated.** Defines the parameters that can be included in the body of a request to the [Charge](#endpoint-charge) endpoint. Deprecated - recommend using [CreatePayment](#endpoint-payments-createpayment) @@ -8,7 +9,7 @@ Defines the parameters that can be included in the body of a request to the [Cha Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **idempotency_key** | **String** | A value you specify that uniquely identifies this transaction among transactions you've created. If you're unsure whether a particular transaction succeeded, you can reattempt it with the same idempotency key without worrying about double-charging the buyer. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | -**amount_money** | [**Money**](Money.md) | The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. | +**amount_money** | [**Money**](Money.md) | The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. | **card_nonce** | **String** | A nonce generated from the `SqPaymentForm` that represents the card to charge. The application that provides a nonce to this endpoint must be the _same application_ that generated the nonce with the `SqPaymentForm`. Otherwise, the nonce is invalid. Do not provide a value for this field if you provide a value for `customer_card_id`. | [optional] **customer_card_id** | **String** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for `card_nonce`. If you provide this value, you _must_ also provide a value for `customer_id`. | [optional] **delay_capture** | **Boolean** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the `CaptureTransaction` or a Void (with the `VoidTransaction`. Default value: `false` | [optional] diff --git a/docs/ChargeRequestAdditionalRecipient.md b/docs/ChargeRequestAdditionalRecipient.md index e6bf6c1..3bf99a8 100644 --- a/docs/ChargeRequestAdditionalRecipient.md +++ b/docs/ChargeRequestAdditionalRecipient.md @@ -1,6 +1,7 @@ # SquareConnect.ChargeRequestAdditionalRecipient ### Description +**Note: This model is deprecated.** Represents an additional recipient (other than the merchant) entitled to a portion of the tender. Support is currently limited to USD, CAD and GBP currencies diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md index d0b98fc..cef7c56 100644 --- a/docs/ChargeResponse.md +++ b/docs/ChargeResponse.md @@ -1,6 +1,7 @@ # SquareConnect.ChargeResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [Charge](#endpoint-charge) endpoint. One of `errors` or `transaction` is present in a given response (never both). diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index bc179b9..b3e85a5 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -9,9 +9,9 @@ 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** | **String** | 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](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | [optional] -**reference_id** | **String** | __Deprecated__: Please set the reference_id on the nested `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** | [**[CreateOrderRequestLineItem]**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested `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** | [**[CreateOrderRequestTax]**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested `order` field instead. The taxes to include on the order. | [optional] -**discounts** | [**[CreateOrderRequestDiscount]**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested `order` field instead. The discounts to include on the order. | [optional] +**reference_id** | **String** | __Deprecated__: Please set the reference_id on the nested `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] [deprecated] +**line_items** | [**[CreateOrderRequestLineItem]**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested `order` field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional] [deprecated] +**taxes** | [**[CreateOrderRequestTax]**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested `order` field instead. The taxes to include on the order. | [optional] [deprecated] +**discounts** | [**[CreateOrderRequestDiscount]**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested `order` field instead. The discounts to include on the order. | [optional] [deprecated] diff --git a/docs/CreateOrderRequestDiscount.md b/docs/CreateOrderRequestDiscount.md index 9eb0fdc..e54251a 100644 --- a/docs/CreateOrderRequestDiscount.md +++ b/docs/CreateOrderRequestDiscount.md @@ -1,6 +1,7 @@ # SquareConnect.CreateOrderRequestDiscount ### Description +**Note: This model is deprecated.** __Deprecated__: Please use the [OrderLineItemDiscount](#type-orderlineitemdiscount) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a discount that can apply to either a single line item or an entire order. diff --git a/docs/CreateOrderRequestLineItem.md b/docs/CreateOrderRequestLineItem.md index 1b67605..5780215 100644 --- a/docs/CreateOrderRequestLineItem.md +++ b/docs/CreateOrderRequestLineItem.md @@ -1,6 +1,7 @@ # SquareConnect.CreateOrderRequestLineItem ### Description +**Note: This model is deprecated.** __Deprecated__: Please use the [OrderLineItem](#type-orderlineitem) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a line item to include in an order. Each line item describes a different product to purchase, with its own quantity and price details. Line items can either reference objects from the merchant's catalog, or can alternatively specify a name and price instead. diff --git a/docs/CreateOrderRequestModifier.md b/docs/CreateOrderRequestModifier.md index b8225af..6911035 100644 --- a/docs/CreateOrderRequestModifier.md +++ b/docs/CreateOrderRequestModifier.md @@ -1,6 +1,7 @@ # SquareConnect.CreateOrderRequestModifier ### Description +**Note: This model is deprecated.** __Deprecated__: Please use the [OrderLineItemModifier](#type-orderlineitemmodifier) type instead. Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price. diff --git a/docs/CreateOrderRequestTax.md b/docs/CreateOrderRequestTax.md index 7e6477b..b5b8f67 100644 --- a/docs/CreateOrderRequestTax.md +++ b/docs/CreateOrderRequestTax.md @@ -1,6 +1,7 @@ # SquareConnect.CreateOrderRequestTax ### Description +**Note: This model is deprecated.** __Deprecated__: Please use the [OrderLineItemTax](#type-orderlineitemtax) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a tax that can apply to either a single line item or an entire order. diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md index c0980ac..c3b9934 100644 --- a/docs/CreatePaymentRequest.md +++ b/docs/CreatePaymentRequest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **location_id** | **String** | The location ID to associate with the payment. If not specified, the default location is used. | [optional] **reference_id** | **String** | A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters. | [optional] **verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](https://developer.squareup.com/docs/sca-overview) for more. | [optional] -**accept_partial_authorization** | **Boolean** | If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true For more information, see [Partial amount with Square gift cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false | [optional] +**accept_partial_authorization** | **Boolean** | If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true For more information, see [Partial amount with Square gift cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false | [optional] [beta] **buyer_email_address** | **String** | The buyer's e-mail address | [optional] **billing_address** | [**Address**](Address.md) | The buyer's billing address. | [optional] **shipping_address** | [**Address**](Address.md) | The buyer's shipping address. | [optional] diff --git a/docs/CreateRefundRequest.md b/docs/CreateRefundRequest.md index 3c02e97..b3863a4 100644 --- a/docs/CreateRefundRequest.md +++ b/docs/CreateRefundRequest.md @@ -1,6 +1,7 @@ # SquareConnect.CreateRefundRequest ### Description +**Note: This model is deprecated.** Defines the body parameters that can be included in a request to the [CreateRefund](#endpoint-createrefund) endpoint. Deprecated - recommend using [RefundPayment](#endpoint-refunds-refundpayment) @@ -10,6 +11,6 @@ Name | Type | Description | Notes **idempotency_key** | **String** | A value you specify that uniquely identifies this refund among refunds you've created for the tender. If you're unsure whether a particular refund succeeded, you can reattempt it with the same idempotency key without worrying about duplicating the refund. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | **tender_id** | **String** | The ID of the tender to refund. A ``Transaction`` has one or more `tenders` (i.e., methods of payment) associated with it, and you refund each tender separately with the Connect API. | **reason** | **String** | A description of the reason for the refund. Default value: `Refund via API` | [optional] -**amount_money** | [**Money**](Money.md) | The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. | +**amount_money** | [**Money**](Money.md) | The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. | diff --git a/docs/CreateRefundResponse.md b/docs/CreateRefundResponse.md index 6bbd4b3..bcfe8d9 100644 --- a/docs/CreateRefundResponse.md +++ b/docs/CreateRefundResponse.md @@ -1,6 +1,7 @@ # SquareConnect.CreateRefundResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [CreateRefund](#endpoint-createrefund) endpoint. One of `errors` or `refund` is present in a given response (never both). diff --git a/docs/CustomerFilter.md b/docs/CustomerFilter.md index cac9a90..26f9437 100644 --- a/docs/CustomerFilter.md +++ b/docs/CustomerFilter.md @@ -2,7 +2,7 @@ ### Description -Represents a set of [`CustomerQuery`](#type-customerquery) filters used to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers). +Represents a set of `CustomerQuery` filters used to limit the set of Customers returned by SearchCustomers. ## Properties Name | Type | Description | Notes diff --git a/docs/CustomerSort.md b/docs/CustomerSort.md index 8c5cfb2..686fd0a 100644 --- a/docs/CustomerSort.md +++ b/docs/CustomerSort.md @@ -2,12 +2,12 @@ ### Description -Indicates the field to use for sorting customer profiles. For example, by total money spent with the merchant or the date of their first purchase. +Indicates the field to use for sorting customer profiles. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | **String** | The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). See [CustomerSortField](#type-customersortfield) for possible values | [optional] -**order** | **String** | Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values | [optional] +**field** | **String** | Indicates the information used to sort the results. For example, by creation date. Default value: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values | [optional] +**order** | **String** | Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default value: `ASC`. See [SortOrder](#type-sortorder) for possible values | [optional] diff --git a/docs/ExcludeStrategy.md b/docs/ExcludeStrategy.md new file mode 100644 index 0000000..7662bc2 --- /dev/null +++ b/docs/ExcludeStrategy.md @@ -0,0 +1,10 @@ +# SquareConnect.ExcludeStrategy + +## Enum + + +* `LEAST_EXPENSIVE` (value: `"LEAST_EXPENSIVE"`) + +* `MOST_EXPENSIVE` (value: `"MOST_EXPENSIVE"`) + + diff --git a/docs/InventoryAdjustment.md b/docs/InventoryAdjustment.md index 1d398f3..30dc963 100644 --- a/docs/InventoryAdjustment.md +++ b/docs/InventoryAdjustment.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **location_id** | **String** | The Square ID of the `Location` where the related quantity of items are being tracked. | [optional] **catalog_object_id** | **String** | The Square generated ID of the `CatalogObject` being tracked. | [optional] **catalog_object_type** | **String** | The `CatalogObjectType` of the `CatalogObject` being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] +**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] [beta] **total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional] diff --git a/docs/InventoryCount.md b/docs/InventoryCount.md index e06898d..123c2ba 100644 --- a/docs/InventoryCount.md +++ b/docs/InventoryCount.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **catalog_object_type** | **String** | The `CatalogObjectType` of the `CatalogObject` being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **String** | The current `InventoryState` for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **String** | The Square ID of the `Location` where the related quantity of items are being tracked. | [optional] -**quantity** | **String** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] +**quantity** | **String** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] [beta] **calculated_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional] diff --git a/docs/InventoryPhysicalCount.md b/docs/InventoryPhysicalCount.md index b1a4c62..41ff110 100644 --- a/docs/InventoryPhysicalCount.md +++ b/docs/InventoryPhysicalCount.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **catalog_object_type** | **String** | The `CatalogObjectType` of the `CatalogObject` being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **String** | The current `InventoryState` for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **String** | The Square ID of the `Location` where the related quantity of items are being tracked. | [optional] -**quantity** | **String** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] +**quantity** | **String** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] [beta] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional] **employee_id** | **String** | The Square ID of the `Employee` responsible for the physical count. | [optional] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] diff --git a/docs/InventoryTransfer.md b/docs/InventoryTransfer.md index 506e1cd..456f112 100644 --- a/docs/InventoryTransfer.md +++ b/docs/InventoryTransfer.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **to_location_id** | **String** | The Square ID of the `Location` where the related quantity of items were tracked after the transfer. | [optional] **catalog_object_id** | **String** | The Square generated ID of the `CatalogObject` being tracked. | [optional] **catalog_object_type** | **String** | The `CatalogObjectType` of the `CatalogObject` being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **String** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] +**quantity** | **String** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](https://developer.squareup.com/docs/orders-api/what-it-does#decimal-quantities) for more information. | [optional] [beta] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional] diff --git a/docs/ListAdditionalRecipientReceivableRefundsRequest.md b/docs/ListAdditionalRecipientReceivableRefundsRequest.md index 7d0f05a..f3048ea 100644 --- a/docs/ListAdditionalRecipientReceivableRefundsRequest.md +++ b/docs/ListAdditionalRecipientReceivableRefundsRequest.md @@ -1,6 +1,7 @@ # SquareConnect.ListAdditionalRecipientReceivableRefundsRequest ### Description +**Note: This model is deprecated.** Defines the query parameters that can be included in a request to the ListAdditionalRecipientReceivableRefunds endpoint. diff --git a/docs/ListAdditionalRecipientReceivableRefundsResponse.md b/docs/ListAdditionalRecipientReceivableRefundsResponse.md index 0e6171d..5afdaf7 100644 --- a/docs/ListAdditionalRecipientReceivableRefundsResponse.md +++ b/docs/ListAdditionalRecipientReceivableRefundsResponse.md @@ -1,6 +1,7 @@ # SquareConnect.ListAdditionalRecipientReceivableRefundsResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the ListAdditionalRecipientReceivableRefunds endpoint. One of `errors` or `additional_recipient_receivable_refunds` is present in a given response (never both). diff --git a/docs/ListAdditionalRecipientReceivablesRequest.md b/docs/ListAdditionalRecipientReceivablesRequest.md index ad6bf77..74c57ca 100644 --- a/docs/ListAdditionalRecipientReceivablesRequest.md +++ b/docs/ListAdditionalRecipientReceivablesRequest.md @@ -1,6 +1,7 @@ # SquareConnect.ListAdditionalRecipientReceivablesRequest ### Description +**Note: This model is deprecated.** Defines the query parameters that can be included in a request to the ListAdditionalRecipientReceivables endpoint. diff --git a/docs/ListAdditionalRecipientReceivablesResponse.md b/docs/ListAdditionalRecipientReceivablesResponse.md index f16f767..d14d896 100644 --- a/docs/ListAdditionalRecipientReceivablesResponse.md +++ b/docs/ListAdditionalRecipientReceivablesResponse.md @@ -1,6 +1,7 @@ # SquareConnect.ListAdditionalRecipientReceivablesResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the ListAdditionalRecipientReceivables endpoint. One of `errors` or `additional_recipient_receivables` is present in a given response (never both). diff --git a/docs/ListMerchantsRequest.md b/docs/ListMerchantsRequest.md new file mode 100644 index 0000000..be41736 --- /dev/null +++ b/docs/ListMerchantsRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.ListMerchantsRequest + +### Description + +Request object for the [ListMerchant](#endpoint-listmerchant) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cursor** | **Number** | The cursor generated by the previous response. | [optional] + + diff --git a/docs/ListMerchantsResponse.md b/docs/ListMerchantsResponse.md new file mode 100644 index 0000000..4f85209 --- /dev/null +++ b/docs/ListMerchantsResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.ListMerchantsResponse + +### Description + +The response object returned by the [ListMerchant](#endpoint-listmerchant) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**merchant** | [**[Merchant]**](Merchant.md) | The requested `Merchant` entities. | [optional] +**cursor** | **Number** | If the response is truncated, the cursor to use in next request to fetch next set of objects. | [optional] + + diff --git a/docs/ListRefundsRequest.md b/docs/ListRefundsRequest.md index ea8fce3..2b643f8 100644 --- a/docs/ListRefundsRequest.md +++ b/docs/ListRefundsRequest.md @@ -1,6 +1,7 @@ # SquareConnect.ListRefundsRequest ### Description +**Note: This model is deprecated.** Defines the query parameters that can be included in a request to the [ListRefunds](#endpoint-listrefunds) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) diff --git a/docs/ListRefundsResponse.md b/docs/ListRefundsResponse.md index e4b859d..1c2c668 100644 --- a/docs/ListRefundsResponse.md +++ b/docs/ListRefundsResponse.md @@ -1,6 +1,7 @@ # SquareConnect.ListRefundsResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [ListRefunds](#endpoint-listrefunds) endpoint. One of `errors` or `refunds` is present in a given response (never both). diff --git a/docs/ListTransactionsRequest.md b/docs/ListTransactionsRequest.md index 0bbc453..b07144f 100644 --- a/docs/ListTransactionsRequest.md +++ b/docs/ListTransactionsRequest.md @@ -1,6 +1,7 @@ # SquareConnect.ListTransactionsRequest ### Description +**Note: This model is deprecated.** Defines the query parameters that can be included in a request to the [ListTransactions](#endpoint-listtransactions) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) diff --git a/docs/ListTransactionsResponse.md b/docs/ListTransactionsResponse.md index 64a4f8c..819e2c0 100644 --- a/docs/ListTransactionsResponse.md +++ b/docs/ListTransactionsResponse.md @@ -1,6 +1,7 @@ # SquareConnect.ListTransactionsResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [ListTransactions](#endpoint-listtransactions) endpoint. One of `errors` or `transactions` is present in a given response (never both). diff --git a/docs/Location.md b/docs/Location.md index 2b5076f..5df2ad8 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -7,17 +7,17 @@ Represents one of a business's locations. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | The location's unique ID. | [optional] +**id** | **String** | The Square-issued ID of the location. | [optional] **name** | **String** | The location's name. Location names are set by the account owner and displayed in the dashboard as the location's nickname | [optional] **address** | [**Address**](Address.md) | The location's physical address. | [optional] **timezone** | **String** | The [IANA Timezone Database](https://www.iana.org/time-zones) identifier for the location's timezone. | [optional] -**capabilities** | **[String]** | Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values | [optional] +**capabilities** | **[String]** | The Square features that are enabled for the location. See `LocationCapability` for possible values. See [LocationCapability](#type-locationcapability) for possible values | [optional] **status** | **String** | The location's status See [LocationStatus](#type-locationstatus) for possible values | [optional] **created_at** | **String** | The time when the location was created, in RFC 3339 format. | [optional] -**merchant_id** | **String** | The identifier of the merchant that owns the location. | [optional] -**country** | **String** | The location's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | [optional] +**merchant_id** | **String** | The ID of the merchant that owns the location. | [optional] +**country** | **String** | The country of the location, in ISO 3166-1-alpha-2 format. See `Country` for possible values. See [Country](#type-country) for possible values | [optional] **language_code** | **String** | The language associated with the location in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). | [optional] -**currency** | **String** | The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values | [optional] +**currency** | **String** | The currency used for all transactions at this location, in ISO 4217 format. See `Currency` for possible values. See [Currency](#type-currency) for possible values | [optional] **phone_number** | **String** | The location's phone_number. | [optional] **business_name** | **String** | The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts. | [optional] **type** | **String** | 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] @@ -31,6 +31,6 @@ Name | Type | Description | Notes **coordinates** | [**Coordinates**](Coordinates.md) | The physical coordinates (latitude and longitude) of the location. | [optional] **logo_url** | **String** | The logo image URL of the location. | [optional] **pos_background_url** | **String** | The Point of Sale background image URL of the location. | [optional] -**mcc** | **String** | The merchant category code (MCC) of the location, as standardized by ISO 18245. The MCC describes the kind of goods or services sold at the location. | [optional] +**mcc** | **String** | The merchant category code (MCC) of the location, as standardized by ISO 18245. The MCC describes the kind of goods or services sold at the location. | [optional] [beta] diff --git a/docs/LocationsApi.md b/docs/LocationsApi.md index 2795e4c..a7f6540 100644 --- a/docs/LocationsApi.md +++ b/docs/LocationsApi.md @@ -53,6 +53,7 @@ This endpoint does not need any parameter. # **retrieveLocation** +**Note: This endpoint is in beta.** > RetrieveLocationResponse retrieveLocation(locationId) RetrieveLocation @@ -101,6 +102,7 @@ Name | Type | Description | Notes # **updateLocation** +**Note: This endpoint is in beta.** > UpdateLocationResponse updateLocation(locationId, body) UpdateLocation diff --git a/docs/MeasurementUnit.md b/docs/MeasurementUnit.md index 1e15463..259b0c6 100644 --- a/docs/MeasurementUnit.md +++ b/docs/MeasurementUnit.md @@ -1,6 +1,7 @@ # SquareConnect.MeasurementUnit ### Description +**Note: This model is in beta.** Represents a unit of measurement to use with a quantity, such as ounces or inches. Exactly one of the following fields are required: `custom_unit`, `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. diff --git a/docs/MeasurementUnitCustom.md b/docs/MeasurementUnitCustom.md index 7edae90..12dc32d 100644 --- a/docs/MeasurementUnitCustom.md +++ b/docs/MeasurementUnitCustom.md @@ -1,6 +1,7 @@ # SquareConnect.MeasurementUnitCustom ### Description +**Note: This model is in beta.** The information needed to define a custom unit, provided by the seller. diff --git a/docs/MerchantsApi.md b/docs/MerchantsApi.md index ac65f2e..91f1ef1 100644 --- a/docs/MerchantsApi.md +++ b/docs/MerchantsApi.md @@ -4,9 +4,59 @@ All URIs are relative to *https://connect.squareup.com* Method | HTTP request | Description ------------- | ------------- | ------------- +[**listMerchants**](MerchantsApi.md#listMerchants) | **GET** /v2/merchants | ListMerchants [**retrieveMerchant**](MerchantsApi.md#retrieveMerchant) | **GET** /v2/merchants/{merchant_id} | RetrieveMerchant + +# **listMerchants** +> ListMerchantsResponse listMerchants(opts) + +ListMerchants + +Returns `Merchant` information for a given access token. If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information. + +### Example +```javascript +var SquareConnect = require('square-connect'); +var defaultClient = SquareConnect.ApiClient.instance; + +// Configure OAuth2 access token for authorization: oauth2 +var oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new SquareConnect.MerchantsApi(); + +var opts = { + 'cursor': 56 // Number | The cursor generated by the previous response. +}; +apiInstance.listMerchants(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **Number**| The cursor generated by the previous response. | [optional] + +### Return type + +[**ListMerchantsResponse**](ListMerchantsResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **retrieveMerchant** > RetrieveMerchantResponse retrieveMerchant(merchantId) @@ -26,7 +76,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.MerchantsApi(); -var merchantId = "merchantId_example"; // String | The ID of the merchant to retrieve +var merchantId = "merchantId_example"; // String | The ID of the merchant to retrieve. apiInstance.retrieveMerchant(merchantId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -40,7 +90,7 @@ apiInstance.retrieveMerchant(merchantId).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **merchantId** | **String**| The ID of the merchant to retrieve | + **merchantId** | **String**| The ID of the merchant to retrieve. | ### Return type diff --git a/docs/Order.md b/docs/Order.md index 7c6aa4c..90c8b40 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -11,24 +11,24 @@ Name | Type | Description | Notes **location_id** | **String** | The ID of the merchant location this order is associated with. | **reference_id** | **String** | 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] -**customer_id** | **String** | The `Customer` ID of the customer associated with the order. | [optional] +**customer_id** | **String** | The `Customer` ID of the customer associated with the order. | [optional] [beta] **line_items** | [**[OrderLineItem]**](OrderLineItem.md) | The line items included in the order. | [optional] **taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead. | [optional] **discounts** | [**[OrderLineItemDiscount]**](OrderLineItemDiscount.md) | The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead. | [optional] **service_charges** | [**[OrderServiceCharge]**](OrderServiceCharge.md) | A list of service charges applied to the order. | [optional] **fulfillments** | [**[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** | [**[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] +**returns** | [**[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] [beta] **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] -**tenders** | [**[Tender]**](Tender.md) | The Tenders which were used to pay for the Order. | [optional] -**refunds** | [**[Refund]**](Refund.md) | The Refunds that are part of this Order. | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**tenders** | [**[Tender]**](Tender.md) | The Tenders which were used to pay for the Order. | [optional] [beta] +**refunds** | [**[Refund]**](Refund.md) | The Refunds that are part of this Order. | [optional] [beta] +**metadata** | **{String: String}** | Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **created_at** | **String** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **updated_at** | **String** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **closed_at** | **String** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **state** | **String** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional] -**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). | [optional] +**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). | [optional] [beta] **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] diff --git a/docs/OrderEntry.md b/docs/OrderEntry.md index 72899ee..40a578b 100644 --- a/docs/OrderEntry.md +++ b/docs/OrderEntry.md @@ -8,7 +8,7 @@ A lightweight description of an [Order](#type-order) that is returned when `retu Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order_id** | **String** | The id of the Order | [optional] -**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). | [optional] +**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). | [optional] [beta] **location_id** | **String** | The location id the Order belongs to. | [optional] diff --git a/docs/OrderFulfillment.md b/docs/OrderFulfillment.md index 9af4b2a..53710a8 100644 --- a/docs/OrderFulfillment.md +++ b/docs/OrderFulfillment.md @@ -7,10 +7,10 @@ Contains details on how to fulfill this order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the fulfillment only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the fulfillment only within this order. | [optional] [beta] **type** | **String** | The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values | [optional] **state** | **String** | The state of the fulfillment. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this fulfillment. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**metadata** | **{String: String}** | Application-defined data attached to this fulfillment. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **pickup_details** | [**OrderFulfillmentPickupDetails**](OrderFulfillmentPickupDetails.md) | Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`. | [optional] **shipment_details** | [**OrderFulfillmentShipmentDetails**](OrderFulfillmentShipmentDetails.md) | Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed. | [optional] diff --git a/docs/OrderFulfillmentShipmentDetails.md b/docs/OrderFulfillmentShipmentDetails.md index 649dc20..5a92124 100644 --- a/docs/OrderFulfillmentShipmentDetails.md +++ b/docs/OrderFulfillmentShipmentDetails.md @@ -1,6 +1,7 @@ # SquareConnect.OrderFulfillmentShipmentDetails ### Description +**Note: This model is in beta.** Contains details necessary to fulfill a shipment order. diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md index 64ea983..9766fe4 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -7,19 +7,19 @@ Represents a line item in an order. Each line item describes a different product ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the line item only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the line item only within this order. | [optional] [beta] **name** | **String** | The name of the line item. | [optional] **quantity** | **String** | 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\"`. | **quantity_unit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional] **note** | **String** | The note of the line item. | [optional] **catalog_object_id** | **String** | The `CatalogItemVariation` id applied to this line item. | [optional] **variation_name** | **String** | The name of the variation applied to this line item. | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**metadata** | **{String: String}** | Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **modifiers** | [**[OrderLineItemModifier]**](OrderLineItemModifier.md) | The `CatalogModifier`s applied to this line item. | [optional] -**taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] -**discounts** | [**[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. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] -**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax. | [optional] -**applied_discounts** | [**[OrderLineItemAppliedDiscount]**](OrderLineItemAppliedDiscount.md) | The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount. | [optional] +**taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] [deprecated] +**discounts** | [**[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. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] [deprecated] +**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax. | [optional] [beta] +**applied_discounts** | [**[OrderLineItemAppliedDiscount]**](OrderLineItemAppliedDiscount.md) | The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount. | [optional] [beta] **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] diff --git a/docs/OrderLineItemAppliedDiscount.md b/docs/OrderLineItemAppliedDiscount.md index 2b8240b..d19dded 100644 --- a/docs/OrderLineItemAppliedDiscount.md +++ b/docs/OrderLineItemAppliedDiscount.md @@ -1,6 +1,7 @@ # SquareConnect.OrderLineItemAppliedDiscount ### Description +**Note: This model is in beta.** Represents an applied portion of a discount to a line item in an order. Order scoped discounts will automatically have applied discounts present for each line item. Line item scoped discounts must have applied discounts added manually for any applicable line items. The corresponding applied money will automatically be computed based on participating line items. diff --git a/docs/OrderLineItemAppliedTax.md b/docs/OrderLineItemAppliedTax.md index 9be2648..226f2ff 100644 --- a/docs/OrderLineItemAppliedTax.md +++ b/docs/OrderLineItemAppliedTax.md @@ -1,6 +1,7 @@ # SquareConnect.OrderLineItemAppliedTax ### Description +**Note: This model is in beta.** Represents an applied portion of a tax to a line item in an order. Order-scoped taxes automatically include the applied taxes in each line item. Line item taxes must be referenced from any applicable line items. The corresponding applied money is automatically computed, based on the set of participating line items. diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index a54a6d8..ec4837d 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -7,14 +7,14 @@ Represents a discount that applies to one or more line items in an order. Fixed ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the discount only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the discount only within this order. | [optional] [beta] **catalog_object_id** | **String** | The catalog object id referencing `CatalogDiscount`. | [optional] **name** | **String** | The discount's name. | [optional] **type** | **String** | The type of the discount. Discounts that don't reference a catalog object ID must have a type of `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional] **percentage** | **String** | The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. `percentage` is not set for amount-based discounts. | [optional] **amount_money** | [**Money**](Money.md) | The total declared monetary amount of the discount. `amount_money` is not set for percentage-based discounts. | [optional] **applied_money** | [**Money**](Money.md) | The amount of discount actually applied to the line item. Represents the amount of money applied as a line item-scoped discount. When an amount-based discount is scoped to the entire order, the value of `applied_money` is different from `amount_money` because the total amount of the discount is distributed across all line items. | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this discount. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**metadata** | **{String: String}** | Application-defined data attached to this discount. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **scope** | **String** | Indicates the level at which the discount applies. For `ORDER` scoped discounts, Square generates references in `applied_discounts` on all order line items that do not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items with a discount reference in their `applied_discounts` field. This field is immutable. To change the scope of a discount you must delete the discount and re-add it as a new discount. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional] diff --git a/docs/OrderLineItemModifier.md b/docs/OrderLineItemModifier.md index bcb34c3..534cbf5 100644 --- a/docs/OrderLineItemModifier.md +++ b/docs/OrderLineItemModifier.md @@ -7,7 +7,7 @@ A [CatalogModifier](#type-catalogmodifier). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the modifier only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the modifier only within this order. | [optional] [beta] **catalog_object_id** | **String** | The catalog object id referencing `CatalogModifier`. | [optional] **name** | **String** | 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` price. | [optional] diff --git a/docs/OrderLineItemTax.md b/docs/OrderLineItemTax.md index 4aea5e5..4685bd3 100644 --- a/docs/OrderLineItemTax.md +++ b/docs/OrderLineItemTax.md @@ -7,12 +7,12 @@ Represents a tax that applies to one or more line item in the order. Fixed-amou ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the tax only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the tax only within this order. | [optional] [beta] **catalog_object_id** | **String** | The catalog object id referencing `CatalogTax`. | [optional] **name** | **String** | The tax's name. | [optional] **type** | **String** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] **percentage** | **String** | The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this tax. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**metadata** | **{String: String}** | Application-defined data attached to this tax. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **applied_money** | [**Money**](Money.md) | The amount of the money applied by the tax in the order. | [optional] **scope** | **String** | Indicates the level at which the tax applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all order line items that do not have them. For `LINE_ITEM` scoped taxes, the tax will only apply to line items with references in their `applied_taxes` field. This field is immutable. To change the scope, you must delete the tax and re-add it as a new tax. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values | [optional] diff --git a/docs/OrderMoneyAmounts.md b/docs/OrderMoneyAmounts.md index 5bb2fc3..ff786ee 100644 --- a/docs/OrderMoneyAmounts.md +++ b/docs/OrderMoneyAmounts.md @@ -1,6 +1,7 @@ # SquareConnect.OrderMoneyAmounts ### Description +**Note: This model is in beta.** A collection of various money amounts. diff --git a/docs/OrderReturn.md b/docs/OrderReturn.md index 79d6943..2e5967b 100644 --- a/docs/OrderReturn.md +++ b/docs/OrderReturn.md @@ -1,6 +1,7 @@ # SquareConnect.OrderReturn ### Description +**Note: This model is in beta.** The set of line items, service charges, taxes, discounts, tips, etc. being returned in an Order. diff --git a/docs/OrderReturnDiscount.md b/docs/OrderReturnDiscount.md index 46d70a6..1825950 100644 --- a/docs/OrderReturnDiscount.md +++ b/docs/OrderReturnDiscount.md @@ -1,6 +1,7 @@ # SquareConnect.OrderReturnDiscount ### Description +**Note: This model is in beta.** Represents a discount being returned that applies to one or more return line items in an order. Fixed-amount, order-scoped discounts are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal. diff --git a/docs/OrderReturnLineItem.md b/docs/OrderReturnLineItem.md index 8e08267..ca8ac58 100644 --- a/docs/OrderReturnLineItem.md +++ b/docs/OrderReturnLineItem.md @@ -1,6 +1,7 @@ # SquareConnect.OrderReturnLineItem ### Description +**Note: This model is in beta.** The line item being returned in an Order. @@ -16,8 +17,8 @@ Name | Type | Description | Notes **catalog_object_id** | **String** | The `CatalogItemVariation` id applied to this returned line item. | [optional] **variation_name** | **String** | The name of the variation applied to this returned line item. | [optional] **return_modifiers** | [**[OrderReturnLineItemModifier]**](OrderReturnLineItemModifier.md) | The `CatalogModifier`s applied to this line item. | [optional] -**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional] -**return_discounts** | [**[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. This field has been deprecated in favour of `applied_discounts`. | [optional] +**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional] [deprecated] +**return_discounts** | [**[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. This field has been deprecated in favour of `applied_discounts`. | [optional] [deprecated] **applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to `OrderReturnTax` entities applied to the returned line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` applied to the returned line item. On reads, the amount applied is populated. | [optional] **applied_discounts** | [**[OrderLineItemAppliedDiscount]**](OrderLineItemAppliedDiscount.md) | The list of references to `OrderReturnDiscount` entities applied to the returned line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderReturnDiscount` applied to the returned line item. On reads, the amount applied is populated. | [optional] **base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] diff --git a/docs/OrderReturnLineItemModifier.md b/docs/OrderReturnLineItemModifier.md index d49c3f3..3a3d051 100644 --- a/docs/OrderReturnLineItemModifier.md +++ b/docs/OrderReturnLineItemModifier.md @@ -1,6 +1,7 @@ # SquareConnect.OrderReturnLineItemModifier ### Description +**Note: This model is in beta.** A line item modifier being returned. diff --git a/docs/OrderReturnServiceCharge.md b/docs/OrderReturnServiceCharge.md index f26d563..a72cabc 100644 --- a/docs/OrderReturnServiceCharge.md +++ b/docs/OrderReturnServiceCharge.md @@ -7,7 +7,7 @@ Represents the service charge applied to the original order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the return service charge only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the return service charge only within this order. | [optional] [beta] **source_service_charge_uid** | **String** | `uid` of the Service Charge from the Order containing the original charge of the service charge. `source_service_charge_uid` is `null` for unlinked returns. | [optional] **name** | **String** | The name of the service charge. | [optional] **catalog_object_id** | **String** | The catalog object ID of the associated `CatalogServiceCharge`. | [optional] @@ -18,7 +18,7 @@ Name | Type | Description | Notes **total_tax_money** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. | [optional] **calculation_phase** | **String** | The calculation phase after which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] **taxable** | **Boolean** | Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] -**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | Taxes applied to the `OrderReturnServiceCharge`. By default, return-level taxes apply to `OrderReturnServiceCharge`s calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional] -**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to `OrderReturnTax` entities applied to the `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` that is being applied to the `OrderReturnServiceCharge`. On reads, the amount applied is populated. | [optional] +**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | Taxes applied to the `OrderReturnServiceCharge`. By default, return-level taxes apply to `OrderReturnServiceCharge`s calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional] [deprecated] +**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to `OrderReturnTax` entities applied to the `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` that is being applied to the `OrderReturnServiceCharge`. On reads, the amount applied is populated. | [optional] [beta] diff --git a/docs/OrderReturnTax.md b/docs/OrderReturnTax.md index 417cab9..a3bb748 100644 --- a/docs/OrderReturnTax.md +++ b/docs/OrderReturnTax.md @@ -1,6 +1,7 @@ # SquareConnect.OrderReturnTax ### Description +**Note: This model is in beta.** Represents a tax being returned that applies to one or more return line items in an order. Fixed-amount, order-scoped taxes are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal. diff --git a/docs/OrderRoundingAdjustment.md b/docs/OrderRoundingAdjustment.md index 6f81559..666b655 100644 --- a/docs/OrderRoundingAdjustment.md +++ b/docs/OrderRoundingAdjustment.md @@ -1,6 +1,7 @@ # SquareConnect.OrderRoundingAdjustment ### Description +**Note: This model is in beta.** A rounding adjustment of the money being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. diff --git a/docs/OrderServiceCharge.md b/docs/OrderServiceCharge.md index f3ebc4b..01d2e9f 100644 --- a/docs/OrderServiceCharge.md +++ b/docs/OrderServiceCharge.md @@ -7,7 +7,7 @@ Represents a service charge applied to an order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | Unique ID that identifies the service charge only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the service charge only within this order. | [optional] [beta] **name** | **String** | The name of the service charge. | [optional] **catalog_object_id** | **String** | The catalog object ID referencing the service charge `CatalogObject`. | [optional] **percentage** | **String** | The service charge percentage as a string representation of a decimal number. For example, `\"7.25\"` indicates a service charge of 7.25%. Exactly 1 of `percentage` or `amount_money` should be set. | [optional] @@ -17,8 +17,8 @@ Name | Type | Description | Notes **total_tax_money** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. | [optional] **calculation_phase** | **String** | The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] **taxable** | **Boolean** | Indicates whether the service charge can be taxed. If set to `true`, order-level taxes automatically apply to the service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] -**taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this service charge. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this service charge. When creating an Order, set your service charge-level taxes in this list. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] -**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this service charge. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable service charge. Taxable service charges have the `taxable` field set to true and calculated in the `SUBTOTAL_PHASE`. To change the amount of a tax, modify the referenced top-level tax. | [optional] -**metadata** | **{String: String}** | Application-defined data attached to this service charge. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] +**taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this service charge. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this service charge. When creating an Order, set your service charge-level taxes in this list. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional] [deprecated] +**applied_taxes** | [**[OrderLineItemAppliedTax]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this service charge. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable service charge. Taxable service charges have the `taxable` field set to true and calculated in the `SUBTOTAL_PHASE`. To change the amount of a tax, modify the referenced top-level tax. | [optional] [beta] +**metadata** | **{String: String}** | Application-defined data attached to this service charge. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index 98648cc..0ac2096 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -115,6 +115,7 @@ Name | Type | Description | Notes # **payOrder** +**Note: This endpoint is in beta.** > PayOrderResponse payOrder(orderId, body) PayOrder @@ -214,6 +215,7 @@ Name | Type | Description | Notes # **updateOrder** +**Note: This endpoint is in beta.** > UpdateOrderResponse updateOrder(locationId, orderId, body) UpdateOrder diff --git a/docs/PayOrderRequest.md b/docs/PayOrderRequest.md index ecd74b2..8f51220 100644 --- a/docs/PayOrderRequest.md +++ b/docs/PayOrderRequest.md @@ -1,6 +1,7 @@ # SquareConnect.PayOrderRequest ### Description +**Note: This model is in beta.** Defines the fields that are included in requests to the [PayOrder](#endpoint-payorder) endpoint. diff --git a/docs/PayOrderResponse.md b/docs/PayOrderResponse.md index cfab821..33ada33 100644 --- a/docs/PayOrderResponse.md +++ b/docs/PayOrderResponse.md @@ -1,6 +1,7 @@ # SquareConnect.PayOrderResponse ### Description +**Note: This model is in beta.** Defines the fields that are included in the response body of a request to the [PayOrder](#endpoint-payorder) endpoint. diff --git a/docs/RenewTokenRequest.md b/docs/RenewTokenRequest.md index d41839f..c04bb6c 100644 --- a/docs/RenewTokenRequest.md +++ b/docs/RenewTokenRequest.md @@ -1,6 +1,7 @@ # SquareConnect.RenewTokenRequest ### Description +**Note: This model is deprecated.** diff --git a/docs/RenewTokenResponse.md b/docs/RenewTokenResponse.md index 66ed7b3..bcdd66f 100644 --- a/docs/RenewTokenResponse.md +++ b/docs/RenewTokenResponse.md @@ -1,6 +1,7 @@ # SquareConnect.RenewTokenResponse ### Description +**Note: This model is deprecated.** diff --git a/docs/RetrieveTransactionRequest.md b/docs/RetrieveTransactionRequest.md index a1634f5..b1325ab 100644 --- a/docs/RetrieveTransactionRequest.md +++ b/docs/RetrieveTransactionRequest.md @@ -1,6 +1,7 @@ # SquareConnect.RetrieveTransactionRequest ### Description +**Note: This model is deprecated.** Defines the request body fields for calls to the RetrieveTransaction endpoint. diff --git a/docs/RetrieveTransactionResponse.md b/docs/RetrieveTransactionResponse.md index b5e3c8d..257051b 100644 --- a/docs/RetrieveTransactionResponse.md +++ b/docs/RetrieveTransactionResponse.md @@ -1,6 +1,7 @@ # SquareConnect.RetrieveTransactionResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [RetrieveTransaction](#endpont-retrievetransaction) endpoint. One of `errors` or `transaction` is present in a given response (never both). diff --git a/docs/SearchCatalogObjectsResponse.md b/docs/SearchCatalogObjectsResponse.md index 9adb3a3..3d59053 100644 --- a/docs/SearchCatalogObjectsResponse.md +++ b/docs/SearchCatalogObjectsResponse.md @@ -11,6 +11,6 @@ Name | Type | Description | Notes **cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] **objects** | [**[CatalogObject]**](CatalogObject.md) | The `CatalogObject`s returned. | [optional] **related_objects** | [**[CatalogObject]**](CatalogObject.md) | A list of `CatalogObject`s referenced by the objects in the `objects` field. | [optional] -**latest_time** | **String** | When this merchant's catalog was last updated. Will match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. | [optional] +**latest_time** | **String** | When the associated product catalog was last updated. Will match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. | [optional] [beta] diff --git a/docs/SearchOrdersCustomerFilter.md b/docs/SearchOrdersCustomerFilter.md index ff157ad..1257902 100644 --- a/docs/SearchOrdersCustomerFilter.md +++ b/docs/SearchOrdersCustomerFilter.md @@ -1,6 +1,7 @@ # SquareConnect.SearchOrdersCustomerFilter ### Description +**Note: This model is in beta.** Filter based on Order `customer_id` and any Tender `customer_id` associated with the Order. Does not filter based on the [FulfillmentRecipient](#type-orderfulfillmentrecipient) `customer_id`. diff --git a/docs/Transaction.md b/docs/Transaction.md index 43dc531..bf06777 100644 --- a/docs/Transaction.md +++ b/docs/Transaction.md @@ -1,6 +1,7 @@ # SquareConnect.Transaction ### Description +**Note: This model is deprecated.** Represents a transaction processed with Square, either with the Connect API or with Square Point of Sale. The `tenders` field of this object lists all methods of payment used to pay in the transaction. diff --git a/docs/UpdateLocationRequest.md b/docs/UpdateLocationRequest.md index fa51b42..119bea3 100644 --- a/docs/UpdateLocationRequest.md +++ b/docs/UpdateLocationRequest.md @@ -1,6 +1,7 @@ # SquareConnect.UpdateLocationRequest ### Description +**Note: This model is in beta.** Request object for the [UpdateLocation](#endpoint-updatelocation) endpoint. diff --git a/docs/UpdateLocationResponse.md b/docs/UpdateLocationResponse.md index c3d64a3..7a92358 100644 --- a/docs/UpdateLocationResponse.md +++ b/docs/UpdateLocationResponse.md @@ -1,6 +1,7 @@ # SquareConnect.UpdateLocationResponse ### Description +**Note: This model is in beta.** Response object returned by the [UpdateLocation](#endpoint-updatelocation) endpoint. diff --git a/docs/UpdateOrderRequest.md b/docs/UpdateOrderRequest.md index 8168cee..36ece37 100644 --- a/docs/UpdateOrderRequest.md +++ b/docs/UpdateOrderRequest.md @@ -1,6 +1,7 @@ # SquareConnect.UpdateOrderRequest ### Description +**Note: This model is in beta.** Defines the fields that are included in requests to the [UpdateOrder](#endpoint-orders-updateorder) endpoint. diff --git a/docs/UpdateOrderResponse.md b/docs/UpdateOrderResponse.md index e413d2a..38caa2d 100644 --- a/docs/UpdateOrderResponse.md +++ b/docs/UpdateOrderResponse.md @@ -1,6 +1,7 @@ # SquareConnect.UpdateOrderResponse ### Description +**Note: This model is in beta.** Defines the fields that are included in the response body of a request to the [UpdateOrder](#endpoint-orders-updateorder) endpoint. diff --git a/docs/VoidTransactionRequest.md b/docs/VoidTransactionRequest.md index 1846d54..a696a84 100644 --- a/docs/VoidTransactionRequest.md +++ b/docs/VoidTransactionRequest.md @@ -1,6 +1,7 @@ # SquareConnect.VoidTransactionRequest ### Description +**Note: This model is deprecated.** Defines the request body for calls to the VoidTransaction endpoint. diff --git a/docs/VoidTransactionResponse.md b/docs/VoidTransactionResponse.md index b129667..79dae37 100644 --- a/docs/VoidTransactionResponse.md +++ b/docs/VoidTransactionResponse.md @@ -1,6 +1,7 @@ # SquareConnect.VoidTransactionResponse ### Description +**Note: This model is deprecated.** Defines the fields that are included in the response body of a request to the [VoidTransaction](#endpoint-voidtransaction) endpoint. diff --git a/docs/WebhookEvents.md b/docs/WebhookEvents.md index 37a1a2a..1b823df 100644 --- a/docs/WebhookEvents.md +++ b/docs/WebhookEvents.md @@ -3,6 +3,8 @@ ## Enum -* `updated` (value: `"inventory.count.updated"`) +* `inventory.count.updated` (value: `"inventory.count.updated"`) + +* `catalog.version.updated` (value: `"catalog.version.updated"`) diff --git a/package.json b/package.json index 135f707..50eee11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "2.20190925.0", + "version": "2.20191023.0", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index 8d4bbf0..8bfdeda 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -13,10 +13,11 @@ */ var superagent = require('superagent'); var querystring = require('querystring'); +var HeaderUtils = require('./lib/HeaderUtils'); /** * @module ApiClient - * @version 2.20190925.0 + * @version 2.20191023.0 */ /** @@ -48,7 +49,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/2.20190925.0' + 'User-Agent': 'Square-Connect-Javascript/2.20191023.0' }; /** * The default HTTP timeout for all API calls. @@ -377,7 +378,7 @@ exports.prototype.callApi = function callApi(path, httpMethod, pathParams, if(contentType != 'multipart/form-data') { request.type(contentType); } - } else if (!request.header['Content-Type']) { + } else if (!HeaderUtils.caseInsensitiveGet(request.header, 'content-type')) { request.type('application/json'); } diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js index 09a7e35..034e93e 100644 --- a/src/api/ApplePayApi.js +++ b/src/api/ApplePayApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js index 319f907..0039c1a 100644 --- a/src/api/CatalogApi.js +++ b/src/api/CatalogApi.js @@ -69,7 +69,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -173,7 +173,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -271,7 +271,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -304,7 +304,7 @@ module.exports = function(apiClient) { /** * 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`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. + * 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`, `IMAGE`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. * @param {Object} opts Optional parameters * @param {String} opts.cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the `CatalogObjectType` enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. @@ -323,7 +323,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -342,7 +342,7 @@ module.exports = function(apiClient) { /** * 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`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. + * 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`, `IMAGE`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. * @param {Object} opts Optional parameters * @param {String} opts.cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the `CatalogObjectType` enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. @@ -382,7 +382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -436,7 +436,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -488,7 +488,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -540,7 +540,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -592,7 +592,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js index e47d9e8..57f3c40 100644 --- a/src/api/CheckoutApi.js +++ b/src/api/CheckoutApi.js @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 33df547..c84874e 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -63,7 +63,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -122,7 +122,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -236,7 +236,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -291,7 +291,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -347,7 +347,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -399,7 +399,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -458,7 +458,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js index ece2799..4b01330 100644 --- a/src/api/EmployeesApi.js +++ b/src/api/EmployeesApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -114,7 +114,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js index 282cdd0..150db57 100644 --- a/src/api/InventoryApi.js +++ b/src/api/InventoryApi.js @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -218,7 +218,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -277,7 +277,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -395,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js index a03a4b9..9e35b69 100644 --- a/src/api/LaborApi.js +++ b/src/api/LaborApi.js @@ -71,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -229,7 +229,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -282,7 +282,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -335,7 +335,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -388,7 +388,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -442,7 +442,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -499,7 +499,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -554,7 +554,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -608,7 +608,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -667,7 +667,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -727,7 +727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -787,7 +787,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js index 1ce6ab0..e4e661d 100644 --- a/src/api/LocationsApi.js +++ b/src/api/LocationsApi.js @@ -49,7 +49,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -81,6 +81,7 @@ module.exports = function(apiClient) { /** * RetrieveLocation + * Note: This endpoint is in beta. * Retrieves details of a location. * @param {String} locationId The ID of the location to retrieve. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveLocationResponse} and HTTP response @@ -101,7 +102,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -134,6 +135,7 @@ module.exports = function(apiClient) { /** * UpdateLocation + * Note: This endpoint is in beta. * Updates the `Location` specified by the given ID. * @param {String} locationId The ID of the location to update. * @param {module:model/UpdateLocationRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. @@ -160,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/MerchantsApi.js b/src/api/MerchantsApi.js index baa0c44..7985032 100644 --- a/src/api/MerchantsApi.js +++ b/src/api/MerchantsApi.js @@ -12,6 +12,7 @@ * */ var ApiClient = require('../ApiClient'); +var ListMerchantsResponse = require('../model/ListMerchantsResponse'); var RetrieveMerchantResponse = require('../model/RetrieveMerchantResponse'); /** @@ -20,7 +21,7 @@ var RetrieveMerchantResponse = require('../model/RetrieveMerchantResponse'); */ /** - * Constructs a new MerchantsApi. + * Constructs a new MerchantsApi. * @alias module:api/MerchantsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -31,10 +32,61 @@ module.exports = function(apiClient) { + /** + * ListMerchants + * Returns `Merchant` information for a given access token. If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information. + * @param {Object} opts Optional parameters + * @param {Number} opts.cursor The cursor generated by the previous response. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchantsResponse} and HTTP response + */ + this.listMerchantsWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'cursor': opts['cursor'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2019-10-23'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ListMerchantsResponse; + + return this.apiClient.callApi( + '/v2/merchants', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * ListMerchants + * Returns `Merchant` information for a given access token. If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information. + * @param {Object} opts Optional parameters + * @param {Number} opts.cursor The cursor generated by the previous response. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchantsResponse} + */ + this.listMerchants = function(opts) { + return this.listMerchantsWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * RetrieveMerchant * Retrieve a `Merchant` object for the given `merchant_id`. - * @param {String} merchantId The ID of the merchant to retrieve + * @param {String} merchantId The ID of the merchant to retrieve. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveMerchantResponse} and HTTP response */ this.retrieveMerchantWithHttpInfo = function(merchantId) { @@ -53,7 +105,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -73,7 +125,7 @@ module.exports = function(apiClient) { /** * RetrieveMerchant * Retrieve a `Merchant` object for the given `merchant_id`. - * @param {String} merchantId The ID of the merchant to retrieve + * @param {String} merchantId The ID of the merchant to retrieve. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveMerchantResponse} */ this.retrieveMerchant = function(merchantId) { diff --git a/src/api/MobileAuthorizationApi.js b/src/api/MobileAuthorizationApi.js index 7f74b2d..b7add52 100644 --- a/src/api/MobileAuthorizationApi.js +++ b/src/api/MobileAuthorizationApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index 2a7139f..e947234 100644 --- a/src/api/OAuthApi.js +++ b/src/api/OAuthApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -97,7 +97,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RenewTokenResponse} and HTTP response */ this.renewTokenWithHttpInfo = function(clientId, body) { - console.warn("Calling deprecated API: OAuthApi.renewToken"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: OAuthApi.renewToken"); var postBody = body; // verify the required parameter 'clientId' is set @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -171,7 +171,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js index 470368e..f0c98ef 100644 --- a/src/api/OrdersApi.js +++ b/src/api/OrdersApi.js @@ -68,7 +68,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -128,7 +128,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -162,6 +162,7 @@ module.exports = function(apiClient) { /** * PayOrder + * Note: This endpoint is in beta. * Pay for an [order](#type-order) using one or more approved [payments](#type-payment), or settle an order with a total of `0`. The total of the `payment_ids` listed in the request must be equal to the order total. Orders with a total amount of `0` can be marked as paid by specifying an empty array of `payment_ids` in the request. To be used with PayOrder, a payment must: - Reference the order by specifying the `order_id` when [creating the payment](#endpoint-payments-createpayment). Any approved payments that reference the same `order_id` not specified in the `payment_ids` will be canceled. - Be approved with [delayed capture](/payments-api/take-payments#delayed-capture). Using a delayed capture payment with PayOrder will complete the approved payment. Learn how to [pay for orders with a single payment using the Payments API](/orders-api/pay-for-orders). * @param {String} orderId The ID of the order being paid. * @param {module:model/PayOrderRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. @@ -188,7 +189,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -241,7 +242,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -274,6 +275,7 @@ module.exports = function(apiClient) { /** * UpdateOrder + * Note: This endpoint is in beta. * Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated. An UpdateOrder request requires the following: - The `order_id` in the endpoint path, identifying the order to update. - The latest `version` of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does). * @param {String} locationId The ID of the order's associated location. * @param {String} orderId The ID of the order to update. @@ -307,7 +309,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/PaymentsApi.js b/src/api/PaymentsApi.js index 05434d3..4305262 100644 --- a/src/api/PaymentsApi.js +++ b/src/api/PaymentsApi.js @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -112,7 +112,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -217,7 +217,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -270,7 +270,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -334,7 +334,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/RefundsApi.js b/src/api/RefundsApi.js index 8331a11..f6b5ddb 100644 --- a/src/api/RefundsApi.js +++ b/src/api/RefundsApi.js @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/ReportingApi.js b/src/api/ReportingApi.js index ecfb331..5754b3f 100644 --- a/src/api/ReportingApi.js +++ b/src/api/ReportingApi.js @@ -45,7 +45,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAdditionalRecipientReceivableRefundsResponse} and HTTP response */ this.listAdditionalRecipientReceivableRefundsWithHttpInfo = function(locationId, opts) { - console.warn("Calling deprecated API: ReportingApi.listAdditionalRecipientReceivableRefunds"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: ReportingApi.listAdditionalRecipientReceivableRefunds"); opts = opts || {}; var postBody = null; @@ -66,7 +66,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -115,7 +115,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAdditionalRecipientReceivablesResponse} and HTTP response */ this.listAdditionalRecipientReceivablesWithHttpInfo = function(locationId, opts) { - console.warn("Calling deprecated API: ReportingApi.listAdditionalRecipientReceivables"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: ReportingApi.listAdditionalRecipientReceivables"); opts = opts || {}; var postBody = null; @@ -136,7 +136,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index 67e06ad..3ccc831 100644 --- a/src/api/TransactionsApi.js +++ b/src/api/TransactionsApi.js @@ -48,7 +48,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CaptureTransactionResponse} and HTTP response */ this.captureTransactionWithHttpInfo = function(locationId, transactionId) { - console.warn("Calling deprecated API: TransactionsApi.captureTransaction"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.captureTransaction"); var postBody = null; // verify the required parameter 'locationId' is set @@ -70,7 +70,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -111,7 +111,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChargeResponse} and HTTP response */ this.chargeWithHttpInfo = function(locationId, body) { - console.warn("Calling deprecated API: TransactionsApi.charge"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.charge"); var postBody = body; // verify the required parameter 'locationId' is set @@ -132,7 +132,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -174,7 +174,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateRefundResponse} and HTTP response */ this.createRefundWithHttpInfo = function(locationId, transactionId, body) { - console.warn("Calling deprecated API: TransactionsApi.createRefund"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.createRefund"); var postBody = body; // verify the required parameter 'locationId' is set @@ -201,7 +201,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -247,7 +247,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListRefundsResponse} and HTTP response */ this.listRefundsWithHttpInfo = function(locationId, opts) { - console.warn("Calling deprecated API: TransactionsApi.listRefunds"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.listRefunds"); opts = opts || {}; var postBody = null; @@ -268,7 +268,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -317,7 +317,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTransactionsResponse} and HTTP response */ this.listTransactionsWithHttpInfo = function(locationId, opts) { - console.warn("Calling deprecated API: TransactionsApi.listTransactions"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.listTransactions"); opts = opts || {}; var postBody = null; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -383,7 +383,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveTransactionResponse} and HTTP response */ this.retrieveTransactionWithHttpInfo = function(locationId, transactionId) { - console.warn("Calling deprecated API: TransactionsApi.retrieveTransaction"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.retrieveTransaction"); var postBody = null; // verify the required parameter 'locationId' is set @@ -405,7 +405,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -446,7 +446,7 @@ module.exports = function(apiClient) { * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VoidTransactionResponse} and HTTP response */ this.voidTransactionWithHttpInfo = function(locationId, transactionId) { - console.warn("Calling deprecated API: TransactionsApi.voidTransaction"); + console.warn("\x1b[33m%s\x1b[0m","Calling deprecated API: TransactionsApi.voidTransaction"); var postBody = null; // verify the required parameter 'locationId' is set @@ -468,7 +468,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js index 7b6f40f..470d16b 100644 --- a/src/api/V1EmployeesApi.js +++ b/src/api/V1EmployeesApi.js @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -160,7 +160,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -213,7 +213,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -274,7 +274,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -332,7 +332,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -401,7 +401,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -463,7 +463,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -533,7 +533,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -604,7 +604,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -658,7 +658,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -711,7 +711,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -764,7 +764,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -823,7 +823,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -883,7 +883,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -943,7 +943,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js index 0f1ecb1..d15c853 100644 --- a/src/api/V1ItemsApi.js +++ b/src/api/V1ItemsApi.js @@ -77,7 +77,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -146,7 +146,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -215,7 +215,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -276,7 +276,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -336,7 +336,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -396,7 +396,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -456,7 +456,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -516,7 +516,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -583,7 +583,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -644,7 +644,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -711,7 +711,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -773,7 +773,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -834,7 +834,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -895,7 +895,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -956,7 +956,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1017,7 +1017,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1085,7 +1085,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1147,7 +1147,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1214,7 +1214,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1285,7 +1285,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1340,7 +1340,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1393,7 +1393,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1446,7 +1446,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1505,7 +1505,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1565,7 +1565,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1620,7 +1620,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1673,7 +1673,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1740,7 +1740,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1809,7 +1809,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1871,7 +1871,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1932,7 +1932,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -1999,7 +1999,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2067,7 +2067,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2135,7 +2135,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2203,7 +2203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2271,7 +2271,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2346,7 +2346,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2415,7 +2415,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2483,7 +2483,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -2558,7 +2558,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js index 96122f0..52dd526 100644 --- a/src/api/V1LocationsApi.js +++ b/src/api/V1LocationsApi.js @@ -46,7 +46,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -91,7 +91,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js index 12ad73f..7e50fb3 100644 --- a/src/api/V1TransactionsApi.js +++ b/src/api/V1TransactionsApi.js @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -119,7 +119,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -180,7 +180,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -251,7 +251,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -323,7 +323,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -396,7 +396,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -463,7 +463,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -524,7 +524,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -585,7 +585,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -646,7 +646,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; @@ -713,7 +713,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-09-25'; + headerParams['Square-Version'] = '2019-10-23'; var formParams = { }; diff --git a/src/index.js b/src/index.js index b0cd7bd..3e25603 100644 --- a/src/index.js +++ b/src/index.js @@ -144,6 +144,7 @@ var EmployeeWage = require('./model/EmployeeWage'); var Error = require('./model/Error'); var ErrorCategory = require('./model/ErrorCategory'); var ErrorCode = require('./model/ErrorCode'); +var ExcludeStrategy = require('./model/ExcludeStrategy'); var GetBreakTypeRequest = require('./model/GetBreakTypeRequest'); var GetBreakTypeResponse = require('./model/GetBreakTypeResponse'); var GetEmployeeWageRequest = require('./model/GetEmployeeWageRequest'); @@ -179,6 +180,8 @@ var ListEmployeesRequest = require('./model/ListEmployeesRequest'); var ListEmployeesResponse = require('./model/ListEmployeesResponse'); var ListLocationsRequest = require('./model/ListLocationsRequest'); var ListLocationsResponse = require('./model/ListLocationsResponse'); +var ListMerchantsRequest = require('./model/ListMerchantsRequest'); +var ListMerchantsResponse = require('./model/ListMerchantsResponse'); var ListPaymentRefundsRequest = require('./model/ListPaymentRefundsRequest'); var ListPaymentRefundsResponse = require('./model/ListPaymentRefundsResponse'); var ListPaymentsRequest = require('./model/ListPaymentsRequest'); @@ -554,7 +557,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *

* @module index - * @version 2.20190925.0 + * @version 2.20191023.0 */ module.exports = { /** @@ -1217,6 +1220,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ErrorCode} */ ErrorCode: ErrorCode, + /** + * The ExcludeStrategy model constructor. + * @property {module:model/ExcludeStrategy} + */ + ExcludeStrategy: ExcludeStrategy, /** * The GetBreakTypeRequest model constructor. * @property {module:model/GetBreakTypeRequest} @@ -1392,6 +1400,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ListLocationsResponse} */ ListLocationsResponse: ListLocationsResponse, + /** + * The ListMerchantsRequest model constructor. + * @property {module:model/ListMerchantsRequest} + */ + ListMerchantsRequest: ListMerchantsRequest, + /** + * The ListMerchantsResponse model constructor. + * @property {module:model/ListMerchantsResponse} + */ + ListMerchantsResponse: ListMerchantsResponse, /** * The ListPaymentRefundsRequest model constructor. * @property {module:model/ListPaymentRefundsRequest} diff --git a/src/lib/HeaderUtils.js b/src/lib/HeaderUtils.js new file mode 100644 index 0000000..966d2e2 --- /dev/null +++ b/src/lib/HeaderUtils.js @@ -0,0 +1,25 @@ +/** + * JavaScript header utils library for the Square Connect v2 API. + */ + +module.exports = { + /** Returns object[matchKey] for a case-insensitive matchKey. + * + * Should be used to look up header params, since HTTP/2 requires lowercase + * headers but some old HTTP/1 services may return any capitalization scheme. + * + * Usage: + * responseHeaders = { + * sOmE-HeAdEr: 'value' + * } + * HeaderUtils.caseInsensitiveGet(responseHeaders, 'some-header') // returns 'value'. + */ + caseInsensitiveGet: function(object, matchKey) { + const objectKey = Object.keys(object).find( + key => key.toLowerCase() === matchKey.toLowerCase() + ); + + return object[objectKey]; + } +}; + \ No newline at end of file diff --git a/src/model/AdditionalRecipientReceivable.js b/src/model/AdditionalRecipientReceivable.js index 02caf3f..0cbfd57 100644 --- a/src/model/AdditionalRecipientReceivable.js +++ b/src/model/AdditionalRecipientReceivable.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** + * @deprecated * The AdditionalRecipientReceivable model module. * @module model/AdditionalRecipientReceivable */ diff --git a/src/model/AdditionalRecipientReceivableRefund.js b/src/model/AdditionalRecipientReceivableRefund.js index d6430de..c31fee0 100644 --- a/src/model/AdditionalRecipientReceivableRefund.js +++ b/src/model/AdditionalRecipientReceivableRefund.js @@ -18,6 +18,7 @@ var Money = require('./Money'); /** + * @deprecated * The AdditionalRecipientReceivableRefund model module. * @module model/AdditionalRecipientReceivableRefund */ diff --git a/src/model/CaptureTransactionRequest.js b/src/model/CaptureTransactionRequest.js index 5be914c..8351d20 100644 --- a/src/model/CaptureTransactionRequest.js +++ b/src/model/CaptureTransactionRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The CaptureTransactionRequest model module. * @module model/CaptureTransactionRequest */ diff --git a/src/model/CaptureTransactionResponse.js b/src/model/CaptureTransactionResponse.js index 4a1a1f0..4b07e2b 100644 --- a/src/model/CaptureTransactionResponse.js +++ b/src/model/CaptureTransactionResponse.js @@ -18,6 +18,7 @@ var Error = require('./Error'); /** + * @deprecated * The CaptureTransactionResponse model module. * @module model/CaptureTransactionResponse */ diff --git a/src/model/CatalogItemOption.js b/src/model/CatalogItemOption.js index d9ff990..d5335dd 100644 --- a/src/model/CatalogItemOption.js +++ b/src/model/CatalogItemOption.js @@ -19,6 +19,7 @@ var CatalogObject = require('./CatalogObject'); /** * The CatalogItemOption model module. + * Note: This model is in beta. * @module model/CatalogItemOption */ diff --git a/src/model/CatalogItemOptionForItem.js b/src/model/CatalogItemOptionForItem.js index 1179b47..951342d 100644 --- a/src/model/CatalogItemOptionForItem.js +++ b/src/model/CatalogItemOptionForItem.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogItemOptionForItem model module. + * Note: This model is in beta. * @module model/CatalogItemOptionForItem */ diff --git a/src/model/CatalogItemOptionValue.js b/src/model/CatalogItemOptionValue.js index 5754822..ae399cd 100644 --- a/src/model/CatalogItemOptionValue.js +++ b/src/model/CatalogItemOptionValue.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogItemOptionValue model module. + * Note: This model is in beta. * @module model/CatalogItemOptionValue */ @@ -87,7 +88,7 @@ exports.prototype['name'] = undefined; */ exports.prototype['description'] = undefined; /** - * The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \"#ff8d4e85\"). Only displayed if parent Item Option's `show_colors` flag is enabled. value. + * The HTML-supported hex color for the item option (e.g., \"#ff8d4e85\"). Only displayed if `show_colors` is enabled on the parent `ItemOption`. When left unset, `color` defaults to white (\"#ffffff\") when `show_colors` is enabled on the parent `ItemOption`. * @member {String} color */ exports.prototype['color'] = undefined; diff --git a/src/model/CatalogItemOptionValueForItemVariation.js b/src/model/CatalogItemOptionValueForItemVariation.js index a4c516a..2fb9e96 100644 --- a/src/model/CatalogItemOptionValueForItemVariation.js +++ b/src/model/CatalogItemOptionValueForItemVariation.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogItemOptionValueForItemVariation model module. + * Note: This model is in beta. * @module model/CatalogItemOptionValueForItemVariation */ diff --git a/src/model/CatalogMeasurementUnit.js b/src/model/CatalogMeasurementUnit.js index dd15c5e..b00ecdd 100644 --- a/src/model/CatalogMeasurementUnit.js +++ b/src/model/CatalogMeasurementUnit.js @@ -19,6 +19,7 @@ var MeasurementUnit = require('./MeasurementUnit'); /** * The CatalogMeasurementUnit model module. + * Note: This model is in beta. * @module model/CatalogMeasurementUnit */ diff --git a/src/model/CatalogPricingRule.js b/src/model/CatalogPricingRule.js index 0c50df0..b08b9c8 100644 --- a/src/model/CatalogPricingRule.js +++ b/src/model/CatalogPricingRule.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogPricingRule model module. + * Note: This model is in beta. * @module model/CatalogPricingRule */ @@ -40,6 +41,7 @@ var exports = function() { + }; /** @@ -82,6 +84,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('valid_until_local_time')) { obj['valid_until_local_time'] = ApiClient.convertToType(data['valid_until_local_time'], 'String'); + } + if (data.hasOwnProperty('exclude_strategy')) { + obj['exclude_strategy'] = ApiClient.convertToType(data['exclude_strategy'], 'String'); } } return obj; @@ -108,7 +113,7 @@ exports.prototype['discount_id'] = undefined; */ exports.prototype['match_products_id'] = undefined; /** - * The `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. + * `CatalogProductSet` to apply the pricing to. An apply rule matches within the subset of the cart that fits the match rules (the match set). An apply 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. This field has been deprecated: new pricing rules should prefer the exclude_products_id field. Exclude sets allow better control over quantity ranges and offer more flexibility for which matched items receive a discount. * @member {String} apply_products_id */ exports.prototype['apply_products_id'] = undefined; @@ -137,6 +142,11 @@ exports.prototype['valid_until_date'] = undefined; * @member {String} valid_until_local_time */ exports.prototype['valid_until_local_time'] = undefined; +/** + * If an `exclude_products_id` was given, controls which subset of matched products is excluded from any discounts. See `ExcludeStrategy` for all possible values. Default value: `LEAST_EXPENSIVE` See [ExcludeStrategy](#type-excludestrategy) for possible values + * @member {String} exclude_strategy + */ +exports.prototype['exclude_strategy'] = undefined; diff --git a/src/model/CatalogProductSet.js b/src/model/CatalogProductSet.js index 71cf02f..5cdb3b7 100644 --- a/src/model/CatalogProductSet.js +++ b/src/model/CatalogProductSet.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogProductSet model module. + * Note: This model is in beta. * @module model/CatalogProductSet */ diff --git a/src/model/CatalogQueryItemVariationsForItemOptionValues.js b/src/model/CatalogQueryItemVariationsForItemOptionValues.js index b227e1f..dbe5c77 100644 --- a/src/model/CatalogQueryItemVariationsForItemOptionValues.js +++ b/src/model/CatalogQueryItemVariationsForItemOptionValues.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogQueryItemVariationsForItemOptionValues model module. + * Note: This model is in beta. * @module model/CatalogQueryItemVariationsForItemOptionValues */ diff --git a/src/model/CatalogQueryItemsForItemOptions.js b/src/model/CatalogQueryItemsForItemOptions.js index 51919b0..3dc409f 100644 --- a/src/model/CatalogQueryItemsForItemOptions.js +++ b/src/model/CatalogQueryItemsForItemOptions.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogQueryItemsForItemOptions model module. + * Note: This model is in beta. * @module model/CatalogQueryItemsForItemOptions */ diff --git a/src/model/CatalogTimePeriod.js b/src/model/CatalogTimePeriod.js index 5db6cab..d7521ea 100644 --- a/src/model/CatalogTimePeriod.js +++ b/src/model/CatalogTimePeriod.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The CatalogTimePeriod model module. + * Note: This model is in beta. * @module model/CatalogTimePeriod */ diff --git a/src/model/ChargeRequest.js b/src/model/ChargeRequest.js index 65a19ad..df203f7 100644 --- a/src/model/ChargeRequest.js +++ b/src/model/ChargeRequest.js @@ -20,6 +20,7 @@ var Money = require('./Money'); /** + * @deprecated * The ChargeRequest model module. * @module model/ChargeRequest */ @@ -30,7 +31,7 @@ var Money = require('./Money'); * @alias module:model/ChargeRequest * @class * @param idempotencyKey {String} A value you specify that uniquely identifies this transaction among transactions you've created. If you're unsure whether a particular transaction succeeded, you can reattempt it with the same idempotency key without worrying about double-charging the buyer. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. - * @param amountMoney {module:model/Money} The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. + * @param amountMoney {module:model/Money} The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. */ var exports = function(idempotencyKey, amountMoney) { var _this = this; @@ -114,7 +115,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['idempotency_key'] = undefined; /** - * The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. + * The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. * @member {module:model/Money} amount_money */ exports.prototype['amount_money'] = undefined; diff --git a/src/model/ChargeRequestAdditionalRecipient.js b/src/model/ChargeRequestAdditionalRecipient.js index fa0dc88..419a94c 100644 --- a/src/model/ChargeRequestAdditionalRecipient.js +++ b/src/model/ChargeRequestAdditionalRecipient.js @@ -18,6 +18,7 @@ var Money = require('./Money'); /** + * @deprecated * The ChargeRequestAdditionalRecipient model module. * @module model/ChargeRequestAdditionalRecipient */ diff --git a/src/model/ChargeResponse.js b/src/model/ChargeResponse.js index d6f9e9d..e98b559 100644 --- a/src/model/ChargeResponse.js +++ b/src/model/ChargeResponse.js @@ -19,6 +19,7 @@ var Transaction = require('./Transaction'); /** + * @deprecated * The ChargeResponse model module. * @module model/ChargeResponse */ diff --git a/src/model/CreateOrderRequestDiscount.js b/src/model/CreateOrderRequestDiscount.js index 9a1fd5c..e4d2966 100644 --- a/src/model/CreateOrderRequestDiscount.js +++ b/src/model/CreateOrderRequestDiscount.js @@ -18,6 +18,7 @@ var Money = require('./Money'); /** + * @deprecated * The CreateOrderRequestDiscount model module. * @module model/CreateOrderRequestDiscount */ diff --git a/src/model/CreateOrderRequestLineItem.js b/src/model/CreateOrderRequestLineItem.js index 9d010ac..2a75591 100644 --- a/src/model/CreateOrderRequestLineItem.js +++ b/src/model/CreateOrderRequestLineItem.js @@ -21,6 +21,7 @@ var Money = require('./Money'); /** + * @deprecated * The CreateOrderRequestLineItem model module. * @module model/CreateOrderRequestLineItem */ diff --git a/src/model/CreateOrderRequestModifier.js b/src/model/CreateOrderRequestModifier.js index b42fc70..cabfefb 100644 --- a/src/model/CreateOrderRequestModifier.js +++ b/src/model/CreateOrderRequestModifier.js @@ -18,6 +18,7 @@ var Money = require('./Money'); /** + * @deprecated * The CreateOrderRequestModifier model module. * @module model/CreateOrderRequestModifier */ diff --git a/src/model/CreateOrderRequestTax.js b/src/model/CreateOrderRequestTax.js index 87960a0..907bda0 100644 --- a/src/model/CreateOrderRequestTax.js +++ b/src/model/CreateOrderRequestTax.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The CreateOrderRequestTax model module. * @module model/CreateOrderRequestTax */ diff --git a/src/model/CreateRefundRequest.js b/src/model/CreateRefundRequest.js index 7c6f429..33b820e 100644 --- a/src/model/CreateRefundRequest.js +++ b/src/model/CreateRefundRequest.js @@ -18,6 +18,7 @@ var Money = require('./Money'); /** + * @deprecated * The CreateRefundRequest model module. * @module model/CreateRefundRequest */ @@ -29,7 +30,7 @@ var Money = require('./Money'); * @class * @param idempotencyKey {String} A value you specify that uniquely identifies this refund among refunds you've created for the tender. If you're unsure whether a particular refund succeeded, you can reattempt it with the same idempotency key without worrying about duplicating the refund. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. * @param tenderId {String} The ID of the tender to refund. A ``Transaction`` has one or more `tenders` (i.e., methods of payment) associated with it, and you refund each tender separately with the Connect API. - * @param amountMoney {module:model/Money} The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. + * @param amountMoney {module:model/Money} The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. */ var exports = function(idempotencyKey, tenderId, amountMoney) { var _this = this; @@ -83,7 +84,7 @@ exports.prototype['tender_id'] = undefined; */ exports.prototype['reason'] = undefined; /** - * The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. + * The amount of money to refund. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. This amount cannot exceed the amount that was originally charged to the tender that corresponds to `tender_id`. * @member {module:model/Money} amount_money */ exports.prototype['amount_money'] = undefined; diff --git a/src/model/CreateRefundResponse.js b/src/model/CreateRefundResponse.js index f5df20b..995a043 100644 --- a/src/model/CreateRefundResponse.js +++ b/src/model/CreateRefundResponse.js @@ -19,6 +19,7 @@ var Refund = require('./Refund'); /** + * @deprecated * The CreateRefundResponse model module. * @module model/CreateRefundResponse */ diff --git a/src/model/CustomerFilter.js b/src/model/CustomerFilter.js index ef4d10c..ce0ad7a 100644 --- a/src/model/CustomerFilter.js +++ b/src/model/CustomerFilter.js @@ -25,7 +25,7 @@ var TimeRange = require('./TimeRange'); /** * Constructs a new CustomerFilter. - * Represents a set of [`CustomerQuery`](#type-customerquery) filters used to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers). + * Represents a set of `CustomerQuery` filters used to limit the set of Customers returned by SearchCustomers. * @alias module:model/CustomerFilter * @class */ diff --git a/src/model/CustomerSort.js b/src/model/CustomerSort.js index 5c2edef..153be9a 100644 --- a/src/model/CustomerSort.js +++ b/src/model/CustomerSort.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CustomerSort. - * Indicates the field to use for sorting customer profiles. For example, by total money spent with the merchant or the date of their first purchase. + * Indicates the field to use for sorting customer profiles. * @alias module:model/CustomerSort * @class */ @@ -56,12 +56,12 @@ exports.constructFromObject = function(data, obj) { } /** - * The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). See [CustomerSortField](#type-customersortfield) for possible values + * Indicates the information used to sort the results. For example, by creation date. Default value: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values * @member {String} field */ exports.prototype['field'] = undefined; /** - * Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values + * Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default value: `ASC`. See [SortOrder](#type-sortorder) for possible values * @member {String} order */ exports.prototype['order'] = undefined; diff --git a/src/model/ExcludeStrategy.js b/src/model/ExcludeStrategy.js new file mode 100644 index 0000000..1e1a12a --- /dev/null +++ b/src/model/ExcludeStrategy.js @@ -0,0 +1,45 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class ExcludeStrategy. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "LEAST_EXPENSIVE" + * @const + */ + "LEAST_EXPENSIVE": "LEAST_EXPENSIVE", + /** + * value: "MOST_EXPENSIVE" + * @const + */ + "MOST_EXPENSIVE": "MOST_EXPENSIVE"}; + +/** + * Returns a ExcludeStrategy enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/ExcludeStrategy} The enum ExcludeStrategy value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/ListAdditionalRecipientReceivableRefundsRequest.js b/src/model/ListAdditionalRecipientReceivableRefundsRequest.js index 5b3fe8e..5b94751 100644 --- a/src/model/ListAdditionalRecipientReceivableRefundsRequest.js +++ b/src/model/ListAdditionalRecipientReceivableRefundsRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The ListAdditionalRecipientReceivableRefundsRequest model module. * @module model/ListAdditionalRecipientReceivableRefundsRequest */ diff --git a/src/model/ListAdditionalRecipientReceivableRefundsResponse.js b/src/model/ListAdditionalRecipientReceivableRefundsResponse.js index 151324b..98bf54f 100644 --- a/src/model/ListAdditionalRecipientReceivableRefundsResponse.js +++ b/src/model/ListAdditionalRecipientReceivableRefundsResponse.js @@ -19,6 +19,7 @@ var Error = require('./Error'); /** + * @deprecated * The ListAdditionalRecipientReceivableRefundsResponse model module. * @module model/ListAdditionalRecipientReceivableRefundsResponse */ diff --git a/src/model/ListAdditionalRecipientReceivablesRequest.js b/src/model/ListAdditionalRecipientReceivablesRequest.js index e380443..98d5320 100644 --- a/src/model/ListAdditionalRecipientReceivablesRequest.js +++ b/src/model/ListAdditionalRecipientReceivablesRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The ListAdditionalRecipientReceivablesRequest model module. * @module model/ListAdditionalRecipientReceivablesRequest */ diff --git a/src/model/ListAdditionalRecipientReceivablesResponse.js b/src/model/ListAdditionalRecipientReceivablesResponse.js index e589a94..74bbc37 100644 --- a/src/model/ListAdditionalRecipientReceivablesResponse.js +++ b/src/model/ListAdditionalRecipientReceivablesResponse.js @@ -19,6 +19,7 @@ var Error = require('./Error'); /** + * @deprecated * The ListAdditionalRecipientReceivablesResponse model module. * @module model/ListAdditionalRecipientReceivablesResponse */ diff --git a/src/model/ListMerchantsRequest.js b/src/model/ListMerchantsRequest.js new file mode 100644 index 0000000..dec1430 --- /dev/null +++ b/src/model/ListMerchantsRequest.js @@ -0,0 +1,65 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + + + +/** + * The ListMerchantsRequest model module. + * @module model/ListMerchantsRequest + */ + +/** + * Constructs a new ListMerchantsRequest. + * Request object for the [ListMerchant](#endpoint-listmerchant) endpoint. + * @alias module:model/ListMerchantsRequest + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a ListMerchantsRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ListMerchantsRequest} obj Optional instance to populate. + * @return {module:model/ListMerchantsRequest} The populated ListMerchantsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'Number'); + } + } + return obj; +} + +/** + * The cursor generated by the previous response. + * @member {Number} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListMerchantsResponse.js b/src/model/ListMerchantsResponse.js new file mode 100644 index 0000000..bed89dc --- /dev/null +++ b/src/model/ListMerchantsResponse.js @@ -0,0 +1,85 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var Error = require('./Error'); +var Merchant = require('./Merchant'); + + + + +/** + * The ListMerchantsResponse model module. + * @module model/ListMerchantsResponse + */ + +/** + * Constructs a new ListMerchantsResponse. + * The response object returned by the [ListMerchant](#endpoint-listmerchant) endpoint. + * @alias module:model/ListMerchantsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListMerchantsResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ListMerchantsResponse} obj Optional instance to populate. + * @return {module:model/ListMerchantsResponse} The populated ListMerchantsResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + if (data.hasOwnProperty('merchant')) { + obj['merchant'] = ApiClient.convertToType(data['merchant'], [Merchant]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'Number'); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The requested `Merchant` entities. + * @member {Array.} merchant + */ +exports.prototype['merchant'] = undefined; +/** + * If the response is truncated, the cursor to use in next request to fetch next set of objects. + * @member {Number} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListRefundsRequest.js b/src/model/ListRefundsRequest.js index 5cf9e11..e0d1823 100644 --- a/src/model/ListRefundsRequest.js +++ b/src/model/ListRefundsRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The ListRefundsRequest model module. * @module model/ListRefundsRequest */ diff --git a/src/model/ListRefundsResponse.js b/src/model/ListRefundsResponse.js index 3fafa0a..509886c 100644 --- a/src/model/ListRefundsResponse.js +++ b/src/model/ListRefundsResponse.js @@ -19,6 +19,7 @@ var Refund = require('./Refund'); /** + * @deprecated * The ListRefundsResponse model module. * @module model/ListRefundsResponse */ diff --git a/src/model/ListTransactionsRequest.js b/src/model/ListTransactionsRequest.js index f3e91ff..b7e7887 100644 --- a/src/model/ListTransactionsRequest.js +++ b/src/model/ListTransactionsRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The ListTransactionsRequest model module. * @module model/ListTransactionsRequest */ diff --git a/src/model/ListTransactionsResponse.js b/src/model/ListTransactionsResponse.js index f6c57f1..8f61527 100644 --- a/src/model/ListTransactionsResponse.js +++ b/src/model/ListTransactionsResponse.js @@ -19,6 +19,7 @@ var Transaction = require('./Transaction'); /** + * @deprecated * The ListTransactionsResponse model module. * @module model/ListTransactionsResponse */ diff --git a/src/model/Location.js b/src/model/Location.js index 6d8c91e..4eaeb40 100644 --- a/src/model/Location.js +++ b/src/model/Location.js @@ -151,7 +151,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The location's unique ID. + * The Square-issued ID of the location. * @member {String} id */ exports.prototype['id'] = undefined; @@ -171,7 +171,7 @@ exports.prototype['address'] = undefined; */ exports.prototype['timezone'] = undefined; /** - * Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values + * The Square features that are enabled for the location. See `LocationCapability` for possible values. See [LocationCapability](#type-locationcapability) for possible values * @member {Array.} capabilities */ exports.prototype['capabilities'] = undefined; @@ -186,12 +186,12 @@ exports.prototype['status'] = undefined; */ exports.prototype['created_at'] = undefined; /** - * The identifier of the merchant that owns the location. + * The ID of the merchant that owns the location. * @member {String} merchant_id */ exports.prototype['merchant_id'] = undefined; /** - * The location's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values + * The country of the location, in ISO 3166-1-alpha-2 format. See `Country` for possible values. See [Country](#type-country) for possible values * @member {String} country */ exports.prototype['country'] = undefined; @@ -201,7 +201,7 @@ exports.prototype['country'] = undefined; */ exports.prototype['language_code'] = undefined; /** - * The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values + * The currency used for all transactions at this location, in ISO 4217 format. See `Currency` for possible values. See [Currency](#type-currency) for possible values * @member {String} currency */ exports.prototype['currency'] = undefined; diff --git a/src/model/MeasurementUnit.js b/src/model/MeasurementUnit.js index 0c21041..5be5af5 100644 --- a/src/model/MeasurementUnit.js +++ b/src/model/MeasurementUnit.js @@ -19,6 +19,7 @@ var MeasurementUnitCustom = require('./MeasurementUnitCustom'); /** * The MeasurementUnit model module. + * Note: This model is in beta. * @module model/MeasurementUnit */ diff --git a/src/model/MeasurementUnitCustom.js b/src/model/MeasurementUnitCustom.js index 86844a4..6699be7 100644 --- a/src/model/MeasurementUnitCustom.js +++ b/src/model/MeasurementUnitCustom.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The MeasurementUnitCustom model module. + * Note: This model is in beta. * @module model/MeasurementUnitCustom */ diff --git a/src/model/OrderFulfillmentShipmentDetails.js b/src/model/OrderFulfillmentShipmentDetails.js index 15feb49..6b7dc41 100644 --- a/src/model/OrderFulfillmentShipmentDetails.js +++ b/src/model/OrderFulfillmentShipmentDetails.js @@ -19,6 +19,7 @@ var OrderFulfillmentRecipient = require('./OrderFulfillmentRecipient'); /** * The OrderFulfillmentShipmentDetails model module. + * Note: This model is in beta. * @module model/OrderFulfillmentShipmentDetails */ diff --git a/src/model/OrderLineItemAppliedDiscount.js b/src/model/OrderLineItemAppliedDiscount.js index 7a6ac7d..4a1de6d 100644 --- a/src/model/OrderLineItemAppliedDiscount.js +++ b/src/model/OrderLineItemAppliedDiscount.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderLineItemAppliedDiscount model module. + * Note: This model is in beta. * @module model/OrderLineItemAppliedDiscount */ diff --git a/src/model/OrderLineItemAppliedTax.js b/src/model/OrderLineItemAppliedTax.js index d25c200..97b9c55 100644 --- a/src/model/OrderLineItemAppliedTax.js +++ b/src/model/OrderLineItemAppliedTax.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderLineItemAppliedTax model module. + * Note: This model is in beta. * @module model/OrderLineItemAppliedTax */ diff --git a/src/model/OrderMoneyAmounts.js b/src/model/OrderMoneyAmounts.js index 472f826..fdb93e3 100644 --- a/src/model/OrderMoneyAmounts.js +++ b/src/model/OrderMoneyAmounts.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderMoneyAmounts model module. + * Note: This model is in beta. * @module model/OrderMoneyAmounts */ diff --git a/src/model/OrderReturn.js b/src/model/OrderReturn.js index 2705f9d..f8d0ce6 100644 --- a/src/model/OrderReturn.js +++ b/src/model/OrderReturn.js @@ -24,6 +24,7 @@ var OrderRoundingAdjustment = require('./OrderRoundingAdjustment'); /** * The OrderReturn model module. + * Note: This model is in beta. * @module model/OrderReturn */ diff --git a/src/model/OrderReturnDiscount.js b/src/model/OrderReturnDiscount.js index 717506b..66625fd 100644 --- a/src/model/OrderReturnDiscount.js +++ b/src/model/OrderReturnDiscount.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderReturnDiscount model module. + * Note: This model is in beta. * @module model/OrderReturnDiscount */ diff --git a/src/model/OrderReturnLineItem.js b/src/model/OrderReturnLineItem.js index 86cfd55..b31e415 100644 --- a/src/model/OrderReturnLineItem.js +++ b/src/model/OrderReturnLineItem.js @@ -25,6 +25,7 @@ var OrderReturnTax = require('./OrderReturnTax'); /** * The OrderReturnLineItem model module. + * Note: This model is in beta. * @module model/OrderReturnLineItem */ diff --git a/src/model/OrderReturnLineItemModifier.js b/src/model/OrderReturnLineItemModifier.js index bd38e95..66d244c 100644 --- a/src/model/OrderReturnLineItemModifier.js +++ b/src/model/OrderReturnLineItemModifier.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderReturnLineItemModifier model module. + * Note: This model is in beta. * @module model/OrderReturnLineItemModifier */ diff --git a/src/model/OrderReturnTax.js b/src/model/OrderReturnTax.js index e0efe23..1df6f59 100644 --- a/src/model/OrderReturnTax.js +++ b/src/model/OrderReturnTax.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderReturnTax model module. + * Note: This model is in beta. * @module model/OrderReturnTax */ diff --git a/src/model/OrderRoundingAdjustment.js b/src/model/OrderRoundingAdjustment.js index a0e2cf6..c9ac230 100644 --- a/src/model/OrderRoundingAdjustment.js +++ b/src/model/OrderRoundingAdjustment.js @@ -19,6 +19,7 @@ var Money = require('./Money'); /** * The OrderRoundingAdjustment model module. + * Note: This model is in beta. * @module model/OrderRoundingAdjustment */ diff --git a/src/model/PayOrderRequest.js b/src/model/PayOrderRequest.js index b55149f..508e7a2 100644 --- a/src/model/PayOrderRequest.js +++ b/src/model/PayOrderRequest.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The PayOrderRequest model module. + * Note: This model is in beta. * @module model/PayOrderRequest */ diff --git a/src/model/PayOrderResponse.js b/src/model/PayOrderResponse.js index 5505321..bbfcd6d 100644 --- a/src/model/PayOrderResponse.js +++ b/src/model/PayOrderResponse.js @@ -20,6 +20,7 @@ var Order = require('./Order'); /** * The PayOrderResponse model module. + * Note: This model is in beta. * @module model/PayOrderResponse */ diff --git a/src/model/RenewTokenRequest.js b/src/model/RenewTokenRequest.js index 5fcda00..f338e42 100644 --- a/src/model/RenewTokenRequest.js +++ b/src/model/RenewTokenRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The RenewTokenRequest model module. * @module model/RenewTokenRequest */ diff --git a/src/model/RenewTokenResponse.js b/src/model/RenewTokenResponse.js index 63b4ed0..145d5b4 100644 --- a/src/model/RenewTokenResponse.js +++ b/src/model/RenewTokenResponse.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The RenewTokenResponse model module. * @module model/RenewTokenResponse */ diff --git a/src/model/RetrieveTransactionRequest.js b/src/model/RetrieveTransactionRequest.js index fc1b122..5bf9868 100644 --- a/src/model/RetrieveTransactionRequest.js +++ b/src/model/RetrieveTransactionRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The RetrieveTransactionRequest model module. * @module model/RetrieveTransactionRequest */ diff --git a/src/model/RetrieveTransactionResponse.js b/src/model/RetrieveTransactionResponse.js index 7bafa6f..3340c4b 100644 --- a/src/model/RetrieveTransactionResponse.js +++ b/src/model/RetrieveTransactionResponse.js @@ -19,6 +19,7 @@ var Transaction = require('./Transaction'); /** + * @deprecated * The RetrieveTransactionResponse model module. * @module model/RetrieveTransactionResponse */ diff --git a/src/model/SearchCatalogObjectsResponse.js b/src/model/SearchCatalogObjectsResponse.js index d3b5863..b56d550 100644 --- a/src/model/SearchCatalogObjectsResponse.js +++ b/src/model/SearchCatalogObjectsResponse.js @@ -90,7 +90,7 @@ exports.prototype['objects'] = undefined; */ exports.prototype['related_objects'] = undefined; /** - * When this merchant's catalog was last updated. Will match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. + * When the associated product catalog was last updated. Will match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. * @member {String} latest_time */ exports.prototype['latest_time'] = undefined; diff --git a/src/model/SearchOrdersCustomerFilter.js b/src/model/SearchOrdersCustomerFilter.js index d94031a..05d0b16 100644 --- a/src/model/SearchOrdersCustomerFilter.js +++ b/src/model/SearchOrdersCustomerFilter.js @@ -18,6 +18,7 @@ var ApiClient = require('../ApiClient'); /** * The SearchOrdersCustomerFilter model module. + * Note: This model is in beta. * @module model/SearchOrdersCustomerFilter */ diff --git a/src/model/Transaction.js b/src/model/Transaction.js index 97c48f2..880a18b 100644 --- a/src/model/Transaction.js +++ b/src/model/Transaction.js @@ -20,6 +20,7 @@ var Tender = require('./Tender'); /** + * @deprecated * The Transaction model module. * @module model/Transaction */ diff --git a/src/model/UpdateLocationRequest.js b/src/model/UpdateLocationRequest.js index fbf1366..59e437c 100644 --- a/src/model/UpdateLocationRequest.js +++ b/src/model/UpdateLocationRequest.js @@ -19,6 +19,7 @@ var Location = require('./Location'); /** * The UpdateLocationRequest model module. + * Note: This model is in beta. * @module model/UpdateLocationRequest */ diff --git a/src/model/UpdateLocationResponse.js b/src/model/UpdateLocationResponse.js index 92d3e03..e6df569 100644 --- a/src/model/UpdateLocationResponse.js +++ b/src/model/UpdateLocationResponse.js @@ -20,6 +20,7 @@ var Location = require('./Location'); /** * The UpdateLocationResponse model module. + * Note: This model is in beta. * @module model/UpdateLocationResponse */ diff --git a/src/model/UpdateOrderRequest.js b/src/model/UpdateOrderRequest.js index 294afbd..7280fa9 100644 --- a/src/model/UpdateOrderRequest.js +++ b/src/model/UpdateOrderRequest.js @@ -19,6 +19,7 @@ var Order = require('./Order'); /** * The UpdateOrderRequest model module. + * Note: This model is in beta. * @module model/UpdateOrderRequest */ diff --git a/src/model/UpdateOrderResponse.js b/src/model/UpdateOrderResponse.js index 5df9da3..1b359aa 100644 --- a/src/model/UpdateOrderResponse.js +++ b/src/model/UpdateOrderResponse.js @@ -20,6 +20,7 @@ var Order = require('./Order'); /** * The UpdateOrderResponse model module. + * Note: This model is in beta. * @module model/UpdateOrderResponse */ diff --git a/src/model/VoidTransactionRequest.js b/src/model/VoidTransactionRequest.js index 7f79fde..a3960df 100644 --- a/src/model/VoidTransactionRequest.js +++ b/src/model/VoidTransactionRequest.js @@ -17,6 +17,7 @@ var ApiClient = require('../ApiClient'); /** + * @deprecated * The VoidTransactionRequest model module. * @module model/VoidTransactionRequest */ diff --git a/src/model/VoidTransactionResponse.js b/src/model/VoidTransactionResponse.js index c2a477f..a907366 100644 --- a/src/model/VoidTransactionResponse.js +++ b/src/model/VoidTransactionResponse.js @@ -18,6 +18,7 @@ var Error = require('./Error'); /** + * @deprecated * The VoidTransactionResponse model module. * @module model/VoidTransactionResponse */ diff --git a/src/model/WebhookEvents.js b/src/model/WebhookEvents.js index 4105db9..43e9f97 100644 --- a/src/model/WebhookEvents.js +++ b/src/model/WebhookEvents.js @@ -24,7 +24,12 @@ var exports = { * value: "inventory.count.updated" * @const */ - "updated": "inventory.count.updated"}; + "inventory.count.updated": "inventory.count.updated", + /** + * value: "catalog.version.updated" + * @const + */ + "catalog.version.updated": "catalog.version.updated"}; /** * Returns a WebhookEvents enum value from a Javascript object name. diff --git a/test/lib/HeaderUtils.spec.js b/test/lib/HeaderUtils.spec.js new file mode 100644 index 0000000..cd2f2ce --- /dev/null +++ b/test/lib/HeaderUtils.spec.js @@ -0,0 +1,45 @@ +const HeaderUtils = require('../../src/lib/HeaderUtils'); +const { + assert +} = require('../support/setup'); + +describe('HeaderUtils', function() { + beforeEach(function() { + this.headerObj = { + "Foo-Header": "abcDEF", + "bar-HEADER": "qwerty", + "bazheader": "123456" + } + }); + + afterEach(function(){ + }); + + describe('caseInsensitiveGet', function() { + it('Matches case-sensitively', function(done) { + assert( + HeaderUtils.caseInsensitiveGet(this.headerObj, "Foo-Header") === "abcDEF" + ); + done(); + }); + }); + + describe('caseInsensitiveGet', function() { + it('Does not match wrong punctuation', function(done) { + assert( + HeaderUtils.caseInsensitiveGet(this.headerObj, "barHEADER") === undefined + ); + done(); + }); + }); + + describe('caseInsensitiveGet', function() { + it('Matches case insensitively', function(done) { + assert( + HeaderUtils.caseInsensitiveGet(this.headerObj, "bAzHeAdEr") === "123456" + ); + done(); + }); + }); +}); + diff --git a/test/model/ExcludeStrategy.spec.js b/test/model/ExcludeStrategy.spec.js new file mode 100644 index 0000000..c076eb0 --- /dev/null +++ b/test/model/ExcludeStrategy.spec.js @@ -0,0 +1,26 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('ExcludeStrategy', function() { + beforeEach(function() { + }); + + it('should create an instance of ExcludeStrategy', function() { + // uncomment below and update the code to test ExcludeStrategy + //var instane = new SquareConnect.ExcludeStrategy(); + //expect(instance).to.be.a(SquareConnect.ExcludeStrategy); + }); + +}); diff --git a/test/model/ListMerchantsRequest.spec.js b/test/model/ListMerchantsRequest.spec.js new file mode 100644 index 0000000..529a417 --- /dev/null +++ b/test/model/ListMerchantsRequest.spec.js @@ -0,0 +1,32 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('ListMerchantsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListMerchantsRequest(); + }); + + it('should create an instance of ListMerchantsRequest', function() { + // uncomment below and update the code to test ListMerchantsRequest + //var instane = new SquareConnect.ListMerchantsRequest(); + //expect(instance).to.be.a(SquareConnect.ListMerchantsRequest); + }); + + it('should have the property cursor (base name: "cursor")', function() { + // uncomment below and update the code to test the property cursor + //var instane = new SquareConnect.ListMerchantsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListMerchantsResponse.spec.js b/test/model/ListMerchantsResponse.spec.js new file mode 100644 index 0000000..30bb0a3 --- /dev/null +++ b/test/model/ListMerchantsResponse.spec.js @@ -0,0 +1,42 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('ListMerchantsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListMerchantsResponse(); + }); + + it('should create an instance of ListMerchantsResponse', function() { + // uncomment below and update the code to test ListMerchantsResponse + //var instane = new SquareConnect.ListMerchantsResponse(); + //expect(instance).to.be.a(SquareConnect.ListMerchantsResponse); + }); + + it('should have the property errors (base name: "errors")', function() { + // uncomment below and update the code to test the property errors + //var instane = new SquareConnect.ListMerchantsResponse(); + //expect(instance).to.be(); + }); + it('should have the property merchant (base name: "merchant")', function() { + // uncomment below and update the code to test the property merchant + //var instane = new SquareConnect.ListMerchantsResponse(); + //expect(instance).to.be(); + }); + it('should have the property cursor (base name: "cursor")', function() { + // uncomment below and update the code to test the property cursor + //var instane = new SquareConnect.ListMerchantsResponse(); + //expect(instance).to.be(); + }); +});