diff --git a/CHANGES.md b/CHANGES.md index 83fce14..7c5dabc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,44 @@ # Change Log +## Version 4.20200722.1 (2020-07-22T00:00) +## API releases + +* Invoices API (beta): + * For an overview, see [Manage Invoices Using the Invoices API](https://developer.squareup.com/docs/invoices-api/overview). + * For technical reference, see [Invoices API](https://developer.squareup.com/reference/square_2020-07-22/invoices-api). + +## Existing API updates + +* Catalog API + * [SearchCatalogItems](https://developer.squareup.com/reference/square_2020-07-22/catalog-api/search-catalog-items). You can now call the new search endpoint to [search for catalog items or item variations](https://developer.squareup.com/docs/catalog-api/search-catalog-items), with simplified programming experiences, using one or more of the supported query filters, including the custom attribute value filter. +* Locations API + * [Locations API Overview](https://developer.squareup.com/docs/locations-api). Introduced the "main" location concept. + * [RetrieveLocation](https://developer.squareup.com/reference/square_2020-07-22/locations-api/retrieve-location). You can now specify "main" as the location ID to retrieve the main location information. + +* Merchants API + * [RetrieveMerchant](https://developer.squareup.com/reference/square_2020-07-22/merchants-api/retrieve-merchant) and [ListMerchants](https://developer.squareup.com/reference/square_2020-07-22/merchants-api/retrieve-merchant). These endpoints now return a new field, `main_location_id`. + +* Orders API + * [PricingOptions](https://developer.squareup.com/reference/square_2020-07-22/objects/Order#definition__property-pricing_options). You can now enable the `auto_apply_discounts` of the options to have rule-based discounts automatically applied to an [Order](https://developer.squareup.com/reference/square_2020-07-22/objects/Order) that is pre-configured with a [pricing rule](https://developer.squareup.com/reference/square_2020-07-22/objects/CatalogPricingRule). + +* [Inventory API](https://developer.squareup.com/reference/square_2020-07-22/inventory-api) + * Replaced 500 error on max string length exceeded with a max length error message. Max length attribute added to string type fields. + +* Terminal API (beta) + * [TerminalCheckout](https://developer.squareup.com/reference/square_2020-07-22/objects/TerminalCheckout) object. The `TerminalCheckoutCancelReason` field is renamed to `ActionCancelReason`. + +## Documentation updates + +* Catalog API + * [Search a catalog](https://developer.squareup.com/docs/catalog-api/search-catalog). New topics added to provide actionable guides to using the existing [SearchCatalogObjects](https://developer.squareup.com/reference/square_2020-07-22/catalog-api/search-catalog-objects) endpoint, in addition to the [SearchCatalogItems](https://developer.squareup.com/reference/square_2020-07-22/catalog-api/search-catalog-items) endpoints. + +* Orders API + * [Create Orders](https://developer.squareup.com/docs/orders-api/create-orders). Updated existing content with the new pricing option for the automatic application of rule-based discounts. + + + + + ## Version 4.20200625.0 (2020-06-25T00:00) ## New API release diff --git a/README.md b/README.md index 734c552..6644956 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *SquareConnect.CatalogApi* | [**deleteCatalogObject**](docs/CatalogApi.md#deleteCatalogObject) | **DELETE** /v2/catalog/object/{object_id} | DeleteCatalogObject *SquareConnect.CatalogApi* | [**listCatalog**](docs/CatalogApi.md#listCatalog) | **GET** /v2/catalog/list | ListCatalog *SquareConnect.CatalogApi* | [**retrieveCatalogObject**](docs/CatalogApi.md#retrieveCatalogObject) | **GET** /v2/catalog/object/{object_id} | RetrieveCatalogObject +*SquareConnect.CatalogApi* | [**searchCatalogItems**](docs/CatalogApi.md#searchCatalogItems) | **POST** /v2/catalog/search-catalog-items | SearchCatalogItems *SquareConnect.CatalogApi* | [**searchCatalogObjects**](docs/CatalogApi.md#searchCatalogObjects) | **POST** /v2/catalog/search | SearchCatalogObjects *SquareConnect.CatalogApi* | [**updateItemModifierLists**](docs/CatalogApi.md#updateItemModifierLists) | **POST** /v2/catalog/update-item-modifier-lists | UpdateItemModifierLists *SquareConnect.CatalogApi* | [**updateItemTaxes**](docs/CatalogApi.md#updateItemTaxes) | **POST** /v2/catalog/update-item-taxes | UpdateItemTaxes @@ -132,6 +133,14 @@ Class | Method | HTTP request | Description *SquareConnect.InventoryApi* | [**retrieveInventoryChanges**](docs/InventoryApi.md#retrieveInventoryChanges) | **GET** /v2/inventory/{catalog_object_id}/changes | RetrieveInventoryChanges *SquareConnect.InventoryApi* | [**retrieveInventoryCount**](docs/InventoryApi.md#retrieveInventoryCount) | **GET** /v2/inventory/{catalog_object_id} | RetrieveInventoryCount *SquareConnect.InventoryApi* | [**retrieveInventoryPhysicalCount**](docs/InventoryApi.md#retrieveInventoryPhysicalCount) | **GET** /v2/inventory/physical-count/{physical_count_id} | RetrieveInventoryPhysicalCount +*SquareConnect.InvoicesApi* | [**cancelInvoice**](docs/InvoicesApi.md#cancelInvoice) | **POST** /v2/invoices/{invoice_id}/cancel | CancelInvoice +*SquareConnect.InvoicesApi* | [**createInvoice**](docs/InvoicesApi.md#createInvoice) | **POST** /v2/invoices | CreateInvoice +*SquareConnect.InvoicesApi* | [**deleteInvoice**](docs/InvoicesApi.md#deleteInvoice) | **DELETE** /v2/invoices/{invoice_id} | DeleteInvoice +*SquareConnect.InvoicesApi* | [**getInvoice**](docs/InvoicesApi.md#getInvoice) | **GET** /v2/invoices/{invoice_id} | GetInvoice +*SquareConnect.InvoicesApi* | [**listInvoices**](docs/InvoicesApi.md#listInvoices) | **GET** /v2/invoices | ListInvoices +*SquareConnect.InvoicesApi* | [**publishInvoice**](docs/InvoicesApi.md#publishInvoice) | **POST** /v2/invoices/{invoice_id}/publish | PublishInvoice +*SquareConnect.InvoicesApi* | [**searchInvoices**](docs/InvoicesApi.md#searchInvoices) | **POST** /v2/invoices/search | SearchInvoices +*SquareConnect.InvoicesApi* | [**updateInvoice**](docs/InvoicesApi.md#updateInvoice) | **PUT** /v2/invoices/{invoice_id} | UpdateInvoice *SquareConnect.LaborApi* | [**createBreakType**](docs/LaborApi.md#createBreakType) | **POST** /v2/labor/break-types | CreateBreakType *SquareConnect.LaborApi* | [**createShift**](docs/LaborApi.md#createShift) | **POST** /v2/labor/shifts | CreateShift *SquareConnect.LaborApi* | [**deleteBreakType**](docs/LaborApi.md#deleteBreakType) | **DELETE** /v2/labor/break-types/{id} | DeleteBreakType @@ -282,6 +291,7 @@ Class | Method | HTTP request | Description - [SquareConnect.AcceptDisputeResponse](docs/AcceptDisputeResponse.md) - [SquareConnect.AccumulateLoyaltyPointsRequest](docs/AccumulateLoyaltyPointsRequest.md) - [SquareConnect.AccumulateLoyaltyPointsResponse](docs/AccumulateLoyaltyPointsResponse.md) + - [SquareConnect.ActionCancelReason](docs/ActionCancelReason.md) - [SquareConnect.AddGroupToCustomerRequest](docs/AddGroupToCustomerRequest.md) - [SquareConnect.AddGroupToCustomerResponse](docs/AddGroupToCustomerResponse.md) - [SquareConnect.AdditionalRecipient](docs/AdditionalRecipient.md) @@ -319,6 +329,8 @@ Class | Method | HTTP request | Description - [SquareConnect.CalculateLoyaltyPointsResponse](docs/CalculateLoyaltyPointsResponse.md) - [SquareConnect.CalculateOrderRequest](docs/CalculateOrderRequest.md) - [SquareConnect.CalculateOrderResponse](docs/CalculateOrderResponse.md) + - [SquareConnect.CancelInvoiceRequest](docs/CancelInvoiceRequest.md) + - [SquareConnect.CancelInvoiceResponse](docs/CancelInvoiceResponse.md) - [SquareConnect.CancelPaymentByIdempotencyKeyRequest](docs/CancelPaymentByIdempotencyKeyRequest.md) - [SquareConnect.CancelPaymentByIdempotencyKeyResponse](docs/CancelPaymentByIdempotencyKeyResponse.md) - [SquareConnect.CancelPaymentRequest](docs/CancelPaymentRequest.md) @@ -418,6 +430,8 @@ Class | Method | HTTP request | Description - [SquareConnect.CreateDisputeEvidenceFileResponse](docs/CreateDisputeEvidenceFileResponse.md) - [SquareConnect.CreateDisputeEvidenceTextRequest](docs/CreateDisputeEvidenceTextRequest.md) - [SquareConnect.CreateDisputeEvidenceTextResponse](docs/CreateDisputeEvidenceTextResponse.md) + - [SquareConnect.CreateInvoiceRequest](docs/CreateInvoiceRequest.md) + - [SquareConnect.CreateInvoiceResponse](docs/CreateInvoiceResponse.md) - [SquareConnect.CreateLocationRequest](docs/CreateLocationRequest.md) - [SquareConnect.CreateLocationResponse](docs/CreateLocationResponse.md) - [SquareConnect.CreateLoyaltyAccountRequest](docs/CreateLoyaltyAccountRequest.md) @@ -439,6 +453,7 @@ Class | Method | HTTP request | Description - [SquareConnect.CreateTerminalCheckoutRequest](docs/CreateTerminalCheckoutRequest.md) - [SquareConnect.CreateTerminalCheckoutResponse](docs/CreateTerminalCheckoutResponse.md) - [SquareConnect.Currency](docs/Currency.md) + - [SquareConnect.CustomAttributeFilter](docs/CustomAttributeFilter.md) - [SquareConnect.Customer](docs/Customer.md) - [SquareConnect.CustomerCreationSource](docs/CustomerCreationSource.md) - [SquareConnect.CustomerCreationSourceFilter](docs/CustomerCreationSourceFilter.md) @@ -464,6 +479,8 @@ Class | Method | HTTP request | Description - [SquareConnect.DeleteCustomerGroupResponse](docs/DeleteCustomerGroupResponse.md) - [SquareConnect.DeleteCustomerRequest](docs/DeleteCustomerRequest.md) - [SquareConnect.DeleteCustomerResponse](docs/DeleteCustomerResponse.md) + - [SquareConnect.DeleteInvoiceRequest](docs/DeleteInvoiceRequest.md) + - [SquareConnect.DeleteInvoiceResponse](docs/DeleteInvoiceResponse.md) - [SquareConnect.DeleteLoyaltyRewardRequest](docs/DeleteLoyaltyRewardRequest.md) - [SquareConnect.DeleteLoyaltyRewardResponse](docs/DeleteLoyaltyRewardResponse.md) - [SquareConnect.DeleteShiftRequest](docs/DeleteShiftRequest.md) @@ -499,6 +516,8 @@ Class | Method | HTTP request | Description - [SquareConnect.GetDeviceCodeResponse](docs/GetDeviceCodeResponse.md) - [SquareConnect.GetEmployeeWageRequest](docs/GetEmployeeWageRequest.md) - [SquareConnect.GetEmployeeWageResponse](docs/GetEmployeeWageResponse.md) + - [SquareConnect.GetInvoiceRequest](docs/GetInvoiceRequest.md) + - [SquareConnect.GetInvoiceResponse](docs/GetInvoiceResponse.md) - [SquareConnect.GetPaymentRefundRequest](docs/GetPaymentRefundRequest.md) - [SquareConnect.GetPaymentRefundResponse](docs/GetPaymentRefundResponse.md) - [SquareConnect.GetPaymentRequest](docs/GetPaymentRequest.md) @@ -515,6 +534,18 @@ Class | Method | HTTP request | Description - [SquareConnect.InventoryPhysicalCount](docs/InventoryPhysicalCount.md) - [SquareConnect.InventoryState](docs/InventoryState.md) - [SquareConnect.InventoryTransfer](docs/InventoryTransfer.md) + - [SquareConnect.Invoice](docs/Invoice.md) + - [SquareConnect.InvoiceFilter](docs/InvoiceFilter.md) + - [SquareConnect.InvoicePaymentReminder](docs/InvoicePaymentReminder.md) + - [SquareConnect.InvoicePaymentReminderStatus](docs/InvoicePaymentReminderStatus.md) + - [SquareConnect.InvoicePaymentRequest](docs/InvoicePaymentRequest.md) + - [SquareConnect.InvoiceQuery](docs/InvoiceQuery.md) + - [SquareConnect.InvoiceRecipient](docs/InvoiceRecipient.md) + - [SquareConnect.InvoiceRequestMethod](docs/InvoiceRequestMethod.md) + - [SquareConnect.InvoiceRequestType](docs/InvoiceRequestType.md) + - [SquareConnect.InvoiceSort](docs/InvoiceSort.md) + - [SquareConnect.InvoiceSortField](docs/InvoiceSortField.md) + - [SquareConnect.InvoiceStatus](docs/InvoiceStatus.md) - [SquareConnect.ItemVariationLocationOverrides](docs/ItemVariationLocationOverrides.md) - [SquareConnect.JobAssignment](docs/JobAssignment.md) - [SquareConnect.JobAssignmentPayType](docs/JobAssignmentPayType.md) @@ -548,6 +579,8 @@ Class | Method | HTTP request | Description - [SquareConnect.ListEmployeeWagesResponse](docs/ListEmployeeWagesResponse.md) - [SquareConnect.ListEmployeesRequest](docs/ListEmployeesRequest.md) - [SquareConnect.ListEmployeesResponse](docs/ListEmployeesResponse.md) + - [SquareConnect.ListInvoicesRequest](docs/ListInvoicesRequest.md) + - [SquareConnect.ListInvoicesResponse](docs/ListInvoicesResponse.md) - [SquareConnect.ListLocationsRequest](docs/ListLocationsRequest.md) - [SquareConnect.ListLocationsResponse](docs/ListLocationsResponse.md) - [SquareConnect.ListLoyaltyProgramsRequest](docs/ListLoyaltyProgramsRequest.md) @@ -642,6 +675,7 @@ Class | Method | HTTP request | Description - [SquareConnect.OrderLineItemTaxScope](docs/OrderLineItemTaxScope.md) - [SquareConnect.OrderLineItemTaxType](docs/OrderLineItemTaxType.md) - [SquareConnect.OrderMoneyAmounts](docs/OrderMoneyAmounts.md) + - [SquareConnect.OrderPricingOptions](docs/OrderPricingOptions.md) - [SquareConnect.OrderQuantityUnit](docs/OrderQuantityUnit.md) - [SquareConnect.OrderReturn](docs/OrderReturn.md) - [SquareConnect.OrderReturnDiscount](docs/OrderReturnDiscount.md) @@ -665,6 +699,9 @@ Class | Method | HTTP request | Description - [SquareConnect.ProcessingFee](docs/ProcessingFee.md) - [SquareConnect.Product](docs/Product.md) - [SquareConnect.ProductType](docs/ProductType.md) + - [SquareConnect.PublishInvoiceRequest](docs/PublishInvoiceRequest.md) + - [SquareConnect.PublishInvoiceResponse](docs/PublishInvoiceResponse.md) + - [SquareConnect.Range](docs/Range.md) - [SquareConnect.RedeemLoyaltyRewardRequest](docs/RedeemLoyaltyRewardRequest.md) - [SquareConnect.RedeemLoyaltyRewardResponse](docs/RedeemLoyaltyRewardResponse.md) - [SquareConnect.Refund](docs/Refund.md) @@ -720,10 +757,15 @@ Class | Method | HTTP request | Description - [SquareConnect.RetrieveWageSettingResponse](docs/RetrieveWageSettingResponse.md) - [SquareConnect.RevokeTokenRequest](docs/RevokeTokenRequest.md) - [SquareConnect.RevokeTokenResponse](docs/RevokeTokenResponse.md) + - [SquareConnect.SearchCatalogItemsRequest](docs/SearchCatalogItemsRequest.md) + - [SquareConnect.SearchCatalogItemsRequestStockLevel](docs/SearchCatalogItemsRequestStockLevel.md) + - [SquareConnect.SearchCatalogItemsResponse](docs/SearchCatalogItemsResponse.md) - [SquareConnect.SearchCatalogObjectsRequest](docs/SearchCatalogObjectsRequest.md) - [SquareConnect.SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md) - [SquareConnect.SearchCustomersRequest](docs/SearchCustomersRequest.md) - [SquareConnect.SearchCustomersResponse](docs/SearchCustomersResponse.md) + - [SquareConnect.SearchInvoicesRequest](docs/SearchInvoicesRequest.md) + - [SquareConnect.SearchInvoicesResponse](docs/SearchInvoicesResponse.md) - [SquareConnect.SearchLoyaltyAccountsRequest](docs/SearchLoyaltyAccountsRequest.md) - [SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery](docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md) - [SquareConnect.SearchLoyaltyAccountsResponse](docs/SearchLoyaltyAccountsResponse.md) @@ -780,7 +822,6 @@ Class | Method | HTTP request | Description - [SquareConnect.TenderCashDetails](docs/TenderCashDetails.md) - [SquareConnect.TenderType](docs/TenderType.md) - [SquareConnect.TerminalCheckout](docs/TerminalCheckout.md) - - [SquareConnect.TerminalCheckoutCancelReason](docs/TerminalCheckoutCancelReason.md) - [SquareConnect.TerminalCheckoutQuery](docs/TerminalCheckoutQuery.md) - [SquareConnect.TerminalCheckoutQueryFilter](docs/TerminalCheckoutQueryFilter.md) - [SquareConnect.TerminalCheckoutQuerySort](docs/TerminalCheckoutQuerySort.md) @@ -795,6 +836,8 @@ Class | Method | HTTP request | Description - [SquareConnect.UpdateCustomerGroupResponse](docs/UpdateCustomerGroupResponse.md) - [SquareConnect.UpdateCustomerRequest](docs/UpdateCustomerRequest.md) - [SquareConnect.UpdateCustomerResponse](docs/UpdateCustomerResponse.md) + - [SquareConnect.UpdateInvoiceRequest](docs/UpdateInvoiceRequest.md) + - [SquareConnect.UpdateInvoiceResponse](docs/UpdateInvoiceResponse.md) - [SquareConnect.UpdateItemModifierListsRequest](docs/UpdateItemModifierListsRequest.md) - [SquareConnect.UpdateItemModifierListsResponse](docs/UpdateItemModifierListsResponse.md) - [SquareConnect.UpdateItemTaxesRequest](docs/UpdateItemTaxesRequest.md) diff --git a/docs/TerminalCheckoutCancelReason.md b/docs/ActionCancelReason.md similarity index 76% rename from docs/TerminalCheckoutCancelReason.md rename to docs/ActionCancelReason.md index 067a0b5..6bae4e1 100644 --- a/docs/TerminalCheckoutCancelReason.md +++ b/docs/ActionCancelReason.md @@ -1,4 +1,4 @@ -# SquareConnect.TerminalCheckoutCancelReason +# SquareConnect.ActionCancelReason ## Enum diff --git a/docs/BatchRetrieveInventoryChangesRequest.md b/docs/BatchRetrieveInventoryChangesRequest.md index 62dac2b..ef46dc5 100644 --- a/docs/BatchRetrieveInventoryChangesRequest.md +++ b/docs/BatchRetrieveInventoryChangesRequest.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**catalog_object_ids** | **[String]** | Filters results by `CatalogObject` ID. Only applied when set. Default: unset. | [optional] +**catalog_object_ids** | **[String]** | Filters results by `CatalogObject` ID. Only applied when set. Max size is 500 IDs. Default: unset. | [optional] **location_ids** | **[String]** | Filters results by `Location` ID. Only applied when set. Default: unset. | [optional] **types** | **[String]** | Filters results by `InventoryChangeType`. Default: [`PHYSICAL_COUNT`, `ADJUSTMENT`]. `TRANSFER` is not supported as a filter. See [InventoryChangeType](#type-inventorychangetype) for possible values | [optional] **states** | **[String]** | Filters `ADJUSTMENT` query results by `InventoryState`. Only applied when set. Default: unset. See [InventoryState](#type-inventorystate) for possible values | [optional] diff --git a/docs/BatchRetrieveInventoryCountsRequest.md b/docs/BatchRetrieveInventoryCountsRequest.md index c265363..395c7f3 100644 --- a/docs/BatchRetrieveInventoryCountsRequest.md +++ b/docs/BatchRetrieveInventoryCountsRequest.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**catalog_object_ids** | **[String]** | Filters results by `CatalogObject` ID. Only applied when set. Default: unset. | [optional] +**catalog_object_ids** | **[String]** | Filters results by `CatalogObject` ID. Only applied when set. Max size is 1000 IDs. Default: unset. | [optional] **location_ids** | **[String]** | Filters results by `Location` ID. Only applied when set. Default: unset. | [optional] **updated_after** | **String** | Provided as an RFC 3339 timestamp. Returns results whose `calculated_at` value is after the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). | [optional] **cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | [optional] diff --git a/docs/BreakType.md b/docs/BreakType.md index 96fbfcc..20d9216 100644 --- a/docs/BreakType.md +++ b/docs/BreakType.md @@ -2,7 +2,7 @@ ### Description -A defined break template that sets an expectation for possible `Break` instances on a `Shift`. +A defined break template that sets an expectation for possible `Break` instances on a `Shift`. ## Properties Name | Type | Description | Notes @@ -12,7 +12,7 @@ Name | Type | Description | Notes **break_name** | **String** | A human-readable name for this type of break. Will be displayed to employees in Square products. | **expected_duration** | **String** | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of this break. Precision below minutes is truncated. | **is_paid** | **Boolean** | Whether this break counts towards time worked for compensation purposes. | -**version** | **Number** | Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If a value is not provided, Square's servers execute a \"blind\" write; potentially overwriting another writer's data. | [optional] +**version** | **Number** | Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If a value is not provided, Square's servers execute a \"blind\" write; potentially overwriting another writer's data. | [optional] **created_at** | **String** | A read-only timestamp in RFC 3339 format. | [optional] **updated_at** | **String** | A read-only timestamp in RFC 3339 format. | [optional] diff --git a/docs/CancelInvoiceRequest.md b/docs/CancelInvoiceRequest.md new file mode 100644 index 0000000..b67859b --- /dev/null +++ b/docs/CancelInvoiceRequest.md @@ -0,0 +1,13 @@ +# SquareConnect.CancelInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `CancelInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **Number** | The version of the `invoice` to cancel. If you do not know the version, you can call `GetInvoice](#endpoint-Invoices-GetInvoice) or [ListInvoices`. | + + diff --git a/docs/CancelInvoiceResponse.md b/docs/CancelInvoiceResponse.md new file mode 100644 index 0000000..94e91aa --- /dev/null +++ b/docs/CancelInvoiceResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CancelInvoiceResponse + +### Description +**Note: This model is in beta.** + +The response returned by the `CancelInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The canceled invoice. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md index fd052eb..29cd78a 100644 --- a/docs/CatalogApi.md +++ b/docs/CatalogApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**deleteCatalogObject**](CatalogApi.md#deleteCatalogObject) | **DELETE** /v2/catalog/object/{object_id} | DeleteCatalogObject [**listCatalog**](CatalogApi.md#listCatalog) | **GET** /v2/catalog/list | ListCatalog [**retrieveCatalogObject**](CatalogApi.md#retrieveCatalogObject) | **GET** /v2/catalog/object/{object_id} | RetrieveCatalogObject +[**searchCatalogItems**](CatalogApi.md#searchCatalogItems) | **POST** /v2/catalog/search-catalog-items | SearchCatalogItems [**searchCatalogObjects**](CatalogApi.md#searchCatalogObjects) | **POST** /v2/catalog/search | SearchCatalogObjects [**updateItemModifierLists**](CatalogApi.md#updateItemModifierLists) | **POST** /v2/catalog/update-item-modifier-lists | UpdateItemModifierLists [**updateItemTaxes**](CatalogApi.md#updateItemTaxes) | **POST** /v2/catalog/update-item-taxes | UpdateItemTaxes @@ -167,7 +168,7 @@ Name | Type | Description | Notes CatalogInfo -Returns information about the Square Catalog API, such as batch size limits for `BatchUpsertCatalogObjects`. +Retrieves information about the Square Catalog API, such as batch size limits that can be used by the `BatchUpsertCatalogObjects` endpoint. ### Example ```javascript @@ -349,6 +350,55 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **searchCatalogItems** +**Note: This endpoint is in beta.** +> SearchCatalogItemsResponse searchCatalogItems(body) + +SearchCatalogItems + +Searches for catalog items or item variations by matching supported search attribute values, including custom attribute values, against one or more of the specified query expressions, This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints use different call conventions, including the query filter formats. + +### 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.CatalogApi(); + +var body = new SquareConnect.SearchCatalogItemsRequest(); // SearchCatalogItemsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.searchCatalogItems(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SearchCatalogItemsRequest**](SearchCatalogItemsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**SearchCatalogItemsResponse**](SearchCatalogItemsResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json @@ -360,7 +410,7 @@ Name | Type | Description | Notes SearchCatalogObjects -Queries the targeted catalog using a variety of query expressions. Supported query expressions are of the following types: - [CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), - [CatalogQueryExact](#type-catalogqueryexact), - [CatalogQueryRange](#type-catalogqueryrange), - [CatalogQueryText](#type-catalogquerytext), - [CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), - [CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist), - [CatalogQueryItemsForItemOptions](#type-catalogqueryitemsforitemoptions), and - [CatalogQueryItemVariationsForItemOptionValues](#type-catalogqueryitemvariationsforitemoptionvalues). +Searches for [CatalogObject](#type-CatalogObject) of any types against supported search attribute values, excluding custom attribute values on items or item variations, against one or more of the specified query expressions, This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints have different call conventions, including the query filter formats. ### Example ```javascript diff --git a/docs/CatalogCategory.md b/docs/CatalogCategory.md index 2e39b59..9d3646e 100644 --- a/docs/CatalogCategory.md +++ b/docs/CatalogCategory.md @@ -2,11 +2,11 @@ ### Description -A category to which a `CatalogItem` belongs in the `Catalog` object model. +A category to which a `CatalogItem` instance belongs. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The category name. Searchable. This field has max length of 255 Unicode code points. | [optional] +**name** | **String** | The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] diff --git a/docs/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md b/docs/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md index 7848487..4693c3e 100644 --- a/docs/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md +++ b/docs/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md @@ -9,6 +9,6 @@ A named selection for this `SELECTION`-type custom attribute definition. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uid** | **String** | Unique ID set by Square. | [optional] -**name** | **String** | Selection name, unique within `allowed_selections`. Required. Min length of 1, max length of 255. | +**name** | **String** | Selection name, unique within `allowed_selections`. | diff --git a/docs/CatalogDiscount.md b/docs/CatalogDiscount.md index b3573e1..f5b978d 100644 --- a/docs/CatalogDiscount.md +++ b/docs/CatalogDiscount.md @@ -2,15 +2,15 @@ ### Description -A discount in the Catalog object model. +A discount applicable to items. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The discount name. Searchable. This field has max length of 255 Unicode code points. | [optional] +**name** | **String** | The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] **discount_type** | **String** | Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale. See [CatalogDiscountType](#type-catalogdiscounttype) for possible values | [optional] -**percentage** | **String** | The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not include this field for amount-based or variable discounts. | [optional] -**amount_money** | [**Money**](Money.md) | The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not include this field for percentage-based or variable discounts. | [optional] +**percentage** | **String** | The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not use this field for amount-based or variable discounts. | [optional] +**amount_money** | [**Money**](Money.md) | The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not use this field for percentage-based or variable discounts. | [optional] **pin_required** | **Boolean** | Indicates whether a mobile staff member needs to enter their PIN to apply the discount to a payment in the Square Point of Sale app. | [optional] **label_color** | **String** | The color of the discount display label in the Square Point of Sale app. This must be a valid hex color code. | [optional] **modify_tax_basis** | **String** | Indicates whether this discount should reduce the price used to calculate tax. Most discounts should use `MODIFY_TAX_BASIS`. However, in some circumstances taxes must be calculated based on an item's price, ignoring a particular discount. For example, in many US jurisdictions, a manufacturer coupon or instant rebate reduces the price a customer pays but does not reduce the sale price used to calculate how much sales tax is due. In this case, the discount representing that manufacturer coupon should have `DO_NOT_MODIFY_TAX_BASIS` for this field. If you are unsure whether you need to use this field, consult your tax professional. See [CatalogDiscountModifyTaxBasis](#type-catalogdiscountmodifytaxbasis) for possible values | [optional] diff --git a/docs/CatalogIdMapping.md b/docs/CatalogIdMapping.md index cb4d876..dd4af56 100644 --- a/docs/CatalogIdMapping.md +++ b/docs/CatalogIdMapping.md @@ -2,12 +2,12 @@ ### Description -A mapping between a client-supplied temporary ID and a permanent server ID. +A mapping between a temporary client-supplied ID and a permanent server-generated ID. When calling [UpsertCatalogObject](#endpoint-Catalog-UpsertCatalogObject) or [BatchUpsertCatalogObjects](#endpoint-Catalog-BatchUpsertCatalogObjects) to create a [CatalogObject](#type-CatalogObject) instance, you can supply a temporary ID for the to-be-created object, especially when the object is to be referenced elsewhere in the same request body. This temporary ID can be any string unique within the call, but must be prefixed by \"#\". After the request is sumbitted and the object created, a permanent server-generated ID is assigned to the new object. The permanent ID is unique across the Square catalog. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_object_id** | **String** | The client-supplied, temporary `#`-prefixed ID for a new `CatalogObject`. | [optional] +**client_object_id** | **String** | The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`. | [optional] **object_id** | **String** | The permanent ID for the CatalogObject created by the server. | [optional] diff --git a/docs/CatalogImage.md b/docs/CatalogImage.md index 9fb0b59..aeaa50f 100644 --- a/docs/CatalogImage.md +++ b/docs/CatalogImage.md @@ -2,13 +2,13 @@ ### Description -An image file to use in Square catalogs. Can be associated with catalog items, item variations, and categories. +An image file to use in Square catalogs. It can be associated with catalog items, item variations, and categories. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The internal name of this image. Identifies this image in calls to the Connect APIs. | [optional] -**url** | **String** | The URL of this image. Generated by Square after an image is uploaded to the CreateCatalogImage endpoint. | [optional] -**caption** | **String** | A caption that describes what is shown in the image. Displayed in the Square Online Store. | [optional] +**name** | **String** | The internal name to identify this image in calls to the Square API. | [optional] +**url** | **String** | The URL of this image, generated by Square after an image is uploaded using the `CreateCatalogImage` endpoint. | [optional] +**caption** | **String** | A caption that describes what is shown in the image. Displayed in the Square Online Store. This is a searchable attribute for use in applicable query filters. | [optional] diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index cc48d88..345c84c 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -2,14 +2,14 @@ ### Description -An item (i.e., product family) in the Catalog object model. +An [CatalogObject](#type-CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. | [optional] -**description** | **String** | The item's description. Searchable. This field has max length of 4096 Unicode code points. | [optional] -**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points. | [optional] +**name** | **String** | The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points. | [optional] +**description** | **String** | The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] +**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. This attribute is searchable, and its value length is of Unicode code points. | [optional] **label_color** | **String** | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | [optional] **available_online** | **Boolean** | If `true`, the item can be added to shipping orders from the merchant's online store. | [optional] **available_for_pickup** | **Boolean** | If `true`, the item can be added to pickup orders from the merchant's online store. | [optional] diff --git a/docs/CatalogItemModifierListInfo.md b/docs/CatalogItemModifierListInfo.md index d679485..d6e0045 100644 --- a/docs/CatalogItemModifierListInfo.md +++ b/docs/CatalogItemModifierListInfo.md @@ -2,7 +2,7 @@ ### Description -Controls the properties of a `CatalogModifierList` as it applies to this `CatalogItem`. +Options to control the properties of a `CatalogModifierList` applied to a `CatalogItem` instance. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogItemOption.md b/docs/CatalogItemOption.md index f7800ce..5f5ed55 100644 --- a/docs/CatalogItemOption.md +++ b/docs/CatalogItemOption.md @@ -8,9 +8,9 @@ A group of variations for a `CatalogItem`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The item option's display name for the seller. Must be unique across all item options. Searchable. | [optional] -**display_name** | **String** | The item option's display name for the customer. Searchable. | [optional] -**description** | **String** | The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. | [optional] +**name** | **String** | The item option's display name for the seller. Must be unique across all item options. This is a searchable attribute for use in applicable query filters. | [optional] +**display_name** | **String** | The item option's display name for the customer. This is a searchable attribute for use in applicable query filters. | [optional] +**description** | **String** | The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. This is a searchable attribute for use in applicable query filters. | [optional] **show_colors** | **Boolean** | If true, display colors for entries in `values` when present. | [optional] **values** | [**[CatalogObject]**](CatalogObject.md) | A list of CatalogObjects containing the `CatalogItemOptionValue`s for this item. | [optional] **item_count** | **Number** | The number of `CatalogItem`s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`. | [optional] diff --git a/docs/CatalogItemOptionForItem.md b/docs/CatalogItemOptionForItem.md index 562c225..74958c0 100644 --- a/docs/CatalogItemOptionForItem.md +++ b/docs/CatalogItemOptionForItem.md @@ -3,7 +3,7 @@ ### 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. + An option that can be assigned to an item. For example, a t-shirt item may offer a color option or a size option. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogItemOptionValue.md b/docs/CatalogItemOptionValue.md index 2d75d32..dbb9c8d 100644 --- a/docs/CatalogItemOptionValue.md +++ b/docs/CatalogItemOptionValue.md @@ -9,10 +9,10 @@ An enumerated value that can link a `CatalogItemVariation` to an item option as 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** | A human-readable description for the option value. | [optional] +**name** | **String** | Name of this item option value. This is a searchable attribute for use in applicable query filters. | [optional] +**description** | **String** | A human-readable description for the option value. This is a searchable attribute for use in applicable query filters. | [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`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] +**item_variation_count** | **Number** | The number of `CatalogItemVariation`s that currently use this item option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent item option of this value. | [optional] diff --git a/docs/CatalogItemVariation.md b/docs/CatalogItemVariation.md index 95187ce..b9a63a3 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -7,10 +7,10 @@ An item variation (i.e., product) in the Catalog object model. Each item may hav ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**item_id** | **String** | The ID of the `CatalogItem` associated with this item variation. Searchable. | [optional] -**name** | **String** | The item variation's name. Searchable. This field has max length of 255 Unicode code points. | [optional] -**sku** | **String** | The item variation's SKU, if any. Searchable. | [optional] -**upc** | **String** | The item variation's UPC, if any. Searchable in the Connect API. This field is only exposed in the Connect API. It is not exposed in Square's Dashboard, Square Point of Sale app or Retail Point of Sale app. | [optional] +**item_id** | **String** | The ID of the `CatalogItem` associated with this item variation. | [optional] +**name** | **String** | The item variation's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] +**sku** | **String** | The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters. | [optional] +**upc** | **String** | The item variation's UPC, if any. This is a searchable attribute for use in applicable query filters. It is only accessible through the Square API, and not exposed in the Square Seller Dashboard, Square Point of Sale or Retail Point of Sale apps. | [optional] **ordinal** | **Number** | The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal for each item variation within a parent `CatalogItem` is set according to the item variations's position. On reads, the value is not guaranteed to be sequential or unique. | [optional] **pricing_type** | **String** | Indicates whether the item variation's price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for possible values | [optional] **price_money** | [**Money**](Money.md) | The item variation's price, if fixed pricing is used. | [optional] @@ -18,7 +18,7 @@ Name | Type | Description | Notes **track_inventory** | **Boolean** | If `true`, inventory tracking is active for the variation. | [optional] **inventory_alert_type** | **String** | Indicates whether the item variation displays an alert when its inventory quantity is less than or equal to its `inventory_alert_threshold`. See [InventoryAlertType](#type-inventoryalerttype) for possible values | [optional] **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. Searchable. This field has max length of 255 Unicode code points. | [optional] +**user_data** | **String** | Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points. | [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] [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/CatalogModifier.md b/docs/CatalogModifier.md index 990efea..77bf5a0 100644 --- a/docs/CatalogModifier.md +++ b/docs/CatalogModifier.md @@ -2,14 +2,14 @@ ### Description -A modifier in the Catalog object model. +A modifier applicable to items at the time of sale. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The modifier name. Searchable. This field has max length of 255 Unicode code points. | [optional] +**name** | **String** | The modifier name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] **price_money** | [**Money**](Money.md) | The modifier price. | [optional] **ordinal** | **Number** | Determines where this `CatalogModifier` appears in the `CatalogModifierList`. | [optional] -**modifier_list_id** | **String** | The ID of the `CatalogModifierList` associated with this modifier. Searchable. | [optional] +**modifier_list_id** | **String** | The ID of the `CatalogModifierList` associated with this modifier. | [optional] diff --git a/docs/CatalogModifierList.md b/docs/CatalogModifierList.md index 545fb61..4f6abdc 100644 --- a/docs/CatalogModifierList.md +++ b/docs/CatalogModifierList.md @@ -2,14 +2,14 @@ ### Description -A modifier list in the Catalog object model. A `CatalogModifierList` contains `CatalogModifier` objects that can be applied to a `CatalogItem` at the time of sale. For example, a modifier list \"Condiments\" that would apply to a \"Hot Dog\" `CatalogItem` might contain `CatalogModifier`s \"Ketchup\", \"Mustard\", and \"Relish\". The `selection_type` field specifies whether or not multiple selections from the modifier list are allowed. +A list of modifiers applicable to items at the time of sale. For example, a \"Condiments\" modifier list applicable to a \"Hot Dog\" item may contain \"Ketchup\", \"Mustard\", and \"Relish\" modifiers. Use the `selection_type` field to specify whether or not multiple selections from the modifier list are allowed. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | A searchable name for the `CatalogModifierList`. This field has max length of 255 Unicode code points. | [optional] -**ordinal** | **Number** | Determines where this `CatalogModifierList` appears in a list of `CatalogModifierList` values. | [optional] -**selection_type** | **String** | Indicates whether multiple options from the `CatalogModifierList` can be applied to a single `CatalogItem`. See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values | [optional] +**name** | **String** | The name for the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] +**ordinal** | **Number** | Determines where this modifier list appears in a list of `CatalogModifierList` values. | [optional] +**selection_type** | **String** | Indicates whether multiple options from the modifier list can be applied to a single `CatalogItem`. See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values | [optional] **modifiers** | [**[CatalogObject]**](CatalogObject.md) | The options included in the `CatalogModifierList`. You must include at least one `CatalogModifier`. Each CatalogObject must have type `MODIFIER` and contain `CatalogModifier` data. | [optional] diff --git a/docs/CatalogModifierOverride.md b/docs/CatalogModifierOverride.md index 25bb0d6..3589660 100644 --- a/docs/CatalogModifierOverride.md +++ b/docs/CatalogModifierOverride.md @@ -2,7 +2,7 @@ ### Description - +Options to control how to override the default behavior of the specified modifier. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index 4fbd01d..8bd6756 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -2,7 +2,7 @@ ### Description -The wrapper object for the Catalog entries of a given object type. The type of a particular `CatalogObject` is determined by the value of the `type` attribute and only the corresponding data attribute can be set on the `CatalogObject` instance. For example, the following list shows some instances of `CatalogObject` of a given `type` and their corresponding data atrribute that can be set: - For a `CatalogObject` of the `ITEM` type, set the `item_data` attribute to yield the `CatalogItem` object. - For a `CatalogObject` of the `ITEM_VARIATION` type, set the `item_variation_data` attribute to yield the `CatalogItemVariation` object. - For a 'CatalogObject' of the `MODIFIER` type, set the `modifier_data` attribute to yield the `CatalogModifier` object. - For a 'CatalogObject' of the `MODIFIER_LIST` type, set the `modifier_list_data` attribute to yield the `CatalogModifierList` object. - For a 'CatalogObject' of the `CATEGORY` type, set the `category_data` attribute to yield the `CatalogCategory` object. - For a 'CatalogObject' of the `DISCOUNT` type, set the `discount_data` attribute to yield the `CatalogDiscount` object. - For a 'CatalogObject' of the `TAX` type, set the `tax_data` attribute to yield the `CatalogTax` object. - For a 'CatalogObject' of the `IMAGE` type, set the `image_data` attribute to yield the `CatalogImageData` object. - For a 'CatalogObject' of the `QUICK_AMOUNTS_SETTINGS` type, set the `quick_amounts_settings_data` attribute to yield the `CatalogQuickAmountsSettings` object. - For a 'CatalogObject' of the `PRICING_RULE` type, set the `pricing_rule_data` attribute to yield the `CatalogPricingRule` object. - For a 'CatalogObject' of the `TIME_PERIOD` type, set the `time_period_data` attribute to yield the `CatalogTimePeriod` object. - For a 'CatalogObject' of the `PRODUCT_SET` type, set the `product_set_data` attribute to yield the `CatalogProductSet` object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. +The wrapper object for the Catalog entries of a given object type. The type of a particular `CatalogObject` is determined by the value of the `type` attribute and only the corresponding data attribute can be set on the `CatalogObject` instance. For example, the following list shows some instances of `CatalogObject` of a given `type` and their corresponding data atrribute that can be set: - For a `CatalogObject` of the `ITEM` type, set the `item_data` attribute to yield the `CatalogItem` object. - For a `CatalogObject` of the `ITEM_VARIATION` type, set the `item_variation_data` attribute to yield the `CatalogItemVariation` object. - For a `CatalogObject` of the `MODIFIER` type, set the `modifier_data` attribute to yield the `CatalogModifier` object. - For a `CatalogObject` of the `MODIFIER_LIST` type, set the `modifier_list_data` attribute to yield the `CatalogModifierList` object. - For a `CatalogObject` of the `CATEGORY` type, set the `category_data` attribute to yield the `CatalogCategory` object. - For a `CatalogObject` of the `DISCOUNT` type, set the `discount_data` attribute to yield the `CatalogDiscount` object. - For a `CatalogObject` of the `TAX` type, set the `tax_data` attribute to yield the `CatalogTax` object. - For a `CatalogObject` of the `IMAGE` type, set the `image_data` attribute to yield the `CatalogImageData` object. - For a `CatalogObject` of the `QUICK_AMOUNTS_SETTINGS` type, set the `quick_amounts_settings_data` attribute to yield the `CatalogQuickAmountsSettings` object. - For a `CatalogObject` of the `PRICING_RULE` type, set the `pricing_rule_data` attribute to yield the `CatalogPricingRule` object. - For a `CatalogObject` of the `TIME_PERIOD` type, set the `time_period_data` attribute to yield the `CatalogTimePeriod` object. - For a `CatalogObject` of the `PRODUCT_SET` type, set the `product_set_data` attribute to yield the `CatalogProductSet` object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQuery.md b/docs/CatalogQuery.md index 332a6be..3dec33b 100644 --- a/docs/CatalogQuery.md +++ b/docs/CatalogQuery.md @@ -2,19 +2,19 @@ ### Description -A query to be applied to a `SearchCatalogObjectsRequest`. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) (`CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`, `CatalogModifierList`, `CatalogModifier`). For example, a query that should return Items may specify attribute names from any of the searchable fields of the `CatalogItem` data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`. +A query composed of one or more different types of filters to narrow the scope of targeted objects when calling the `SearchCatalogObjects` endpoint. Although a query can have multiple filters, only one query is allowed per call to [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects). When a query filter is based on an attribute, the attribute must be searchable. Searchable attributes are listed as follows, along their parent types that can be searched for with applicable query filters. Searchable attribute and objects queryable by searchable attributes ** - `name`: `CatalogItem`, `CatalogItemVariation`, `CatelogCatogry`, `CatalogTax`, `CatalogDiscount`, `CatalogModifier`, 'CatalogModifierList`, `CatalogItemOption`, `CatalogItemOptionValue` - `description`: `CatalogItem`, `CatalogItemOptionValue` - `abbreviation`: `CatalogItem` - `upc`: `CatalogItemVariation` - `sku`: `CatalogItemVariation` - `caption`: `CatalogImage` - `display_name`: `CatalogItemOption` For example, to search for [CatalogItem](#type-CatalogItem) objects by searchable attributes, you can use the `\"name\"`, `\"description\"`, or `\"abbreviation\"` attribute in an applicable query filter. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sorted_attribute_query** | [**CatalogQuerySortedAttribute**](CatalogQuerySortedAttribute.md) | A query that returns all objects, sorted by the given attribute. | [optional] -**exact_query** | [**CatalogQueryExact**](CatalogQueryExact.md) | A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value. | [optional] -**prefix_query** | [**CatalogQueryPrefix**](CatalogQueryPrefix.md) | A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix. | [optional] -**range_query** | [**CatalogQueryRange**](CatalogQueryRange.md) | A query that returns only objects for which the given (integer-valued) attribute lies in the given range. | [optional] -**text_query** | [**CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a `CatalogItem` contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`. | [optional] -**items_for_tax_query** | [**CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query that returns all `CatalogItem`s that have any of the given `CatalogTax`es enabled. | [optional] -**items_for_modifier_list_query** | [**CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query that returns all `CatalogItem`s that have any of the given `CatalogModifierList`s enabled. | [optional] -**items_for_item_options_query** | [**CatalogQueryItemsForItemOptions**](CatalogQueryItemsForItemOptions.md) | A query that returns all `CatalogItem`s that have all of the given `CatalogItemOption`s. | [optional] -**item_variations_for_item_option_values_query** | [**CatalogQueryItemVariationsForItemOptionValues**](CatalogQueryItemVariationsForItemOptionValues.md) | A query that returns all `CatalogItemVariation`s that have all of the given `CatalogItemOption` values. | [optional] +**sorted_attribute_query** | [**CatalogQuerySortedAttribute**](CatalogQuerySortedAttribute.md) | A query expression to sort returned query result by the given attribute. | [optional] +**exact_query** | [**CatalogQueryExact**](CatalogQueryExact.md) | An exact query expression to return objects with attribute name and value matching the specified attribute name and value exactly. Value matching is case insensitive. | [optional] +**prefix_query** | [**CatalogQueryPrefix**](CatalogQueryPrefix.md) | A prefix query expression to return objects with attribute values that have a prefix matching the specified string value. Value maching is case insensitive. | [optional] +**range_query** | [**CatalogQueryRange**](CatalogQueryRange.md) | A range query expression to return objects with numberic values that lie in the specified range. | [optional] +**text_query** | [**CatalogQueryText**](CatalogQueryText.md) | A text query expression to return objectd whose searchable attributes contain all of the given keywords, irrespective of their order. For example, if a `CatalogItem` contains custom attribute values of `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, the query filter of `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}` returns this item. | [optional] +**items_for_tax_query** | [**CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query expression to return items that have any of the specified taxes (as identified by the corresponding `CatalogTax` object IDs) enabled. | [optional] +**items_for_modifier_list_query** | [**CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query expression to return items that have any of the given modifier list (as identifieid by the coresponding `CatalogModifierList`s IDs) enabled. | [optional] +**items_for_item_options_query** | [**CatalogQueryItemsForItemOptions**](CatalogQueryItemsForItemOptions.md) | A query expression to return items that contains the specified item options (as identified the corresponding `CatalogItemOption` IDs). | [optional] +**item_variations_for_item_option_values_query** | [**CatalogQueryItemVariationsForItemOptionValues**](CatalogQueryItemVariationsForItemOptionValues.md) | A query expression to return item variations (of the `CatalogItemVariation` that contain all of the specified `CatalogItemOption` IDs. | [optional] diff --git a/docs/CatalogQueryExact.md b/docs/CatalogQueryExact.md index a792aec..805f641 100644 --- a/docs/CatalogQueryExact.md +++ b/docs/CatalogQueryExact.md @@ -2,12 +2,12 @@ ### Description - +The query filter to return the serch result by exact match of the specified attribute name and value. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**attribute_name** | **String** | The name of the attribute to be searched. | -**attribute_value** | **String** | The desired value of the search attribute. | +**attribute_name** | **String** | The name of the attribute to be searched. Matching of the attribute name is exact. | +**attribute_value** | **String** | The desired value of the search attribute. Matching of the attribute value is case insensitive and can be partial. For example, if a specified value of \"sma\", objects with the named attribute value of \"Small\", \"small\" are both matched. | diff --git a/docs/CatalogQueryItemVariationsForItemOptionValues.md b/docs/CatalogQueryItemVariationsForItemOptionValues.md index ea7f85a..9b190f0 100644 --- a/docs/CatalogQueryItemVariationsForItemOptionValues.md +++ b/docs/CatalogQueryItemVariationsForItemOptionValues.md @@ -3,7 +3,7 @@ ### Description **Note: This model is in beta.** - +The query filter to return the item variations containing the specified item option value IDs. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQueryItemsForItemOptions.md b/docs/CatalogQueryItemsForItemOptions.md index c13a457..6632269 100644 --- a/docs/CatalogQueryItemsForItemOptions.md +++ b/docs/CatalogQueryItemsForItemOptions.md @@ -3,7 +3,7 @@ ### Description **Note: This model is in beta.** - +The query filter to return the items containing the specified item option IDs. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQueryItemsForModifierList.md b/docs/CatalogQueryItemsForModifierList.md index cee88a7..357ef48 100644 --- a/docs/CatalogQueryItemsForModifierList.md +++ b/docs/CatalogQueryItemsForModifierList.md @@ -2,7 +2,7 @@ ### Description - +The query filter to return the items containing the specified modifier list IDs. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQueryItemsForTax.md b/docs/CatalogQueryItemsForTax.md index 67dd1d9..6d617fc 100644 --- a/docs/CatalogQueryItemsForTax.md +++ b/docs/CatalogQueryItemsForTax.md @@ -2,7 +2,7 @@ ### Description - +The query filter to return the items containing the specified tax IDs. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQueryPrefix.md b/docs/CatalogQueryPrefix.md index c113964..d49197f 100644 --- a/docs/CatalogQueryPrefix.md +++ b/docs/CatalogQueryPrefix.md @@ -2,7 +2,7 @@ ### Description - +The query filter to return the search result whose named attribute values are prefixed by the specified attribute value. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQueryRange.md b/docs/CatalogQueryRange.md index ffa2ac9..f5be7e8 100644 --- a/docs/CatalogQueryRange.md +++ b/docs/CatalogQueryRange.md @@ -2,7 +2,7 @@ ### Description - +The query filter to return the search result whose named attribute values fall between the specified range. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogQuerySortedAttribute.md b/docs/CatalogQuerySortedAttribute.md index ea11302..c5e5dc2 100644 --- a/docs/CatalogQuerySortedAttribute.md +++ b/docs/CatalogQuerySortedAttribute.md @@ -2,12 +2,12 @@ ### Description - +The query expression to specify the key to sort search results. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**attribute_name** | **String** | The attribute whose value should be used as the sort key. | +**attribute_name** | **String** | The attribute whose value is used as the sort key. | **initial_attribute_value** | **String** | The first attribute value to be returned by the query. Ascending sorts will return only objects with this value or greater, while descending sorts will return only objects with this value or less. If unset, start at the beginning (for ascending sorts) or end (for descending sorts). | [optional] **sort_order** | **String** | The desired sort order, `\"ASC\"` (ascending) or `\"DESC\"` (descending). See [SortOrder](#type-sortorder) for possible values | [optional] diff --git a/docs/CatalogQueryText.md b/docs/CatalogQueryText.md index 686b094..7edafde 100644 --- a/docs/CatalogQueryText.md +++ b/docs/CatalogQueryText.md @@ -2,7 +2,7 @@ ### Description - +The query filter to return the search result whose searchable attribute values contain all of the specified keywords or tokens, independent of the token order or case. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogTax.md b/docs/CatalogTax.md index 4ad2f81..ae58228 100644 --- a/docs/CatalogTax.md +++ b/docs/CatalogTax.md @@ -2,12 +2,12 @@ ### Description -A tax in the Catalog object model. +A tax applicable to an item. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The tax's name. Searchable. This field has max length of 255 Unicode code points. | [optional] +**name** | **String** | The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. | [optional] **calculation_phase** | **String** | Whether the tax is calculated based on a payment's subtotal or total. See [TaxCalculationPhase](#type-taxcalculationphase) for possible values | [optional] **inclusion_type** | **String** | Whether the tax is `ADDITIVE` or `INCLUSIVE`. See [TaxInclusionType](#type-taxinclusiontype) for possible values | [optional] **percentage** | **String** | The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign. A value of `7.5` corresponds to 7.5%. | [optional] diff --git a/docs/CatalogV1Id.md b/docs/CatalogV1Id.md index 327382b..bdf31db 100644 --- a/docs/CatalogV1Id.md +++ b/docs/CatalogV1Id.md @@ -2,12 +2,12 @@ ### Description -An Items Connect V1 object ID along with its associated location ID. +A Square API V1 identifier of an item, including the object ID and its associated location ID. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**catalog_v1_id** | **String** | The ID for an object in Connect V1, if different from its Connect V2 ID. | [optional] +**catalog_v1_id** | **String** | The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID. | [optional] **location_id** | **String** | The ID of the `Location` this Connect V1 ID is associated with. | [optional] diff --git a/docs/CreateInvoiceRequest.md b/docs/CreateInvoiceRequest.md new file mode 100644 index 0000000..dddfb13 --- /dev/null +++ b/docs/CreateInvoiceRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `CreateInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The invoice to create. | +**idempotency_key** | **String** | A unique string that identifies the `CreateInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). | [optional] + + diff --git a/docs/CreateInvoiceResponse.md b/docs/CreateInvoiceResponse.md new file mode 100644 index 0000000..c938a77 --- /dev/null +++ b/docs/CreateInvoiceResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateInvoiceResponse + +### Description +**Note: This model is in beta.** + +The response returned by the `CreateInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The newly created invoice. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/CustomAttributeFilter.md b/docs/CustomAttributeFilter.md new file mode 100644 index 0000000..1534133 --- /dev/null +++ b/docs/CustomAttributeFilter.md @@ -0,0 +1,18 @@ +# SquareConnect.CustomAttributeFilter + +### Description +**Note: This model is in beta.** + +Supported custom attribute query expressions for calling the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint to search for items or item variations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_attribute_definition_id** | **String** | A query expression to filter items or item variations by matching their custom attributes' `custom_attribute_definition_id` property value against the the specified id. | [optional] +**key** | **String** | A query expression to filter items or item variations by matching their custom attributes' `key` property value against the specified key. | [optional] +**string_filter** | **String** | A query expression to filter items or item variations by matching their custom attributes' `string_value` property value against the specified text. | [optional] +**number_filter** | [**Range**](Range.md) | A query expression to filter items or item variations with their custom attributes containing a number value within the specified range. | [optional] +**selection_uids_filter** | **[String]** | A query expression to filter items or item variations by matching their custom attributes' `selection_uid_values` values against the specified selection uids. | [optional] +**bool_filter** | **Boolean** | A query expression to filter items or item variations by matching their custom attributes' `boolean_value` property values against the specified Boolean expression. | [optional] + + diff --git a/docs/DeleteInvoiceRequest.md b/docs/DeleteInvoiceRequest.md new file mode 100644 index 0000000..d049789 --- /dev/null +++ b/docs/DeleteInvoiceRequest.md @@ -0,0 +1,13 @@ +# SquareConnect.DeleteInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `DeleteInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **Number** | The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. | [optional] + + diff --git a/docs/DeleteInvoiceResponse.md b/docs/DeleteInvoiceResponse.md new file mode 100644 index 0000000..95bf89d --- /dev/null +++ b/docs/DeleteInvoiceResponse.md @@ -0,0 +1,13 @@ +# SquareConnect.DeleteInvoiceResponse + +### Description +**Note: This model is in beta.** + +Describes a `DeleteInvoice` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index b0014f3..6b3a06a 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -95,6 +95,12 @@ * `NO_FIELDS_SET` (value: `"NO_FIELDS_SET"`) +* `TOO_MANY_MAP_ENTRIES` (value: `"TOO_MANY_MAP_ENTRIES"`) + +* `MAP_KEY_LENGTH_TOO_SHORT` (value: `"MAP_KEY_LENGTH_TOO_SHORT"`) + +* `MAP_KEY_LENGTH_TOO_LONG` (value: `"MAP_KEY_LENGTH_TOO_LONG"`) + * `CARD_EXPIRED` (value: `"CARD_EXPIRED"`) * `INVALID_EXPIRATION` (value: `"INVALID_EXPIRATION"`) diff --git a/docs/GetInvoiceRequest.md b/docs/GetInvoiceRequest.md new file mode 100644 index 0000000..4199e93 --- /dev/null +++ b/docs/GetInvoiceRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.GetInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `GetInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/GetInvoiceResponse.md b/docs/GetInvoiceResponse.md new file mode 100644 index 0000000..ba7687d --- /dev/null +++ b/docs/GetInvoiceResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.GetInvoiceResponse + +### Description +**Note: This model is in beta.** + +Describes a `GetInvoice` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The invoice requested. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/InventoryAdjustment.md b/docs/InventoryAdjustment.md index 8335473..0d6e833 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/inventory-api/what-it-does#decimal-quantities-beta) for more information. | [optional] [beta] +**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. | [optional] **total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional] **occurred_at** | **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/InventoryApi.md b/docs/InventoryApi.md index fdf4d94..94fd209 100644 --- a/docs/InventoryApi.md +++ b/docs/InventoryApi.md @@ -228,7 +228,7 @@ var catalogObjectId = "catalogObjectId_example"; // String | ID of the `CatalogO var opts = { 'locationIds': "locationIds_example", // String | The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. - 'cursor': "cursor_example" // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + 'cursor': "cursor_example" // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. }; apiInstance.retrieveInventoryChanges(catalogObjectId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -244,7 +244,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **catalogObjectId** | **String**| ID of the `CatalogObject` to retrieve. | **locationIds** | **String**| The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. | [optional] - **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. | [optional] + **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | [optional] ### Return type diff --git a/docs/InventoryChange.md b/docs/InventoryChange.md index 3a29009..93453af 100644 --- a/docs/InventoryChange.md +++ b/docs/InventoryChange.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes **type** | **String** | Indicates how the inventory change was applied. See `InventoryChangeType` for all possible values. See [InventoryChangeType](#type-inventorychangetype) for possible values | [optional] **physical_count** | [**InventoryPhysicalCount**](InventoryPhysicalCount.md) | Contains details about the physical count when `type` is `PHYSICAL_COUNT` and unset for all other types. | [optional] **adjustment** | [**InventoryAdjustment**](InventoryAdjustment.md) | Contains details about the inventory adjustment when `type` is `ADJUSTMENT` and unset for all other types. | [optional] -**transfer** | [**InventoryTransfer**](InventoryTransfer.md) | Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types. | [optional] +**transfer** | [**InventoryTransfer**](InventoryTransfer.md) | Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types. _Note:_ An `InventoryTransfer` object is read-only and can only be present in a `RetrieveInventoryChangesResponse` and `BatchRetrieveInventoryChangesResponse` object. | [optional] diff --git a/docs/InventoryCount.md b/docs/InventoryCount.md index 6cbbacf..53c022b 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 affected by the estimated 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/docs/inventory-api/what-it-does#decimal-quantities-beta) for more information. | [optional] [beta] +**quantity** | **String** | The number of items affected by the estimated count as a decimal string. Can support up to 5 digits after the decimal point. | [optional] **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 52863bd..172aaa4 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/inventory-api/what-it-does#decimal-quantities-beta) for more information. | [optional] [beta] +**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. | [optional] **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 a6e64f8..db8f89c 100644 --- a/docs/InventoryTransfer.md +++ b/docs/InventoryTransfer.md @@ -9,12 +9,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | A unique ID generated by Square for the `InventoryTransfer`. | [optional] **reference_id** | **String** | An optional ID provided by the application to tie the `InventoryTransfer` to an external system. | [optional] -**state** | **String** | The `InventoryState` for the quantity of items being transfered. See [InventoryState](#type-inventorystate) for possible values | [optional] +**state** | **String** | The `InventoryState` for the quantity of items being transferred. See [InventoryState](#type-inventorystate) for possible values | [optional] **from_location_id** | **String** | The Square ID of the `Location` where the related quantity of items were tracked before the transfer. | [optional] **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/docs/inventory-api/what-it-does#decimal-quantities-beta) for more information. | [optional] [beta] +**quantity** | **String** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. | [optional] **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/Invoice.md b/docs/Invoice.md new file mode 100644 index 0000000..7db850a --- /dev/null +++ b/docs/Invoice.md @@ -0,0 +1,28 @@ +# SquareConnect.Invoice + +### Description +**Note: This model is in beta.** + +Stores information about an invoice. You use the Invoices API to create and process invoices. For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | The Square-assigned ID of the invoice. | [optional] +**version** | **Number** | The version number, which is incremented each time an update is committed to the invoice. | [optional] +**location_id** | **String** | The ID of the location that this invoice is associated with. This field is required when creating an invoice. | [optional] +**order_id** | **String** | The ID of the `order` for which the invoice is created. This order must be in the `OPEN` state and must belong to the `location_id` specified for this invoice. This field is required when creating an invoice. | [optional] +**primary_recipient** | [**InvoiceRecipient**](InvoiceRecipient.md) | The customer who gets the invoice. Square uses the contact information to deliver the invoice. This field is required when creating an invoice. | [optional] +**payment_requests** | [**[InvoicePaymentRequest]**](InvoicePaymentRequest.md) | An array of `InvoicePaymentRequest` objects. Each object defines a payment request in an invoice payment schedule. It provides information such as when and how Square processes payments. You can specify maximum of nine payment requests. All all the payment requests must specify the same `request_method`. This field is required when creating an invoice. | [optional] +**invoice_number** | **String** | A user-friendly invoice number. The value is unique within a location. If not provided when creating an invoice, Square assigns a value. It increments from 1 and padded with zeros making it 7 characters long for example, 0000001, 0000002. | [optional] +**title** | **String** | The title of the invoice. | [optional] +**description** | **String** | The description of the invoice. This is visible the customer receiving the invoice. | [optional] +**scheduled_at** | **String** | The timestamp when the invoice is scheduled for processing, in RFC 3339 format. At the specified time, depending on the `request_method`, Square sends the invoice to the customer's email address or charge the customer's card on file. If the field is not set, Square processes the invoice immediately after publication. | [optional] +**public_url** | **String** | The URL of the Square-hosted invoice page. After you publish the invoice using the `PublishInvoice` endpoint, Square hosts the invoice page and returns the page URL in the response. | [optional] +**next_payment_amount_money** | [**Money**](Money.md) | The current amount due for the invoice. In addition to the amount due on the next payment request, this also includes any overdue payment amounts. | [optional] +**status** | **String** | The status of the invoice. See [InvoiceStatus](#type-invoicestatus) for possible values | [optional] +**timezone** | **String** | The time zone of the date values (for example, `due_date`) specified in the invoice. | [optional] +**created_at** | **String** | The timestamp when the invoice was created, in RFC 3339 format. | [optional] +**updated_at** | **String** | The timestamp when the invoice was last updated, in RFC 3339 format. | [optional] + + diff --git a/docs/InvoiceFilter.md b/docs/InvoiceFilter.md new file mode 100644 index 0000000..5a0c416 --- /dev/null +++ b/docs/InvoiceFilter.md @@ -0,0 +1,14 @@ +# SquareConnect.InvoiceFilter + +### Description +**Note: This model is in beta.** + +Describes query filters to apply. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location_ids** | **[String]** | Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. | +**customer_ids** | **[String]** | Limits the search to the specified customers, within the specified locations. Specifying a customer is optional. In the current implementation, a maximum of one customer can be specified. | [optional] + + diff --git a/docs/InvoicePaymentReminder.md b/docs/InvoicePaymentReminder.md new file mode 100644 index 0000000..0a38a59 --- /dev/null +++ b/docs/InvoicePaymentReminder.md @@ -0,0 +1,17 @@ +# SquareConnect.InvoicePaymentReminder + +### Description +**Note: This model is in beta.** + +Describes a payment request reminder (automatic notification) that Square sends to the customer. You configure a reminder relative to the payment request `due_date`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | A Square-assigned ID that uniquely identifies the reminder within the `InvoicePaymentRequest`. | [optional] +**relative_scheduled_days** | **Number** | The number of days before (a negative number) or after (a positive number) the payment request `due_date` when the reminder is sent. For example, -3 indicates that the reminder should be sent 3 days before the payment request `due_date`. | [optional] +**message** | **String** | The reminder message. | [optional] +**status** | **String** | The status of the reminder. See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values | [optional] +**sent_at** | **String** | If sent, the timestamp when the reminder was sent, in RFC 3339 format. | [optional] + + diff --git a/docs/InvoicePaymentReminderStatus.md b/docs/InvoicePaymentReminderStatus.md new file mode 100644 index 0000000..c57f080 --- /dev/null +++ b/docs/InvoicePaymentReminderStatus.md @@ -0,0 +1,12 @@ +# SquareConnect.InvoicePaymentReminderStatus + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `NOT_APPLICABLE` (value: `"NOT_APPLICABLE"`) + +* `SENT` (value: `"SENT"`) + + diff --git a/docs/InvoicePaymentRequest.md b/docs/InvoicePaymentRequest.md new file mode 100644 index 0000000..3475b7a --- /dev/null +++ b/docs/InvoicePaymentRequest.md @@ -0,0 +1,24 @@ +# SquareConnect.InvoicePaymentRequest + +### Description +**Note: This model is in beta.** + +Describes a specific payment request in an invoice. You can have up to nine payment requests for an invoice. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | The Square-generated ID of the payment request in an `invoice`. | [optional] +**request_method** | **String** | Indicates how Square processes the payment request. See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible values | [optional] +**request_type** | **String** | Identifies the payment request type. This type defines how the payment request amount is determined. See [InvoiceRequestType](#type-invoicerequesttype) for possible values | [optional] +**due_date** | **String** | The due date (in the invoice location's time zone) for the payment request. After this date, the invoice becomes overdue. | [optional] +**fixed_amount_requested_money** | [**Money**](Money.md) | If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the `request_type`, this indicates the request amount. You cannot specify this when `request_type` is `BALANCE` or when the payment request includes the `percentage_requested` field. | [optional] +**percentage_requested** | **String** | Specifies the amount for the payment request in percentage: - When the payment `request_type` is `DEPOSIT`, it is the percentage of the order total amount. - When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order total less the deposit, if requested. The sum of the `percentage_requested` in all installment payment requests must be equal to 100. You cannot specify this when the payment `request_type` is `BALANCE` or when the payment request specifies the `fixed_amount_requested_money` field. | [optional] +**tipping_enabled** | **Boolean** | If set to true, the Square-hosted invoice page (the `public_url` field of the invoice) provides a place for the customer to pay a tip. This field is allowed only on the final payment request and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. | [optional] +**card_id** | **String** | If the request method is `CHARGE_CARD_ON_FILE`, this field provides the card to charge. | [optional] +**reminders** | [**[InvoicePaymentReminder]**](InvoicePaymentReminder.md) | A list of one or more reminders to send for the payment request. | [optional] +**computed_amount_money** | [**Money**](Money.md) | The payment request amount, computed using the order amount and information from the various payment request fields (`invoice_request_type`, `fixed_amount_requested_money`, and `percentage_requested`). | [optional] +**total_completed_amount_money** | [**Money**](Money.md) | The amount of money already paid for the specific payment request. This amount might include a rounding adjustment if the most recent invoice payment was in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`). | [optional] +**rounding_adjustment_included_money** | [**Money**](Money.md) | If the most recent payment was a cash payment in a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment is rounded from `computed_amount_money` in the payment request, then this field specifies the rounding adjustment applied. This amount might be negative. | [optional] + + diff --git a/docs/InvoiceQuery.md b/docs/InvoiceQuery.md new file mode 100644 index 0000000..1747cf7 --- /dev/null +++ b/docs/InvoiceQuery.md @@ -0,0 +1,14 @@ +# SquareConnect.InvoiceQuery + +### Description +**Note: This model is in beta.** + +Describes query criteria for searching invoices. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**InvoiceFilter**](InvoiceFilter.md) | Query filters to apply in searching invoices. For more information, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices). | +**sort** | [**InvoiceSort**](InvoiceSort.md) | Describes the sort order for the search result. | [optional] + + diff --git a/docs/InvoiceRecipient.md b/docs/InvoiceRecipient.md new file mode 100644 index 0000000..cc3d436 --- /dev/null +++ b/docs/InvoiceRecipient.md @@ -0,0 +1,19 @@ +# SquareConnect.InvoiceRecipient + +### Description +**Note: This model is in beta.** + +Provides customer data that Square uses to deliver an invoice. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **String** | The ID of the customer. This is the customer profile ID that you provide when creating a draft invoice. | [optional] +**given_name** | **String** | The recipient's given (that is, first) name. | [optional] +**family_name** | **String** | The recipient's family (that is, last) name. | [optional] +**email_address** | **String** | The recipient's email address. | [optional] +**address** | [**Address**](Address.md) | The recipient's physical address. | [optional] +**phone_number** | **String** | The recipient's phone number. | [optional] +**company_name** | **String** | The name of the recipient's company. | [optional] + + diff --git a/docs/InvoiceRequestMethod.md b/docs/InvoiceRequestMethod.md new file mode 100644 index 0000000..510478f --- /dev/null +++ b/docs/InvoiceRequestMethod.md @@ -0,0 +1,12 @@ +# SquareConnect.InvoiceRequestMethod + +## Enum + + +* `EMAIL` (value: `"EMAIL"`) + +* `CHARGE_CARD_ON_FILE` (value: `"CHARGE_CARD_ON_FILE"`) + +* `SHARE_MANUALLY` (value: `"SHARE_MANUALLY"`) + + diff --git a/docs/InvoiceRequestType.md b/docs/InvoiceRequestType.md new file mode 100644 index 0000000..eb86953 --- /dev/null +++ b/docs/InvoiceRequestType.md @@ -0,0 +1,12 @@ +# SquareConnect.InvoiceRequestType + +## Enum + + +* `BALANCE` (value: `"BALANCE"`) + +* `DEPOSIT` (value: `"DEPOSIT"`) + +* `INSTALLMENT` (value: `"INSTALLMENT"`) + + diff --git a/docs/InvoiceSort.md b/docs/InvoiceSort.md new file mode 100644 index 0000000..ea74dc7 --- /dev/null +++ b/docs/InvoiceSort.md @@ -0,0 +1,14 @@ +# SquareConnect.InvoiceSort + +### Description +**Note: This model is in beta.** + +Identifies the sort field and sort order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **String** | The field to sort on. See [InvoiceSortField](#type-invoicesortfield) for possible values | +**order** | **String** | The order to use for sorting the results. See [SortOrder](#type-sortorder) for possible values | [optional] + + diff --git a/docs/InvoiceSortField.md b/docs/InvoiceSortField.md new file mode 100644 index 0000000..0f87572 --- /dev/null +++ b/docs/InvoiceSortField.md @@ -0,0 +1,8 @@ +# SquareConnect.InvoiceSortField + +## Enum + + +* `DATE` (value: `"INVOICE_SORT_DATE"`) + + diff --git a/docs/InvoiceStatus.md b/docs/InvoiceStatus.md new file mode 100644 index 0000000..b87f755 --- /dev/null +++ b/docs/InvoiceStatus.md @@ -0,0 +1,24 @@ +# SquareConnect.InvoiceStatus + +## Enum + + +* `DRAFT` (value: `"DRAFT"`) + +* `UNPAID` (value: `"UNPAID"`) + +* `SCHEDULED` (value: `"SCHEDULED"`) + +* `PARTIALLY_PAID` (value: `"PARTIALLY_PAID"`) + +* `PAID` (value: `"PAID"`) + +* `PARTIALLY_REFUNDED` (value: `"PARTIALLY_REFUNDED"`) + +* `REFUNDED` (value: `"REFUNDED"`) + +* `CANCELED` (value: `"CANCELED"`) + +* `FAILED` (value: `"FAILED"`) + + diff --git a/docs/InvoicesApi.md b/docs/InvoicesApi.md new file mode 100644 index 0000000..8632c91 --- /dev/null +++ b/docs/InvoicesApi.md @@ -0,0 +1,427 @@ +# SquareConnect.InvoicesApi + +All URIs are relative to *https://connect.squareup.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancelInvoice**](InvoicesApi.md#cancelInvoice) | **POST** /v2/invoices/{invoice_id}/cancel | CancelInvoice +[**createInvoice**](InvoicesApi.md#createInvoice) | **POST** /v2/invoices | CreateInvoice +[**deleteInvoice**](InvoicesApi.md#deleteInvoice) | **DELETE** /v2/invoices/{invoice_id} | DeleteInvoice +[**getInvoice**](InvoicesApi.md#getInvoice) | **GET** /v2/invoices/{invoice_id} | GetInvoice +[**listInvoices**](InvoicesApi.md#listInvoices) | **GET** /v2/invoices | ListInvoices +[**publishInvoice**](InvoicesApi.md#publishInvoice) | **POST** /v2/invoices/{invoice_id}/publish | PublishInvoice +[**searchInvoices**](InvoicesApi.md#searchInvoices) | **POST** /v2/invoices/search | SearchInvoices +[**updateInvoice**](InvoicesApi.md#updateInvoice) | **PUT** /v2/invoices/{invoice_id} | UpdateInvoice + + + +# **cancelInvoice** +**Note: This endpoint is in beta.** +> CancelInvoiceResponse cancelInvoice(invoiceId, body) + +CancelInvoice + +Cancels an invoice. The seller cannot collect payments for the canceled invoice. You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`. + +### 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.InvoicesApi(); + +var invoiceId = "invoiceId_example"; // String | The ID of the `invoice` to cancel. + +var body = new SquareConnect.CancelInvoiceRequest(); // CancelInvoiceRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.cancelInvoice(invoiceId, body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invoiceId** | **String**| The ID of the `invoice` to cancel. | + **body** | [**CancelInvoiceRequest**](CancelInvoiceRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CancelInvoiceResponse**](CancelInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createInvoice** +**Note: This endpoint is in beta.** +> CreateInvoiceResponse createInvoice(body) + +CreateInvoice + +Creates a draft [invoice](#type-invoice) for an order created using the Orders API. A draft invoice remains in your account and no action is taken. You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file). For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview). + +### 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.InvoicesApi(); + +var body = new SquareConnect.CreateInvoiceRequest(); // CreateInvoiceRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.createInvoice(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateInvoiceRequest**](CreateInvoiceRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CreateInvoiceResponse**](CreateInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteInvoice** +**Note: This endpoint is in beta.** +> DeleteInvoiceResponse deleteInvoice(invoiceId, opts) + +DeleteInvoice + +Deletes the specified invoice. When an invoice is deleted, the associated Order status changes to CANCELED. You can only delete a draft invoice (you cannot delete an invoice scheduled for publication, or a published invoice). + +### 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.InvoicesApi(); + +var invoiceId = "invoiceId_example"; // String | The ID of the invoice to delete. + +var opts = { + 'version': 56 // Number | The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. +}; +apiInstance.deleteInvoice(invoiceId, opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invoiceId** | **String**| The ID of the invoice to delete. | + **version** | **Number**| The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. | [optional] + +### Return type + +[**DeleteInvoiceResponse**](DeleteInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getInvoice** +**Note: This endpoint is in beta.** +> GetInvoiceResponse getInvoice(invoiceId) + +GetInvoice + +Retrieves an invoice by invoice ID. + +### 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.InvoicesApi(); + +var invoiceId = "invoiceId_example"; // String | The id of the invoice to retrieve. + +apiInstance.getInvoice(invoiceId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invoiceId** | **String**| The id of the invoice to retrieve. | + +### Return type + +[**GetInvoiceResponse**](GetInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **listInvoices** +**Note: This endpoint is in beta.** +> ListInvoicesResponse listInvoices(locationId, opts) + +ListInvoices + +Returns a list of invoices for a given location. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + +### 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.InvoicesApi(); + +var locationId = "locationId_example"; // String | The ID of the location for which to list invoices. + +var opts = { + 'cursor': "cursor_example", // String | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + 'limit': 56 // Number | The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. +}; +apiInstance.listInvoices(locationId, opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **locationId** | **String**| The ID of the location for which to list invoices. | + **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). | [optional] + **limit** | **Number**| The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. | [optional] + +### Return type + +[**ListInvoicesResponse**](ListInvoicesResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **publishInvoice** +**Note: This endpoint is in beta.** +> PublishInvoiceResponse publishInvoice(invoiceId, body) + +PublishInvoice + +Publishes the specified draft invoice. After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page. The invoice `status` also changes from `DRAFT` to a status based on the invoice configuration. For example, the status changes to `UNPAID` if Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on file for a portion of the invoice amount). For more information, see [Create and publish an invoice](/docs/invoices-api/overview#create-and-publish-an-invoice). + +### 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.InvoicesApi(); + +var invoiceId = "invoiceId_example"; // String | The id of the invoice to publish. + +var body = new SquareConnect.PublishInvoiceRequest(); // PublishInvoiceRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.publishInvoice(invoiceId, body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invoiceId** | **String**| The id of the invoice to publish. | + **body** | [**PublishInvoiceRequest**](PublishInvoiceRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**PublishInvoiceResponse**](PublishInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **searchInvoices** +**Note: This endpoint is in beta.** +> SearchInvoicesResponse searchInvoices(body) + +SearchInvoices + +Searches for invoices from a location specified in the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + +### 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.InvoicesApi(); + +var body = new SquareConnect.SearchInvoicesRequest(); // SearchInvoicesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.searchInvoices(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SearchInvoicesRequest**](SearchInvoicesRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**SearchInvoicesResponse**](SearchInvoicesResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateInvoice** +**Note: This endpoint is in beta.** +> UpdateInvoiceResponse updateInvoice(invoiceId, body) + +UpdateInvoice + +Updates an invoice by modifying field values, clearing field values, or both as specified in the request. There are no restrictions to updating an invoice in a draft state. However, there are guidelines for updating a published invoice. For more information, see [Update an invoice](/docs/invoices-api/overview#update-an-invoice). + +### 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.InvoicesApi(); + +var invoiceId = "invoiceId_example"; // String | The id of the invoice to update. + +var body = new SquareConnect.UpdateInvoiceRequest(); // UpdateInvoiceRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.updateInvoice(invoiceId, body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invoiceId** | **String**| The id of the invoice to update. | + **body** | [**UpdateInvoiceRequest**](UpdateInvoiceRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**UpdateInvoiceResponse**](UpdateInvoiceResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/ListInvoicesRequest.md b/docs/ListInvoicesRequest.md new file mode 100644 index 0000000..512bc57 --- /dev/null +++ b/docs/ListInvoicesRequest.md @@ -0,0 +1,15 @@ +# SquareConnect.ListInvoicesRequest + +### Description +**Note: This model is in beta.** + +Describes a `ListInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location_id** | **String** | The ID of the location for which to list invoices. | +**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). | [optional] +**limit** | **Number** | The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. | [optional] + + diff --git a/docs/ListInvoicesResponse.md b/docs/ListInvoicesResponse.md new file mode 100644 index 0000000..677b464 --- /dev/null +++ b/docs/ListInvoicesResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.ListInvoicesResponse + +### Description +**Note: This model is in beta.** + +Describes a `ListInvoice` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoices** | [**[Invoice]**](Invoice.md) | The invoices retrieved. | [optional] +**cursor** | **String** | When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of invoices. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/LocationsApi.md b/docs/LocationsApi.md index 035ee94..ff31155 100644 --- a/docs/LocationsApi.md +++ b/docs/LocationsApi.md @@ -107,7 +107,7 @@ This endpoint does not need any parameter. RetrieveLocation -Retrieves details of a location. +Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. For more information, see [Locations API Overview](/docs/locations-api). ### Example ```javascript @@ -120,7 +120,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LocationsApi(); -var locationId = "locationId_example"; // String | The ID of the location to retrieve. +var locationId = "locationId_example"; // String | The ID of the location to retrieve. If you specify the string \"main\", then the endpoint returns the main location. apiInstance.retrieveLocation(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -134,7 +134,7 @@ apiInstance.retrieveLocation(locationId).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **locationId** | **String**| The ID of the location to retrieve. | + **locationId** | **String**| The ID of the location to retrieve. If you specify the string \"main\", then the endpoint returns the main location. | ### Return type diff --git a/docs/Merchant.md b/docs/Merchant.md index 6392d7f..4403835 100644 --- a/docs/Merchant.md +++ b/docs/Merchant.md @@ -9,9 +9,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | The Square-issued ID of the merchant. | [optional] **business_name** | **String** | The business name of the merchant. | [optional] -**country** | **String** | The country code associated with the merchant account, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | +**country** | **String** | The country code associated with the merchant account, in ISO 3166 format. See [Country](#type-country) for possible values | **language_code** | **String** | The language code associated with the merchant account, in BCP 47 format. | [optional] **currency** | **String** | The currency associated with the merchant account, in ISO 4217 format. See [Currency](#type-currency) for possible values | [optional] **status** | **String** | The merchant status, active or inactive. See [MerchantStatus](#type-merchantstatus) for possible values | [optional] +**main_location_id** | **String** | The ID of the main `Location` for this merchant. | [optional] diff --git a/docs/MerchantsApi.md b/docs/MerchantsApi.md index f4877a0..509ee1b 100644 --- a/docs/MerchantsApi.md +++ b/docs/MerchantsApi.md @@ -76,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. If the string \"me\" is supplied as the ID, then retrieve the merchant that is currently accessible to this call. apiInstance.retrieveMerchant(merchantId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -90,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. If the string \"me\" is supplied as the ID, then retrieve the merchant that is currently accessible to this call. | ### Return type diff --git a/docs/Order.md b/docs/Order.md index 26495af..a02639d 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -33,6 +33,7 @@ Name | Type | Description | Notes **total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional] **total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional] **total_service_charge_money** | [**Money**](Money.md) | The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. | [optional] +**pricing_options** | [**OrderPricingOptions**](OrderPricingOptions.md) | Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on pre-configured [pricing rules](https://developer.squareup.com/docs/reference/square/objects/CatalogPricingRule). | [optional] **rewards** | [**[OrderReward]**](OrderReward.md) | A set-like list of rewards that have been added to the order. | [optional] [beta] diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index 9a1b03a..4cd88d4 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -17,5 +17,6 @@ Name | Type | Description | Notes **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] **reward_ids** | **[String]** | The reward identifiers corresponding to this discount. The application and specification of discounts that have `reward_ids` are completely controlled by the backing criteria corresponding to the reward tiers of the rewards that are added to the order through the Loyalty API. To manually unapply discounts that are the result of added rewards, the rewards must be removed from the order through the Loyalty API. | [optional] [beta] +**pricing_rule_id** | **String** | The object identifier of a `pricing rule` to be applied automatically to this discount. The specification and application of the discounts, to which a `pricing_rule_id` is assigned, are completely controlled by the corresponding pricing rule. | [optional] diff --git a/docs/OrderPricingOptions.md b/docs/OrderPricingOptions.md new file mode 100644 index 0000000..352a994 --- /dev/null +++ b/docs/OrderPricingOptions.md @@ -0,0 +1,12 @@ +# SquareConnect.OrderPricingOptions + +### Description + +Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on pre-configured [pricing rules](/reference/square/objects/CatalogPricingRule). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_apply_discounts** | **Boolean** | The option to determine whether or not pricing rule-based discounts are automatically applied to an order. | [optional] + + diff --git a/docs/PublishInvoiceRequest.md b/docs/PublishInvoiceRequest.md new file mode 100644 index 0000000..20feaae --- /dev/null +++ b/docs/PublishInvoiceRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.PublishInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `PublishInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **Number** | The version of the `Invoice` to publish. This must match the current version of the invoice, otherwise the request is rejected. | +**idempotency_key** | **String** | A unique string that identifies the `PublishInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). | [optional] + + diff --git a/docs/PublishInvoiceResponse.md b/docs/PublishInvoiceResponse.md new file mode 100644 index 0000000..0a91bb5 --- /dev/null +++ b/docs/PublishInvoiceResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.PublishInvoiceResponse + +### Description +**Note: This model is in beta.** + +Describes a `PublishInvoice` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The published invoice. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/Range.md b/docs/Range.md new file mode 100644 index 0000000..7e760c9 --- /dev/null +++ b/docs/Range.md @@ -0,0 +1,14 @@ +# SquareConnect.Range + +### Description +**Note: This model is in beta.** + +The range of a number value between the specified lower and upper bounds. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min** | **String** | The lower bound of the number range. | [optional] +**max** | **String** | The upper bound of the number range. | [optional] + + diff --git a/docs/RegisterDomainRequest.md b/docs/RegisterDomainRequest.md index 2d495ab..9ffe6b4 100644 --- a/docs/RegisterDomainRequest.md +++ b/docs/RegisterDomainRequest.md @@ -2,7 +2,7 @@ ### Description -Defines the parameters that can be included in the body of a request to the __RegisterDomain__ endpoint. +Defines the parameters that can be included in the body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. ## Properties Name | Type | Description | Notes diff --git a/docs/RegisterDomainResponse.md b/docs/RegisterDomainResponse.md index baec347..432ca7f 100644 --- a/docs/RegisterDomainResponse.md +++ b/docs/RegisterDomainResponse.md @@ -2,7 +2,7 @@ ### Description -Defines the fields that are included in the response body of a request to the __RegisterDomain__ endpoint. Either `errors` or `status` will be present in a given response (never both). +Defines the fields that are included in the response body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. Either `errors` or `status` will be present in a given response (never both). ## Properties Name | Type | Description | Notes diff --git a/docs/RetrieveInventoryChangesRequest.md b/docs/RetrieveInventoryChangesRequest.md index 31d64be..bc184ca 100644 --- a/docs/RetrieveInventoryChangesRequest.md +++ b/docs/RetrieveInventoryChangesRequest.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location_ids** | **String** | The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. | [optional] -**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. | [optional] +**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | [optional] diff --git a/docs/RetrieveInventoryChangesResponse.md b/docs/RetrieveInventoryChangesResponse.md index 62e2338..79c2f4b 100644 --- a/docs/RetrieveInventoryChangesResponse.md +++ b/docs/RetrieveInventoryChangesResponse.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **changes** | [**[InventoryChange]**](InventoryChange.md) | The set of inventory changes for the requested object and locations. | [optional] -**cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. | [optional] +**cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | [optional] diff --git a/docs/SearchCatalogItemsRequest.md b/docs/SearchCatalogItemsRequest.md new file mode 100644 index 0000000..38a17d6 --- /dev/null +++ b/docs/SearchCatalogItemsRequest.md @@ -0,0 +1,21 @@ +# SquareConnect.SearchCatalogItemsRequest + +### Description +**Note: This model is in beta.** + +Defines the request body for the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text_filter** | **String** | The text filter expression to return items or item variations containing specified text in the `name`, `description`, or `abbreviation` attribute value of an item, or in the `name`, `sku`, or `upc` attribute value of an item variation. | [optional] +**category_ids** | **[String]** | The category id query expression to return items containing the specified category IDs. | [optional] +**stock_levels** | **[String]** | The stock-level query expression to return item variations with the specified stock levels. See [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) for possible values | [optional] +**enabled_location_ids** | **[String]** | The enabled-location query expression to return items and item variations having specified enabled locations. | [optional] +**cursor** | **String** | The pagination token, returned in the previous response, used to fetch the next batch of pending results. | [optional] +**limit** | **Number** | The maximum number of results to return per page. The default value is 100. | [optional] +**sort_order** | **String** | The order to sort the resutls. The default sort order is ascending (`ASC`). See [SortOrder](#type-sortorder) for possible values | [optional] +**product_types** | **[String]** | The product types query expression to return items or item variations having the specified product types. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional] +**custom_attribute_filters** | [**[CustomAttributeFilter]**](CustomAttributeFilter.md) | The customer-attribute filter to return items or item variations matching the specified custom attribute expressions. A maximum number of 10 custom attribute expressions are supported in a single call to the `SearchCatalogItems` endpoint. | [optional] + + diff --git a/docs/SearchCatalogItemsRequestStockLevel.md b/docs/SearchCatalogItemsRequestStockLevel.md new file mode 100644 index 0000000..ceb0866 --- /dev/null +++ b/docs/SearchCatalogItemsRequestStockLevel.md @@ -0,0 +1,10 @@ +# SquareConnect.SearchCatalogItemsRequestStockLevel + +## Enum + + +* `OUT` (value: `"OUT"`) + +* `LOW` (value: `"LOW"`) + + diff --git a/docs/SearchCatalogItemsResponse.md b/docs/SearchCatalogItemsResponse.md new file mode 100644 index 0000000..f8f923d --- /dev/null +++ b/docs/SearchCatalogItemsResponse.md @@ -0,0 +1,16 @@ +# SquareConnect.SearchCatalogItemsResponse + +### Description +**Note: This model is in beta.** + +Defines the response body returned from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Errors detected when the call to `SearchCatalogItems` endpoint fails. | [optional] +**items** | [**[CatalogObject]**](CatalogObject.md) | Returned items matching the specified query expressions. | [optional] +**cursor** | **String** | Pagination token used in the next request to return more of the search result. | [optional] +**matched_variation_ids** | **[String]** | Ids of returned item variations matching the specified query expression. | [optional] + + diff --git a/docs/SearchInvoicesRequest.md b/docs/SearchInvoicesRequest.md new file mode 100644 index 0000000..99c2ea9 --- /dev/null +++ b/docs/SearchInvoicesRequest.md @@ -0,0 +1,15 @@ +# SquareConnect.SearchInvoicesRequest + +### Description +**Note: This model is in beta.** + +Describes a `SearchInvoices` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query** | [**InvoiceQuery**](InvoiceQuery.md) | Describes the query criteria for searching invoices. | +**limit** | **Number** | The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. | [optional] +**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). | [optional] + + diff --git a/docs/SearchInvoicesResponse.md b/docs/SearchInvoicesResponse.md new file mode 100644 index 0000000..b7f212c --- /dev/null +++ b/docs/SearchInvoicesResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.SearchInvoicesResponse + +### Description +**Note: This model is in beta.** + +Describes a `SearchInvoices` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoices** | [**[Invoice]**](Invoice.md) | The list of invoices returned by the search. | [optional] +**cursor** | **String** | When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of invoices. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/Shift.md b/docs/Shift.md index 0a4a347..c97e011 100644 --- a/docs/Shift.md +++ b/docs/Shift.md @@ -2,7 +2,7 @@ ### Description -A record of the hourly rate, start, and end times for a single work shift for an employee. May include a record of the start and end times for breaks taken during the shift. +A record of the hourly rate, start, and end times for a single work shift for an employee. May include a record of the start and end times for breaks taken during the shift. ## Properties Name | Type | Description | Notes diff --git a/docs/SourceApplication.md b/docs/SourceApplication.md index 4a9bbbc..696e6de 100644 --- a/docs/SourceApplication.md +++ b/docs/SourceApplication.md @@ -2,7 +2,7 @@ ### Description -Provides information about the application used to generate an inventory change. +Provides information about the application used to generate a change. ## Properties Name | Type | Description | Notes diff --git a/docs/TerminalCheckout.md b/docs/TerminalCheckout.md index 79905f4..52aa49f 100644 --- a/docs/TerminalCheckout.md +++ b/docs/TerminalCheckout.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **device_options** | [**DeviceCheckoutOptions**](DeviceCheckoutOptions.md) | Options to control the display and behavior of the Square Terminal device. | **deadline_duration** | **String** | The duration as an RFC 3339 duration, after which the checkout will be automatically canceled. TerminalCheckouts that are PENDING will be automatically CANCELED and have a cancellation reason of “TIMED\\_OUT”. Default: 5 minutes from creation Maximum: 5 minutes | [optional] **status** | **String** | The status of the `TerminalCheckout`. Options: PENDING, IN\\_PROGRESS, CANCELED, COMPLETED | [optional] -**cancel_reason** | **String** | Present if the status is CANCELED. See [TerminalCheckoutCancelReason](#type-terminalcheckoutcancelreason) for possible values | [optional] +**cancel_reason** | **String** | Present if the status is CANCELED. See [ActionCancelReason](#type-actioncancelreason) for possible values | [optional] **payment_ids** | **[String]** | A list of payments created by this `TerminalCheckout`. | [optional] **created_at** | **String** | The time when the `TerminalCheckout` was created as an RFC 3339 timestamp. | [optional] **updated_at** | **String** | The time when the `TerminalCheckout` was last updated as an RFC 3339 timestamp. | [optional] diff --git a/docs/UpdateInvoiceRequest.md b/docs/UpdateInvoiceRequest.md new file mode 100644 index 0000000..7d97186 --- /dev/null +++ b/docs/UpdateInvoiceRequest.md @@ -0,0 +1,15 @@ +# SquareConnect.UpdateInvoiceRequest + +### Description +**Note: This model is in beta.** + +Describes a `UpdateInvoice` request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The invoice fields to update. You need to only specify the fields you want to change. The current invoice version must be specified in the version field. For more information, see [Update an invoice](invoices-api/overview#update-an-invoice). | +**idempotency_key** | **String** | A unique string that identifies the `UpdateInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). | [optional] +**fields_to_clear** | **[String]** | List of fields to clear. For examples, see [Update an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice). | [optional] + + diff --git a/docs/UpdateInvoiceResponse.md b/docs/UpdateInvoiceResponse.md new file mode 100644 index 0000000..642e83f --- /dev/null +++ b/docs/UpdateInvoiceResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.UpdateInvoiceResponse + +### Description +**Note: This model is in beta.** + +Describes a `UpdateInvoice` response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice** | [**Invoice**](Invoice.md) | The updated invoice. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] + + diff --git a/docs/WorkweekConfig.md b/docs/WorkweekConfig.md index 2076df7..07349c2 100644 --- a/docs/WorkweekConfig.md +++ b/docs/WorkweekConfig.md @@ -2,7 +2,7 @@ ### Description -Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay. +Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay. ## Properties Name | Type | Description | Notes diff --git a/package.json b/package.json index 32cb904..43fd02c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "4.20200625.0", + "version": "4.20200722.1", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index fdded20..3a6b9b5 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils'); /** * @module ApiClient - * @version 4.20200625.0 + * @version 4.20200722.1 */ /** @@ -49,7 +49,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/4.20200625.0' + 'User-Agent': 'Square-Connect-Javascript/4.20200722.1' }; /** * The default HTTP timeout for all API calls. diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js index e13e60a..ba8dca0 100644 --- a/src/api/ApplePayApi.js +++ b/src/api/ApplePayApi.js @@ -21,7 +21,7 @@ var RegisterDomainResponse = require('../model/RegisterDomainResponse'); */ /** - * Constructs a new ApplePayApi. + * Constructs a new ApplePayApi. * @alias module:api/ApplePayApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/BankAccountsApi.js b/src/api/BankAccountsApi.js index 898798e..4abdd6f 100644 --- a/src/api/BankAccountsApi.js +++ b/src/api/BankAccountsApi.js @@ -22,7 +22,7 @@ var ListBankAccountsResponse = require('../model/ListBankAccountsResponse'); */ /** - * Constructs a new BankAccountsApi. + * Constructs a new BankAccountsApi. * @alias module:api/BankAccountsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -55,7 +55,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CashDrawersApi.js b/src/api/CashDrawersApi.js index d246cb1..e2d3017 100644 --- a/src/api/CashDrawersApi.js +++ b/src/api/CashDrawersApi.js @@ -22,7 +22,7 @@ var RetrieveCashDrawerShiftResponse = require('../model/RetrieveCashDrawerShiftR */ /** - * Constructs a new CashDrawersApi. + * Constructs a new CashDrawersApi. * @alias module:api/CashDrawersApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -68,7 +68,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -137,7 +137,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -203,7 +203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js index 33ae140..e33f943 100644 --- a/src/api/CatalogApi.js +++ b/src/api/CatalogApi.js @@ -22,6 +22,8 @@ var CatalogInfoResponse = require('../model/CatalogInfoResponse'); var DeleteCatalogObjectResponse = require('../model/DeleteCatalogObjectResponse'); var ListCatalogResponse = require('../model/ListCatalogResponse'); var RetrieveCatalogObjectResponse = require('../model/RetrieveCatalogObjectResponse'); +var SearchCatalogItemsRequest = require('../model/SearchCatalogItemsRequest'); +var SearchCatalogItemsResponse = require('../model/SearchCatalogItemsResponse'); var SearchCatalogObjectsRequest = require('../model/SearchCatalogObjectsRequest'); var SearchCatalogObjectsResponse = require('../model/SearchCatalogObjectsResponse'); var UpdateItemModifierListsRequest = require('../model/UpdateItemModifierListsRequest'); @@ -37,7 +39,7 @@ var UpsertCatalogObjectResponse = require('../model/UpsertCatalogObjectResponse' */ /** - * Constructs a new CatalogApi. + * Constructs a new CatalogApi. * @alias module:api/CatalogApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -69,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -121,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -173,7 +175,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -206,7 +208,7 @@ module.exports = function(apiClient) { /** * CatalogInfo - * Returns information about the Square Catalog API, such as batch size limits for `BatchUpsertCatalogObjects`. + * Retrieves information about the Square Catalog API, such as batch size limits that can be used by the `BatchUpsertCatalogObjects` endpoint. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CatalogInfoResponse} and HTTP response */ this.catalogInfoWithHttpInfo = function() { @@ -219,7 +221,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -238,7 +240,7 @@ module.exports = function(apiClient) { /** * CatalogInfo - * Returns information about the Square Catalog API, such as batch size limits for `BatchUpsertCatalogObjects`. + * Retrieves information about the Square Catalog API, such as batch size limits that can be used by the `BatchUpsertCatalogObjects` endpoint. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CatalogInfoResponse} */ this.catalogInfo = function() { @@ -271,7 +273,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -323,7 +325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -382,7 +384,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -415,9 +417,62 @@ module.exports = function(apiClient) { } + /** + * SearchCatalogItems + * Note: This endpoint is in beta. + * Searches for catalog items or item variations by matching supported search attribute values, including custom attribute values, against one or more of the specified query expressions, This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints use different call conventions, including the query filter formats. + * @param {module:model/SearchCatalogItemsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchCatalogItemsResponse} and HTTP response + */ + this.searchCatalogItemsWithHttpInfo = function(body) { + var postBody = body; + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling searchCatalogItems"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = SearchCatalogItemsResponse; + + return this.apiClient.callApi( + '/v2/catalog/search-catalog-items', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * SearchCatalogItems + * Searches for catalog items or item variations by matching supported search attribute values, including custom attribute values, against one or more of the specified query expressions, This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints use different call conventions, including the query filter formats. + * @param {module:model/SearchCatalogItemsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchCatalogItemsResponse} + */ + this.searchCatalogItems = function(body) { + return this.searchCatalogItemsWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * SearchCatalogObjects - * Queries the targeted catalog using a variety of query expressions. Supported query expressions are of the following types: - [CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), - [CatalogQueryExact](#type-catalogqueryexact), - [CatalogQueryRange](#type-catalogqueryrange), - [CatalogQueryText](#type-catalogquerytext), - [CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), - [CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist), - [CatalogQueryItemsForItemOptions](#type-catalogqueryitemsforitemoptions), and - [CatalogQueryItemVariationsForItemOptionValues](#type-catalogqueryitemvariationsforitemoptionvalues). + * Searches for [CatalogObject](#type-CatalogObject) of any types against supported search attribute values, excluding custom attribute values on items or item variations, against one or more of the specified query expressions, This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints have different call conventions, including the query filter formats. * @param {module:model/SearchCatalogObjectsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchCatalogObjectsResponse} and HTTP response */ @@ -436,7 +491,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -455,7 +510,7 @@ module.exports = function(apiClient) { /** * SearchCatalogObjects - * Queries the targeted catalog using a variety of query expressions. Supported query expressions are of the following types: - [CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), - [CatalogQueryExact](#type-catalogqueryexact), - [CatalogQueryRange](#type-catalogqueryrange), - [CatalogQueryText](#type-catalogquerytext), - [CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), - [CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist), - [CatalogQueryItemsForItemOptions](#type-catalogqueryitemsforitemoptions), and - [CatalogQueryItemVariationsForItemOptionValues](#type-catalogqueryitemvariationsforitemoptionvalues). + * Searches for [CatalogObject](#type-CatalogObject) of any types against supported search attribute values, excluding custom attribute values on items or item variations, against one or more of the specified query expressions, This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint in the following aspects: - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects. - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints have different call conventions, including the query filter formats. * @param {module:model/SearchCatalogObjectsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchCatalogObjectsResponse} */ @@ -488,7 +543,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -540,7 +595,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -592,7 +647,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js index 74603bf..e215c98 100644 --- a/src/api/CheckoutApi.js +++ b/src/api/CheckoutApi.js @@ -21,7 +21,7 @@ var CreateCheckoutResponse = require('../model/CreateCheckoutResponse'); */ /** - * Constructs a new CheckoutApi. + * Constructs a new CheckoutApi. * @alias module:api/CheckoutApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CustomerGroupsApi.js b/src/api/CustomerGroupsApi.js index 8470122..221dbc3 100644 --- a/src/api/CustomerGroupsApi.js +++ b/src/api/CustomerGroupsApi.js @@ -26,7 +26,7 @@ var UpdateCustomerGroupResponse = require('../model/UpdateCustomerGroupResponse' */ /** - * Constructs a new CustomerGroupsApi. + * Constructs a new CustomerGroupsApi. * @alias module:api/CustomerGroupsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -59,7 +59,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -164,7 +164,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -279,7 +279,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CustomerSegmentsApi.js b/src/api/CustomerSegmentsApi.js index 6d74e6a..4ba3c0a 100644 --- a/src/api/CustomerSegmentsApi.js +++ b/src/api/CustomerSegmentsApi.js @@ -21,7 +21,7 @@ var RetrieveCustomerSegmentResponse = require('../model/RetrieveCustomerSegmentR */ /** - * Constructs a new CustomerSegmentsApi. + * Constructs a new CustomerSegmentsApi. * @alias module:api/CustomerSegmentsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -52,7 +52,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -107,7 +107,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 4be073c..7f57ec5 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -33,7 +33,7 @@ var UpdateCustomerResponse = require('../model/UpdateCustomerResponse'); */ /** - * Constructs a new CustomersApi. + * Constructs a new CustomersApi. * @alias module:api/CustomersApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -74,7 +74,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -127,7 +127,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -186,7 +186,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -240,7 +240,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -300,7 +300,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -355,7 +355,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -419,7 +419,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -473,7 +473,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -525,7 +525,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -584,7 +584,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/DevicesApi.js b/src/api/DevicesApi.js index 4716a61..a04b427 100644 --- a/src/api/DevicesApi.js +++ b/src/api/DevicesApi.js @@ -23,7 +23,7 @@ var ListDeviceCodesResponse = require('../model/ListDeviceCodesResponse'); */ /** - * Constructs a new DevicesApi. + * Constructs a new DevicesApi. * @alias module:api/DevicesApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -110,7 +110,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/DisputesApi.js b/src/api/DisputesApi.js index dc41485..df50be2 100644 --- a/src/api/DisputesApi.js +++ b/src/api/DisputesApi.js @@ -28,7 +28,7 @@ var SubmitEvidenceResponse = require('../model/SubmitEvidenceResponse'); */ /** - * Constructs a new DisputesApi. + * Constructs a new DisputesApi. * @alias module:api/DisputesApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -62,7 +62,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -122,7 +122,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -232,7 +232,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -296,7 +296,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -351,7 +351,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -412,7 +412,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js index 84e0b0d..17addc6 100644 --- a/src/api/EmployeesApi.js +++ b/src/api/EmployeesApi.js @@ -21,7 +21,7 @@ var RetrieveEmployeeResponse = require('../model/RetrieveEmployeeResponse'); */ /** - * Constructs a new EmployeesApi. + * Constructs a new EmployeesApi. * @alias module:api/EmployeesApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -34,7 +34,7 @@ module.exports = function(apiClient) { /** * ListEmployees - * + * * @param {Object} opts Optional parameters * @param {String} opts.locationId Filter employees returned to only those that are associated with the specified location. * @param {String} opts.status Specifies the EmployeeStatus to filter the employee by. @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -76,7 +76,7 @@ module.exports = function(apiClient) { /** * ListEmployees - * + * * @param {Object} opts Optional parameters * @param {String} opts.locationId Filter employees returned to only those that are associated with the specified location. * @param {String} opts.status Specifies the EmployeeStatus to filter the employee by. @@ -94,7 +94,7 @@ module.exports = function(apiClient) { /** * RetrieveEmployee - * + * * @param {String} id UUID for the employee that was requested. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveEmployeeResponse} and HTTP response */ @@ -114,7 +114,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -133,7 +133,7 @@ module.exports = function(apiClient) { /** * RetrieveEmployee - * + * * @param {String} id UUID for the employee that was requested. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveEmployeeResponse} */ diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js index 44e76e0..826aa68 100644 --- a/src/api/InventoryApi.js +++ b/src/api/InventoryApi.js @@ -29,7 +29,7 @@ var RetrieveInventoryPhysicalCountResponse = require('../model/RetrieveInventory */ /** - * Constructs a new InventoryApi. + * Constructs a new InventoryApi. * @alias module:api/InventoryApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -218,7 +218,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -255,7 +255,7 @@ module.exports = function(apiClient) { * @param {String} catalogObjectId ID of the `CatalogObject` to retrieve. * @param {Object} opts Optional parameters * @param {String} opts.locationIds The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. - * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveInventoryChangesResponse} and HTTP response */ this.retrieveInventoryChangesWithHttpInfo = function(catalogObjectId, opts) { @@ -277,7 +277,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -300,7 +300,7 @@ module.exports = function(apiClient) { * @param {String} catalogObjectId ID of the `CatalogObject` to retrieve. * @param {Object} opts Optional parameters * @param {String} opts.locationIds The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. - * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveInventoryChangesResponse} */ this.retrieveInventoryChanges = function(catalogObjectId, opts) { @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -395,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/InvoicesApi.js b/src/api/InvoicesApi.js new file mode 100644 index 0000000..a87b01e --- /dev/null +++ b/src/api/InvoicesApi.js @@ -0,0 +1,510 @@ +/** + * 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 CancelInvoiceRequest = require('../model/CancelInvoiceRequest'); +var CancelInvoiceResponse = require('../model/CancelInvoiceResponse'); +var CreateInvoiceRequest = require('../model/CreateInvoiceRequest'); +var CreateInvoiceResponse = require('../model/CreateInvoiceResponse'); +var DeleteInvoiceResponse = require('../model/DeleteInvoiceResponse'); +var GetInvoiceResponse = require('../model/GetInvoiceResponse'); +var ListInvoicesResponse = require('../model/ListInvoicesResponse'); +var PublishInvoiceRequest = require('../model/PublishInvoiceRequest'); +var PublishInvoiceResponse = require('../model/PublishInvoiceResponse'); +var SearchInvoicesRequest = require('../model/SearchInvoicesRequest'); +var SearchInvoicesResponse = require('../model/SearchInvoicesResponse'); +var UpdateInvoiceRequest = require('../model/UpdateInvoiceRequest'); +var UpdateInvoiceResponse = require('../model/UpdateInvoiceResponse'); + +/** + * Invoices service. + * @module api/InvoicesApi + */ + +/** + * Constructs a new InvoicesApi. + * @alias module:api/InvoicesApi + * @class + * @param {module:ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ +module.exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * CancelInvoice + * Note: This endpoint is in beta. + * Cancels an invoice. The seller cannot collect payments for the canceled invoice. You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`. + * @param {String} invoiceId The ID of the `invoice` to cancel. + * @param {module:model/CancelInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelInvoiceResponse} and HTTP response + */ + this.cancelInvoiceWithHttpInfo = function(invoiceId, body) { + var postBody = body; + + // verify the required parameter 'invoiceId' is set + if (invoiceId === undefined || invoiceId === null) { + throw new Error("Missing the required parameter 'invoiceId' when calling cancelInvoice"); + } + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling cancelInvoice"); + } + + + var pathParams = { + 'invoice_id': invoiceId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CancelInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices/{invoice_id}/cancel', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CancelInvoice + * Cancels an invoice. The seller cannot collect payments for the canceled invoice. You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`. + * @param {String} invoiceId The ID of the `invoice` to cancel. + * @param {module:model/CancelInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelInvoiceResponse} + */ + this.cancelInvoice = function(invoiceId, body) { + return this.cancelInvoiceWithHttpInfo(invoiceId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * CreateInvoice + * Note: This endpoint is in beta. + * Creates a draft [invoice](#type-invoice) for an order created using the Orders API. A draft invoice remains in your account and no action is taken. You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file). For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview). + * @param {module:model/CreateInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateInvoiceResponse} and HTTP response + */ + this.createInvoiceWithHttpInfo = function(body) { + var postBody = body; + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling createInvoice"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CreateInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CreateInvoice + * Creates a draft [invoice](#type-invoice) for an order created using the Orders API. A draft invoice remains in your account and no action is taken. You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file). For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview). + * @param {module:model/CreateInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateInvoiceResponse} + */ + this.createInvoice = function(body) { + return this.createInvoiceWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * DeleteInvoice + * Note: This endpoint is in beta. + * Deletes the specified invoice. When an invoice is deleted, the associated Order status changes to CANCELED. You can only delete a draft invoice (you cannot delete an invoice scheduled for publication, or a published invoice). + * @param {String} invoiceId The ID of the invoice to delete. + * @param {Object} opts Optional parameters + * @param {Number} opts.version The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteInvoiceResponse} and HTTP response + */ + this.deleteInvoiceWithHttpInfo = function(invoiceId, opts) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'invoiceId' is set + if (invoiceId === undefined || invoiceId === null) { + throw new Error("Missing the required parameter 'invoiceId' when calling deleteInvoice"); + } + + + var pathParams = { + 'invoice_id': invoiceId + }; + var queryParams = { + 'version': opts['version'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = DeleteInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices/{invoice_id}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * DeleteInvoice + * Deletes the specified invoice. When an invoice is deleted, the associated Order status changes to CANCELED. You can only delete a draft invoice (you cannot delete an invoice scheduled for publication, or a published invoice). + * @param {String} invoiceId The ID of the invoice to delete. + * @param {Object} opts Optional parameters + * @param {Number} opts.version The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteInvoiceResponse} + */ + this.deleteInvoice = function(invoiceId, opts) { + return this.deleteInvoiceWithHttpInfo(invoiceId, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * GetInvoice + * Note: This endpoint is in beta. + * Retrieves an invoice by invoice ID. + * @param {String} invoiceId The id of the invoice to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetInvoiceResponse} and HTTP response + */ + this.getInvoiceWithHttpInfo = function(invoiceId) { + var postBody = null; + + // verify the required parameter 'invoiceId' is set + if (invoiceId === undefined || invoiceId === null) { + throw new Error("Missing the required parameter 'invoiceId' when calling getInvoice"); + } + + + var pathParams = { + 'invoice_id': invoiceId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = GetInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices/{invoice_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * GetInvoice + * Retrieves an invoice by invoice ID. + * @param {String} invoiceId The id of the invoice to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetInvoiceResponse} + */ + this.getInvoice = function(invoiceId) { + return this.getInvoiceWithHttpInfo(invoiceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * ListInvoices + * Note: This endpoint is in beta. + * Returns a list of invoices for a given location. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + * @param {String} locationId The ID of the location for which to list invoices. + * @param {Object} opts Optional parameters + * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @param {Number} opts.limit The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListInvoicesResponse} and HTTP response + */ + this.listInvoicesWithHttpInfo = function(locationId, opts) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'locationId' is set + if (locationId === undefined || locationId === null) { + throw new Error("Missing the required parameter 'locationId' when calling listInvoices"); + } + + + var pathParams = { + }; + var queryParams = { + 'location_id': locationId, + 'cursor': opts['cursor'], + 'limit': opts['limit'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ListInvoicesResponse; + + return this.apiClient.callApi( + '/v2/invoices', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * ListInvoices + * Returns a list of invoices for a given location. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + * @param {String} locationId The ID of the location for which to list invoices. + * @param {Object} opts Optional parameters + * @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @param {Number} opts.limit The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListInvoicesResponse} + */ + this.listInvoices = function(locationId, opts) { + return this.listInvoicesWithHttpInfo(locationId, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * PublishInvoice + * Note: This endpoint is in beta. + * Publishes the specified draft invoice. After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page. The invoice `status` also changes from `DRAFT` to a status based on the invoice configuration. For example, the status changes to `UNPAID` if Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on file for a portion of the invoice amount). For more information, see [Create and publish an invoice](/docs/invoices-api/overview#create-and-publish-an-invoice). + * @param {String} invoiceId The id of the invoice to publish. + * @param {module:model/PublishInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PublishInvoiceResponse} and HTTP response + */ + this.publishInvoiceWithHttpInfo = function(invoiceId, body) { + var postBody = body; + + // verify the required parameter 'invoiceId' is set + if (invoiceId === undefined || invoiceId === null) { + throw new Error("Missing the required parameter 'invoiceId' when calling publishInvoice"); + } + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling publishInvoice"); + } + + + var pathParams = { + 'invoice_id': invoiceId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = PublishInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices/{invoice_id}/publish', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * PublishInvoice + * Publishes the specified draft invoice. After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page. The invoice `status` also changes from `DRAFT` to a status based on the invoice configuration. For example, the status changes to `UNPAID` if Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on file for a portion of the invoice amount). For more information, see [Create and publish an invoice](/docs/invoices-api/overview#create-and-publish-an-invoice). + * @param {String} invoiceId The id of the invoice to publish. + * @param {module:model/PublishInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PublishInvoiceResponse} + */ + this.publishInvoice = function(invoiceId, body) { + return this.publishInvoiceWithHttpInfo(invoiceId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * SearchInvoices + * Note: This endpoint is in beta. + * Searches for invoices from a location specified in the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + * @param {module:model/SearchInvoicesRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchInvoicesResponse} and HTTP response + */ + this.searchInvoicesWithHttpInfo = function(body) { + var postBody = body; + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling searchInvoices"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = SearchInvoicesResponse; + + return this.apiClient.callApi( + '/v2/invoices/search', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * SearchInvoices + * Searches for invoices from a location specified in the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer. The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices. For more information about retrieving invoices, see [Retrieve invoices](/docs/invoices-api/overview#retrieve-invoices). + * @param {module:model/SearchInvoicesRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchInvoicesResponse} + */ + this.searchInvoices = function(body) { + return this.searchInvoicesWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * UpdateInvoice + * Note: This endpoint is in beta. + * Updates an invoice by modifying field values, clearing field values, or both as specified in the request. There are no restrictions to updating an invoice in a draft state. However, there are guidelines for updating a published invoice. For more information, see [Update an invoice](/docs/invoices-api/overview#update-an-invoice). + * @param {String} invoiceId The id of the invoice to update. + * @param {module:model/UpdateInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateInvoiceResponse} and HTTP response + */ + this.updateInvoiceWithHttpInfo = function(invoiceId, body) { + var postBody = body; + + // verify the required parameter 'invoiceId' is set + if (invoiceId === undefined || invoiceId === null) { + throw new Error("Missing the required parameter 'invoiceId' when calling updateInvoice"); + } + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling updateInvoice"); + } + + + var pathParams = { + 'invoice_id': invoiceId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-07-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UpdateInvoiceResponse; + + return this.apiClient.callApi( + '/v2/invoices/{invoice_id}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * UpdateInvoice + * Updates an invoice by modifying field values, clearing field values, or both as specified in the request. There are no restrictions to updating an invoice in a draft state. However, there are guidelines for updating a published invoice. For more information, see [Update an invoice](/docs/invoices-api/overview#update-an-invoice). + * @param {String} invoiceId The id of the invoice to update. + * @param {module:model/UpdateInvoiceRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateInvoiceResponse} + */ + this.updateInvoice = function(invoiceId, body) { + return this.updateInvoiceWithHttpInfo(invoiceId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } +}; diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js index 585a42e..f867e47 100644 --- a/src/api/LaborApi.js +++ b/src/api/LaborApi.js @@ -39,7 +39,7 @@ var UpdateWorkweekConfigResponse = require('../model/UpdateWorkweekConfigRespons */ /** - * Constructs a new LaborApi. + * Constructs a new LaborApi. * @alias module:api/LaborApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -71,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -229,7 +229,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -282,7 +282,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -335,7 +335,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -388,7 +388,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -442,7 +442,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -499,7 +499,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -554,7 +554,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -608,7 +608,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -667,7 +667,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -727,7 +727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -787,7 +787,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js index 5c0eceb..55b06cd 100644 --- a/src/api/LocationsApi.js +++ b/src/api/LocationsApi.js @@ -25,7 +25,7 @@ var UpdateLocationResponse = require('../model/UpdateLocationResponse'); */ /** - * Constructs a new LocationsApi. + * Constructs a new LocationsApi. * @alias module:api/LocationsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -58,7 +58,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -104,7 +104,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -136,8 +136,8 @@ module.exports = function(apiClient) { /** * RetrieveLocation - * Retrieves details of a location. - * @param {String} locationId The ID of the location to retrieve. + * Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. For more information, see [Locations API Overview](/docs/locations-api). + * @param {String} locationId The ID of the location to retrieve. If you specify the string \"main\", then the endpoint returns the main location. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveLocationResponse} and HTTP response */ this.retrieveLocationWithHttpInfo = function(locationId) { @@ -156,7 +156,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -175,8 +175,8 @@ module.exports = function(apiClient) { /** * RetrieveLocation - * Retrieves details of a location. - * @param {String} locationId The ID of the location to retrieve. + * Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. For more information, see [Locations API Overview](/docs/locations-api). + * @param {String} locationId The ID of the location to retrieve. If you specify the string \"main\", then the endpoint returns the main location. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveLocationResponse} */ this.retrieveLocation = function(locationId) { @@ -216,7 +216,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/LoyaltyApi.js b/src/api/LoyaltyApi.js index fbd0dd4..8caf06b 100644 --- a/src/api/LoyaltyApi.js +++ b/src/api/LoyaltyApi.js @@ -41,7 +41,7 @@ var SearchLoyaltyRewardsResponse = require('../model/SearchLoyaltyRewardsRespons */ /** - * Constructs a new LoyaltyApi. + * Constructs a new LoyaltyApi. * @alias module:api/LoyaltyApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -81,7 +81,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -142,7 +142,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -203,7 +203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -257,7 +257,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -310,7 +310,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -364,7 +364,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -411,7 +411,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -470,7 +470,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -525,7 +525,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -579,7 +579,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -632,7 +632,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -685,7 +685,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -738,7 +738,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/MerchantsApi.js b/src/api/MerchantsApi.js index 5b4a69a..296c7f9 100644 --- a/src/api/MerchantsApi.js +++ b/src/api/MerchantsApi.js @@ -21,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, @@ -51,7 +51,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -86,7 +86,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. If the string \"me\" is supplied as the ID, then retrieve the merchant that is currently accessible to this call. * @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) { @@ -105,7 +105,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -125,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. If the string \"me\" is supplied as the ID, then retrieve the merchant that is currently accessible to this call. * @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 30ed390..1193baa 100644 --- a/src/api/MobileAuthorizationApi.js +++ b/src/api/MobileAuthorizationApi.js @@ -21,7 +21,7 @@ var CreateMobileAuthorizationCodeResponse = require('../model/CreateMobileAuthor */ /** - * Constructs a new MobileAuthorizationApi. + * Constructs a new MobileAuthorizationApi. * @alias module:api/MobileAuthorizationApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index 6d959b5..31eeeb0 100644 --- a/src/api/OAuthApi.js +++ b/src/api/OAuthApi.js @@ -25,7 +25,7 @@ var RevokeTokenResponse = require('../model/RevokeTokenResponse'); */ /** - * Constructs a new OAuthApi. + * Constructs a new OAuthApi. * @alias module:api/OAuthApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -171,7 +171,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js index 4ce0fdc..881b4cb 100644 --- a/src/api/OrdersApi.js +++ b/src/api/OrdersApi.js @@ -31,7 +31,7 @@ var UpdateOrderResponse = require('../model/UpdateOrderResponse'); */ /** - * Constructs a new OrdersApi. + * Constructs a new OrdersApi. * @alias module:api/OrdersApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -70,7 +70,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -124,7 +124,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -183,7 +183,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -244,7 +244,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -297,7 +297,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -364,7 +364,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/PaymentsApi.js b/src/api/PaymentsApi.js index a2d6d35..65870ef 100644 --- a/src/api/PaymentsApi.js +++ b/src/api/PaymentsApi.js @@ -28,7 +28,7 @@ var ListPaymentsResponse = require('../model/ListPaymentsResponse'); */ /** - * Constructs a new PaymentsApi. + * Constructs a new PaymentsApi. * @alias module:api/PaymentsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -172,7 +172,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -225,7 +225,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -278,7 +278,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -342,7 +342,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/RefundsApi.js b/src/api/RefundsApi.js index 82d8c17..575a067 100644 --- a/src/api/RefundsApi.js +++ b/src/api/RefundsApi.js @@ -23,7 +23,7 @@ var RefundPaymentResponse = require('../model/RefundPaymentResponse'); */ /** - * Constructs a new RefundsApi. + * Constructs a new RefundsApi. * @alias module:api/RefundsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/ReportingApi.js b/src/api/ReportingApi.js index 6e3b1bc..3721d34 100644 --- a/src/api/ReportingApi.js +++ b/src/api/ReportingApi.js @@ -21,7 +21,7 @@ var ListAdditionalRecipientReceivablesResponse = require('../model/ListAdditiona */ /** - * Constructs a new ReportingApi. + * Constructs a new ReportingApi. * @alias module:api/ReportingApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -66,7 +66,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -136,7 +136,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/TeamApi.js b/src/api/TeamApi.js index 64bf808..c75c031 100644 --- a/src/api/TeamApi.js +++ b/src/api/TeamApi.js @@ -33,7 +33,7 @@ var UpdateWageSettingResponse = require('../model/UpdateWageSettingResponse'); */ /** - * Constructs a new TeamApi. + * Constructs a new TeamApi. * @alias module:api/TeamApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -117,7 +117,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -169,7 +169,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -222,7 +222,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -275,7 +275,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -327,7 +327,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -386,7 +386,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -446,7 +446,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/TerminalApi.js b/src/api/TerminalApi.js index d422951..fe625c8 100644 --- a/src/api/TerminalApi.js +++ b/src/api/TerminalApi.js @@ -25,7 +25,7 @@ var SearchTerminalCheckoutsResponse = require('../model/SearchTerminalCheckoutsR */ /** - * Constructs a new TerminalApi. + * Constructs a new TerminalApi. * @alias module:api/TerminalApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -59,7 +59,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -112,7 +112,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -166,7 +166,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index 409fa50..54cbfb7 100644 --- a/src/api/TransactionsApi.js +++ b/src/api/TransactionsApi.js @@ -28,7 +28,7 @@ var VoidTransactionResponse = require('../model/VoidTransactionResponse'); */ /** - * Constructs a new TransactionsApi. + * Constructs a new TransactionsApi. * @alias module:api/TransactionsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -43,8 +43,8 @@ module.exports = function(apiClient) { * @deprecated * CaptureTransaction * Captures a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. - * @param {String} locationId - * @param {String} transactionId + * @param {String} locationId + * @param {String} transactionId * @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) { @@ -70,7 +70,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -90,8 +90,8 @@ module.exports = function(apiClient) { /** * CaptureTransaction * Captures a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. - * @param {String} locationId - * @param {String} transactionId + * @param {String} locationId + * @param {String} transactionId * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CaptureTransactionResponse} */ this.captureTransaction = function(locationId, transactionId) { @@ -132,7 +132,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -201,7 +201,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -268,7 +268,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -405,7 +405,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -441,8 +441,8 @@ module.exports = function(apiClient) { * @deprecated * VoidTransaction * Cancels a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. - * @param {String} locationId - * @param {String} transactionId + * @param {String} locationId + * @param {String} transactionId * @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) { @@ -468,7 +468,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -488,8 +488,8 @@ module.exports = function(apiClient) { /** * VoidTransaction * Cancels a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. - * @param {String} locationId - * @param {String} transactionId + * @param {String} locationId + * @param {String} transactionId * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VoidTransactionResponse} */ this.voidTransaction = function(locationId, transactionId) { diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js index e75a9ed..fe31e7a 100644 --- a/src/api/V1EmployeesApi.js +++ b/src/api/V1EmployeesApi.js @@ -24,7 +24,7 @@ var V1TimecardEvent = require('../model/V1TimecardEvent'); */ /** - * Constructs a new V1EmployeesApi. + * Constructs a new V1EmployeesApi. * @alias module:api/V1EmployeesApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -217,7 +217,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -280,7 +280,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -407,7 +407,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -471,7 +471,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -543,7 +543,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -616,7 +616,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -670,7 +670,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -723,7 +723,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -778,7 +778,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -811,7 +811,7 @@ module.exports = function(apiClient) { /** * UpdateEmployee - * + * * @param {String} employeeId The ID of the role to modify. * @param {module:model/V1Employee} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/V1Employee} and HTTP response @@ -837,7 +837,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -856,7 +856,7 @@ module.exports = function(apiClient) { /** * UpdateEmployee - * + * * @param {String} employeeId The ID of the role to modify. * @param {module:model/V1Employee} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/V1Employee} @@ -897,7 +897,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -959,7 +959,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js index 718632c..7b87703 100644 --- a/src/api/V1ItemsApi.js +++ b/src/api/V1ItemsApi.js @@ -31,7 +31,7 @@ var V1Variation = require('../model/V1Variation'); */ /** - * Constructs a new V1ItemsApi. + * Constructs a new V1ItemsApi. * @alias module:api/V1ItemsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -79,7 +79,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -150,7 +150,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -221,7 +221,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -284,7 +284,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -346,7 +346,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -408,7 +408,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -470,7 +470,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -532,7 +532,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -601,7 +601,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -664,7 +664,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -733,7 +733,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -797,7 +797,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -860,7 +860,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -923,7 +923,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -986,7 +986,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1049,7 +1049,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1119,7 +1119,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1183,7 +1183,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1252,7 +1252,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1325,7 +1325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1382,7 +1382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1437,7 +1437,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1492,7 +1492,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1553,7 +1553,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1615,7 +1615,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1672,7 +1672,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1727,7 +1727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1796,7 +1796,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1867,7 +1867,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1931,7 +1931,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -1994,7 +1994,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2063,7 +2063,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2133,7 +2133,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2203,7 +2203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2273,7 +2273,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2343,7 +2343,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2420,7 +2420,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2491,7 +2491,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2561,7 +2561,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -2638,7 +2638,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js index 3cad44d..485ef78 100644 --- a/src/api/V1LocationsApi.js +++ b/src/api/V1LocationsApi.js @@ -20,7 +20,7 @@ var V1Merchant = require('../model/V1Merchant'); */ /** - * Constructs a new V1LocationsApi. + * Constructs a new V1LocationsApi. * @alias module:api/V1LocationsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -48,7 +48,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -95,7 +95,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js index 5ef6106..1cb3ad6 100644 --- a/src/api/V1TransactionsApi.js +++ b/src/api/V1TransactionsApi.js @@ -26,7 +26,7 @@ var V1UpdateOrderRequest = require('../model/V1UpdateOrderRequest'); */ /** - * Constructs a new V1TransactionsApi. + * Constructs a new V1TransactionsApi. * @alias module:api/V1TransactionsApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -182,7 +182,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -253,7 +253,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -325,7 +325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -398,7 +398,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -528,7 +528,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -589,7 +589,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -650,7 +650,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; @@ -717,7 +717,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-06-25'; + headerParams['Square-Version'] = '2020-07-22'; var formParams = { }; diff --git a/src/index.js b/src/index.js index b07c1d2..c7abb83 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,7 @@ var AcceptDisputeRequest = require('./model/AcceptDisputeRequest'); var AcceptDisputeResponse = require('./model/AcceptDisputeResponse'); var AccumulateLoyaltyPointsRequest = require('./model/AccumulateLoyaltyPointsRequest'); var AccumulateLoyaltyPointsResponse = require('./model/AccumulateLoyaltyPointsResponse'); +var ActionCancelReason = require('./model/ActionCancelReason'); var AddGroupToCustomerRequest = require('./model/AddGroupToCustomerRequest'); var AddGroupToCustomerResponse = require('./model/AddGroupToCustomerResponse'); var AdditionalRecipient = require('./model/AdditionalRecipient'); @@ -54,6 +55,8 @@ var CalculateLoyaltyPointsRequest = require('./model/CalculateLoyaltyPointsReque var CalculateLoyaltyPointsResponse = require('./model/CalculateLoyaltyPointsResponse'); var CalculateOrderRequest = require('./model/CalculateOrderRequest'); var CalculateOrderResponse = require('./model/CalculateOrderResponse'); +var CancelInvoiceRequest = require('./model/CancelInvoiceRequest'); +var CancelInvoiceResponse = require('./model/CancelInvoiceResponse'); var CancelPaymentByIdempotencyKeyRequest = require('./model/CancelPaymentByIdempotencyKeyRequest'); var CancelPaymentByIdempotencyKeyResponse = require('./model/CancelPaymentByIdempotencyKeyResponse'); var CancelPaymentRequest = require('./model/CancelPaymentRequest'); @@ -153,6 +156,8 @@ var CreateDisputeEvidenceFileRequest = require('./model/CreateDisputeEvidenceFil var CreateDisputeEvidenceFileResponse = require('./model/CreateDisputeEvidenceFileResponse'); var CreateDisputeEvidenceTextRequest = require('./model/CreateDisputeEvidenceTextRequest'); var CreateDisputeEvidenceTextResponse = require('./model/CreateDisputeEvidenceTextResponse'); +var CreateInvoiceRequest = require('./model/CreateInvoiceRequest'); +var CreateInvoiceResponse = require('./model/CreateInvoiceResponse'); var CreateLocationRequest = require('./model/CreateLocationRequest'); var CreateLocationResponse = require('./model/CreateLocationResponse'); var CreateLoyaltyAccountRequest = require('./model/CreateLoyaltyAccountRequest'); @@ -174,6 +179,7 @@ var CreateTeamMemberResponse = require('./model/CreateTeamMemberResponse'); var CreateTerminalCheckoutRequest = require('./model/CreateTerminalCheckoutRequest'); var CreateTerminalCheckoutResponse = require('./model/CreateTerminalCheckoutResponse'); var Currency = require('./model/Currency'); +var CustomAttributeFilter = require('./model/CustomAttributeFilter'); var Customer = require('./model/Customer'); var CustomerCreationSource = require('./model/CustomerCreationSource'); var CustomerCreationSourceFilter = require('./model/CustomerCreationSourceFilter'); @@ -199,6 +205,8 @@ var DeleteCustomerGroupRequest = require('./model/DeleteCustomerGroupRequest'); var DeleteCustomerGroupResponse = require('./model/DeleteCustomerGroupResponse'); var DeleteCustomerRequest = require('./model/DeleteCustomerRequest'); var DeleteCustomerResponse = require('./model/DeleteCustomerResponse'); +var DeleteInvoiceRequest = require('./model/DeleteInvoiceRequest'); +var DeleteInvoiceResponse = require('./model/DeleteInvoiceResponse'); var DeleteLoyaltyRewardRequest = require('./model/DeleteLoyaltyRewardRequest'); var DeleteLoyaltyRewardResponse = require('./model/DeleteLoyaltyRewardResponse'); var DeleteShiftRequest = require('./model/DeleteShiftRequest'); @@ -234,6 +242,8 @@ var GetDeviceCodeRequest = require('./model/GetDeviceCodeRequest'); var GetDeviceCodeResponse = require('./model/GetDeviceCodeResponse'); var GetEmployeeWageRequest = require('./model/GetEmployeeWageRequest'); var GetEmployeeWageResponse = require('./model/GetEmployeeWageResponse'); +var GetInvoiceRequest = require('./model/GetInvoiceRequest'); +var GetInvoiceResponse = require('./model/GetInvoiceResponse'); var GetPaymentRefundRequest = require('./model/GetPaymentRefundRequest'); var GetPaymentRefundResponse = require('./model/GetPaymentRefundResponse'); var GetPaymentRequest = require('./model/GetPaymentRequest'); @@ -250,6 +260,18 @@ var InventoryCount = require('./model/InventoryCount'); var InventoryPhysicalCount = require('./model/InventoryPhysicalCount'); var InventoryState = require('./model/InventoryState'); var InventoryTransfer = require('./model/InventoryTransfer'); +var Invoice = require('./model/Invoice'); +var InvoiceFilter = require('./model/InvoiceFilter'); +var InvoicePaymentReminder = require('./model/InvoicePaymentReminder'); +var InvoicePaymentReminderStatus = require('./model/InvoicePaymentReminderStatus'); +var InvoicePaymentRequest = require('./model/InvoicePaymentRequest'); +var InvoiceQuery = require('./model/InvoiceQuery'); +var InvoiceRecipient = require('./model/InvoiceRecipient'); +var InvoiceRequestMethod = require('./model/InvoiceRequestMethod'); +var InvoiceRequestType = require('./model/InvoiceRequestType'); +var InvoiceSort = require('./model/InvoiceSort'); +var InvoiceSortField = require('./model/InvoiceSortField'); +var InvoiceStatus = require('./model/InvoiceStatus'); var ItemVariationLocationOverrides = require('./model/ItemVariationLocationOverrides'); var JobAssignment = require('./model/JobAssignment'); var JobAssignmentPayType = require('./model/JobAssignmentPayType'); @@ -283,6 +305,8 @@ var ListEmployeeWagesRequest = require('./model/ListEmployeeWagesRequest'); var ListEmployeeWagesResponse = require('./model/ListEmployeeWagesResponse'); var ListEmployeesRequest = require('./model/ListEmployeesRequest'); var ListEmployeesResponse = require('./model/ListEmployeesResponse'); +var ListInvoicesRequest = require('./model/ListInvoicesRequest'); +var ListInvoicesResponse = require('./model/ListInvoicesResponse'); var ListLocationsRequest = require('./model/ListLocationsRequest'); var ListLocationsResponse = require('./model/ListLocationsResponse'); var ListLoyaltyProgramsRequest = require('./model/ListLoyaltyProgramsRequest'); @@ -377,6 +401,7 @@ var OrderLineItemTax = require('./model/OrderLineItemTax'); var OrderLineItemTaxScope = require('./model/OrderLineItemTaxScope'); var OrderLineItemTaxType = require('./model/OrderLineItemTaxType'); var OrderMoneyAmounts = require('./model/OrderMoneyAmounts'); +var OrderPricingOptions = require('./model/OrderPricingOptions'); var OrderQuantityUnit = require('./model/OrderQuantityUnit'); var OrderReturn = require('./model/OrderReturn'); var OrderReturnDiscount = require('./model/OrderReturnDiscount'); @@ -400,6 +425,9 @@ var PaymentRefund = require('./model/PaymentRefund'); var ProcessingFee = require('./model/ProcessingFee'); var Product = require('./model/Product'); var ProductType = require('./model/ProductType'); +var PublishInvoiceRequest = require('./model/PublishInvoiceRequest'); +var PublishInvoiceResponse = require('./model/PublishInvoiceResponse'); +var Range = require('./model/Range'); var RedeemLoyaltyRewardRequest = require('./model/RedeemLoyaltyRewardRequest'); var RedeemLoyaltyRewardResponse = require('./model/RedeemLoyaltyRewardResponse'); var Refund = require('./model/Refund'); @@ -455,10 +483,15 @@ var RetrieveWageSettingRequest = require('./model/RetrieveWageSettingRequest'); var RetrieveWageSettingResponse = require('./model/RetrieveWageSettingResponse'); var RevokeTokenRequest = require('./model/RevokeTokenRequest'); var RevokeTokenResponse = require('./model/RevokeTokenResponse'); +var SearchCatalogItemsRequest = require('./model/SearchCatalogItemsRequest'); +var SearchCatalogItemsRequestStockLevel = require('./model/SearchCatalogItemsRequestStockLevel'); +var SearchCatalogItemsResponse = require('./model/SearchCatalogItemsResponse'); var SearchCatalogObjectsRequest = require('./model/SearchCatalogObjectsRequest'); var SearchCatalogObjectsResponse = require('./model/SearchCatalogObjectsResponse'); var SearchCustomersRequest = require('./model/SearchCustomersRequest'); var SearchCustomersResponse = require('./model/SearchCustomersResponse'); +var SearchInvoicesRequest = require('./model/SearchInvoicesRequest'); +var SearchInvoicesResponse = require('./model/SearchInvoicesResponse'); var SearchLoyaltyAccountsRequest = require('./model/SearchLoyaltyAccountsRequest'); var SearchLoyaltyAccountsRequestLoyaltyAccountQuery = require('./model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery'); var SearchLoyaltyAccountsResponse = require('./model/SearchLoyaltyAccountsResponse'); @@ -515,7 +548,6 @@ var TenderCardDetailsStatus = require('./model/TenderCardDetailsStatus'); var TenderCashDetails = require('./model/TenderCashDetails'); var TenderType = require('./model/TenderType'); var TerminalCheckout = require('./model/TerminalCheckout'); -var TerminalCheckoutCancelReason = require('./model/TerminalCheckoutCancelReason'); var TerminalCheckoutQuery = require('./model/TerminalCheckoutQuery'); var TerminalCheckoutQueryFilter = require('./model/TerminalCheckoutQueryFilter'); var TerminalCheckoutQuerySort = require('./model/TerminalCheckoutQuerySort'); @@ -530,6 +562,8 @@ var UpdateCustomerGroupRequest = require('./model/UpdateCustomerGroupRequest'); var UpdateCustomerGroupResponse = require('./model/UpdateCustomerGroupResponse'); var UpdateCustomerRequest = require('./model/UpdateCustomerRequest'); var UpdateCustomerResponse = require('./model/UpdateCustomerResponse'); +var UpdateInvoiceRequest = require('./model/UpdateInvoiceRequest'); +var UpdateInvoiceResponse = require('./model/UpdateInvoiceResponse'); var UpdateItemModifierListsRequest = require('./model/UpdateItemModifierListsRequest'); var UpdateItemModifierListsResponse = require('./model/UpdateItemModifierListsResponse'); var UpdateItemTaxesRequest = require('./model/UpdateItemTaxesRequest'); @@ -726,6 +760,7 @@ var DevicesApi = require('./api/DevicesApi'); var DisputesApi = require('./api/DisputesApi'); var EmployeesApi = require('./api/EmployeesApi'); var InventoryApi = require('./api/InventoryApi'); +var InvoicesApi = require('./api/InvoicesApi'); var LaborApi = require('./api/LaborApi'); var LocationsApi = require('./api/LocationsApi'); var LoyaltyApi = require('./api/LoyaltyApi'); @@ -774,7 +809,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *

* @module index - * @version 4.20200625.0 + * @version 4.20200722.1 */ module.exports = { /** @@ -802,6 +837,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/AccumulateLoyaltyPointsResponse} */ AccumulateLoyaltyPointsResponse: AccumulateLoyaltyPointsResponse, + /** + * The ActionCancelReason model constructor. + * @property {module:model/ActionCancelReason} + */ + ActionCancelReason: ActionCancelReason, /** * The AddGroupToCustomerRequest model constructor. * @property {module:model/AddGroupToCustomerRequest} @@ -987,6 +1027,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CalculateOrderResponse} */ CalculateOrderResponse: CalculateOrderResponse, + /** + * The CancelInvoiceRequest model constructor. + * @property {module:model/CancelInvoiceRequest} + */ + CancelInvoiceRequest: CancelInvoiceRequest, + /** + * The CancelInvoiceResponse model constructor. + * @property {module:model/CancelInvoiceResponse} + */ + CancelInvoiceResponse: CancelInvoiceResponse, /** * The CancelPaymentByIdempotencyKeyRequest model constructor. * @property {module:model/CancelPaymentByIdempotencyKeyRequest} @@ -1482,6 +1532,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CreateDisputeEvidenceTextResponse} */ CreateDisputeEvidenceTextResponse: CreateDisputeEvidenceTextResponse, + /** + * The CreateInvoiceRequest model constructor. + * @property {module:model/CreateInvoiceRequest} + */ + CreateInvoiceRequest: CreateInvoiceRequest, + /** + * The CreateInvoiceResponse model constructor. + * @property {module:model/CreateInvoiceResponse} + */ + CreateInvoiceResponse: CreateInvoiceResponse, /** * The CreateLocationRequest model constructor. * @property {module:model/CreateLocationRequest} @@ -1587,6 +1647,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Currency} */ Currency: Currency, + /** + * The CustomAttributeFilter model constructor. + * @property {module:model/CustomAttributeFilter} + */ + CustomAttributeFilter: CustomAttributeFilter, /** * The Customer model constructor. * @property {module:model/Customer} @@ -1712,6 +1777,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/DeleteCustomerResponse} */ DeleteCustomerResponse: DeleteCustomerResponse, + /** + * The DeleteInvoiceRequest model constructor. + * @property {module:model/DeleteInvoiceRequest} + */ + DeleteInvoiceRequest: DeleteInvoiceRequest, + /** + * The DeleteInvoiceResponse model constructor. + * @property {module:model/DeleteInvoiceResponse} + */ + DeleteInvoiceResponse: DeleteInvoiceResponse, /** * The DeleteLoyaltyRewardRequest model constructor. * @property {module:model/DeleteLoyaltyRewardRequest} @@ -1887,6 +1962,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/GetEmployeeWageResponse} */ GetEmployeeWageResponse: GetEmployeeWageResponse, + /** + * The GetInvoiceRequest model constructor. + * @property {module:model/GetInvoiceRequest} + */ + GetInvoiceRequest: GetInvoiceRequest, + /** + * The GetInvoiceResponse model constructor. + * @property {module:model/GetInvoiceResponse} + */ + GetInvoiceResponse: GetInvoiceResponse, /** * The GetPaymentRefundRequest model constructor. * @property {module:model/GetPaymentRefundRequest} @@ -1967,6 +2052,66 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/InventoryTransfer} */ InventoryTransfer: InventoryTransfer, + /** + * The Invoice model constructor. + * @property {module:model/Invoice} + */ + Invoice: Invoice, + /** + * The InvoiceFilter model constructor. + * @property {module:model/InvoiceFilter} + */ + InvoiceFilter: InvoiceFilter, + /** + * The InvoicePaymentReminder model constructor. + * @property {module:model/InvoicePaymentReminder} + */ + InvoicePaymentReminder: InvoicePaymentReminder, + /** + * The InvoicePaymentReminderStatus model constructor. + * @property {module:model/InvoicePaymentReminderStatus} + */ + InvoicePaymentReminderStatus: InvoicePaymentReminderStatus, + /** + * The InvoicePaymentRequest model constructor. + * @property {module:model/InvoicePaymentRequest} + */ + InvoicePaymentRequest: InvoicePaymentRequest, + /** + * The InvoiceQuery model constructor. + * @property {module:model/InvoiceQuery} + */ + InvoiceQuery: InvoiceQuery, + /** + * The InvoiceRecipient model constructor. + * @property {module:model/InvoiceRecipient} + */ + InvoiceRecipient: InvoiceRecipient, + /** + * The InvoiceRequestMethod model constructor. + * @property {module:model/InvoiceRequestMethod} + */ + InvoiceRequestMethod: InvoiceRequestMethod, + /** + * The InvoiceRequestType model constructor. + * @property {module:model/InvoiceRequestType} + */ + InvoiceRequestType: InvoiceRequestType, + /** + * The InvoiceSort model constructor. + * @property {module:model/InvoiceSort} + */ + InvoiceSort: InvoiceSort, + /** + * The InvoiceSortField model constructor. + * @property {module:model/InvoiceSortField} + */ + InvoiceSortField: InvoiceSortField, + /** + * The InvoiceStatus model constructor. + * @property {module:model/InvoiceStatus} + */ + InvoiceStatus: InvoiceStatus, /** * The ItemVariationLocationOverrides model constructor. * @property {module:model/ItemVariationLocationOverrides} @@ -2132,6 +2277,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ListEmployeesResponse} */ ListEmployeesResponse: ListEmployeesResponse, + /** + * The ListInvoicesRequest model constructor. + * @property {module:model/ListInvoicesRequest} + */ + ListInvoicesRequest: ListInvoicesRequest, + /** + * The ListInvoicesResponse model constructor. + * @property {module:model/ListInvoicesResponse} + */ + ListInvoicesResponse: ListInvoicesResponse, /** * The ListLocationsRequest model constructor. * @property {module:model/ListLocationsRequest} @@ -2602,6 +2757,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/OrderMoneyAmounts} */ OrderMoneyAmounts: OrderMoneyAmounts, + /** + * The OrderPricingOptions model constructor. + * @property {module:model/OrderPricingOptions} + */ + OrderPricingOptions: OrderPricingOptions, /** * The OrderQuantityUnit model constructor. * @property {module:model/OrderQuantityUnit} @@ -2717,6 +2877,21 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ProductType} */ ProductType: ProductType, + /** + * The PublishInvoiceRequest model constructor. + * @property {module:model/PublishInvoiceRequest} + */ + PublishInvoiceRequest: PublishInvoiceRequest, + /** + * The PublishInvoiceResponse model constructor. + * @property {module:model/PublishInvoiceResponse} + */ + PublishInvoiceResponse: PublishInvoiceResponse, + /** + * The Range model constructor. + * @property {module:model/Range} + */ + Range: Range, /** * The RedeemLoyaltyRewardRequest model constructor. * @property {module:model/RedeemLoyaltyRewardRequest} @@ -2992,6 +3167,21 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/RevokeTokenResponse} */ RevokeTokenResponse: RevokeTokenResponse, + /** + * The SearchCatalogItemsRequest model constructor. + * @property {module:model/SearchCatalogItemsRequest} + */ + SearchCatalogItemsRequest: SearchCatalogItemsRequest, + /** + * The SearchCatalogItemsRequestStockLevel model constructor. + * @property {module:model/SearchCatalogItemsRequestStockLevel} + */ + SearchCatalogItemsRequestStockLevel: SearchCatalogItemsRequestStockLevel, + /** + * The SearchCatalogItemsResponse model constructor. + * @property {module:model/SearchCatalogItemsResponse} + */ + SearchCatalogItemsResponse: SearchCatalogItemsResponse, /** * The SearchCatalogObjectsRequest model constructor. * @property {module:model/SearchCatalogObjectsRequest} @@ -3012,6 +3202,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/SearchCustomersResponse} */ SearchCustomersResponse: SearchCustomersResponse, + /** + * The SearchInvoicesRequest model constructor. + * @property {module:model/SearchInvoicesRequest} + */ + SearchInvoicesRequest: SearchInvoicesRequest, + /** + * The SearchInvoicesResponse model constructor. + * @property {module:model/SearchInvoicesResponse} + */ + SearchInvoicesResponse: SearchInvoicesResponse, /** * The SearchLoyaltyAccountsRequest model constructor. * @property {module:model/SearchLoyaltyAccountsRequest} @@ -3292,11 +3492,6 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/TerminalCheckout} */ TerminalCheckout: TerminalCheckout, - /** - * The TerminalCheckoutCancelReason model constructor. - * @property {module:model/TerminalCheckoutCancelReason} - */ - TerminalCheckoutCancelReason: TerminalCheckoutCancelReason, /** * The TerminalCheckoutQuery model constructor. * @property {module:model/TerminalCheckoutQuery} @@ -3367,6 +3562,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/UpdateCustomerResponse} */ UpdateCustomerResponse: UpdateCustomerResponse, + /** + * The UpdateInvoiceRequest model constructor. + * @property {module:model/UpdateInvoiceRequest} + */ + UpdateInvoiceRequest: UpdateInvoiceRequest, + /** + * The UpdateInvoiceResponse model constructor. + * @property {module:model/UpdateInvoiceResponse} + */ + UpdateInvoiceResponse: UpdateInvoiceResponse, /** * The UpdateItemModifierListsRequest model constructor. * @property {module:model/UpdateItemModifierListsRequest} @@ -4342,6 +4547,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:api/InventoryApi} */ InventoryApi: InventoryApi, + /** + * The InvoicesApi service constructor. + * @property {module:api/InvoicesApi} + */ + InvoicesApi: InvoicesApi, /** * The LaborApi service constructor. * @property {module:api/LaborApi} diff --git a/src/model/TerminalCheckoutCancelReason.js b/src/model/ActionCancelReason.js similarity index 77% rename from src/model/TerminalCheckoutCancelReason.js rename to src/model/ActionCancelReason.js index 027c425..40612b2 100644 --- a/src/model/TerminalCheckoutCancelReason.js +++ b/src/model/ActionCancelReason.js @@ -15,7 +15,7 @@ var ApiClient = require('../ApiClient'); /** - * Enum class TerminalCheckoutCancelReason. + * Enum class ActionCancelReason. * @enum {} * @readonly */ @@ -37,9 +37,9 @@ var exports = { "TIMED_OUT": "TIMED_OUT"}; /** - * Returns a TerminalCheckoutCancelReason enum value from a Javascript object name. + * Returns a ActionCancelReason enum value from a Javascript object name. * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/TerminalCheckoutCancelReason} The enum TerminalCheckoutCancelReason value. + * @return {module:model/ActionCancelReason} The enum ActionCancelReason value. */ exports.constructFromObject = function(object) { return object; diff --git a/src/model/BatchRetrieveInventoryChangesRequest.js b/src/model/BatchRetrieveInventoryChangesRequest.js index 615eb3c..46d3f57 100644 --- a/src/model/BatchRetrieveInventoryChangesRequest.js +++ b/src/model/BatchRetrieveInventoryChangesRequest.js @@ -76,7 +76,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Filters results by `CatalogObject` ID. Only applied when set. Default: unset. + * Filters results by `CatalogObject` ID. Only applied when set. Max size is 500 IDs. Default: unset. * @member {Array.} catalog_object_ids */ exports.prototype['catalog_object_ids'] = undefined; diff --git a/src/model/BatchRetrieveInventoryCountsRequest.js b/src/model/BatchRetrieveInventoryCountsRequest.js index 620e6c5..40975c4 100644 --- a/src/model/BatchRetrieveInventoryCountsRequest.js +++ b/src/model/BatchRetrieveInventoryCountsRequest.js @@ -64,7 +64,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Filters results by `CatalogObject` ID. Only applied when set. Default: unset. + * Filters results by `CatalogObject` ID. Only applied when set. Max size is 1000 IDs. Default: unset. * @member {Array.} catalog_object_ids */ exports.prototype['catalog_object_ids'] = undefined; diff --git a/src/model/BreakType.js b/src/model/BreakType.js index c14e1a6..ee0b84b 100644 --- a/src/model/BreakType.js +++ b/src/model/BreakType.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new BreakType. - * A defined break template that sets an expectation for possible `Break` instances on a `Shift`. + * A defined break template that sets an expectation for possible `Break` instances on a `Shift`. * @alias module:model/BreakType * @class * @param locationId {String} The ID of the business location this type of break applies to. @@ -109,7 +109,7 @@ exports.prototype['expected_duration'] = undefined; */ exports.prototype['is_paid'] = undefined; /** - * Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If a value is not provided, Square's servers execute a \"blind\" write; potentially overwriting another writer's data. + * Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If a value is not provided, Square's servers execute a \"blind\" write; potentially overwriting another writer's data. * @member {Number} version */ exports.prototype['version'] = undefined; diff --git a/src/model/CancelInvoiceRequest.js b/src/model/CancelInvoiceRequest.js new file mode 100644 index 0000000..bcd4a74 --- /dev/null +++ b/src/model/CancelInvoiceRequest.js @@ -0,0 +1,67 @@ +/** + * 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 CancelInvoiceRequest model module. + * Note: This model is in beta. + * @module model/CancelInvoiceRequest + */ + +/** + * Constructs a new CancelInvoiceRequest. + * Describes a `CancelInvoice` request. + * @alias module:model/CancelInvoiceRequest + * @class + * @param version {Number} The version of the `invoice` to cancel. If you do not know the version, you can call `GetInvoice](#endpoint-Invoices-GetInvoice) or [ListInvoices`. + */ +var exports = function(version) { + var _this = this; + + _this['version'] = version; +}; + +/** + * Constructs a CancelInvoiceRequest 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/CancelInvoiceRequest} obj Optional instance to populate. + * @return {module:model/CancelInvoiceRequest} The populated CancelInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + } + return obj; +} + +/** + * The version of the `invoice` to cancel. If you do not know the version, you can call `GetInvoice](#endpoint-Invoices-GetInvoice) or [ListInvoices`. + * @member {Number} version + */ +exports.prototype['version'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CancelInvoiceResponse.js b/src/model/CancelInvoiceResponse.js new file mode 100644 index 0000000..fe1a337 --- /dev/null +++ b/src/model/CancelInvoiceResponse.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The CancelInvoiceResponse model module. + * Note: This model is in beta. + * @module model/CancelInvoiceResponse + */ + +/** + * Constructs a new CancelInvoiceResponse. + * The response returned by the `CancelInvoice` request. + * @alias module:model/CancelInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CancelInvoiceResponse 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/CancelInvoiceResponse} obj Optional instance to populate. + * @return {module:model/CancelInvoiceResponse} The populated CancelInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The canceled invoice. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogCategory.js b/src/model/CatalogCategory.js index 0b496a3..b710c91 100644 --- a/src/model/CatalogCategory.js +++ b/src/model/CatalogCategory.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogCategory. - * A category to which a `CatalogItem` belongs in the `Catalog` object model. + * A category to which a `CatalogItem` instance belongs. * @alias module:model/CatalogCategory * @class */ @@ -52,7 +52,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The category name. Searchable. This field has max length of 255 Unicode code points. + * The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; diff --git a/src/model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.js b/src/model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.js index ec96763..36b5a6e 100644 --- a/src/model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.js +++ b/src/model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.js @@ -27,7 +27,7 @@ var ApiClient = require('../ApiClient'); * A named selection for this `SELECTION`-type custom attribute definition. * @alias module:model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection * @class - * @param name {String} Selection name, unique within `allowed_selections`. Required. Min length of 1, max length of 255. + * @param name {String} Selection name, unique within `allowed_selections`. */ var exports = function(name) { var _this = this; @@ -63,7 +63,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['uid'] = undefined; /** - * Selection name, unique within `allowed_selections`. Required. Min length of 1, max length of 255. + * Selection name, unique within `allowed_selections`. * @member {String} name */ exports.prototype['name'] = undefined; diff --git a/src/model/CatalogDiscount.js b/src/model/CatalogDiscount.js index e140df0..5269bd6 100644 --- a/src/model/CatalogDiscount.js +++ b/src/model/CatalogDiscount.js @@ -24,7 +24,7 @@ var Money = require('./Money'); /** * Constructs a new CatalogDiscount. - * A discount in the Catalog object model. + * A discount applicable to items. * @alias module:model/CatalogDiscount * @class */ @@ -77,7 +77,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The discount name. Searchable. This field has max length of 255 Unicode code points. + * The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; @@ -87,12 +87,12 @@ exports.prototype['name'] = undefined; */ exports.prototype['discount_type'] = undefined; /** - * The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not include this field for amount-based or variable discounts. + * The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not use this field for amount-based or variable discounts. * @member {String} percentage */ exports.prototype['percentage'] = undefined; /** - * The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not include this field for percentage-based or variable discounts. + * The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not use this field for percentage-based or variable discounts. * @member {module:model/Money} amount_money */ exports.prototype['amount_money'] = undefined; diff --git a/src/model/CatalogIdMapping.js b/src/model/CatalogIdMapping.js index ad52659..11650ca 100644 --- a/src/model/CatalogIdMapping.js +++ b/src/model/CatalogIdMapping.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogIdMapping. - * A mapping between a client-supplied temporary ID and a permanent server ID. + * A mapping between a temporary client-supplied ID and a permanent server-generated ID. When calling [UpsertCatalogObject](#endpoint-Catalog-UpsertCatalogObject) or [BatchUpsertCatalogObjects](#endpoint-Catalog-BatchUpsertCatalogObjects) to create a [CatalogObject](#type-CatalogObject) instance, you can supply a temporary ID for the to-be-created object, especially when the object is to be referenced elsewhere in the same request body. This temporary ID can be any string unique within the call, but must be prefixed by \"#\". After the request is sumbitted and the object created, a permanent server-generated ID is assigned to the new object. The permanent ID is unique across the Square catalog. * @alias module:model/CatalogIdMapping * @class */ @@ -56,7 +56,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The client-supplied, temporary `#`-prefixed ID for a new `CatalogObject`. + * The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`. * @member {String} client_object_id */ exports.prototype['client_object_id'] = undefined; diff --git a/src/model/CatalogImage.js b/src/model/CatalogImage.js index d6d114d..98bb84f 100644 --- a/src/model/CatalogImage.js +++ b/src/model/CatalogImage.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogImage. - * An image file to use in Square catalogs. Can be associated with catalog items, item variations, and categories. + * An image file to use in Square catalogs. It can be associated with catalog items, item variations, and categories. * @alias module:model/CatalogImage * @class */ @@ -60,17 +60,17 @@ exports.constructFromObject = function(data, obj) { } /** - * The internal name of this image. Identifies this image in calls to the Connect APIs. + * The internal name to identify this image in calls to the Square API. * @member {String} name */ exports.prototype['name'] = undefined; /** - * The URL of this image. Generated by Square after an image is uploaded to the CreateCatalogImage endpoint. + * The URL of this image, generated by Square after an image is uploaded using the `CreateCatalogImage` endpoint. * @member {String} url */ exports.prototype['url'] = undefined; /** - * A caption that describes what is shown in the image. Displayed in the Square Online Store. + * A caption that describes what is shown in the image. Displayed in the Square Online Store. This is a searchable attribute for use in applicable query filters. * @member {String} caption */ exports.prototype['caption'] = undefined; diff --git a/src/model/CatalogItem.js b/src/model/CatalogItem.js index 0853c9a..deab9a6 100644 --- a/src/model/CatalogItem.js +++ b/src/model/CatalogItem.js @@ -26,7 +26,7 @@ var CatalogObject = require('./CatalogObject'); /** * Constructs a new CatalogItem. - * An item (i.e., product family) in the Catalog object model. + * An [CatalogObject](#type-CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog. * @alias module:model/CatalogItem * @class */ @@ -107,17 +107,17 @@ exports.constructFromObject = function(data, obj) { } /** - * The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. + * The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; /** - * The item's description. Searchable. This field has max length of 4096 Unicode code points. + * The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} description */ exports.prototype['description'] = undefined; /** - * The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points. + * The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. This attribute is searchable, and its value length is of Unicode code points. * @member {String} abbreviation */ exports.prototype['abbreviation'] = undefined; diff --git a/src/model/CatalogItemModifierListInfo.js b/src/model/CatalogItemModifierListInfo.js index beb5929..b4bee54 100644 --- a/src/model/CatalogItemModifierListInfo.js +++ b/src/model/CatalogItemModifierListInfo.js @@ -24,7 +24,7 @@ var CatalogModifierOverride = require('./CatalogModifierOverride'); /** * Constructs a new CatalogItemModifierListInfo. - * Controls the properties of a `CatalogModifierList` as it applies to this `CatalogItem`. + * Options to control the properties of a `CatalogModifierList` applied to a `CatalogItem` instance. * @alias module:model/CatalogItemModifierListInfo * @class * @param modifierListId {String} The ID of the `CatalogModifierList` controlled by this `CatalogModifierListInfo`. diff --git a/src/model/CatalogItemOption.js b/src/model/CatalogItemOption.js index b8aaf30..d8fa14e 100644 --- a/src/model/CatalogItemOption.js +++ b/src/model/CatalogItemOption.js @@ -74,17 +74,17 @@ exports.constructFromObject = function(data, obj) { } /** - * The item option's display name for the seller. Must be unique across all item options. Searchable. + * The item option's display name for the seller. Must be unique across all item options. This is a searchable attribute for use in applicable query filters. * @member {String} name */ exports.prototype['name'] = undefined; /** - * The item option's display name for the customer. Searchable. + * The item option's display name for the customer. This is a searchable attribute for use in applicable query filters. * @member {String} display_name */ exports.prototype['display_name'] = undefined; /** - * The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. + * The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. This is a searchable attribute for use in applicable query filters. * @member {String} description */ exports.prototype['description'] = undefined; diff --git a/src/model/CatalogItemOptionForItem.js b/src/model/CatalogItemOptionForItem.js index 951342d..5af22aa 100644 --- a/src/model/CatalogItemOptionForItem.js +++ b/src/model/CatalogItemOptionForItem.js @@ -24,7 +24,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogItemOptionForItem. - * 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. + * An option that can be assigned to an item. For example, a t-shirt item may offer a color option or a size option. * @alias module:model/CatalogItemOptionForItem * @class */ diff --git a/src/model/CatalogItemOptionValue.js b/src/model/CatalogItemOptionValue.js index e46ce85..eed88d5 100644 --- a/src/model/CatalogItemOptionValue.js +++ b/src/model/CatalogItemOptionValue.js @@ -78,12 +78,12 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['item_option_id'] = undefined; /** - * Name of this item option value. Searchable. + * Name of this item option value. This is a searchable attribute for use in applicable query filters. * @member {String} name */ exports.prototype['name'] = undefined; /** - * A human-readable description for the option value. + * A human-readable description for the option value. This is a searchable attribute for use in applicable query filters. * @member {String} description */ exports.prototype['description'] = undefined; @@ -98,7 +98,7 @@ exports.prototype['color'] = undefined; */ exports.prototype['ordinal'] = undefined; /** - * The number of `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. + * The number of `CatalogItemVariation`s that currently use this item option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent item option of this value. * @member {Number} item_variation_count */ exports.prototype['item_variation_count'] = undefined; diff --git a/src/model/CatalogItemVariation.js b/src/model/CatalogItemVariation.js index 5ae20f9..cb25a77 100644 --- a/src/model/CatalogItemVariation.js +++ b/src/model/CatalogItemVariation.js @@ -111,22 +111,22 @@ exports.constructFromObject = function(data, obj) { } /** - * The ID of the `CatalogItem` associated with this item variation. Searchable. + * The ID of the `CatalogItem` associated with this item variation. * @member {String} item_id */ exports.prototype['item_id'] = undefined; /** - * The item variation's name. Searchable. This field has max length of 255 Unicode code points. + * The item variation's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; /** - * The item variation's SKU, if any. Searchable. + * The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters. * @member {String} sku */ exports.prototype['sku'] = undefined; /** - * The item variation's UPC, if any. Searchable in the Connect API. This field is only exposed in the Connect API. It is not exposed in Square's Dashboard, Square Point of Sale app or Retail Point of Sale app. + * The item variation's UPC, if any. This is a searchable attribute for use in applicable query filters. It is only accessible through the Square API, and not exposed in the Square Seller Dashboard, Square Point of Sale or Retail Point of Sale apps. * @member {String} upc */ exports.prototype['upc'] = undefined; @@ -166,7 +166,7 @@ exports.prototype['inventory_alert_type'] = undefined; */ exports.prototype['inventory_alert_threshold'] = undefined; /** - * Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points. + * Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points. * @member {String} user_data */ exports.prototype['user_data'] = undefined; diff --git a/src/model/CatalogModifier.js b/src/model/CatalogModifier.js index 23e3245..450199e 100644 --- a/src/model/CatalogModifier.js +++ b/src/model/CatalogModifier.js @@ -24,7 +24,7 @@ var Money = require('./Money'); /** * Constructs a new CatalogModifier. - * A modifier in the Catalog object model. + * A modifier applicable to items at the time of sale. * @alias module:model/CatalogModifier * @class */ @@ -65,7 +65,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The modifier name. Searchable. This field has max length of 255 Unicode code points. + * The modifier name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; @@ -80,7 +80,7 @@ exports.prototype['price_money'] = undefined; */ exports.prototype['ordinal'] = undefined; /** - * The ID of the `CatalogModifierList` associated with this modifier. Searchable. + * The ID of the `CatalogModifierList` associated with this modifier. * @member {String} modifier_list_id */ exports.prototype['modifier_list_id'] = undefined; diff --git a/src/model/CatalogModifierList.js b/src/model/CatalogModifierList.js index 9e02856..087c5df 100644 --- a/src/model/CatalogModifierList.js +++ b/src/model/CatalogModifierList.js @@ -24,7 +24,7 @@ var CatalogObject = require('./CatalogObject'); /** * Constructs a new CatalogModifierList. - * A modifier list in the Catalog object model. A `CatalogModifierList` contains `CatalogModifier` objects that can be applied to a `CatalogItem` at the time of sale. For example, a modifier list \"Condiments\" that would apply to a \"Hot Dog\" `CatalogItem` might contain `CatalogModifier`s \"Ketchup\", \"Mustard\", and \"Relish\". The `selection_type` field specifies whether or not multiple selections from the modifier list are allowed. + * A list of modifiers applicable to items at the time of sale. For example, a \"Condiments\" modifier list applicable to a \"Hot Dog\" item may contain \"Ketchup\", \"Mustard\", and \"Relish\" modifiers. Use the `selection_type` field to specify whether or not multiple selections from the modifier list are allowed. * @alias module:model/CatalogModifierList * @class */ @@ -65,17 +65,17 @@ exports.constructFromObject = function(data, obj) { } /** - * A searchable name for the `CatalogModifierList`. This field has max length of 255 Unicode code points. + * The name for the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; /** - * Determines where this `CatalogModifierList` appears in a list of `CatalogModifierList` values. + * Determines where this modifier list appears in a list of `CatalogModifierList` values. * @member {Number} ordinal */ exports.prototype['ordinal'] = undefined; /** - * Indicates whether multiple options from the `CatalogModifierList` can be applied to a single `CatalogItem`. See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values + * Indicates whether multiple options from the modifier list can be applied to a single `CatalogItem`. See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values * @member {String} selection_type */ exports.prototype['selection_type'] = undefined; diff --git a/src/model/CatalogModifierOverride.js b/src/model/CatalogModifierOverride.js index ccf22fd..bb1fff2 100644 --- a/src/model/CatalogModifierOverride.js +++ b/src/model/CatalogModifierOverride.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogModifierOverride. - * + * Options to control how to override the default behavior of the specified modifier. * @alias module:model/CatalogModifierOverride * @class * @param modifierId {String} The ID of the `CatalogModifier` whose default behavior is being overridden. diff --git a/src/model/CatalogObject.js b/src/model/CatalogObject.js index fabd30c..af3e556 100644 --- a/src/model/CatalogObject.js +++ b/src/model/CatalogObject.js @@ -41,7 +41,7 @@ var CatalogV1Id = require('./CatalogV1Id'); /** * Constructs a new CatalogObject. - * The wrapper object for the Catalog entries of a given object type. The type of a particular `CatalogObject` is determined by the value of the `type` attribute and only the corresponding data attribute can be set on the `CatalogObject` instance. For example, the following list shows some instances of `CatalogObject` of a given `type` and their corresponding data atrribute that can be set: - For a `CatalogObject` of the `ITEM` type, set the `item_data` attribute to yield the `CatalogItem` object. - For a `CatalogObject` of the `ITEM_VARIATION` type, set the `item_variation_data` attribute to yield the `CatalogItemVariation` object. - For a 'CatalogObject' of the `MODIFIER` type, set the `modifier_data` attribute to yield the `CatalogModifier` object. - For a 'CatalogObject' of the `MODIFIER_LIST` type, set the `modifier_list_data` attribute to yield the `CatalogModifierList` object. - For a 'CatalogObject' of the `CATEGORY` type, set the `category_data` attribute to yield the `CatalogCategory` object. - For a 'CatalogObject' of the `DISCOUNT` type, set the `discount_data` attribute to yield the `CatalogDiscount` object. - For a 'CatalogObject' of the `TAX` type, set the `tax_data` attribute to yield the `CatalogTax` object. - For a 'CatalogObject' of the `IMAGE` type, set the `image_data` attribute to yield the `CatalogImageData` object. - For a 'CatalogObject' of the `QUICK_AMOUNTS_SETTINGS` type, set the `quick_amounts_settings_data` attribute to yield the `CatalogQuickAmountsSettings` object. - For a 'CatalogObject' of the `PRICING_RULE` type, set the `pricing_rule_data` attribute to yield the `CatalogPricingRule` object. - For a 'CatalogObject' of the `TIME_PERIOD` type, set the `time_period_data` attribute to yield the `CatalogTimePeriod` object. - For a 'CatalogObject' of the `PRODUCT_SET` type, set the `product_set_data` attribute to yield the `CatalogProductSet` object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. + * The wrapper object for the Catalog entries of a given object type. The type of a particular `CatalogObject` is determined by the value of the `type` attribute and only the corresponding data attribute can be set on the `CatalogObject` instance. For example, the following list shows some instances of `CatalogObject` of a given `type` and their corresponding data atrribute that can be set: - For a `CatalogObject` of the `ITEM` type, set the `item_data` attribute to yield the `CatalogItem` object. - For a `CatalogObject` of the `ITEM_VARIATION` type, set the `item_variation_data` attribute to yield the `CatalogItemVariation` object. - For a `CatalogObject` of the `MODIFIER` type, set the `modifier_data` attribute to yield the `CatalogModifier` object. - For a `CatalogObject` of the `MODIFIER_LIST` type, set the `modifier_list_data` attribute to yield the `CatalogModifierList` object. - For a `CatalogObject` of the `CATEGORY` type, set the `category_data` attribute to yield the `CatalogCategory` object. - For a `CatalogObject` of the `DISCOUNT` type, set the `discount_data` attribute to yield the `CatalogDiscount` object. - For a `CatalogObject` of the `TAX` type, set the `tax_data` attribute to yield the `CatalogTax` object. - For a `CatalogObject` of the `IMAGE` type, set the `image_data` attribute to yield the `CatalogImageData` object. - For a `CatalogObject` of the `QUICK_AMOUNTS_SETTINGS` type, set the `quick_amounts_settings_data` attribute to yield the `CatalogQuickAmountsSettings` object. - For a `CatalogObject` of the `PRICING_RULE` type, set the `pricing_rule_data` attribute to yield the `CatalogPricingRule` object. - For a `CatalogObject` of the `TIME_PERIOD` type, set the `time_period_data` attribute to yield the `CatalogTimePeriod` object. - For a `CatalogObject` of the `PRODUCT_SET` type, set the `product_set_data` attribute to yield the `CatalogProductSet` object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. * @alias module:model/CatalogObject * @class * @param type {String} The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values diff --git a/src/model/CatalogQuery.js b/src/model/CatalogQuery.js index a2b29c0..411d0a2 100644 --- a/src/model/CatalogQuery.js +++ b/src/model/CatalogQuery.js @@ -32,7 +32,7 @@ var CatalogQueryText = require('./CatalogQueryText'); /** * Constructs a new CatalogQuery. - * A query to be applied to a `SearchCatalogObjectsRequest`. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) (`CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`, `CatalogModifierList`, `CatalogModifier`). For example, a query that should return Items may specify attribute names from any of the searchable fields of the `CatalogItem` data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`. + * A query composed of one or more different types of filters to narrow the scope of targeted objects when calling the `SearchCatalogObjects` endpoint. Although a query can have multiple filters, only one query is allowed per call to [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects). When a query filter is based on an attribute, the attribute must be searchable. Searchable attributes are listed as follows, along their parent types that can be searched for with applicable query filters. Searchable attribute and objects queryable by searchable attributes ** - `name`: `CatalogItem`, `CatalogItemVariation`, `CatelogCatogry`, `CatalogTax`, `CatalogDiscount`, `CatalogModifier`, 'CatalogModifierList`, `CatalogItemOption`, `CatalogItemOptionValue` - `description`: `CatalogItem`, `CatalogItemOptionValue` - `abbreviation`: `CatalogItem` - `upc`: `CatalogItemVariation` - `sku`: `CatalogItemVariation` - `caption`: `CatalogImage` - `display_name`: `CatalogItemOption` For example, to search for [CatalogItem](#type-CatalogItem) objects by searchable attributes, you can use the `\"name\"`, `\"description\"`, or `\"abbreviation\"` attribute in an applicable query filter. * @alias module:model/CatalogQuery * @class */ @@ -93,47 +93,47 @@ exports.constructFromObject = function(data, obj) { } /** - * A query that returns all objects, sorted by the given attribute. + * A query expression to sort returned query result by the given attribute. * @member {module:model/CatalogQuerySortedAttribute} sorted_attribute_query */ exports.prototype['sorted_attribute_query'] = undefined; /** - * A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value. + * An exact query expression to return objects with attribute name and value matching the specified attribute name and value exactly. Value matching is case insensitive. * @member {module:model/CatalogQueryExact} exact_query */ exports.prototype['exact_query'] = undefined; /** - * A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix. + * A prefix query expression to return objects with attribute values that have a prefix matching the specified string value. Value maching is case insensitive. * @member {module:model/CatalogQueryPrefix} prefix_query */ exports.prototype['prefix_query'] = undefined; /** - * A query that returns only objects for which the given (integer-valued) attribute lies in the given range. + * A range query expression to return objects with numberic values that lie in the specified range. * @member {module:model/CatalogQueryRange} range_query */ exports.prototype['range_query'] = undefined; /** - * A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a `CatalogItem` contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`. + * A text query expression to return objectd whose searchable attributes contain all of the given keywords, irrespective of their order. For example, if a `CatalogItem` contains custom attribute values of `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, the query filter of `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}` returns this item. * @member {module:model/CatalogQueryText} text_query */ exports.prototype['text_query'] = undefined; /** - * A query that returns all `CatalogItem`s that have any of the given `CatalogTax`es enabled. + * A query expression to return items that have any of the specified taxes (as identified by the corresponding `CatalogTax` object IDs) enabled. * @member {module:model/CatalogQueryItemsForTax} items_for_tax_query */ exports.prototype['items_for_tax_query'] = undefined; /** - * A query that returns all `CatalogItem`s that have any of the given `CatalogModifierList`s enabled. + * A query expression to return items that have any of the given modifier list (as identifieid by the coresponding `CatalogModifierList`s IDs) enabled. * @member {module:model/CatalogQueryItemsForModifierList} items_for_modifier_list_query */ exports.prototype['items_for_modifier_list_query'] = undefined; /** - * A query that returns all `CatalogItem`s that have all of the given `CatalogItemOption`s. + * A query expression to return items that contains the specified item options (as identified the corresponding `CatalogItemOption` IDs). * @member {module:model/CatalogQueryItemsForItemOptions} items_for_item_options_query */ exports.prototype['items_for_item_options_query'] = undefined; /** - * A query that returns all `CatalogItemVariation`s that have all of the given `CatalogItemOption` values. + * A query expression to return item variations (of the `CatalogItemVariation` that contain all of the specified `CatalogItemOption` IDs. * @member {module:model/CatalogQueryItemVariationsForItemOptionValues} item_variations_for_item_option_values_query */ exports.prototype['item_variations_for_item_option_values_query'] = undefined; diff --git a/src/model/CatalogQueryExact.js b/src/model/CatalogQueryExact.js index d667481..9426025 100644 --- a/src/model/CatalogQueryExact.js +++ b/src/model/CatalogQueryExact.js @@ -23,11 +23,11 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryExact. - * + * The query filter to return the serch result by exact match of the specified attribute name and value. * @alias module:model/CatalogQueryExact * @class - * @param attributeName {String} The name of the attribute to be searched. - * @param attributeValue {String} The desired value of the search attribute. + * @param attributeName {String} The name of the attribute to be searched. Matching of the attribute name is exact. + * @param attributeValue {String} The desired value of the search attribute. Matching of the attribute value is case insensitive and can be partial. For example, if a specified value of \"sma\", objects with the named attribute value of \"Small\", \"small\" are both matched. */ var exports = function(attributeName, attributeValue) { var _this = this; @@ -58,12 +58,12 @@ exports.constructFromObject = function(data, obj) { } /** - * The name of the attribute to be searched. + * The name of the attribute to be searched. Matching of the attribute name is exact. * @member {String} attribute_name */ exports.prototype['attribute_name'] = undefined; /** - * The desired value of the search attribute. + * The desired value of the search attribute. Matching of the attribute value is case insensitive and can be partial. For example, if a specified value of \"sma\", objects with the named attribute value of \"Small\", \"small\" are both matched. * @member {String} attribute_value */ exports.prototype['attribute_value'] = undefined; diff --git a/src/model/CatalogQueryItemVariationsForItemOptionValues.js b/src/model/CatalogQueryItemVariationsForItemOptionValues.js index dbe5c77..7648170 100644 --- a/src/model/CatalogQueryItemVariationsForItemOptionValues.js +++ b/src/model/CatalogQueryItemVariationsForItemOptionValues.js @@ -24,7 +24,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryItemVariationsForItemOptionValues. - * + * The query filter to return the item variations containing the specified item option value IDs. * @alias module:model/CatalogQueryItemVariationsForItemOptionValues * @class */ diff --git a/src/model/CatalogQueryItemsForItemOptions.js b/src/model/CatalogQueryItemsForItemOptions.js index 93af267..8846243 100644 --- a/src/model/CatalogQueryItemsForItemOptions.js +++ b/src/model/CatalogQueryItemsForItemOptions.js @@ -24,7 +24,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryItemsForItemOptions. - * + * The query filter to return the items containing the specified item option IDs. * @alias module:model/CatalogQueryItemsForItemOptions * @class */ diff --git a/src/model/CatalogQueryItemsForModifierList.js b/src/model/CatalogQueryItemsForModifierList.js index e180a9e..57555d4 100644 --- a/src/model/CatalogQueryItemsForModifierList.js +++ b/src/model/CatalogQueryItemsForModifierList.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryItemsForModifierList. - * + * The query filter to return the items containing the specified modifier list IDs. * @alias module:model/CatalogQueryItemsForModifierList * @class * @param modifierListIds {Array.} A set of `CatalogModifierList` IDs to be used to find associated `CatalogItem`s. diff --git a/src/model/CatalogQueryItemsForTax.js b/src/model/CatalogQueryItemsForTax.js index 0d02c7c..c51aeef 100644 --- a/src/model/CatalogQueryItemsForTax.js +++ b/src/model/CatalogQueryItemsForTax.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryItemsForTax. - * + * The query filter to return the items containing the specified tax IDs. * @alias module:model/CatalogQueryItemsForTax * @class * @param taxIds {Array.} A set of `CatalogTax` IDs to be used to find associated `CatalogItem`s. diff --git a/src/model/CatalogQueryPrefix.js b/src/model/CatalogQueryPrefix.js index e8f77d2..c4d05b9 100644 --- a/src/model/CatalogQueryPrefix.js +++ b/src/model/CatalogQueryPrefix.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryPrefix. - * + * The query filter to return the search result whose named attribute values are prefixed by the specified attribute value. * @alias module:model/CatalogQueryPrefix * @class * @param attributeName {String} The name of the attribute to be searched. diff --git a/src/model/CatalogQueryRange.js b/src/model/CatalogQueryRange.js index fcefbdf..0837877 100644 --- a/src/model/CatalogQueryRange.js +++ b/src/model/CatalogQueryRange.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryRange. - * + * The query filter to return the search result whose named attribute values fall between the specified range. * @alias module:model/CatalogQueryRange * @class * @param attributeName {String} The name of the attribute to be searched. diff --git a/src/model/CatalogQuerySortedAttribute.js b/src/model/CatalogQuerySortedAttribute.js index 9a33b14..f93a2b9 100644 --- a/src/model/CatalogQuerySortedAttribute.js +++ b/src/model/CatalogQuerySortedAttribute.js @@ -23,10 +23,10 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQuerySortedAttribute. - * + * The query expression to specify the key to sort search results. * @alias module:model/CatalogQuerySortedAttribute * @class - * @param attributeName {String} The attribute whose value should be used as the sort key. + * @param attributeName {String} The attribute whose value is used as the sort key. */ var exports = function(attributeName) { var _this = this; @@ -61,7 +61,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The attribute whose value should be used as the sort key. + * The attribute whose value is used as the sort key. * @member {String} attribute_name */ exports.prototype['attribute_name'] = undefined; diff --git a/src/model/CatalogQueryText.js b/src/model/CatalogQueryText.js index d60378d..a1e410d 100644 --- a/src/model/CatalogQueryText.js +++ b/src/model/CatalogQueryText.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogQueryText. - * + * The query filter to return the search result whose searchable attribute values contain all of the specified keywords or tokens, independent of the token order or case. * @alias module:model/CatalogQueryText * @class * @param keywords {Array.} A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 characters are ignored. diff --git a/src/model/CatalogTax.js b/src/model/CatalogTax.js index 6ddadae..7316a43 100644 --- a/src/model/CatalogTax.js +++ b/src/model/CatalogTax.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogTax. - * A tax in the Catalog object model. + * A tax applicable to an item. * @alias module:model/CatalogTax * @class */ @@ -72,7 +72,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The tax's name. Searchable. This field has max length of 255 Unicode code points. + * The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points. * @member {String} name */ exports.prototype['name'] = undefined; diff --git a/src/model/CatalogV1Id.js b/src/model/CatalogV1Id.js index d9ec5b9..658cfa4 100644 --- a/src/model/CatalogV1Id.js +++ b/src/model/CatalogV1Id.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogV1Id. - * An Items Connect V1 object ID along with its associated location ID. + * A Square API V1 identifier of an item, including the object ID and its associated location ID. * @alias module:model/CatalogV1Id * @class */ @@ -56,7 +56,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The ID for an object in Connect V1, if different from its Connect V2 ID. + * The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID. * @member {String} catalog_v1_id */ exports.prototype['catalog_v1_id'] = undefined; diff --git a/src/model/CreateInvoiceRequest.js b/src/model/CreateInvoiceRequest.js new file mode 100644 index 0000000..c09d6f1 --- /dev/null +++ b/src/model/CreateInvoiceRequest.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The CreateInvoiceRequest model module. + * Note: This model is in beta. + * @module model/CreateInvoiceRequest + */ + +/** + * Constructs a new CreateInvoiceRequest. + * Describes a `CreateInvoice` request. + * @alias module:model/CreateInvoiceRequest + * @class + * @param invoice {module:model/Invoice} The invoice to create. + */ +var exports = function(invoice) { + var _this = this; + + _this['invoice'] = invoice; + +}; + +/** + * Constructs a CreateInvoiceRequest 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/CreateInvoiceRequest} obj Optional instance to populate. + * @return {module:model/CreateInvoiceRequest} The populated CreateInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('idempotency_key')) { + obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String'); + } + } + return obj; +} + +/** + * The invoice to create. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * A unique string that identifies the `CreateInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateInvoiceResponse.js b/src/model/CreateInvoiceResponse.js new file mode 100644 index 0000000..853be66 --- /dev/null +++ b/src/model/CreateInvoiceResponse.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The CreateInvoiceResponse model module. + * Note: This model is in beta. + * @module model/CreateInvoiceResponse + */ + +/** + * Constructs a new CreateInvoiceResponse. + * The response returned by the `CreateInvoice` request. + * @alias module:model/CreateInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CreateInvoiceResponse 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/CreateInvoiceResponse} obj Optional instance to populate. + * @return {module:model/CreateInvoiceResponse} The populated CreateInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The newly created invoice. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CustomAttributeFilter.js b/src/model/CustomAttributeFilter.js new file mode 100644 index 0000000..7b4732d --- /dev/null +++ b/src/model/CustomAttributeFilter.js @@ -0,0 +1,112 @@ +/** + * 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 Range = require('./Range'); + + + + +/** + * The CustomAttributeFilter model module. + * Note: This model is in beta. + * @module model/CustomAttributeFilter + */ + +/** + * Constructs a new CustomAttributeFilter. + * Supported custom attribute query expressions for calling the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint to search for items or item variations. + * @alias module:model/CustomAttributeFilter + * @class + */ +var exports = function() { + var _this = this; + + + + + + + +}; + +/** + * Constructs a CustomAttributeFilter 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/CustomAttributeFilter} obj Optional instance to populate. + * @return {module:model/CustomAttributeFilter} The populated CustomAttributeFilter instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('custom_attribute_definition_id')) { + obj['custom_attribute_definition_id'] = ApiClient.convertToType(data['custom_attribute_definition_id'], 'String'); + } + if (data.hasOwnProperty('key')) { + obj['key'] = ApiClient.convertToType(data['key'], 'String'); + } + if (data.hasOwnProperty('string_filter')) { + obj['string_filter'] = ApiClient.convertToType(data['string_filter'], 'String'); + } + if (data.hasOwnProperty('number_filter')) { + obj['number_filter'] = Range.constructFromObject(data['number_filter']); + } + if (data.hasOwnProperty('selection_uids_filter')) { + obj['selection_uids_filter'] = ApiClient.convertToType(data['selection_uids_filter'], ['String']); + } + if (data.hasOwnProperty('bool_filter')) { + obj['bool_filter'] = ApiClient.convertToType(data['bool_filter'], 'Boolean'); + } + } + return obj; +} + +/** + * A query expression to filter items or item variations by matching their custom attributes' `custom_attribute_definition_id` property value against the the specified id. + * @member {String} custom_attribute_definition_id + */ +exports.prototype['custom_attribute_definition_id'] = undefined; +/** + * A query expression to filter items or item variations by matching their custom attributes' `key` property value against the specified key. + * @member {String} key + */ +exports.prototype['key'] = undefined; +/** + * A query expression to filter items or item variations by matching their custom attributes' `string_value` property value against the specified text. + * @member {String} string_filter + */ +exports.prototype['string_filter'] = undefined; +/** + * A query expression to filter items or item variations with their custom attributes containing a number value within the specified range. + * @member {module:model/Range} number_filter + */ +exports.prototype['number_filter'] = undefined; +/** + * A query expression to filter items or item variations by matching their custom attributes' `selection_uid_values` values against the specified selection uids. + * @member {Array.} selection_uids_filter + */ +exports.prototype['selection_uids_filter'] = undefined; +/** + * A query expression to filter items or item variations by matching their custom attributes' `boolean_value` property values against the specified Boolean expression. + * @member {Boolean} bool_filter + */ +exports.prototype['bool_filter'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeleteInvoiceRequest.js b/src/model/DeleteInvoiceRequest.js new file mode 100644 index 0000000..2b32a7c --- /dev/null +++ b/src/model/DeleteInvoiceRequest.js @@ -0,0 +1,66 @@ +/** + * 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 DeleteInvoiceRequest model module. + * Note: This model is in beta. + * @module model/DeleteInvoiceRequest + */ + +/** + * Constructs a new DeleteInvoiceRequest. + * Describes a `DeleteInvoice` request. + * @alias module:model/DeleteInvoiceRequest + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a DeleteInvoiceRequest 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/DeleteInvoiceRequest} obj Optional instance to populate. + * @return {module:model/DeleteInvoiceRequest} The populated DeleteInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + } + return obj; +} + +/** + * The version of the `invoice` to delete. If you do not know the version, you can call `GetInvoice` or `ListInvoices`. + * @member {Number} version + */ +exports.prototype['version'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeleteInvoiceResponse.js b/src/model/DeleteInvoiceResponse.js new file mode 100644 index 0000000..1f69ce6 --- /dev/null +++ b/src/model/DeleteInvoiceResponse.js @@ -0,0 +1,67 @@ +/** + * 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'); + + + + +/** + * The DeleteInvoiceResponse model module. + * Note: This model is in beta. + * @module model/DeleteInvoiceResponse + */ + +/** + * Constructs a new DeleteInvoiceResponse. + * Describes a `DeleteInvoice` response. + * @alias module:model/DeleteInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a DeleteInvoiceResponse 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/DeleteInvoiceResponse} obj Optional instance to populate. + * @return {module:model/DeleteInvoiceResponse} The populated DeleteInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ErrorCode.js b/src/model/ErrorCode.js index 3071781..61236da 100644 --- a/src/model/ErrorCode.js +++ b/src/model/ErrorCode.js @@ -250,6 +250,21 @@ var exports = { * @const */ "NO_FIELDS_SET": "NO_FIELDS_SET", + /** + * value: "TOO_MANY_MAP_ENTRIES" + * @const + */ + "TOO_MANY_MAP_ENTRIES": "TOO_MANY_MAP_ENTRIES", + /** + * value: "MAP_KEY_LENGTH_TOO_SHORT" + * @const + */ + "MAP_KEY_LENGTH_TOO_SHORT": "MAP_KEY_LENGTH_TOO_SHORT", + /** + * value: "MAP_KEY_LENGTH_TOO_LONG" + * @const + */ + "MAP_KEY_LENGTH_TOO_LONG": "MAP_KEY_LENGTH_TOO_LONG", /** * value: "CARD_EXPIRED" * @const diff --git a/src/model/GetInvoiceRequest.js b/src/model/GetInvoiceRequest.js new file mode 100644 index 0000000..0867a29 --- /dev/null +++ b/src/model/GetInvoiceRequest.js @@ -0,0 +1,57 @@ +/** + * 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 GetInvoiceRequest model module. + * Note: This model is in beta. + * @module model/GetInvoiceRequest + */ + +/** + * Constructs a new GetInvoiceRequest. + * Describes a `GetInvoice` request. + * @alias module:model/GetInvoiceRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a GetInvoiceRequest 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/GetInvoiceRequest} obj Optional instance to populate. + * @return {module:model/GetInvoiceRequest} The populated GetInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/GetInvoiceResponse.js b/src/model/GetInvoiceResponse.js new file mode 100644 index 0000000..4b8edef --- /dev/null +++ b/src/model/GetInvoiceResponse.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The GetInvoiceResponse model module. + * Note: This model is in beta. + * @module model/GetInvoiceResponse + */ + +/** + * Constructs a new GetInvoiceResponse. + * Describes a `GetInvoice` response. + * @alias module:model/GetInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a GetInvoiceResponse 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/GetInvoiceResponse} obj Optional instance to populate. + * @return {module:model/GetInvoiceResponse} The populated GetInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The invoice requested. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InventoryAdjustment.js b/src/model/InventoryAdjustment.js index a418e07..2aa2a90 100644 --- a/src/model/InventoryAdjustment.js +++ b/src/model/InventoryAdjustment.js @@ -153,7 +153,7 @@ exports.prototype['catalog_object_id'] = undefined; */ exports.prototype['catalog_object_type'] = undefined; /** - * 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/inventory-api/what-it-does#decimal-quantities-beta) for more information. + * The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. * @member {String} quantity */ exports.prototype['quantity'] = undefined; diff --git a/src/model/InventoryChange.js b/src/model/InventoryChange.js index 772e8f3..fcd1b97 100644 --- a/src/model/InventoryChange.js +++ b/src/model/InventoryChange.js @@ -82,7 +82,7 @@ exports.prototype['physical_count'] = undefined; */ exports.prototype['adjustment'] = undefined; /** - * Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types. + * Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types. _Note:_ An `InventoryTransfer` object is read-only and can only be present in a `RetrieveInventoryChangesResponse` and `BatchRetrieveInventoryChangesResponse` object. * @member {module:model/InventoryTransfer} transfer */ exports.prototype['transfer'] = undefined; diff --git a/src/model/InventoryCount.js b/src/model/InventoryCount.js index f72a0d4..08af92a 100644 --- a/src/model/InventoryCount.js +++ b/src/model/InventoryCount.js @@ -92,7 +92,7 @@ exports.prototype['state'] = undefined; */ exports.prototype['location_id'] = undefined; /** - * The number of items affected by the estimated 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/docs/inventory-api/what-it-does#decimal-quantities-beta) for more information. + * The number of items affected by the estimated count as a decimal string. Can support up to 5 digits after the decimal point. * @member {String} quantity */ exports.prototype['quantity'] = undefined; diff --git a/src/model/InventoryPhysicalCount.js b/src/model/InventoryPhysicalCount.js index 203f8ec..5e51570 100644 --- a/src/model/InventoryPhysicalCount.js +++ b/src/model/InventoryPhysicalCount.js @@ -123,7 +123,7 @@ exports.prototype['state'] = undefined; */ exports.prototype['location_id'] = undefined; /** - * 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/inventory-api/what-it-does#decimal-quantities-beta) for more information. + * The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. * @member {String} quantity */ exports.prototype['quantity'] = undefined; diff --git a/src/model/InventoryTransfer.js b/src/model/InventoryTransfer.js index fb22769..9182fc9 100644 --- a/src/model/InventoryTransfer.js +++ b/src/model/InventoryTransfer.js @@ -107,7 +107,7 @@ exports.prototype['id'] = undefined; */ exports.prototype['reference_id'] = undefined; /** - * The `InventoryState` for the quantity of items being transfered. See [InventoryState](#type-inventorystate) for possible values + * The `InventoryState` for the quantity of items being transferred. See [InventoryState](#type-inventorystate) for possible values * @member {String} state */ exports.prototype['state'] = undefined; @@ -132,7 +132,7 @@ exports.prototype['catalog_object_id'] = undefined; */ exports.prototype['catalog_object_type'] = undefined; /** - * 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/docs/inventory-api/what-it-does#decimal-quantities-beta) for more information. + * The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. * @member {String} quantity */ exports.prototype['quantity'] = undefined; diff --git a/src/model/Invoice.js b/src/model/Invoice.js new file mode 100644 index 0000000..1074775 --- /dev/null +++ b/src/model/Invoice.js @@ -0,0 +1,204 @@ +/** + * 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 InvoicePaymentRequest = require('./InvoicePaymentRequest'); +var InvoiceRecipient = require('./InvoiceRecipient'); +var Money = require('./Money'); + + + + +/** + * The Invoice model module. + * Note: This model is in beta. + * @module model/Invoice + */ + +/** + * Constructs a new Invoice. + * Stores information about an invoice. You use the Invoices API to create and process invoices. For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview). + * @alias module:model/Invoice + * @class + */ +var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + +}; + +/** + * Constructs a Invoice 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/Invoice} obj Optional instance to populate. + * @return {module:model/Invoice} The populated Invoice instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('order_id')) { + obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String'); + } + if (data.hasOwnProperty('primary_recipient')) { + obj['primary_recipient'] = InvoiceRecipient.constructFromObject(data['primary_recipient']); + } + if (data.hasOwnProperty('payment_requests')) { + obj['payment_requests'] = ApiClient.convertToType(data['payment_requests'], [InvoicePaymentRequest]); + } + if (data.hasOwnProperty('invoice_number')) { + obj['invoice_number'] = ApiClient.convertToType(data['invoice_number'], 'String'); + } + if (data.hasOwnProperty('title')) { + obj['title'] = ApiClient.convertToType(data['title'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('scheduled_at')) { + obj['scheduled_at'] = ApiClient.convertToType(data['scheduled_at'], 'String'); + } + if (data.hasOwnProperty('public_url')) { + obj['public_url'] = ApiClient.convertToType(data['public_url'], 'String'); + } + if (data.hasOwnProperty('next_payment_amount_money')) { + obj['next_payment_amount_money'] = Money.constructFromObject(data['next_payment_amount_money']); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('timezone')) { + obj['timezone'] = ApiClient.convertToType(data['timezone'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String'); + } + if (data.hasOwnProperty('updated_at')) { + obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String'); + } + } + return obj; +} + +/** + * The Square-assigned ID of the invoice. + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * The version number, which is incremented each time an update is committed to the invoice. + * @member {Number} version + */ +exports.prototype['version'] = undefined; +/** + * The ID of the location that this invoice is associated with. This field is required when creating an invoice. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * The ID of the `order` for which the invoice is created. This order must be in the `OPEN` state and must belong to the `location_id` specified for this invoice. This field is required when creating an invoice. + * @member {String} order_id + */ +exports.prototype['order_id'] = undefined; +/** + * The customer who gets the invoice. Square uses the contact information to deliver the invoice. This field is required when creating an invoice. + * @member {module:model/InvoiceRecipient} primary_recipient + */ +exports.prototype['primary_recipient'] = undefined; +/** + * An array of `InvoicePaymentRequest` objects. Each object defines a payment request in an invoice payment schedule. It provides information such as when and how Square processes payments. You can specify maximum of nine payment requests. All all the payment requests must specify the same `request_method`. This field is required when creating an invoice. + * @member {Array.} payment_requests + */ +exports.prototype['payment_requests'] = undefined; +/** + * A user-friendly invoice number. The value is unique within a location. If not provided when creating an invoice, Square assigns a value. It increments from 1 and padded with zeros making it 7 characters long for example, 0000001, 0000002. + * @member {String} invoice_number + */ +exports.prototype['invoice_number'] = undefined; +/** + * The title of the invoice. + * @member {String} title + */ +exports.prototype['title'] = undefined; +/** + * The description of the invoice. This is visible the customer receiving the invoice. + * @member {String} description + */ +exports.prototype['description'] = undefined; +/** + * The timestamp when the invoice is scheduled for processing, in RFC 3339 format. At the specified time, depending on the `request_method`, Square sends the invoice to the customer's email address or charge the customer's card on file. If the field is not set, Square processes the invoice immediately after publication. + * @member {String} scheduled_at + */ +exports.prototype['scheduled_at'] = undefined; +/** + * The URL of the Square-hosted invoice page. After you publish the invoice using the `PublishInvoice` endpoint, Square hosts the invoice page and returns the page URL in the response. + * @member {String} public_url + */ +exports.prototype['public_url'] = undefined; +/** + * The current amount due for the invoice. In addition to the amount due on the next payment request, this also includes any overdue payment amounts. + * @member {module:model/Money} next_payment_amount_money + */ +exports.prototype['next_payment_amount_money'] = undefined; +/** + * The status of the invoice. See [InvoiceStatus](#type-invoicestatus) for possible values + * @member {String} status + */ +exports.prototype['status'] = undefined; +/** + * The time zone of the date values (for example, `due_date`) specified in the invoice. + * @member {String} timezone + */ +exports.prototype['timezone'] = undefined; +/** + * The timestamp when the invoice was created, in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * The timestamp when the invoice was last updated, in RFC 3339 format. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoiceFilter.js b/src/model/InvoiceFilter.js new file mode 100644 index 0000000..e9021aa --- /dev/null +++ b/src/model/InvoiceFilter.js @@ -0,0 +1,76 @@ +/** + * 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 InvoiceFilter model module. + * Note: This model is in beta. + * @module model/InvoiceFilter + */ + +/** + * Constructs a new InvoiceFilter. + * Describes query filters to apply. + * @alias module:model/InvoiceFilter + * @class + * @param locationIds {Array.} Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. + */ +var exports = function(locationIds) { + var _this = this; + + _this['location_ids'] = locationIds; + +}; + +/** + * Constructs a InvoiceFilter 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/InvoiceFilter} obj Optional instance to populate. + * @return {module:model/InvoiceFilter} The populated InvoiceFilter instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('location_ids')) { + obj['location_ids'] = ApiClient.convertToType(data['location_ids'], ['String']); + } + if (data.hasOwnProperty('customer_ids')) { + obj['customer_ids'] = ApiClient.convertToType(data['customer_ids'], ['String']); + } + } + return obj; +} + +/** + * Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. + * @member {Array.} location_ids + */ +exports.prototype['location_ids'] = undefined; +/** + * Limits the search to the specified customers, within the specified locations. Specifying a customer is optional. In the current implementation, a maximum of one customer can be specified. + * @member {Array.} customer_ids + */ +exports.prototype['customer_ids'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoicePaymentReminder.js b/src/model/InvoicePaymentReminder.js new file mode 100644 index 0000000..d0be033 --- /dev/null +++ b/src/model/InvoicePaymentReminder.js @@ -0,0 +1,102 @@ +/** + * 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 InvoicePaymentReminder model module. + * Note: This model is in beta. + * @module model/InvoicePaymentReminder + */ + +/** + * Constructs a new InvoicePaymentReminder. + * Describes a payment request reminder (automatic notification) that Square sends to the customer. You configure a reminder relative to the payment request `due_date`. + * @alias module:model/InvoicePaymentReminder + * @class + */ +var exports = function() { + var _this = this; + + + + + + +}; + +/** + * Constructs a InvoicePaymentReminder 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/InvoicePaymentReminder} obj Optional instance to populate. + * @return {module:model/InvoicePaymentReminder} The populated InvoicePaymentReminder instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('uid')) { + obj['uid'] = ApiClient.convertToType(data['uid'], 'String'); + } + if (data.hasOwnProperty('relative_scheduled_days')) { + obj['relative_scheduled_days'] = ApiClient.convertToType(data['relative_scheduled_days'], 'Number'); + } + if (data.hasOwnProperty('message')) { + obj['message'] = ApiClient.convertToType(data['message'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('sent_at')) { + obj['sent_at'] = ApiClient.convertToType(data['sent_at'], 'String'); + } + } + return obj; +} + +/** + * A Square-assigned ID that uniquely identifies the reminder within the `InvoicePaymentRequest`. + * @member {String} uid + */ +exports.prototype['uid'] = undefined; +/** + * The number of days before (a negative number) or after (a positive number) the payment request `due_date` when the reminder is sent. For example, -3 indicates that the reminder should be sent 3 days before the payment request `due_date`. + * @member {Number} relative_scheduled_days + */ +exports.prototype['relative_scheduled_days'] = undefined; +/** + * The reminder message. + * @member {String} message + */ +exports.prototype['message'] = undefined; +/** + * The status of the reminder. See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values + * @member {String} status + */ +exports.prototype['status'] = undefined; +/** + * If sent, the timestamp when the reminder was sent, in RFC 3339 format. + * @member {String} sent_at + */ +exports.prototype['sent_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoicePaymentReminderStatus.js b/src/model/InvoicePaymentReminderStatus.js new file mode 100644 index 0000000..00b7b03 --- /dev/null +++ b/src/model/InvoicePaymentReminderStatus.js @@ -0,0 +1,50 @@ +/** + * 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 InvoicePaymentReminderStatus. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "PENDING" + * @const + */ + "PENDING": "PENDING", + /** + * value: "NOT_APPLICABLE" + * @const + */ + "NOT_APPLICABLE": "NOT_APPLICABLE", + /** + * value: "SENT" + * @const + */ + "SENT": "SENT"}; + +/** + * Returns a InvoicePaymentReminderStatus enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InvoicePaymentReminderStatus} The enum InvoicePaymentReminderStatus value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/InvoicePaymentRequest.js b/src/model/InvoicePaymentRequest.js new file mode 100644 index 0000000..b3e66e3 --- /dev/null +++ b/src/model/InvoicePaymentRequest.js @@ -0,0 +1,167 @@ +/** + * 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 InvoicePaymentReminder = require('./InvoicePaymentReminder'); +var Money = require('./Money'); + + + + +/** + * The InvoicePaymentRequest model module. + * Note: This model is in beta. + * @module model/InvoicePaymentRequest + */ + +/** + * Constructs a new InvoicePaymentRequest. + * Describes a specific payment request in an invoice. You can have up to nine payment requests for an invoice. + * @alias module:model/InvoicePaymentRequest + * @class + */ +var exports = function() { + var _this = this; + + + + + + + + + + + + + +}; + +/** + * Constructs a InvoicePaymentRequest 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/InvoicePaymentRequest} obj Optional instance to populate. + * @return {module:model/InvoicePaymentRequest} The populated InvoicePaymentRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('uid')) { + obj['uid'] = ApiClient.convertToType(data['uid'], 'String'); + } + if (data.hasOwnProperty('request_method')) { + obj['request_method'] = ApiClient.convertToType(data['request_method'], 'String'); + } + if (data.hasOwnProperty('request_type')) { + obj['request_type'] = ApiClient.convertToType(data['request_type'], 'String'); + } + if (data.hasOwnProperty('due_date')) { + obj['due_date'] = ApiClient.convertToType(data['due_date'], 'String'); + } + if (data.hasOwnProperty('fixed_amount_requested_money')) { + obj['fixed_amount_requested_money'] = Money.constructFromObject(data['fixed_amount_requested_money']); + } + if (data.hasOwnProperty('percentage_requested')) { + obj['percentage_requested'] = ApiClient.convertToType(data['percentage_requested'], 'String'); + } + if (data.hasOwnProperty('tipping_enabled')) { + obj['tipping_enabled'] = ApiClient.convertToType(data['tipping_enabled'], 'Boolean'); + } + if (data.hasOwnProperty('card_id')) { + obj['card_id'] = ApiClient.convertToType(data['card_id'], 'String'); + } + if (data.hasOwnProperty('reminders')) { + obj['reminders'] = ApiClient.convertToType(data['reminders'], [InvoicePaymentReminder]); + } + if (data.hasOwnProperty('computed_amount_money')) { + obj['computed_amount_money'] = Money.constructFromObject(data['computed_amount_money']); + } + if (data.hasOwnProperty('total_completed_amount_money')) { + obj['total_completed_amount_money'] = Money.constructFromObject(data['total_completed_amount_money']); + } + if (data.hasOwnProperty('rounding_adjustment_included_money')) { + obj['rounding_adjustment_included_money'] = Money.constructFromObject(data['rounding_adjustment_included_money']); + } + } + return obj; +} + +/** + * The Square-generated ID of the payment request in an `invoice`. + * @member {String} uid + */ +exports.prototype['uid'] = undefined; +/** + * Indicates how Square processes the payment request. See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible values + * @member {String} request_method + */ +exports.prototype['request_method'] = undefined; +/** + * Identifies the payment request type. This type defines how the payment request amount is determined. See [InvoiceRequestType](#type-invoicerequesttype) for possible values + * @member {String} request_type + */ +exports.prototype['request_type'] = undefined; +/** + * The due date (in the invoice location's time zone) for the payment request. After this date, the invoice becomes overdue. + * @member {String} due_date + */ +exports.prototype['due_date'] = undefined; +/** + * If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the `request_type`, this indicates the request amount. You cannot specify this when `request_type` is `BALANCE` or when the payment request includes the `percentage_requested` field. + * @member {module:model/Money} fixed_amount_requested_money + */ +exports.prototype['fixed_amount_requested_money'] = undefined; +/** + * Specifies the amount for the payment request in percentage: - When the payment `request_type` is `DEPOSIT`, it is the percentage of the order total amount. - When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order total less the deposit, if requested. The sum of the `percentage_requested` in all installment payment requests must be equal to 100. You cannot specify this when the payment `request_type` is `BALANCE` or when the payment request specifies the `fixed_amount_requested_money` field. + * @member {String} percentage_requested + */ +exports.prototype['percentage_requested'] = undefined; +/** + * If set to true, the Square-hosted invoice page (the `public_url` field of the invoice) provides a place for the customer to pay a tip. This field is allowed only on the final payment request and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. + * @member {Boolean} tipping_enabled + */ +exports.prototype['tipping_enabled'] = undefined; +/** + * If the request method is `CHARGE_CARD_ON_FILE`, this field provides the card to charge. + * @member {String} card_id + */ +exports.prototype['card_id'] = undefined; +/** + * A list of one or more reminders to send for the payment request. + * @member {Array.} reminders + */ +exports.prototype['reminders'] = undefined; +/** + * The payment request amount, computed using the order amount and information from the various payment request fields (`invoice_request_type`, `fixed_amount_requested_money`, and `percentage_requested`). + * @member {module:model/Money} computed_amount_money + */ +exports.prototype['computed_amount_money'] = undefined; +/** + * The amount of money already paid for the specific payment request. This amount might include a rounding adjustment if the most recent invoice payment was in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`). + * @member {module:model/Money} total_completed_amount_money + */ +exports.prototype['total_completed_amount_money'] = undefined; +/** + * If the most recent payment was a cash payment in a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment is rounded from `computed_amount_money` in the payment request, then this field specifies the rounding adjustment applied. This amount might be negative. + * @member {module:model/Money} rounding_adjustment_included_money + */ +exports.prototype['rounding_adjustment_included_money'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoiceQuery.js b/src/model/InvoiceQuery.js new file mode 100644 index 0000000..2e5d923 --- /dev/null +++ b/src/model/InvoiceQuery.js @@ -0,0 +1,78 @@ +/** + * 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 InvoiceFilter = require('./InvoiceFilter'); +var InvoiceSort = require('./InvoiceSort'); + + + + +/** + * The InvoiceQuery model module. + * Note: This model is in beta. + * @module model/InvoiceQuery + */ + +/** + * Constructs a new InvoiceQuery. + * Describes query criteria for searching invoices. + * @alias module:model/InvoiceQuery + * @class + * @param filter {module:model/InvoiceFilter} Query filters to apply in searching invoices. For more information, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices). + */ +var exports = function(filter) { + var _this = this; + + _this['filter'] = filter; + +}; + +/** + * Constructs a InvoiceQuery 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/InvoiceQuery} obj Optional instance to populate. + * @return {module:model/InvoiceQuery} The populated InvoiceQuery instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('filter')) { + obj['filter'] = InvoiceFilter.constructFromObject(data['filter']); + } + if (data.hasOwnProperty('sort')) { + obj['sort'] = InvoiceSort.constructFromObject(data['sort']); + } + } + return obj; +} + +/** + * Query filters to apply in searching invoices. For more information, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices). + * @member {module:model/InvoiceFilter} filter + */ +exports.prototype['filter'] = undefined; +/** + * Describes the sort order for the search result. + * @member {module:model/InvoiceSort} sort + */ +exports.prototype['sort'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoiceRecipient.js b/src/model/InvoiceRecipient.js new file mode 100644 index 0000000..9ec8001 --- /dev/null +++ b/src/model/InvoiceRecipient.js @@ -0,0 +1,121 @@ +/** + * 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 Address = require('./Address'); + + + + +/** + * The InvoiceRecipient model module. + * Note: This model is in beta. + * @module model/InvoiceRecipient + */ + +/** + * Constructs a new InvoiceRecipient. + * Provides customer data that Square uses to deliver an invoice. + * @alias module:model/InvoiceRecipient + * @class + */ +var exports = function() { + var _this = this; + + + + + + + + +}; + +/** + * Constructs a InvoiceRecipient 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/InvoiceRecipient} obj Optional instance to populate. + * @return {module:model/InvoiceRecipient} The populated InvoiceRecipient instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('customer_id')) { + obj['customer_id'] = ApiClient.convertToType(data['customer_id'], 'String'); + } + if (data.hasOwnProperty('given_name')) { + obj['given_name'] = ApiClient.convertToType(data['given_name'], 'String'); + } + if (data.hasOwnProperty('family_name')) { + obj['family_name'] = ApiClient.convertToType(data['family_name'], 'String'); + } + if (data.hasOwnProperty('email_address')) { + obj['email_address'] = ApiClient.convertToType(data['email_address'], 'String'); + } + if (data.hasOwnProperty('address')) { + obj['address'] = Address.constructFromObject(data['address']); + } + if (data.hasOwnProperty('phone_number')) { + obj['phone_number'] = ApiClient.convertToType(data['phone_number'], 'String'); + } + if (data.hasOwnProperty('company_name')) { + obj['company_name'] = ApiClient.convertToType(data['company_name'], 'String'); + } + } + return obj; +} + +/** + * The ID of the customer. This is the customer profile ID that you provide when creating a draft invoice. + * @member {String} customer_id + */ +exports.prototype['customer_id'] = undefined; +/** + * The recipient's given (that is, first) name. + * @member {String} given_name + */ +exports.prototype['given_name'] = undefined; +/** + * The recipient's family (that is, last) name. + * @member {String} family_name + */ +exports.prototype['family_name'] = undefined; +/** + * The recipient's email address. + * @member {String} email_address + */ +exports.prototype['email_address'] = undefined; +/** + * The recipient's physical address. + * @member {module:model/Address} address + */ +exports.prototype['address'] = undefined; +/** + * The recipient's phone number. + * @member {String} phone_number + */ +exports.prototype['phone_number'] = undefined; +/** + * The name of the recipient's company. + * @member {String} company_name + */ +exports.prototype['company_name'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoiceRequestMethod.js b/src/model/InvoiceRequestMethod.js new file mode 100644 index 0000000..96af453 --- /dev/null +++ b/src/model/InvoiceRequestMethod.js @@ -0,0 +1,50 @@ +/** + * 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 InvoiceRequestMethod. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "EMAIL" + * @const + */ + "EMAIL": "EMAIL", + /** + * value: "CHARGE_CARD_ON_FILE" + * @const + */ + "CHARGE_CARD_ON_FILE": "CHARGE_CARD_ON_FILE", + /** + * value: "SHARE_MANUALLY" + * @const + */ + "SHARE_MANUALLY": "SHARE_MANUALLY"}; + +/** + * Returns a InvoiceRequestMethod enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InvoiceRequestMethod} The enum InvoiceRequestMethod value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/InvoiceRequestType.js b/src/model/InvoiceRequestType.js new file mode 100644 index 0000000..d5e2a53 --- /dev/null +++ b/src/model/InvoiceRequestType.js @@ -0,0 +1,50 @@ +/** + * 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 InvoiceRequestType. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "BALANCE" + * @const + */ + "BALANCE": "BALANCE", + /** + * value: "DEPOSIT" + * @const + */ + "DEPOSIT": "DEPOSIT", + /** + * value: "INSTALLMENT" + * @const + */ + "INSTALLMENT": "INSTALLMENT"}; + +/** + * Returns a InvoiceRequestType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InvoiceRequestType} The enum InvoiceRequestType value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/InvoiceSort.js b/src/model/InvoiceSort.js new file mode 100644 index 0000000..06646f3 --- /dev/null +++ b/src/model/InvoiceSort.js @@ -0,0 +1,76 @@ +/** + * 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 InvoiceSort model module. + * Note: This model is in beta. + * @module model/InvoiceSort + */ + +/** + * Constructs a new InvoiceSort. + * Identifies the sort field and sort order. + * @alias module:model/InvoiceSort + * @class + * @param field {String} The field to sort on. See [InvoiceSortField](#type-invoicesortfield) for possible values + */ +var exports = function(field) { + var _this = this; + + _this['field'] = field; + +}; + +/** + * Constructs a InvoiceSort 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/InvoiceSort} obj Optional instance to populate. + * @return {module:model/InvoiceSort} The populated InvoiceSort instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('field')) { + obj['field'] = ApiClient.convertToType(data['field'], 'String'); + } + if (data.hasOwnProperty('order')) { + obj['order'] = ApiClient.convertToType(data['order'], 'String'); + } + } + return obj; +} + +/** + * The field to sort on. See [InvoiceSortField](#type-invoicesortfield) for possible values + * @member {String} field + */ +exports.prototype['field'] = undefined; +/** + * The order to use for sorting the results. See [SortOrder](#type-sortorder) for possible values + * @member {String} order + */ +exports.prototype['order'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/InvoiceSortField.js b/src/model/InvoiceSortField.js new file mode 100644 index 0000000..db07255 --- /dev/null +++ b/src/model/InvoiceSortField.js @@ -0,0 +1,40 @@ +/** + * 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 InvoiceSortField. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "INVOICE_SORT_DATE" + * @const + */ + "DATE": "INVOICE_SORT_DATE"}; + +/** + * Returns a InvoiceSortField enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InvoiceSortField} The enum InvoiceSortField value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/InvoiceStatus.js b/src/model/InvoiceStatus.js new file mode 100644 index 0000000..f526533 --- /dev/null +++ b/src/model/InvoiceStatus.js @@ -0,0 +1,80 @@ +/** + * 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 InvoiceStatus. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "DRAFT" + * @const + */ + "DRAFT": "DRAFT", + /** + * value: "UNPAID" + * @const + */ + "UNPAID": "UNPAID", + /** + * value: "SCHEDULED" + * @const + */ + "SCHEDULED": "SCHEDULED", + /** + * value: "PARTIALLY_PAID" + * @const + */ + "PARTIALLY_PAID": "PARTIALLY_PAID", + /** + * value: "PAID" + * @const + */ + "PAID": "PAID", + /** + * value: "PARTIALLY_REFUNDED" + * @const + */ + "PARTIALLY_REFUNDED": "PARTIALLY_REFUNDED", + /** + * value: "REFUNDED" + * @const + */ + "REFUNDED": "REFUNDED", + /** + * value: "CANCELED" + * @const + */ + "CANCELED": "CANCELED", + /** + * value: "FAILED" + * @const + */ + "FAILED": "FAILED"}; + +/** + * Returns a InvoiceStatus enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InvoiceStatus} The enum InvoiceStatus value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/ListInvoicesRequest.js b/src/model/ListInvoicesRequest.js new file mode 100644 index 0000000..153a3f4 --- /dev/null +++ b/src/model/ListInvoicesRequest.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'); + + + + +/** + * The ListInvoicesRequest model module. + * Note: This model is in beta. + * @module model/ListInvoicesRequest + */ + +/** + * Constructs a new ListInvoicesRequest. + * Describes a `ListInvoice` request. + * @alias module:model/ListInvoicesRequest + * @class + * @param locationId {String} The ID of the location for which to list invoices. + */ +var exports = function(locationId) { + var _this = this; + + _this['location_id'] = locationId; + + +}; + +/** + * Constructs a ListInvoicesRequest 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/ListInvoicesRequest} obj Optional instance to populate. + * @return {module:model/ListInvoicesRequest} The populated ListInvoicesRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('limit')) { + obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); + } + } + return obj; +} + +/** + * The ID of the location for which to list invoices. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. + * @member {Number} limit + */ +exports.prototype['limit'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListInvoicesResponse.js b/src/model/ListInvoicesResponse.js new file mode 100644 index 0000000..ea51299 --- /dev/null +++ b/src/model/ListInvoicesResponse.js @@ -0,0 +1,86 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The ListInvoicesResponse model module. + * Note: This model is in beta. + * @module model/ListInvoicesResponse + */ + +/** + * Constructs a new ListInvoicesResponse. + * Describes a `ListInvoice` response. + * @alias module:model/ListInvoicesResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListInvoicesResponse 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/ListInvoicesResponse} obj Optional instance to populate. + * @return {module:model/ListInvoicesResponse} The populated ListInvoicesResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoices')) { + obj['invoices'] = ApiClient.convertToType(data['invoices'], [Invoice]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The invoices retrieved. + * @member {Array.} invoices + */ +exports.prototype['invoices'] = undefined; +/** + * When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of invoices. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/Merchant.js b/src/model/Merchant.js index 80c36cb..2aa5fa2 100644 --- a/src/model/Merchant.js +++ b/src/model/Merchant.js @@ -26,7 +26,7 @@ var ApiClient = require('../ApiClient'); * Represents a Square seller. * @alias module:model/Merchant * @class - * @param country {String} The country code associated with the merchant account, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values + * @param country {String} The country code associated with the merchant account, in ISO 3166 format. See [Country](#type-country) for possible values */ var exports = function(country) { var _this = this; @@ -37,6 +37,7 @@ var exports = function(country) { + }; /** @@ -67,6 +68,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('main_location_id')) { + obj['main_location_id'] = ApiClient.convertToType(data['main_location_id'], 'String'); } } return obj; @@ -83,7 +87,7 @@ exports.prototype['id'] = undefined; */ exports.prototype['business_name'] = undefined; /** - * The country code associated with the merchant account, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values + * The country code associated with the merchant account, in ISO 3166 format. See [Country](#type-country) for possible values * @member {String} country */ exports.prototype['country'] = undefined; @@ -102,6 +106,11 @@ exports.prototype['currency'] = undefined; * @member {String} status */ exports.prototype['status'] = undefined; +/** + * The ID of the main `Location` for this merchant. + * @member {String} main_location_id + */ +exports.prototype['main_location_id'] = undefined; diff --git a/src/model/Order.js b/src/model/Order.js index d04dbba..0cd473a 100644 --- a/src/model/Order.js +++ b/src/model/Order.js @@ -18,6 +18,7 @@ var OrderLineItem = require('./OrderLineItem'); var OrderLineItemDiscount = require('./OrderLineItemDiscount'); var OrderLineItemTax = require('./OrderLineItemTax'); var OrderMoneyAmounts = require('./OrderMoneyAmounts'); +var OrderPricingOptions = require('./OrderPricingOptions'); var OrderReturn = require('./OrderReturn'); var OrderReward = require('./OrderReward'); var OrderRoundingAdjustment = require('./OrderRoundingAdjustment'); @@ -69,6 +70,7 @@ var exports = function(locationId) { + }; @@ -161,6 +163,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('total_service_charge_money')) { obj['total_service_charge_money'] = Money.constructFromObject(data['total_service_charge_money']); + } + if (data.hasOwnProperty('pricing_options')) { + obj['pricing_options'] = OrderPricingOptions.constructFromObject(data['pricing_options']); } if (data.hasOwnProperty('rewards')) { obj['rewards'] = ApiClient.convertToType(data['rewards'], [OrderReward]); @@ -299,6 +304,11 @@ exports.prototype['total_discount_money'] = undefined; * @member {module:model/Money} total_service_charge_money */ exports.prototype['total_service_charge_money'] = undefined; +/** + * Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on pre-configured [pricing rules](https://developer.squareup.com/docs/reference/square/objects/CatalogPricingRule). + * @member {module:model/OrderPricingOptions} pricing_options + */ +exports.prototype['pricing_options'] = undefined; /** * A set-like list of rewards that have been added to the order. * @member {Array.} rewards diff --git a/src/model/OrderLineItemDiscount.js b/src/model/OrderLineItemDiscount.js index 6654f72..fb40a7f 100644 --- a/src/model/OrderLineItemDiscount.js +++ b/src/model/OrderLineItemDiscount.js @@ -41,6 +41,7 @@ var exports = function() { + }; /** @@ -83,6 +84,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('reward_ids')) { obj['reward_ids'] = ApiClient.convertToType(data['reward_ids'], ['String']); + } + if (data.hasOwnProperty('pricing_rule_id')) { + obj['pricing_rule_id'] = ApiClient.convertToType(data['pricing_rule_id'], 'String'); } } return obj; @@ -138,6 +142,11 @@ exports.prototype['scope'] = undefined; * @member {Array.} reward_ids */ exports.prototype['reward_ids'] = undefined; +/** + * The object identifier of a `pricing rule` to be applied automatically to this discount. The specification and application of the discounts, to which a `pricing_rule_id` is assigned, are completely controlled by the corresponding pricing rule. + * @member {String} pricing_rule_id + */ +exports.prototype['pricing_rule_id'] = undefined; diff --git a/src/model/OrderPricingOptions.js b/src/model/OrderPricingOptions.js new file mode 100644 index 0000000..9204dbb --- /dev/null +++ b/src/model/OrderPricingOptions.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 OrderPricingOptions model module. + * @module model/OrderPricingOptions + */ + +/** + * Constructs a new OrderPricingOptions. + * Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on pre-configured [pricing rules](/reference/square/objects/CatalogPricingRule). + * @alias module:model/OrderPricingOptions + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a OrderPricingOptions 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/OrderPricingOptions} obj Optional instance to populate. + * @return {module:model/OrderPricingOptions} The populated OrderPricingOptions instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('auto_apply_discounts')) { + obj['auto_apply_discounts'] = ApiClient.convertToType(data['auto_apply_discounts'], 'Boolean'); + } + } + return obj; +} + +/** + * The option to determine whether or not pricing rule-based discounts are automatically applied to an order. + * @member {Boolean} auto_apply_discounts + */ +exports.prototype['auto_apply_discounts'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/PublishInvoiceRequest.js b/src/model/PublishInvoiceRequest.js new file mode 100644 index 0000000..3565376 --- /dev/null +++ b/src/model/PublishInvoiceRequest.js @@ -0,0 +1,76 @@ +/** + * 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 PublishInvoiceRequest model module. + * Note: This model is in beta. + * @module model/PublishInvoiceRequest + */ + +/** + * Constructs a new PublishInvoiceRequest. + * Describes a `PublishInvoice` request. + * @alias module:model/PublishInvoiceRequest + * @class + * @param version {Number} The version of the `Invoice` to publish. This must match the current version of the invoice, otherwise the request is rejected. + */ +var exports = function(version) { + var _this = this; + + _this['version'] = version; + +}; + +/** + * Constructs a PublishInvoiceRequest 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/PublishInvoiceRequest} obj Optional instance to populate. + * @return {module:model/PublishInvoiceRequest} The populated PublishInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + if (data.hasOwnProperty('idempotency_key')) { + obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String'); + } + } + return obj; +} + +/** + * The version of the `Invoice` to publish. This must match the current version of the invoice, otherwise the request is rejected. + * @member {Number} version + */ +exports.prototype['version'] = undefined; +/** + * A unique string that identifies the `PublishInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/PublishInvoiceResponse.js b/src/model/PublishInvoiceResponse.js new file mode 100644 index 0000000..bf0dbf8 --- /dev/null +++ b/src/model/PublishInvoiceResponse.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The PublishInvoiceResponse model module. + * Note: This model is in beta. + * @module model/PublishInvoiceResponse + */ + +/** + * Constructs a new PublishInvoiceResponse. + * Describes a `PublishInvoice` response. + * @alias module:model/PublishInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a PublishInvoiceResponse 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/PublishInvoiceResponse} obj Optional instance to populate. + * @return {module:model/PublishInvoiceResponse} The populated PublishInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The published invoice. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/Range.js b/src/model/Range.js new file mode 100644 index 0000000..1be4060 --- /dev/null +++ b/src/model/Range.js @@ -0,0 +1,75 @@ +/** + * 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 Range model module. + * Note: This model is in beta. + * @module model/Range + */ + +/** + * Constructs a new Range. + * The range of a number value between the specified lower and upper bounds. + * @alias module:model/Range + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a Range 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/Range} obj Optional instance to populate. + * @return {module:model/Range} The populated Range instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('min')) { + obj['min'] = ApiClient.convertToType(data['min'], 'String'); + } + if (data.hasOwnProperty('max')) { + obj['max'] = ApiClient.convertToType(data['max'], 'String'); + } + } + return obj; +} + +/** + * The lower bound of the number range. + * @member {String} min + */ +exports.prototype['min'] = undefined; +/** + * The upper bound of the number range. + * @member {String} max + */ +exports.prototype['max'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/RegisterDomainRequest.js b/src/model/RegisterDomainRequest.js index ff930d9..8d64aff 100644 --- a/src/model/RegisterDomainRequest.js +++ b/src/model/RegisterDomainRequest.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new RegisterDomainRequest. - * Defines the parameters that can be included in the body of a request to the __RegisterDomain__ endpoint. + * Defines the parameters that can be included in the body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. * @alias module:model/RegisterDomainRequest * @class * @param domainName {String} A domain name as described in RFC-1034 that will be registered with ApplePay diff --git a/src/model/RegisterDomainResponse.js b/src/model/RegisterDomainResponse.js index 5cfa16c..9dda007 100644 --- a/src/model/RegisterDomainResponse.js +++ b/src/model/RegisterDomainResponse.js @@ -24,7 +24,7 @@ var Error = require('./Error'); /** * Constructs a new RegisterDomainResponse. - * Defines the fields that are included in the response body of a request to the __RegisterDomain__ endpoint. Either `errors` or `status` will be present in a given response (never both). + * Defines the fields that are included in the response body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. Either `errors` or `status` will be present in a given response (never both). * @alias module:model/RegisterDomainResponse * @class */ diff --git a/src/model/RetrieveInventoryChangesRequest.js b/src/model/RetrieveInventoryChangesRequest.js index 13abe7d..99a9905 100644 --- a/src/model/RetrieveInventoryChangesRequest.js +++ b/src/model/RetrieveInventoryChangesRequest.js @@ -61,7 +61,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['location_ids'] = undefined; /** - * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. * @member {String} cursor */ exports.prototype['cursor'] = undefined; diff --git a/src/model/RetrieveInventoryChangesResponse.js b/src/model/RetrieveInventoryChangesResponse.js index 2acb069..74498a2 100644 --- a/src/model/RetrieveInventoryChangesResponse.js +++ b/src/model/RetrieveInventoryChangesResponse.js @@ -72,7 +72,7 @@ exports.prototype['errors'] = undefined; */ exports.prototype['changes'] = undefined; /** - * The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + * The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. * @member {String} cursor */ exports.prototype['cursor'] = undefined; diff --git a/src/model/SearchCatalogItemsRequest.js b/src/model/SearchCatalogItemsRequest.js new file mode 100644 index 0000000..992f09f --- /dev/null +++ b/src/model/SearchCatalogItemsRequest.js @@ -0,0 +1,139 @@ +/** + * 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 CustomAttributeFilter = require('./CustomAttributeFilter'); + + + + +/** + * The SearchCatalogItemsRequest model module. + * Note: This model is in beta. + * @module model/SearchCatalogItemsRequest + */ + +/** + * Constructs a new SearchCatalogItemsRequest. + * Defines the request body for the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. + * @alias module:model/SearchCatalogItemsRequest + * @class + */ +var exports = function() { + var _this = this; + + + + + + + + + + +}; + +/** + * Constructs a SearchCatalogItemsRequest 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/SearchCatalogItemsRequest} obj Optional instance to populate. + * @return {module:model/SearchCatalogItemsRequest} The populated SearchCatalogItemsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('text_filter')) { + obj['text_filter'] = ApiClient.convertToType(data['text_filter'], 'String'); + } + if (data.hasOwnProperty('category_ids')) { + obj['category_ids'] = ApiClient.convertToType(data['category_ids'], ['String']); + } + if (data.hasOwnProperty('stock_levels')) { + obj['stock_levels'] = ApiClient.convertToType(data['stock_levels'], ['String']); + } + if (data.hasOwnProperty('enabled_location_ids')) { + obj['enabled_location_ids'] = ApiClient.convertToType(data['enabled_location_ids'], ['String']); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('limit')) { + obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); + } + if (data.hasOwnProperty('sort_order')) { + obj['sort_order'] = ApiClient.convertToType(data['sort_order'], 'String'); + } + if (data.hasOwnProperty('product_types')) { + obj['product_types'] = ApiClient.convertToType(data['product_types'], ['String']); + } + if (data.hasOwnProperty('custom_attribute_filters')) { + obj['custom_attribute_filters'] = ApiClient.convertToType(data['custom_attribute_filters'], [CustomAttributeFilter]); + } + } + return obj; +} + +/** + * The text filter expression to return items or item variations containing specified text in the `name`, `description`, or `abbreviation` attribute value of an item, or in the `name`, `sku`, or `upc` attribute value of an item variation. + * @member {String} text_filter + */ +exports.prototype['text_filter'] = undefined; +/** + * The category id query expression to return items containing the specified category IDs. + * @member {Array.} category_ids + */ +exports.prototype['category_ids'] = undefined; +/** + * The stock-level query expression to return item variations with the specified stock levels. See [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) for possible values + * @member {Array.} stock_levels + */ +exports.prototype['stock_levels'] = undefined; +/** + * The enabled-location query expression to return items and item variations having specified enabled locations. + * @member {Array.} enabled_location_ids + */ +exports.prototype['enabled_location_ids'] = undefined; +/** + * The pagination token, returned in the previous response, used to fetch the next batch of pending results. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * The maximum number of results to return per page. The default value is 100. + * @member {Number} limit + */ +exports.prototype['limit'] = undefined; +/** + * The order to sort the resutls. The default sort order is ascending (`ASC`). See [SortOrder](#type-sortorder) for possible values + * @member {String} sort_order + */ +exports.prototype['sort_order'] = undefined; +/** + * The product types query expression to return items or item variations having the specified product types. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values + * @member {Array.} product_types + */ +exports.prototype['product_types'] = undefined; +/** + * The customer-attribute filter to return items or item variations matching the specified custom attribute expressions. A maximum number of 10 custom attribute expressions are supported in a single call to the `SearchCatalogItems` endpoint. + * @member {Array.} custom_attribute_filters + */ +exports.prototype['custom_attribute_filters'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/SearchCatalogItemsRequestStockLevel.js b/src/model/SearchCatalogItemsRequestStockLevel.js new file mode 100644 index 0000000..d52aeb8 --- /dev/null +++ b/src/model/SearchCatalogItemsRequestStockLevel.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 SearchCatalogItemsRequestStockLevel. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "OUT" + * @const + */ + "OUT": "OUT", + /** + * value: "LOW" + * @const + */ + "LOW": "LOW"}; + +/** + * Returns a SearchCatalogItemsRequestStockLevel enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/SearchCatalogItemsRequestStockLevel} The enum SearchCatalogItemsRequestStockLevel value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/SearchCatalogItemsResponse.js b/src/model/SearchCatalogItemsResponse.js new file mode 100644 index 0000000..1d53a7b --- /dev/null +++ b/src/model/SearchCatalogItemsResponse.js @@ -0,0 +1,95 @@ +/** + * 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 CatalogObject = require('./CatalogObject'); +var Error = require('./Error'); + + + + +/** + * The SearchCatalogItemsResponse model module. + * Note: This model is in beta. + * @module model/SearchCatalogItemsResponse + */ + +/** + * Constructs a new SearchCatalogItemsResponse. + * Defines the response body returned from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. + * @alias module:model/SearchCatalogItemsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + + +}; + +/** + * Constructs a SearchCatalogItemsResponse 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/SearchCatalogItemsResponse} obj Optional instance to populate. + * @return {module:model/SearchCatalogItemsResponse} The populated SearchCatalogItemsResponse 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('items')) { + obj['items'] = ApiClient.convertToType(data['items'], [CatalogObject]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('matched_variation_ids')) { + obj['matched_variation_ids'] = ApiClient.convertToType(data['matched_variation_ids'], ['String']); + } + } + return obj; +} + +/** + * Errors detected when the call to `SearchCatalogItems` endpoint fails. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * Returned items matching the specified query expressions. + * @member {Array.} items + */ +exports.prototype['items'] = undefined; +/** + * Pagination token used in the next request to return more of the search result. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * Ids of returned item variations matching the specified query expression. + * @member {Array.} matched_variation_ids + */ +exports.prototype['matched_variation_ids'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/SearchInvoicesRequest.js b/src/model/SearchInvoicesRequest.js new file mode 100644 index 0000000..ec2603e --- /dev/null +++ b/src/model/SearchInvoicesRequest.js @@ -0,0 +1,86 @@ +/** + * 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 InvoiceQuery = require('./InvoiceQuery'); + + + + +/** + * The SearchInvoicesRequest model module. + * Note: This model is in beta. + * @module model/SearchInvoicesRequest + */ + +/** + * Constructs a new SearchInvoicesRequest. + * Describes a `SearchInvoices` request. + * @alias module:model/SearchInvoicesRequest + * @class + * @param query {module:model/InvoiceQuery} Describes the query criteria for searching invoices. + */ +var exports = function(query) { + var _this = this; + + _this['query'] = query; + + +}; + +/** + * Constructs a SearchInvoicesRequest 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/SearchInvoicesRequest} obj Optional instance to populate. + * @return {module:model/SearchInvoicesRequest} The populated SearchInvoicesRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('query')) { + obj['query'] = InvoiceQuery.constructFromObject(data['query']); + } + if (data.hasOwnProperty('limit')) { + obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * Describes the query criteria for searching invoices. + * @member {module:model/InvoiceQuery} query + */ +exports.prototype['query'] = undefined; +/** + * The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices. + * @member {Number} limit + */ +exports.prototype['limit'] = undefined; +/** + * A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/SearchInvoicesResponse.js b/src/model/SearchInvoicesResponse.js new file mode 100644 index 0000000..d935ebd --- /dev/null +++ b/src/model/SearchInvoicesResponse.js @@ -0,0 +1,86 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The SearchInvoicesResponse model module. + * Note: This model is in beta. + * @module model/SearchInvoicesResponse + */ + +/** + * Constructs a new SearchInvoicesResponse. + * Describes a `SearchInvoices` response. + * @alias module:model/SearchInvoicesResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a SearchInvoicesResponse 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/SearchInvoicesResponse} obj Optional instance to populate. + * @return {module:model/SearchInvoicesResponse} The populated SearchInvoicesResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoices')) { + obj['invoices'] = ApiClient.convertToType(data['invoices'], [Invoice]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The list of invoices returned by the search. + * @member {Array.} invoices + */ +exports.prototype['invoices'] = undefined; +/** + * When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of invoices. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/Shift.js b/src/model/Shift.js index 897aef8..6b11103 100644 --- a/src/model/Shift.js +++ b/src/model/Shift.js @@ -25,7 +25,7 @@ var ShiftWage = require('./ShiftWage'); /** * Constructs a new Shift. - * A record of the hourly rate, start, and end times for a single work shift for an employee. May include a record of the start and end times for breaks taken during the shift. + * A record of the hourly rate, start, and end times for a single work shift for an employee. May include a record of the start and end times for breaks taken during the shift. * @alias module:model/Shift * @class * @param employeeId {String} The ID of the employee this shift belongs to. diff --git a/src/model/SourceApplication.js b/src/model/SourceApplication.js index e2b22f4..b55cab4 100644 --- a/src/model/SourceApplication.js +++ b/src/model/SourceApplication.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new SourceApplication. - * Provides information about the application used to generate an inventory change. + * Provides information about the application used to generate a change. * @alias module:model/SourceApplication * @class */ diff --git a/src/model/TerminalCheckout.js b/src/model/TerminalCheckout.js index a1755d7..0b5415a 100644 --- a/src/model/TerminalCheckout.js +++ b/src/model/TerminalCheckout.js @@ -132,7 +132,7 @@ exports.prototype['deadline_duration'] = undefined; */ exports.prototype['status'] = undefined; /** - * Present if the status is CANCELED. See [TerminalCheckoutCancelReason](#type-terminalcheckoutcancelreason) for possible values + * Present if the status is CANCELED. See [ActionCancelReason](#type-actioncancelreason) for possible values * @member {String} cancel_reason */ exports.prototype['cancel_reason'] = undefined; diff --git a/src/model/UpdateInvoiceRequest.js b/src/model/UpdateInvoiceRequest.js new file mode 100644 index 0000000..894cfff --- /dev/null +++ b/src/model/UpdateInvoiceRequest.js @@ -0,0 +1,86 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The UpdateInvoiceRequest model module. + * Note: This model is in beta. + * @module model/UpdateInvoiceRequest + */ + +/** + * Constructs a new UpdateInvoiceRequest. + * Describes a `UpdateInvoice` request. + * @alias module:model/UpdateInvoiceRequest + * @class + * @param invoice {module:model/Invoice} The invoice fields to update. You need to only specify the fields you want to change. The current invoice version must be specified in the version field. For more information, see [Update an invoice](invoices-api/overview#update-an-invoice). + */ +var exports = function(invoice) { + var _this = this; + + _this['invoice'] = invoice; + + +}; + +/** + * Constructs a UpdateInvoiceRequest 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/UpdateInvoiceRequest} obj Optional instance to populate. + * @return {module:model/UpdateInvoiceRequest} The populated UpdateInvoiceRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('idempotency_key')) { + obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String'); + } + if (data.hasOwnProperty('fields_to_clear')) { + obj['fields_to_clear'] = ApiClient.convertToType(data['fields_to_clear'], ['String']); + } + } + return obj; +} + +/** + * The invoice fields to update. You need to only specify the fields you want to change. The current invoice version must be specified in the version field. For more information, see [Update an invoice](invoices-api/overview#update-an-invoice). + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * A unique string that identifies the `UpdateInvoice` request. If you do not provide `idempotency_key` (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency). + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; +/** + * List of fields to clear. For examples, see [Update an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice). + * @member {Array.} fields_to_clear + */ +exports.prototype['fields_to_clear'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/UpdateInvoiceResponse.js b/src/model/UpdateInvoiceResponse.js new file mode 100644 index 0000000..dedb7a9 --- /dev/null +++ b/src/model/UpdateInvoiceResponse.js @@ -0,0 +1,77 @@ +/** + * 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 Invoice = require('./Invoice'); + + + + +/** + * The UpdateInvoiceResponse model module. + * Note: This model is in beta. + * @module model/UpdateInvoiceResponse + */ + +/** + * Constructs a new UpdateInvoiceResponse. + * Describes a `UpdateInvoice` response. + * @alias module:model/UpdateInvoiceResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a UpdateInvoiceResponse 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/UpdateInvoiceResponse} obj Optional instance to populate. + * @return {module:model/UpdateInvoiceResponse} The populated UpdateInvoiceResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('invoice')) { + obj['invoice'] = Invoice.constructFromObject(data['invoice']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The updated invoice. + * @member {module:model/Invoice} invoice + */ +exports.prototype['invoice'] = undefined; +/** + * Information about errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/WorkweekConfig.js b/src/model/WorkweekConfig.js index 5855c36..d078eb9 100644 --- a/src/model/WorkweekConfig.js +++ b/src/model/WorkweekConfig.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new WorkweekConfig. - * Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay. + * Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay. * @alias module:model/WorkweekConfig * @class * @param startOfWeek {String} The day of the week on which a business week cuts over for compensation purposes. See [Weekday](#type-weekday) for possible values diff --git a/test/api/CustomersApi.spec.js b/test/api/CustomersApi.spec.js index a4f73d3..f5bd507 100644 --- a/test/api/CustomersApi.spec.js +++ b/test/api/CustomersApi.spec.js @@ -59,17 +59,17 @@ describe('CustomersApi', function () { expect(resp.customer).to.have.property('given_name', 'Bob Dole'); }); }); - describe('createCustomerCard', function () { - it('should call createCustomerCard successfully', async function () { - const resp = await this.api.createCustomer({given_name: 'Bob Dole'}) - .catch(handleUnexpectedError); + // describe('createCustomerCard', function () { + // it('should call createCustomerCard successfully', async function () { + // const resp = await this.api.createCustomer({given_name: 'Bob Dole'}) + // .catch(handleUnexpectedError); - const createCardResp = await this.api.createCustomerCard(resp.customer.id, {card_nonce: 'fake-card-nonce-ok'}) - .catch(handleUnexpectedError); + // const createCardResp = await this.api.createCustomerCard(resp.customer.id, {card_nonce: 'fake-card-nonce-ok'}) + // .catch(handleUnexpectedError); - expect(createCardResp).to.have.property('card'); - }); - }); + // expect(createCardResp).to.have.property('card'); + // }); + // }); describe('deleteCustomer', function () { it('should call deleteCustomer successfully', async function () { const createCustomerResp = await this.api.createCustomer({given_name: 'Bob Dole'}) @@ -82,22 +82,22 @@ describe('CustomersApi', function () { expect(deleteCustomerResp.errors).to.equal(undefined); }) }); - describe('deleteCustomerCard', function () { - it('should call deleteCustomerCard successfully', async function () { - const createCustomerResp = await this.api.createCustomer({given_name: 'Bob Dole'}) - .catch(handleUnexpectedError); + // describe('deleteCustomerCard', function () { + // it('should call deleteCustomerCard successfully', async function () { + // const createCustomerResp = await this.api.createCustomer({given_name: 'Bob Dole'}) + // .catch(handleUnexpectedError); - const createCustomerCardResp = await this.api.createCustomerCard(createCustomerResp.customer.id, {card_nonce: 'fake-card-nonce-ok'}) - .catch(handleUnexpectedError); + // const createCustomerCardResp = await this.api.createCustomerCard(createCustomerResp.customer.id, {card_nonce: 'fake-card-nonce-ok'}) + // .catch(handleUnexpectedError); - const deleteCustomerCardResp = await this.api.deleteCustomerCard(createCustomerResp.customer.id, createCustomerCardResp.card.id) - .catch(handleUnexpectedError); + // const deleteCustomerCardResp = await this.api.deleteCustomerCard(createCustomerResp.customer.id, createCustomerCardResp.card.id) + // .catch(handleUnexpectedError); - expect(deleteCustomerCardResp).to.have.property('errors'); - expect(deleteCustomerCardResp.error).to.equal(undefined); - }) - }); + // expect(deleteCustomerCardResp).to.have.property('errors'); + // expect(deleteCustomerCardResp.error).to.equal(undefined); + // }) + // }); describe('listCustomers', function () { it('should call listCustomers successfully', async function () { const createCustomerResp = await this.api.createCustomer({given_name: 'Bob Dole'}) diff --git a/test/api/InvoicesApi.spec.js b/test/api/InvoicesApi.spec.js new file mode 100644 index 0000000..ceb9c0a --- /dev/null +++ b/test/api/InvoicesApi.spec.js @@ -0,0 +1,116 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +/** + * 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 + * + */ + +describe('InvoicesApi', function() { + beforeEach(function() { + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + // Some APIs do not work with sandbox. Replace `sandbox` with `production` for those test suites. + oauth2.accessToken = accounts.sandbox.access_token; + this.api = new SquareConnect.InvoicesApi(); + }); + + afterEach(function(){ + }); + + describe('InvoicesApi', function() { + describe('cancelInvoice', function() { + it('should call cancelInvoice successfully', function(done) { + //uncomment below and update the code to test cancelInvoice + //instance.cancelInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('createInvoice', function() { + it('should call createInvoice successfully', function(done) { + //uncomment below and update the code to test createInvoice + //instance.createInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteInvoice', function() { + it('should call deleteInvoice successfully', function(done) { + //uncomment below and update the code to test deleteInvoice + //instance.deleteInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getInvoice', function() { + it('should call getInvoice successfully', function(done) { + //uncomment below and update the code to test getInvoice + //instance.getInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listInvoices', function() { + it('should call listInvoices successfully', function(done) { + //uncomment below and update the code to test listInvoices + //instance.listInvoices(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('publishInvoice', function() { + it('should call publishInvoice successfully', function(done) { + //uncomment below and update the code to test publishInvoice + //instance.publishInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('searchInvoices', function() { + it('should call searchInvoices successfully', function(done) { + //uncomment below and update the code to test searchInvoices + //instance.searchInvoices(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateInvoice', function() { + it('should call updateInvoice successfully', function(done) { + //uncomment below and update the code to test updateInvoice + //instance.updateInvoice(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); +}); diff --git a/test/model/ActionCancelReason.spec.js b/test/model/ActionCancelReason.spec.js new file mode 100644 index 0000000..56d1fff --- /dev/null +++ b/test/model/ActionCancelReason.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('ActionCancelReason', function() { + beforeEach(function() { + }); + + it('should create an instance of ActionCancelReason', function() { + // uncomment below and update the code to test ActionCancelReason + //var instane = new SquareConnect.ActionCancelReason(); + //expect(instance).to.be.a(SquareConnect.ActionCancelReason); + }); + +}); diff --git a/test/model/CancelInvoiceRequest.spec.js b/test/model/CancelInvoiceRequest.spec.js new file mode 100644 index 0000000..affeeb7 --- /dev/null +++ b/test/model/CancelInvoiceRequest.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('CancelInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelInvoiceRequest(); + }); + + it('should create an instance of CancelInvoiceRequest', function() { + // uncomment below and update the code to test CancelInvoiceRequest + //var instane = new SquareConnect.CancelInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.CancelInvoiceRequest); + }); + + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.CancelInvoiceRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CancelInvoiceResponse.spec.js b/test/model/CancelInvoiceResponse.spec.js new file mode 100644 index 0000000..737d719 --- /dev/null +++ b/test/model/CancelInvoiceResponse.spec.js @@ -0,0 +1,37 @@ +/** + * 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('CancelInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelInvoiceResponse(); + }); + + it('should create an instance of CancelInvoiceResponse', function() { + // uncomment below and update the code to test CancelInvoiceResponse + //var instane = new SquareConnect.CancelInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.CancelInvoiceResponse); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.CancelInvoiceResponse(); + //expect(instance).to.be(); + }); + 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.CancelInvoiceResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CatalogQueryCustomAttributeUsage.spec.js b/test/model/CatalogQueryCustomAttributeUsage.spec.js index e53b507..90bd52d 100644 --- a/test/model/CatalogQueryCustomAttributeUsage.spec.js +++ b/test/model/CatalogQueryCustomAttributeUsage.spec.js @@ -15,7 +15,7 @@ const SquareConnect = require('../../src/index'); describe('CatalogQueryCustomAttributeUsage', function() { beforeEach(function() { -// this.api = new SquareConnect.CatalogQueryCustomAttributeUsage(); + //this.api = new SquareConnect.CatalogQueryCustomAttributeUsage(); }); it('should create an instance of CatalogQueryCustomAttributeUsage', function() { diff --git a/test/model/CatalogQueryFilteredItems.spec.js b/test/model/CatalogQueryFilteredItems.spec.js index 1059438..8038f7d 100644 --- a/test/model/CatalogQueryFilteredItems.spec.js +++ b/test/model/CatalogQueryFilteredItems.spec.js @@ -15,7 +15,7 @@ const SquareConnect = require('../../src/index'); describe('CatalogQueryFilteredItems', function() { beforeEach(function() { -// this.api = new SquareConnect.CatalogQueryFilteredItems(); + //this.api = new SquareConnect.CatalogQueryFilteredItems(); }); it('should create an instance of CatalogQueryFilteredItems', function() { diff --git a/test/model/CatalogQueryFilteredItemsCustomAttributeFilter.spec.js b/test/model/CatalogQueryFilteredItemsCustomAttributeFilter.spec.js index 4fac714..47e1fbc 100644 --- a/test/model/CatalogQueryFilteredItemsCustomAttributeFilter.spec.js +++ b/test/model/CatalogQueryFilteredItemsCustomAttributeFilter.spec.js @@ -15,7 +15,7 @@ const SquareConnect = require('../../src/index'); describe('CatalogQueryFilteredItemsCustomAttributeFilter', function() { beforeEach(function() { -// this.api = new SquareConnect.CatalogQueryFilteredItemsCustomAttributeFilter(); + //this.api = new SquareConnect.CatalogQueryFilteredItemsCustomAttributeFilter(); }); it('should create an instance of CatalogQueryFilteredItemsCustomAttributeFilter', function() { diff --git a/test/model/CreateInvoiceRequest.spec.js b/test/model/CreateInvoiceRequest.spec.js new file mode 100644 index 0000000..c8d13b9 --- /dev/null +++ b/test/model/CreateInvoiceRequest.spec.js @@ -0,0 +1,37 @@ +/** + * 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('CreateInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateInvoiceRequest(); + }); + + it('should create an instance of CreateInvoiceRequest', function() { + // uncomment below and update the code to test CreateInvoiceRequest + //var instane = new SquareConnect.CreateInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.CreateInvoiceRequest); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.CreateInvoiceRequest(); + //expect(instance).to.be(); + }); + it('should have the property idempotencyKey (base name: "idempotency_key")', function() { + // uncomment below and update the code to test the property idempotencyKey + //var instane = new SquareConnect.CreateInvoiceRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateInvoiceResponse.spec.js b/test/model/CreateInvoiceResponse.spec.js new file mode 100644 index 0000000..ed2a56b --- /dev/null +++ b/test/model/CreateInvoiceResponse.spec.js @@ -0,0 +1,37 @@ +/** + * 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('CreateInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateInvoiceResponse(); + }); + + it('should create an instance of CreateInvoiceResponse', function() { + // uncomment below and update the code to test CreateInvoiceResponse + //var instane = new SquareConnect.CreateInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.CreateInvoiceResponse); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.CreateInvoiceResponse(); + //expect(instance).to.be(); + }); + 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.CreateInvoiceResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CustomAttributeFilter.spec.js b/test/model/CustomAttributeFilter.spec.js new file mode 100644 index 0000000..6ff6910 --- /dev/null +++ b/test/model/CustomAttributeFilter.spec.js @@ -0,0 +1,57 @@ +/** + * 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('CustomAttributeFilter', function() { + beforeEach(function() { + this.api = new SquareConnect.CustomAttributeFilter(); + }); + + it('should create an instance of CustomAttributeFilter', function() { + // uncomment below and update the code to test CustomAttributeFilter + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be.a(SquareConnect.CustomAttributeFilter); + }); + + it('should have the property customAttributeDefinitionId (base name: "custom_attribute_definition_id")', function() { + // uncomment below and update the code to test the property customAttributeDefinitionId + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); + it('should have the property key (base name: "key")', function() { + // uncomment below and update the code to test the property key + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); + it('should have the property stringFilter (base name: "string_filter")', function() { + // uncomment below and update the code to test the property stringFilter + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); + it('should have the property numberFilter (base name: "number_filter")', function() { + // uncomment below and update the code to test the property numberFilter + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); + it('should have the property selectionUidsFilter (base name: "selection_uids_filter")', function() { + // uncomment below and update the code to test the property selectionUidsFilter + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); + it('should have the property boolFilter (base name: "bool_filter")', function() { + // uncomment below and update the code to test the property boolFilter + //var instane = new SquareConnect.CustomAttributeFilter(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeleteInvoiceRequest.spec.js b/test/model/DeleteInvoiceRequest.spec.js new file mode 100644 index 0000000..3864844 --- /dev/null +++ b/test/model/DeleteInvoiceRequest.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('DeleteInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.DeleteInvoiceRequest(); + }); + + it('should create an instance of DeleteInvoiceRequest', function() { + // uncomment below and update the code to test DeleteInvoiceRequest + //var instane = new SquareConnect.DeleteInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.DeleteInvoiceRequest); + }); + + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.DeleteInvoiceRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeleteInvoiceResponse.spec.js b/test/model/DeleteInvoiceResponse.spec.js new file mode 100644 index 0000000..b115b69 --- /dev/null +++ b/test/model/DeleteInvoiceResponse.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('DeleteInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.DeleteInvoiceResponse(); + }); + + it('should create an instance of DeleteInvoiceResponse', function() { + // uncomment below and update the code to test DeleteInvoiceResponse + //var instane = new SquareConnect.DeleteInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.DeleteInvoiceResponse); + }); + + 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.DeleteInvoiceResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/GetInvoiceRequest.spec.js b/test/model/GetInvoiceRequest.spec.js new file mode 100644 index 0000000..44a757e --- /dev/null +++ b/test/model/GetInvoiceRequest.spec.js @@ -0,0 +1,27 @@ +/** + * 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('GetInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.GetInvoiceRequest(); + }); + + it('should create an instance of GetInvoiceRequest', function() { + // uncomment below and update the code to test GetInvoiceRequest + //var instane = new SquareConnect.GetInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.GetInvoiceRequest); + }); + +}); diff --git a/test/model/GetInvoiceResponse.spec.js b/test/model/GetInvoiceResponse.spec.js new file mode 100644 index 0000000..a024e7c --- /dev/null +++ b/test/model/GetInvoiceResponse.spec.js @@ -0,0 +1,37 @@ +/** + * 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('GetInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.GetInvoiceResponse(); + }); + + it('should create an instance of GetInvoiceResponse', function() { + // uncomment below and update the code to test GetInvoiceResponse + //var instane = new SquareConnect.GetInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.GetInvoiceResponse); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.GetInvoiceResponse(); + //expect(instance).to.be(); + }); + 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.GetInvoiceResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/Invoice.spec.js b/test/model/Invoice.spec.js new file mode 100644 index 0000000..e9179c4 --- /dev/null +++ b/test/model/Invoice.spec.js @@ -0,0 +1,107 @@ +/** + * 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('Invoice', function() { + beforeEach(function() { + this.api = new SquareConnect.Invoice(); + }); + + it('should create an instance of Invoice', function() { + // uncomment below and update the code to test Invoice + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be.a(SquareConnect.Invoice); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property orderId (base name: "order_id")', function() { + // uncomment below and update the code to test the property orderId + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property primaryRecipient (base name: "primary_recipient")', function() { + // uncomment below and update the code to test the property primaryRecipient + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property paymentRequests (base name: "payment_requests")', function() { + // uncomment below and update the code to test the property paymentRequests + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property invoiceNumber (base name: "invoice_number")', function() { + // uncomment below and update the code to test the property invoiceNumber + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property title (base name: "title")', function() { + // uncomment below and update the code to test the property title + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property scheduledAt (base name: "scheduled_at")', function() { + // uncomment below and update the code to test the property scheduledAt + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property publicUrl (base name: "public_url")', function() { + // uncomment below and update the code to test the property publicUrl + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property nextPaymentAmountMoney (base name: "next_payment_amount_money")', function() { + // uncomment below and update the code to test the property nextPaymentAmountMoney + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property timezone (base name: "timezone")', function() { + // uncomment below and update the code to test the property timezone + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property createdAt (base name: "created_at")', function() { + // uncomment below and update the code to test the property createdAt + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); + it('should have the property updatedAt (base name: "updated_at")', function() { + // uncomment below and update the code to test the property updatedAt + //var instane = new SquareConnect.Invoice(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoiceFilter.spec.js b/test/model/InvoiceFilter.spec.js new file mode 100644 index 0000000..00f0b71 --- /dev/null +++ b/test/model/InvoiceFilter.spec.js @@ -0,0 +1,37 @@ +/** + * 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('InvoiceFilter', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoiceFilter(); + }); + + it('should create an instance of InvoiceFilter', function() { + // uncomment below and update the code to test InvoiceFilter + //var instane = new SquareConnect.InvoiceFilter(); + //expect(instance).to.be.a(SquareConnect.InvoiceFilter); + }); + + it('should have the property locationIds (base name: "location_ids")', function() { + // uncomment below and update the code to test the property locationIds + //var instane = new SquareConnect.InvoiceFilter(); + //expect(instance).to.be(); + }); + it('should have the property customerIds (base name: "customer_ids")', function() { + // uncomment below and update the code to test the property customerIds + //var instane = new SquareConnect.InvoiceFilter(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoicePaymentReminder.spec.js b/test/model/InvoicePaymentReminder.spec.js new file mode 100644 index 0000000..535a3fd --- /dev/null +++ b/test/model/InvoicePaymentReminder.spec.js @@ -0,0 +1,52 @@ +/** + * 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('InvoicePaymentReminder', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoicePaymentReminder(); + }); + + it('should create an instance of InvoicePaymentReminder', function() { + // uncomment below and update the code to test InvoicePaymentReminder + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be.a(SquareConnect.InvoicePaymentReminder); + }); + + it('should have the property uid (base name: "uid")', function() { + // uncomment below and update the code to test the property uid + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be(); + }); + it('should have the property relativeScheduledDays (base name: "relative_scheduled_days")', function() { + // uncomment below and update the code to test the property relativeScheduledDays + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be(); + }); + it('should have the property message (base name: "message")', function() { + // uncomment below and update the code to test the property message + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be(); + }); + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be(); + }); + it('should have the property sentAt (base name: "sent_at")', function() { + // uncomment below and update the code to test the property sentAt + //var instane = new SquareConnect.InvoicePaymentReminder(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoicePaymentReminderStatus.spec.js b/test/model/InvoicePaymentReminderStatus.spec.js new file mode 100644 index 0000000..f59bc15 --- /dev/null +++ b/test/model/InvoicePaymentReminderStatus.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('InvoicePaymentReminderStatus', function() { + beforeEach(function() { + }); + + it('should create an instance of InvoicePaymentReminderStatus', function() { + // uncomment below and update the code to test InvoicePaymentReminderStatus + //var instane = new SquareConnect.InvoicePaymentReminderStatus(); + //expect(instance).to.be.a(SquareConnect.InvoicePaymentReminderStatus); + }); + +}); diff --git a/test/model/InvoicePaymentRequest.spec.js b/test/model/InvoicePaymentRequest.spec.js new file mode 100644 index 0000000..0a7f9cf --- /dev/null +++ b/test/model/InvoicePaymentRequest.spec.js @@ -0,0 +1,87 @@ +/** + * 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('InvoicePaymentRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoicePaymentRequest(); + }); + + it('should create an instance of InvoicePaymentRequest', function() { + // uncomment below and update the code to test InvoicePaymentRequest + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be.a(SquareConnect.InvoicePaymentRequest); + }); + + it('should have the property uid (base name: "uid")', function() { + // uncomment below and update the code to test the property uid + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property requestMethod (base name: "request_method")', function() { + // uncomment below and update the code to test the property requestMethod + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property requestType (base name: "request_type")', function() { + // uncomment below and update the code to test the property requestType + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property dueDate (base name: "due_date")', function() { + // uncomment below and update the code to test the property dueDate + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property fixedAmountRequestedMoney (base name: "fixed_amount_requested_money")', function() { + // uncomment below and update the code to test the property fixedAmountRequestedMoney + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property percentageRequested (base name: "percentage_requested")', function() { + // uncomment below and update the code to test the property percentageRequested + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property tippingEnabled (base name: "tipping_enabled")', function() { + // uncomment below and update the code to test the property tippingEnabled + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property cardId (base name: "card_id")', function() { + // uncomment below and update the code to test the property cardId + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property reminders (base name: "reminders")', function() { + // uncomment below and update the code to test the property reminders + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property computedAmountMoney (base name: "computed_amount_money")', function() { + // uncomment below and update the code to test the property computedAmountMoney + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property totalCompletedAmountMoney (base name: "total_completed_amount_money")', function() { + // uncomment below and update the code to test the property totalCompletedAmountMoney + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); + it('should have the property roundingAdjustmentIncludedMoney (base name: "rounding_adjustment_included_money")', function() { + // uncomment below and update the code to test the property roundingAdjustmentIncludedMoney + //var instane = new SquareConnect.InvoicePaymentRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoiceQuery.spec.js b/test/model/InvoiceQuery.spec.js new file mode 100644 index 0000000..8ff3efa --- /dev/null +++ b/test/model/InvoiceQuery.spec.js @@ -0,0 +1,37 @@ +/** + * 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('InvoiceQuery', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoiceQuery(); + }); + + it('should create an instance of InvoiceQuery', function() { + // uncomment below and update the code to test InvoiceQuery + //var instane = new SquareConnect.InvoiceQuery(); + //expect(instance).to.be.a(SquareConnect.InvoiceQuery); + }); + + it('should have the property filter (base name: "filter")', function() { + // uncomment below and update the code to test the property filter + //var instane = new SquareConnect.InvoiceQuery(); + //expect(instance).to.be(); + }); + it('should have the property sort (base name: "sort")', function() { + // uncomment below and update the code to test the property sort + //var instane = new SquareConnect.InvoiceQuery(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoiceRecipient.spec.js b/test/model/InvoiceRecipient.spec.js new file mode 100644 index 0000000..f9a6753 --- /dev/null +++ b/test/model/InvoiceRecipient.spec.js @@ -0,0 +1,62 @@ +/** + * 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('InvoiceRecipient', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoiceRecipient(); + }); + + it('should create an instance of InvoiceRecipient', function() { + // uncomment below and update the code to test InvoiceRecipient + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be.a(SquareConnect.InvoiceRecipient); + }); + + it('should have the property customerId (base name: "customer_id")', function() { + // uncomment below and update the code to test the property customerId + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property givenName (base name: "given_name")', function() { + // uncomment below and update the code to test the property givenName + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property familyName (base name: "family_name")', function() { + // uncomment below and update the code to test the property familyName + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property emailAddress (base name: "email_address")', function() { + // uncomment below and update the code to test the property emailAddress + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property address (base name: "address")', function() { + // uncomment below and update the code to test the property address + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property phoneNumber (base name: "phone_number")', function() { + // uncomment below and update the code to test the property phoneNumber + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); + it('should have the property companyName (base name: "company_name")', function() { + // uncomment below and update the code to test the property companyName + //var instane = new SquareConnect.InvoiceRecipient(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoiceRequestMethod.spec.js b/test/model/InvoiceRequestMethod.spec.js new file mode 100644 index 0000000..1468534 --- /dev/null +++ b/test/model/InvoiceRequestMethod.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('InvoiceRequestMethod', function() { + beforeEach(function() { + }); + + it('should create an instance of InvoiceRequestMethod', function() { + // uncomment below and update the code to test InvoiceRequestMethod + //var instane = new SquareConnect.InvoiceRequestMethod(); + //expect(instance).to.be.a(SquareConnect.InvoiceRequestMethod); + }); + +}); diff --git a/test/model/InvoiceRequestType.spec.js b/test/model/InvoiceRequestType.spec.js new file mode 100644 index 0000000..eb0b534 --- /dev/null +++ b/test/model/InvoiceRequestType.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('InvoiceRequestType', function() { + beforeEach(function() { + }); + + it('should create an instance of InvoiceRequestType', function() { + // uncomment below and update the code to test InvoiceRequestType + //var instane = new SquareConnect.InvoiceRequestType(); + //expect(instance).to.be.a(SquareConnect.InvoiceRequestType); + }); + +}); diff --git a/test/model/InvoiceSort.spec.js b/test/model/InvoiceSort.spec.js new file mode 100644 index 0000000..a911c87 --- /dev/null +++ b/test/model/InvoiceSort.spec.js @@ -0,0 +1,37 @@ +/** + * 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('InvoiceSort', function() { + beforeEach(function() { + this.api = new SquareConnect.InvoiceSort(); + }); + + it('should create an instance of InvoiceSort', function() { + // uncomment below and update the code to test InvoiceSort + //var instane = new SquareConnect.InvoiceSort(); + //expect(instance).to.be.a(SquareConnect.InvoiceSort); + }); + + it('should have the property field (base name: "field")', function() { + // uncomment below and update the code to test the property field + //var instane = new SquareConnect.InvoiceSort(); + //expect(instance).to.be(); + }); + it('should have the property order (base name: "order")', function() { + // uncomment below and update the code to test the property order + //var instane = new SquareConnect.InvoiceSort(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InvoiceSortField.spec.js b/test/model/InvoiceSortField.spec.js new file mode 100644 index 0000000..b4885d7 --- /dev/null +++ b/test/model/InvoiceSortField.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('InvoiceSortField', function() { + beforeEach(function() { + }); + + it('should create an instance of InvoiceSortField', function() { + // uncomment below and update the code to test InvoiceSortField + //var instane = new SquareConnect.InvoiceSortField(); + //expect(instance).to.be.a(SquareConnect.InvoiceSortField); + }); + +}); diff --git a/test/model/InvoiceStatus.spec.js b/test/model/InvoiceStatus.spec.js new file mode 100644 index 0000000..189c96d --- /dev/null +++ b/test/model/InvoiceStatus.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('InvoiceStatus', function() { + beforeEach(function() { + }); + + it('should create an instance of InvoiceStatus', function() { + // uncomment below and update the code to test InvoiceStatus + //var instane = new SquareConnect.InvoiceStatus(); + //expect(instance).to.be.a(SquareConnect.InvoiceStatus); + }); + +}); diff --git a/test/model/ListInvoicesRequest.spec.js b/test/model/ListInvoicesRequest.spec.js new file mode 100644 index 0000000..cb3bdc6 --- /dev/null +++ b/test/model/ListInvoicesRequest.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('ListInvoicesRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListInvoicesRequest(); + }); + + it('should create an instance of ListInvoicesRequest', function() { + // uncomment below and update the code to test ListInvoicesRequest + //var instane = new SquareConnect.ListInvoicesRequest(); + //expect(instance).to.be.a(SquareConnect.ListInvoicesRequest); + }); + + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.ListInvoicesRequest(); + //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.ListInvoicesRequest(); + //expect(instance).to.be(); + }); + it('should have the property limit (base name: "limit")', function() { + // uncomment below and update the code to test the property limit + //var instane = new SquareConnect.ListInvoicesRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListInvoicesResponse.spec.js b/test/model/ListInvoicesResponse.spec.js new file mode 100644 index 0000000..c84c50b --- /dev/null +++ b/test/model/ListInvoicesResponse.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('ListInvoicesResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListInvoicesResponse(); + }); + + it('should create an instance of ListInvoicesResponse', function() { + // uncomment below and update the code to test ListInvoicesResponse + //var instane = new SquareConnect.ListInvoicesResponse(); + //expect(instance).to.be.a(SquareConnect.ListInvoicesResponse); + }); + + it('should have the property invoices (base name: "invoices")', function() { + // uncomment below and update the code to test the property invoices + //var instane = new SquareConnect.ListInvoicesResponse(); + //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.ListInvoicesResponse(); + //expect(instance).to.be(); + }); + 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.ListInvoicesResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderPricingOptions.spec.js b/test/model/OrderPricingOptions.spec.js new file mode 100644 index 0000000..d57f143 --- /dev/null +++ b/test/model/OrderPricingOptions.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('OrderPricingOptions', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderPricingOptions(); + }); + + it('should create an instance of OrderPricingOptions', function() { + // uncomment below and update the code to test OrderPricingOptions + //var instane = new SquareConnect.OrderPricingOptions(); + //expect(instance).to.be.a(SquareConnect.OrderPricingOptions); + }); + + it('should have the property autoApplyDiscounts (base name: "auto_apply_discounts")', function() { + // uncomment below and update the code to test the property autoApplyDiscounts + //var instane = new SquareConnect.OrderPricingOptions(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/PublishInvoiceRequest.spec.js b/test/model/PublishInvoiceRequest.spec.js new file mode 100644 index 0000000..bd7411b --- /dev/null +++ b/test/model/PublishInvoiceRequest.spec.js @@ -0,0 +1,37 @@ +/** + * 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('PublishInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.PublishInvoiceRequest(); + }); + + it('should create an instance of PublishInvoiceRequest', function() { + // uncomment below and update the code to test PublishInvoiceRequest + //var instane = new SquareConnect.PublishInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.PublishInvoiceRequest); + }); + + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.PublishInvoiceRequest(); + //expect(instance).to.be(); + }); + it('should have the property idempotencyKey (base name: "idempotency_key")', function() { + // uncomment below and update the code to test the property idempotencyKey + //var instane = new SquareConnect.PublishInvoiceRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/PublishInvoiceResponse.spec.js b/test/model/PublishInvoiceResponse.spec.js new file mode 100644 index 0000000..d154fd0 --- /dev/null +++ b/test/model/PublishInvoiceResponse.spec.js @@ -0,0 +1,37 @@ +/** + * 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('PublishInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.PublishInvoiceResponse(); + }); + + it('should create an instance of PublishInvoiceResponse', function() { + // uncomment below and update the code to test PublishInvoiceResponse + //var instane = new SquareConnect.PublishInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.PublishInvoiceResponse); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.PublishInvoiceResponse(); + //expect(instance).to.be(); + }); + 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.PublishInvoiceResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/Range.spec.js b/test/model/Range.spec.js new file mode 100644 index 0000000..1e00eb6 --- /dev/null +++ b/test/model/Range.spec.js @@ -0,0 +1,37 @@ +/** + * 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('Range', function() { + beforeEach(function() { + this.api = new SquareConnect.Range(); + }); + + it('should create an instance of Range', function() { + // uncomment below and update the code to test Range + //var instane = new SquareConnect.Range(); + //expect(instance).to.be.a(SquareConnect.Range); + }); + + it('should have the property min (base name: "min")', function() { + // uncomment below and update the code to test the property min + //var instane = new SquareConnect.Range(); + //expect(instance).to.be(); + }); + it('should have the property max (base name: "max")', function() { + // uncomment below and update the code to test the property max + //var instane = new SquareConnect.Range(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchCatalogItemsRequest.spec.js b/test/model/SearchCatalogItemsRequest.spec.js new file mode 100644 index 0000000..fa679e8 --- /dev/null +++ b/test/model/SearchCatalogItemsRequest.spec.js @@ -0,0 +1,72 @@ +/** + * 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('SearchCatalogItemsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchCatalogItemsRequest(); + }); + + it('should create an instance of SearchCatalogItemsRequest', function() { + // uncomment below and update the code to test SearchCatalogItemsRequest + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be.a(SquareConnect.SearchCatalogItemsRequest); + }); + + it('should have the property textFilter (base name: "text_filter")', function() { + // uncomment below and update the code to test the property textFilter + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property categoryIds (base name: "category_ids")', function() { + // uncomment below and update the code to test the property categoryIds + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property stockLevels (base name: "stock_levels")', function() { + // uncomment below and update the code to test the property stockLevels + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property enabledLocationIds (base name: "enabled_location_ids")', function() { + // uncomment below and update the code to test the property enabledLocationIds + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //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.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property limit (base name: "limit")', function() { + // uncomment below and update the code to test the property limit + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property sortOrder (base name: "sort_order")', function() { + // uncomment below and update the code to test the property sortOrder + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property productTypes (base name: "product_types")', function() { + // uncomment below and update the code to test the property productTypes + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); + it('should have the property customAttributeFilters (base name: "custom_attribute_filters")', function() { + // uncomment below and update the code to test the property customAttributeFilters + //var instane = new SquareConnect.SearchCatalogItemsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchCatalogItemsRequestStockLevel.spec.js b/test/model/SearchCatalogItemsRequestStockLevel.spec.js new file mode 100644 index 0000000..d75775f --- /dev/null +++ b/test/model/SearchCatalogItemsRequestStockLevel.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('SearchCatalogItemsRequestStockLevel', function() { + beforeEach(function() { + }); + + it('should create an instance of SearchCatalogItemsRequestStockLevel', function() { + // uncomment below and update the code to test SearchCatalogItemsRequestStockLevel + //var instane = new SquareConnect.SearchCatalogItemsRequestStockLevel(); + //expect(instance).to.be.a(SquareConnect.SearchCatalogItemsRequestStockLevel); + }); + +}); diff --git a/test/model/SearchCatalogItemsResponse.spec.js b/test/model/SearchCatalogItemsResponse.spec.js new file mode 100644 index 0000000..766fc3d --- /dev/null +++ b/test/model/SearchCatalogItemsResponse.spec.js @@ -0,0 +1,47 @@ +/** + * 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('SearchCatalogItemsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchCatalogItemsResponse(); + }); + + it('should create an instance of SearchCatalogItemsResponse', function() { + // uncomment below and update the code to test SearchCatalogItemsResponse + //var instane = new SquareConnect.SearchCatalogItemsResponse(); + //expect(instance).to.be.a(SquareConnect.SearchCatalogItemsResponse); + }); + + 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.SearchCatalogItemsResponse(); + //expect(instance).to.be(); + }); + it('should have the property items (base name: "items")', function() { + // uncomment below and update the code to test the property items + //var instane = new SquareConnect.SearchCatalogItemsResponse(); + //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.SearchCatalogItemsResponse(); + //expect(instance).to.be(); + }); + it('should have the property matchedVariationIds (base name: "matched_variation_ids")', function() { + // uncomment below and update the code to test the property matchedVariationIds + //var instane = new SquareConnect.SearchCatalogItemsResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchInvoicesRequest.spec.js b/test/model/SearchInvoicesRequest.spec.js new file mode 100644 index 0000000..38e191c --- /dev/null +++ b/test/model/SearchInvoicesRequest.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('SearchInvoicesRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchInvoicesRequest(); + }); + + it('should create an instance of SearchInvoicesRequest', function() { + // uncomment below and update the code to test SearchInvoicesRequest + //var instane = new SquareConnect.SearchInvoicesRequest(); + //expect(instance).to.be.a(SquareConnect.SearchInvoicesRequest); + }); + + it('should have the property query (base name: "query")', function() { + // uncomment below and update the code to test the property query + //var instane = new SquareConnect.SearchInvoicesRequest(); + //expect(instance).to.be(); + }); + it('should have the property limit (base name: "limit")', function() { + // uncomment below and update the code to test the property limit + //var instane = new SquareConnect.SearchInvoicesRequest(); + //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.SearchInvoicesRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchInvoicesResponse.spec.js b/test/model/SearchInvoicesResponse.spec.js new file mode 100644 index 0000000..36ad2e2 --- /dev/null +++ b/test/model/SearchInvoicesResponse.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('SearchInvoicesResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchInvoicesResponse(); + }); + + it('should create an instance of SearchInvoicesResponse', function() { + // uncomment below and update the code to test SearchInvoicesResponse + //var instane = new SquareConnect.SearchInvoicesResponse(); + //expect(instance).to.be.a(SquareConnect.SearchInvoicesResponse); + }); + + it('should have the property invoices (base name: "invoices")', function() { + // uncomment below and update the code to test the property invoices + //var instane = new SquareConnect.SearchInvoicesResponse(); + //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.SearchInvoicesResponse(); + //expect(instance).to.be(); + }); + 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.SearchInvoicesResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/UpdateInvoiceRequest.spec.js b/test/model/UpdateInvoiceRequest.spec.js new file mode 100644 index 0000000..3661e23 --- /dev/null +++ b/test/model/UpdateInvoiceRequest.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('UpdateInvoiceRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.UpdateInvoiceRequest(); + }); + + it('should create an instance of UpdateInvoiceRequest', function() { + // uncomment below and update the code to test UpdateInvoiceRequest + //var instane = new SquareConnect.UpdateInvoiceRequest(); + //expect(instance).to.be.a(SquareConnect.UpdateInvoiceRequest); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.UpdateInvoiceRequest(); + //expect(instance).to.be(); + }); + it('should have the property idempotencyKey (base name: "idempotency_key")', function() { + // uncomment below and update the code to test the property idempotencyKey + //var instane = new SquareConnect.UpdateInvoiceRequest(); + //expect(instance).to.be(); + }); + it('should have the property fieldsToClear (base name: "fields_to_clear")', function() { + // uncomment below and update the code to test the property fieldsToClear + //var instane = new SquareConnect.UpdateInvoiceRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/UpdateInvoiceResponse.spec.js b/test/model/UpdateInvoiceResponse.spec.js new file mode 100644 index 0000000..fe94f9e --- /dev/null +++ b/test/model/UpdateInvoiceResponse.spec.js @@ -0,0 +1,37 @@ +/** + * 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('UpdateInvoiceResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.UpdateInvoiceResponse(); + }); + + it('should create an instance of UpdateInvoiceResponse', function() { + // uncomment below and update the code to test UpdateInvoiceResponse + //var instane = new SquareConnect.UpdateInvoiceResponse(); + //expect(instance).to.be.a(SquareConnect.UpdateInvoiceResponse); + }); + + it('should have the property invoice (base name: "invoice")', function() { + // uncomment below and update the code to test the property invoice + //var instane = new SquareConnect.UpdateInvoiceResponse(); + //expect(instance).to.be(); + }); + 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.UpdateInvoiceResponse(); + //expect(instance).to.be(); + }); +});