From fa60202dd992083e4ace0d0ffecb69d76ef63578 Mon Sep 17 00:00:00 2001 From: Connect API Specification Generator Date: Wed, 28 Oct 2020 19:12:08 +0000 Subject: [PATCH] Release 4.20201028.5 --- CHANGES.md | 44 +++- README.md | 24 +- docs/ApplePayApi.md | 2 +- docs/BankAccountsApi.md | 16 +- docs/BatchDeleteCatalogObjectsResponse.md | 2 +- docs/BatchRetrieveCatalogObjectsResponse.md | 2 +- docs/BatchUpsertCatalogObjectsResponse.md | 2 +- docs/BusinessHoursPeriod.md | 4 +- docs/CancelPaymentByIdempotencyKeyRequest.md | 4 +- docs/CancelPaymentByIdempotencyKeyResponse.md | 2 +- docs/CancelPaymentRequest.md | 2 +- docs/CancelPaymentResponse.md | 4 +- docs/CancelTerminalCheckoutRequest.md | 1 - docs/CancelTerminalCheckoutResponse.md | 3 +- docs/CancelTerminalRefundRequest.md | 12 + docs/CancelTerminalRefundResponse.md | 14 ++ docs/CashDrawersApi.md | 24 +- docs/CatalogApi.md | 32 +-- docs/CatalogCustomAttributeDefinition.md | 6 +- docs/CatalogIdMapping.md | 2 +- docs/CatalogInfoResponse.md | 4 +- docs/CatalogItemOption.md | 1 - docs/CatalogItemOptionValue.md | 1 - docs/CatalogObject.md | 4 +- docs/CatalogPricingRule.md | 12 +- docs/CatalogQuery.md | 13 +- docs/CatalogQueryExact.md | 4 +- docs/CatalogQuerySet.md | 13 + docs/CatalogTax.md | 2 +- docs/CatalogTimePeriod.md | 2 +- docs/CheckoutApi.md | 4 +- docs/CompletePaymentRequest.md | 2 +- docs/CompletePaymentResponse.md | 6 +- docs/CreateCatalogImageResponse.md | 2 +- docs/CreateCustomerRequest.md | 2 +- docs/CreateDeviceCodeRequest.md | 1 - docs/CreateDeviceCodeResponse.md | 1 - docs/CreatePaymentRequest.md | 32 +-- docs/CreatePaymentResponse.md | 4 +- docs/CreateTerminalCheckoutRequest.md | 3 +- docs/CreateTerminalCheckoutResponse.md | 1 - docs/CreateTerminalRefundRequest.md | 14 ++ docs/CreateTerminalRefundResponse.md | 14 ++ docs/CustomAttributeFilter.md | 12 +- docs/Customer.md | 2 +- docs/CustomerGroupsApi.md | 12 +- docs/CustomerSegmentsApi.md | 4 +- docs/CustomersApi.md | 40 +-- docs/DeleteCatalogObjectResponse.md | 2 +- docs/DeviceCheckoutOptions.md | 3 +- docs/DeviceCode.md | 1 - docs/DeviceCodeStatus.md | 4 + docs/DevicesApi.md | 15 +- docs/DisputesApi.md | 26 +- docs/EmployeesApi.md | 10 +- docs/ErrorCode.md | 4 + docs/GetDeviceCodeRequest.md | 1 - docs/GetDeviceCodeResponse.md | 1 - docs/GetPaymentRequest.md | 2 +- docs/GetPaymentResponse.md | 2 +- docs/GetTerminalCheckoutRequest.md | 1 - docs/GetTerminalCheckoutResponse.md | 3 +- docs/GetTerminalRefundRequest.md | 12 + docs/GetTerminalRefundResponse.md | 14 ++ docs/InlineTypes.md | 12 + docs/InventoryApi.md | 22 +- docs/Invoice.md | 6 +- docs/InvoicePaymentRequest.md | 2 +- docs/InvoicesApi.md | 28 +-- docs/LaborApi.md | 52 ++-- docs/ListCatalogResponse.md | 2 +- docs/ListDeviceCodesRequest.md | 2 +- docs/ListDeviceCodesResponse.md | 1 - docs/ListPaymentsRequest.md | 20 +- docs/ListPaymentsResponse.md | 6 +- docs/Location.md | 3 +- docs/LocationsApi.md | 14 +- docs/LoyaltyAccount.md | 2 +- docs/LoyaltyAccountMapping.md | 2 +- docs/LoyaltyApi.md | 52 ++-- docs/MerchantsApi.md | 4 +- docs/MobileAuthorizationApi.md | 2 +- docs/OAuthApi.md | 8 +- docs/OrdersApi.md | 65 ++++- docs/PaymentOptions.md | 3 +- docs/PaymentsApi.md | 64 ++--- docs/RefundsApi.md | 24 +- docs/RetrieveCatalogObjectRequest.md | 2 +- docs/RetrieveCatalogObjectResponse.md | 6 +- docs/RetrieveOrderRequest.md | 11 + docs/RetrieveOrderResponse.md | 13 + docs/SearchCatalogItemsRequest.md | 2 +- docs/SearchCatalogItemsResponse.md | 2 +- docs/SearchCatalogObjectsResponse.md | 2 +- ...yaltyAccountsRequestLoyaltyAccountQuery.md | 3 +- docs/SearchTerminalCheckoutsRequest.md | 5 +- docs/SearchTerminalCheckoutsResponse.md | 1 - docs/SearchTerminalRefundsRequest.md | 15 ++ docs/SearchTerminalRefundsResponse.md | 15 ++ docs/SubscriptionsApi.md | 18 +- docs/TeamApi.md | 26 +- docs/Tender.md | 1 - docs/TenderBankTransferDetails.md | 12 - docs/TenderBankTransferDetailsStatus.md | 12 - docs/TenderType.md | 2 +- docs/TerminalApi.md | 214 +++++++++++++++- docs/TerminalCheckout.md | 11 +- docs/TerminalCheckoutQuery.md | 1 - docs/TerminalCheckoutQueryFilter.md | 1 - docs/TerminalCheckoutQuerySort.md | 1 - docs/TerminalRefund.md | 24 ++ docs/TerminalRefundQuery.md | 14 ++ docs/TerminalRefundQueryFilter.md | 15 ++ docs/TerminalRefundQuerySort.md | 13 + docs/TipSettings.md | 1 - docs/TransactionsApi.md | 42 ++-- docs/UpdateCustomerRequest.md | 2 +- docs/UpdateInvoiceRequest.md | 2 +- docs/UpdateItemModifierListsResponse.md | 4 +- docs/UpdateItemTaxesResponse.md | 2 +- docs/UpsertCatalogObjectResponse.md | 2 +- docs/V1EmployeesApi.md | 86 +++---- docs/V1ItemsApi.md | 196 +++++++-------- docs/V1TransactionsApi.md | 76 +++--- docs/VersionedCatalogObject.md | 13 + package.json | 2 +- src/ApiClient.js | 4 +- src/api/ApplePayApi.js | 2 +- src/api/BankAccountsApi.js | 18 +- src/api/CashDrawersApi.js | 6 +- src/api/CatalogApi.js | 36 +-- src/api/CheckoutApi.js | 2 +- src/api/CustomerGroupsApi.js | 10 +- src/api/CustomerSegmentsApi.js | 4 +- src/api/CustomersApi.js | 32 +-- src/api/DevicesApi.js | 14 +- src/api/DisputesApi.js | 16 +- src/api/EmployeesApi.js | 4 +- src/api/InventoryApi.js | 14 +- src/api/InvoicesApi.js | 16 +- src/api/LaborApi.js | 32 +-- src/api/LocationsApi.js | 20 +- src/api/LoyaltyApi.js | 66 ++--- src/api/MerchantsApi.js | 4 +- src/api/MobileAuthorizationApi.js | 2 +- src/api/OAuthApi.js | 6 +- src/api/OrdersApi.js | 66 ++++- src/api/PaymentsApi.js | 84 +++---- src/api/RefundsApi.js | 14 +- src/api/SubscriptionsApi.js | 12 +- src/api/TeamApi.js | 28 +-- src/api/TerminalApi.js | 236 +++++++++++++++++- src/api/TransactionsApi.js | 14 +- src/api/V1EmployeesApi.js | 32 +-- src/api/V1ItemsApi.js | 80 +++--- src/api/V1LocationsApi.js | 4 +- src/api/V1TransactionsApi.js | 22 +- src/index.js | 116 ++++++++- .../BatchDeleteCatalogObjectsResponse.js | 2 +- .../BatchRetrieveCatalogObjectsResponse.js | 2 +- .../BatchUpsertCatalogObjectsResponse.js | 2 +- src/model/BusinessHoursPeriod.js | 4 +- .../CancelPaymentByIdempotencyKeyRequest.js | 6 +- .../CancelPaymentByIdempotencyKeyResponse.js | 2 +- src/model/CancelPaymentRequest.js | 2 +- src/model/CancelPaymentResponse.js | 4 +- src/model/CancelTerminalCheckoutRequest.js | 1 - src/model/CancelTerminalCheckoutResponse.js | 3 +- src/model/CancelTerminalRefundRequest.js | 57 +++++ src/model/CancelTerminalRefundResponse.js | 77 ++++++ src/model/CatalogCustomAttributeDefinition.js | 8 +- src/model/CatalogIdMapping.js | 2 +- src/model/CatalogInfoResponse.js | 4 +- src/model/CatalogItemOption.js | 9 - src/model/CatalogItemOptionValue.js | 9 - src/model/CatalogObject.js | 4 +- src/model/CatalogPricingRule.js | 12 +- src/model/CatalogQuery.js | 22 +- src/model/CatalogQueryExact.js | 6 +- src/model/CatalogQuerySet.js | 76 ++++++ src/model/CatalogTax.js | 2 +- src/model/CatalogTimePeriod.js | 2 +- src/model/CompletePaymentRequest.js | 2 +- src/model/CompletePaymentResponse.js | 6 +- src/model/CreateCatalogImageResponse.js | 2 +- src/model/CreateCustomerRequest.js | 2 +- src/model/CreateDeviceCodeRequest.js | 1 - src/model/CreateDeviceCodeResponse.js | 1 - src/model/CreatePaymentRequest.js | 38 +-- src/model/CreatePaymentResponse.js | 4 +- src/model/CreateTerminalCheckoutRequest.js | 5 +- src/model/CreateTerminalCheckoutResponse.js | 1 - src/model/CreateTerminalRefundRequest.js | 77 ++++++ src/model/CreateTerminalRefundResponse.js | 77 ++++++ src/model/CustomAttributeFilter.js | 12 +- src/model/Customer.js | 2 +- src/model/DeleteCatalogObjectResponse.js | 2 +- src/model/DeviceCheckoutOptions.js | 5 +- src/model/DeviceCode.js | 1 - src/model/DeviceCodeStatus.js | 12 +- src/model/ErrorCode.js | 10 + src/model/GetDeviceCodeRequest.js | 1 - src/model/GetDeviceCodeResponse.js | 1 - src/model/GetPaymentRequest.js | 2 +- src/model/GetPaymentResponse.js | 2 +- src/model/GetTerminalCheckoutRequest.js | 1 - src/model/GetTerminalCheckoutResponse.js | 3 +- src/model/GetTerminalRefundRequest.js | 57 +++++ src/model/GetTerminalRefundResponse.js | 77 ++++++ ...ransferDetailsStatus.js => InlineTypes.js} | 18 +- src/model/Invoice.js | 6 +- src/model/InvoicePaymentRequest.js | 2 +- src/model/ListCatalogResponse.js | 2 +- src/model/ListDeviceCodesRequest.js | 10 +- src/model/ListDeviceCodesResponse.js | 1 - src/model/ListPaymentsRequest.js | 20 +- src/model/ListPaymentsResponse.js | 6 +- src/model/Location.js | 11 +- src/model/LoyaltyAccount.js | 2 +- src/model/LoyaltyAccountMapping.js | 2 +- src/model/PaymentOptions.js | 3 +- src/model/RetrieveCatalogObjectRequest.js | 2 +- src/model/RetrieveCatalogObjectResponse.js | 6 +- src/model/RetrieveOrderRequest.js | 56 +++++ src/model/RetrieveOrderResponse.js | 76 ++++++ src/model/SearchCatalogItemsRequest.js | 2 +- src/model/SearchCatalogItemsResponse.js | 2 +- src/model/SearchCatalogObjectsResponse.js | 2 +- ...yaltyAccountsRequestLoyaltyAccountQuery.js | 11 +- src/model/SearchTerminalCheckoutsRequest.js | 5 +- src/model/SearchTerminalCheckoutsResponse.js | 1 - src/model/SearchTerminalRefundsRequest.js | 85 +++++++ src/model/SearchTerminalRefundsResponse.js | 86 +++++++ src/model/Tender.js | 10 - src/model/TenderBankTransferDetails.js | 65 ----- src/model/TenderType.js | 4 +- src/model/TerminalCheckout.js | 11 +- src/model/TerminalCheckoutQuery.js | 1 - src/model/TerminalCheckoutQueryFilter.js | 1 - src/model/TerminalCheckoutQuerySort.js | 1 - src/model/TerminalRefund.js | 168 +++++++++++++ src/model/TerminalRefundQuery.js | 77 ++++++ src/model/TerminalRefundQueryFilter.js | 85 +++++++ src/model/TerminalRefundQuerySort.js | 66 +++++ src/model/TipSettings.js | 1 - src/model/UpdateCustomerRequest.js | 2 +- src/model/UpdateInvoiceRequest.js | 4 +- src/model/UpdateItemModifierListsResponse.js | 4 +- src/model/UpdateItemTaxesResponse.js | 2 +- src/model/UpsertCatalogObjectResponse.js | 2 +- src/model/VersionedCatalogObject.js | 74 ++++++ test/api/LocationsApi.spec.js | 4 +- test/api/ReportingApi.spec.js | 53 ++++ .../AdditionalRecipientReceivable.spec.js | 59 +++++ ...dditionalRecipientReceivableRefund.spec.js | 59 +++++ .../model/CancelTerminalRefundRequest.spec.js | 27 ++ .../CancelTerminalRefundResponse.spec.js | 37 +++ test/model/CatalogQuerySet.spec.js | 37 +++ .../model/CreateTerminalRefundRequest.spec.js | 37 +++ .../CreateTerminalRefundResponse.spec.js | 37 +++ test/model/GetTerminalRefundRequest.spec.js | 27 ++ test/model/GetTerminalRefundResponse.spec.js | 37 +++ test/model/InlineTypes.spec.js | 26 ++ ...lRecipientReceivableRefundsRequest.spec.js | 49 ++++ ...RecipientReceivableRefundsResponse.spec.js | 44 ++++ ...itionalRecipientReceivablesRequest.spec.js | 49 ++++ ...tionalRecipientReceivablesResponse.spec.js | 44 ++++ test/model/MethodErrorCodes.spec.js | 32 +++ test/model/RetrieveOrderRequest.spec.js | 27 ++ test/model/RetrieveOrderResponse.spec.js | 37 +++ .../SearchTerminalRefundsRequest.spec.js | 42 ++++ .../SearchTerminalRefundsResponse.spec.js | 42 ++++ test/model/TerminalRefund.spec.js | 87 +++++++ test/model/TerminalRefundQuery.spec.js | 37 +++ test/model/TerminalRefundQueryFilter.spec.js | 42 ++++ test/model/TerminalRefundQuerySort.spec.js | 32 +++ test/model/VersionedCatalogObject.spec.js | 37 +++ 277 files changed, 4331 insertions(+), 1224 deletions(-) create mode 100644 docs/CancelTerminalRefundRequest.md create mode 100644 docs/CancelTerminalRefundResponse.md create mode 100644 docs/CatalogQuerySet.md create mode 100644 docs/CreateTerminalRefundRequest.md create mode 100644 docs/CreateTerminalRefundResponse.md create mode 100644 docs/GetTerminalRefundRequest.md create mode 100644 docs/GetTerminalRefundResponse.md create mode 100644 docs/InlineTypes.md create mode 100644 docs/RetrieveOrderRequest.md create mode 100644 docs/RetrieveOrderResponse.md create mode 100644 docs/SearchTerminalRefundsRequest.md create mode 100644 docs/SearchTerminalRefundsResponse.md delete mode 100644 docs/TenderBankTransferDetails.md delete mode 100644 docs/TenderBankTransferDetailsStatus.md create mode 100644 docs/TerminalRefund.md create mode 100644 docs/TerminalRefundQuery.md create mode 100644 docs/TerminalRefundQueryFilter.md create mode 100644 docs/TerminalRefundQuerySort.md create mode 100644 docs/VersionedCatalogObject.md create mode 100644 src/model/CancelTerminalRefundRequest.js create mode 100644 src/model/CancelTerminalRefundResponse.js create mode 100644 src/model/CatalogQuerySet.js create mode 100644 src/model/CreateTerminalRefundRequest.js create mode 100644 src/model/CreateTerminalRefundResponse.js create mode 100644 src/model/GetTerminalRefundRequest.js create mode 100644 src/model/GetTerminalRefundResponse.js rename src/model/{TenderBankTransferDetailsStatus.js => InlineTypes.js} (63%) create mode 100644 src/model/RetrieveOrderRequest.js create mode 100644 src/model/RetrieveOrderResponse.js create mode 100644 src/model/SearchTerminalRefundsRequest.js create mode 100644 src/model/SearchTerminalRefundsResponse.js delete mode 100644 src/model/TenderBankTransferDetails.js create mode 100644 src/model/TerminalRefund.js create mode 100644 src/model/TerminalRefundQuery.js create mode 100644 src/model/TerminalRefundQueryFilter.js create mode 100644 src/model/TerminalRefundQuerySort.js create mode 100644 src/model/VersionedCatalogObject.js create mode 100644 test/api/ReportingApi.spec.js create mode 100644 test/model/AdditionalRecipientReceivable.spec.js create mode 100644 test/model/AdditionalRecipientReceivableRefund.spec.js create mode 100644 test/model/CancelTerminalRefundRequest.spec.js create mode 100644 test/model/CancelTerminalRefundResponse.spec.js create mode 100644 test/model/CatalogQuerySet.spec.js create mode 100644 test/model/CreateTerminalRefundRequest.spec.js create mode 100644 test/model/CreateTerminalRefundResponse.spec.js create mode 100644 test/model/GetTerminalRefundRequest.spec.js create mode 100644 test/model/GetTerminalRefundResponse.spec.js create mode 100644 test/model/InlineTypes.spec.js create mode 100644 test/model/ListAdditionalRecipientReceivableRefundsRequest.spec.js create mode 100644 test/model/ListAdditionalRecipientReceivableRefundsResponse.spec.js create mode 100644 test/model/ListAdditionalRecipientReceivablesRequest.spec.js create mode 100644 test/model/ListAdditionalRecipientReceivablesResponse.spec.js create mode 100644 test/model/MethodErrorCodes.spec.js create mode 100644 test/model/RetrieveOrderRequest.spec.js create mode 100644 test/model/RetrieveOrderResponse.spec.js create mode 100644 test/model/SearchTerminalRefundsRequest.spec.js create mode 100644 test/model/SearchTerminalRefundsResponse.spec.js create mode 100644 test/model/TerminalRefund.spec.js create mode 100644 test/model/TerminalRefundQuery.spec.js create mode 100644 test/model/TerminalRefundQueryFilter.spec.js create mode 100644 test/model/TerminalRefundQuerySort.spec.js create mode 100644 test/model/VersionedCatalogObject.spec.js diff --git a/CHANGES.md b/CHANGES.md index 4b1eb52..ba8e02e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,37 @@ # Change Log +## Version 4.20201028.5 (2020-10-28T00:00) + +## Existing API updates + +* **Terminal API.** New endpoints to enable sellers in Canada refund Interac payments. + * New endpoints: + + * [CreateTerminalRefund](https://developer.squareup.com/reference/square_2020-10-28/terminal-api/create-terminal-refund) + * [GetTerminalRefund](https://developer.squareup.com/reference/square_2020-10-28/terminal-api/get-terminal-refund) + * [CancelTerminalRefund](https://developer.squareup.com/reference/square_2020-10-28/terminal-api/cancel-terminal-refund) + * [SearchTerminalRefunds](https://developer.squareup.com/reference/square_2020-10-28/terminal-api/search-terminal-refunds) + + * New webhooks: + * `terminal.refund.created`. Notification of a new Terminal refund request. + * `terminal.refund.updated`. Notification that a Terminal refund request state is changed. + + * New topic [Refund Interac Payments.](https://developer.squareup.com/docs/terminal-api/square-terminal-refunds). Describes how to refund Interac payments. + +* **Loyalty API (beta):** + * [SearchLoyaltyAccounts.](https://developer.squareup.com/reference/square_2020-10-28/loyalty-api/search-loyalty-accounts) The endpoint supports a new query parameter to search by customer ID. + +* **Locations API:** + * [Location](https://developer.squareup.com/reference/square_2020-10-28/objects/Location) object. Has a new read-only field,[full_format_logo_url](https://developer.squareup.com/reference/square_2020-10-28/objects/Location#definition__property-full_format_logo_url), which provides URL of a full-format logo image for the location. + * [Webhooks.](https://developer.squareup.com/docs/webhooks-api/subscribe-to-events#locations) The Locations API now supports notifications for when a location is created and when a location is updated. + +* **Orders API:** + * [RetrieveOrder](https://developer.squareup.com/reference/square_2020-10-28/orders-api/retrieve-order), new endpoint. For more information, see the [Retrieve Orders](https://developer.squareup.com/docs/orders-api/manage-orders#retrieve-orders) overview. + +* **Invoices API (beta):** + * [Invoice](https://developer.squareup.com/reference/square_2020-10-28/objects/Invoice) object. The [payment_requests](https://developer.squareup.com/reference/square_2020-10-28/objects/Invoice#definition__property-payment_requests) field can now contain up to 13 payment requests, with a maximum of 12 `INSTALLMENT` request types. This is a service-level change that applies to all Square API versions. For more information, see [Payment requests.](https://developer.squareup.com/docs/invoices-api/overview#payment-requests) + + ## Version 4.20200923.4 (2020-09-23T00:00) ## Existing API updates * Invoices API (beta) @@ -159,17 +191,17 @@ ## Version 3.20200422.0 (2020-04-22) ## API releases * **Terminal API.** The new Terminal API lets a custom third-party POS app integrate with the Square Terminal to send terminal checkout requests to collect payments. - * For an overview, see [Overview](/terminal-api/overview). + * For an overview, see [Overview](https://developer.squareup.com/docs/terminal-api/overview). * For technical reference, see [Terminal API](https://developer.squareup.com/reference/square/terminal-api). * **Devices API.** The new Devices API lets a custom third-party POS app generate a code used to sign in to a Square Terminal to create a pairing that lets the POS app send terminal checkout requests. For technical reference, see [Devices API](https://developer.squareup.com/reference/square/devices-api). * **Customer Groups API (beta).** The new Customer Groups API (Beta) enables full CRUD management of customer groups, including the ability to list, retrieve, create, update, and delete customer groups. Previously, this functionality was only available through the Square dashboard and point-of-sale product interfaces. - * For an overview, see [Overview](/customer-groups-api/what-it-does) + * For an overview, see [Overview](https://developer.squareup.com/docs/customer-groups-api/what-it-does) * For technical reference, see [Customer Groups](https://developer.squareup.com/reference/square/customer-groups-api). * **Customer Segments API (beta).** The new Customer Segments API (Beta) lets you list and retrieve customer segment (also called smart groups) information. Coupled with the new `segment_ids` field on the customer resource, this API lets you better understand and track the customer segments to which a customer belongs. - * For an overview, see [Overview](/customer-segmentss-api/what-it-does) + * For an overview, see [Overview](https://developer.squareup.com/docs/customer-segmentss-api/what-it-does) * For technical reference, see [Customer Segments]( https://developer.squareup.com/reference/square/customer-segments-api). @@ -207,7 +239,7 @@ * [CatalogQuickAmountsSettings](https://developer.squareup.com/reference/square/objects/CatalogQuickAmountsSettings) type. Added to support predefined custom payment amounts in the Square Register checkout dialog box. * ENUM`CatalogItemProductType`. The ENUM value `GIFT_CARD` is now deprecated. -* **Payments API.** See [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees) for updated information about permission requirements, Square reporting of the application fee collected by an app, and how to collect fees internationally. +* **Payments API.** See [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees) for updated information about permission requirements, Square reporting of the application fee collected by an app, and how to collect fees internationally. @@ -268,7 +300,7 @@ All SDKs have been updated to support the following changes: ## Version 2.3.0-20191217 (2019-12-17) !!!important -Square is excited to announce the public release of customized SDKs for [Java](https://github.com/square/square-java-sdk) and [.NET](https://github.com/square/square-dotnet-sdk). For more information, see [Square SDKs](/sdks). +Square is excited to announce the public release of customized SDKs for [Java](https://github.com/square/square-java-sdk) and [.NET](https://github.com/square/square-dotnet-sdk). For more information, see [Square SDKs](https://developer.squareup.com/docs/sdks). !!! * __GA release:__ SDKs updated to support new `receipt_url` and `receipt_number` fields added to the [Payment](https://developer.squareup.com/reference/square/objects/Payment) type. @@ -280,7 +312,7 @@ Square is excited to announce the public release of customized SDKs for [Java](h ## Version 2.20191120.0 (2019-11-20) !!!important -Square has begun the retirement process for Connect v1 APIs. See the [Connect v1 Retirement](/migrate-from-v1) information page for details. +Square has begun the retirement process for Connect v1 APIs. See the [Connect v1 Retirement](https://developer.squareup.com/docs/migrate-from-v1) information page for details. !!! * __GA releases:__ SDKs now support the new `modify_tax_basis` field to Discounts and v2 Sandbox diff --git a/README.md b/README.md index ff085fa..c997d06 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,7 @@ Class | Method | HTTP request | Description *SquareConnect.OrdersApi* | [**calculateOrder**](docs/OrdersApi.md#calculateOrder) | **POST** /v2/orders/calculate | CalculateOrder *SquareConnect.OrdersApi* | [**createOrder**](docs/OrdersApi.md#createOrder) | **POST** /v2/orders | CreateOrder *SquareConnect.OrdersApi* | [**payOrder**](docs/OrdersApi.md#payOrder) | **POST** /v2/orders/{order_id}/pay | PayOrder +*SquareConnect.OrdersApi* | [**retrieveOrder**](docs/OrdersApi.md#retrieveOrder) | **GET** /v2/orders/{order_id} | RetrieveOrder *SquareConnect.OrdersApi* | [**searchOrders**](docs/OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders *SquareConnect.OrdersApi* | [**updateOrder**](docs/OrdersApi.md#updateOrder) | **PUT** /v2/orders/{order_id} | UpdateOrder *SquareConnect.PaymentsApi* | [**cancelPayment**](docs/PaymentsApi.md#cancelPayment) | **POST** /v2/payments/{payment_id}/cancel | CancelPayment @@ -210,9 +211,13 @@ Class | Method | HTTP request | Description *SquareConnect.TeamApi* | [**updateTeamMember**](docs/TeamApi.md#updateTeamMember) | **PUT** /v2/team-members/{team_member_id} | UpdateTeamMember *SquareConnect.TeamApi* | [**updateWageSetting**](docs/TeamApi.md#updateWageSetting) | **PUT** /v2/team-members/{team_member_id}/wage-setting | UpdateWageSetting *SquareConnect.TerminalApi* | [**cancelTerminalCheckout**](docs/TerminalApi.md#cancelTerminalCheckout) | **POST** /v2/terminals/checkouts/{checkout_id}/cancel | CancelTerminalCheckout +*SquareConnect.TerminalApi* | [**cancelTerminalRefund**](docs/TerminalApi.md#cancelTerminalRefund) | **POST** /v2/terminals/refunds/{terminal_refund_id}/cancel | CancelTerminalRefund *SquareConnect.TerminalApi* | [**createTerminalCheckout**](docs/TerminalApi.md#createTerminalCheckout) | **POST** /v2/terminals/checkouts | CreateTerminalCheckout +*SquareConnect.TerminalApi* | [**createTerminalRefund**](docs/TerminalApi.md#createTerminalRefund) | **POST** /v2/terminals/refunds | CreateTerminalRefund *SquareConnect.TerminalApi* | [**getTerminalCheckout**](docs/TerminalApi.md#getTerminalCheckout) | **GET** /v2/terminals/checkouts/{checkout_id} | GetTerminalCheckout +*SquareConnect.TerminalApi* | [**getTerminalRefund**](docs/TerminalApi.md#getTerminalRefund) | **GET** /v2/terminals/refunds/{terminal_refund_id} | GetTerminalRefund *SquareConnect.TerminalApi* | [**searchTerminalCheckouts**](docs/TerminalApi.md#searchTerminalCheckouts) | **POST** /v2/terminals/checkouts/search | SearchTerminalCheckouts +*SquareConnect.TerminalApi* | [**searchTerminalRefunds**](docs/TerminalApi.md#searchTerminalRefunds) | **POST** /v2/terminals/refunds/search | SearchTerminalRefunds *SquareConnect.TransactionsApi* | [**captureTransaction**](docs/TransactionsApi.md#captureTransaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction *SquareConnect.TransactionsApi* | [**charge**](docs/TransactionsApi.md#charge) | **POST** /v2/locations/{location_id}/transactions | Charge *SquareConnect.TransactionsApi* | [**createRefund**](docs/TransactionsApi.md#createRefund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund | CreateRefund @@ -343,6 +348,8 @@ Class | Method | HTTP request | Description - [SquareConnect.CancelSubscriptionResponse](docs/CancelSubscriptionResponse.md) - [SquareConnect.CancelTerminalCheckoutRequest](docs/CancelTerminalCheckoutRequest.md) - [SquareConnect.CancelTerminalCheckoutResponse](docs/CancelTerminalCheckoutResponse.md) + - [SquareConnect.CancelTerminalRefundRequest](docs/CancelTerminalRefundRequest.md) + - [SquareConnect.CancelTerminalRefundResponse](docs/CancelTerminalRefundResponse.md) - [SquareConnect.CaptureTransactionRequest](docs/CaptureTransactionRequest.md) - [SquareConnect.CaptureTransactionResponse](docs/CaptureTransactionResponse.md) - [SquareConnect.Card](docs/Card.md) @@ -402,6 +409,7 @@ Class | Method | HTTP request | Description - [SquareConnect.CatalogQueryItemsForTax](docs/CatalogQueryItemsForTax.md) - [SquareConnect.CatalogQueryPrefix](docs/CatalogQueryPrefix.md) - [SquareConnect.CatalogQueryRange](docs/CatalogQueryRange.md) + - [SquareConnect.CatalogQuerySet](docs/CatalogQuerySet.md) - [SquareConnect.CatalogQuerySortedAttribute](docs/CatalogQuerySortedAttribute.md) - [SquareConnect.CatalogQueryText](docs/CatalogQueryText.md) - [SquareConnect.CatalogQuickAmount](docs/CatalogQuickAmount.md) @@ -462,6 +470,8 @@ Class | Method | HTTP request | Description - [SquareConnect.CreateTeamMemberResponse](docs/CreateTeamMemberResponse.md) - [SquareConnect.CreateTerminalCheckoutRequest](docs/CreateTerminalCheckoutRequest.md) - [SquareConnect.CreateTerminalCheckoutResponse](docs/CreateTerminalCheckoutResponse.md) + - [SquareConnect.CreateTerminalRefundRequest](docs/CreateTerminalRefundRequest.md) + - [SquareConnect.CreateTerminalRefundResponse](docs/CreateTerminalRefundResponse.md) - [SquareConnect.Currency](docs/Currency.md) - [SquareConnect.CustomAttributeFilter](docs/CustomAttributeFilter.md) - [SquareConnect.Customer](docs/Customer.md) @@ -538,6 +548,9 @@ Class | Method | HTTP request | Description - [SquareConnect.GetTeamMemberWageResponse](docs/GetTeamMemberWageResponse.md) - [SquareConnect.GetTerminalCheckoutRequest](docs/GetTerminalCheckoutRequest.md) - [SquareConnect.GetTerminalCheckoutResponse](docs/GetTerminalCheckoutResponse.md) + - [SquareConnect.GetTerminalRefundRequest](docs/GetTerminalRefundRequest.md) + - [SquareConnect.GetTerminalRefundResponse](docs/GetTerminalRefundResponse.md) + - [SquareConnect.InlineTypes](docs/InlineTypes.md) - [SquareConnect.InventoryAdjustment](docs/InventoryAdjustment.md) - [SquareConnect.InventoryAlertType](docs/InventoryAlertType.md) - [SquareConnect.InventoryChange](docs/InventoryChange.md) @@ -760,6 +773,8 @@ Class | Method | HTTP request | Description - [SquareConnect.RetrieveLoyaltyRewardResponse](docs/RetrieveLoyaltyRewardResponse.md) - [SquareConnect.RetrieveMerchantRequest](docs/RetrieveMerchantRequest.md) - [SquareConnect.RetrieveMerchantResponse](docs/RetrieveMerchantResponse.md) + - [SquareConnect.RetrieveOrderRequest](docs/RetrieveOrderRequest.md) + - [SquareConnect.RetrieveOrderResponse](docs/RetrieveOrderResponse.md) - [SquareConnect.RetrieveSubscriptionRequest](docs/RetrieveSubscriptionRequest.md) - [SquareConnect.RetrieveSubscriptionResponse](docs/RetrieveSubscriptionResponse.md) - [SquareConnect.RetrieveTeamMemberRequest](docs/RetrieveTeamMemberRequest.md) @@ -810,6 +825,8 @@ Class | Method | HTTP request | Description - [SquareConnect.SearchTeamMembersResponse](docs/SearchTeamMembersResponse.md) - [SquareConnect.SearchTerminalCheckoutsRequest](docs/SearchTerminalCheckoutsRequest.md) - [SquareConnect.SearchTerminalCheckoutsResponse](docs/SearchTerminalCheckoutsResponse.md) + - [SquareConnect.SearchTerminalRefundsRequest](docs/SearchTerminalRefundsRequest.md) + - [SquareConnect.SearchTerminalRefundsResponse](docs/SearchTerminalRefundsResponse.md) - [SquareConnect.Shift](docs/Shift.md) - [SquareConnect.ShiftFilter](docs/ShiftFilter.md) - [SquareConnect.ShiftFilterStatus](docs/ShiftFilterStatus.md) @@ -840,8 +857,6 @@ Class | Method | HTTP request | Description - [SquareConnect.TeamMemberStatus](docs/TeamMemberStatus.md) - [SquareConnect.TeamMemberWage](docs/TeamMemberWage.md) - [SquareConnect.Tender](docs/Tender.md) - - [SquareConnect.TenderBankTransferDetails](docs/TenderBankTransferDetails.md) - - [SquareConnect.TenderBankTransferDetailsStatus](docs/TenderBankTransferDetailsStatus.md) - [SquareConnect.TenderCardDetails](docs/TenderCardDetails.md) - [SquareConnect.TenderCardDetailsEntryMethod](docs/TenderCardDetailsEntryMethod.md) - [SquareConnect.TenderCardDetailsStatus](docs/TenderCardDetailsStatus.md) @@ -851,6 +866,10 @@ Class | Method | HTTP request | Description - [SquareConnect.TerminalCheckoutQuery](docs/TerminalCheckoutQuery.md) - [SquareConnect.TerminalCheckoutQueryFilter](docs/TerminalCheckoutQueryFilter.md) - [SquareConnect.TerminalCheckoutQuerySort](docs/TerminalCheckoutQuerySort.md) + - [SquareConnect.TerminalRefund](docs/TerminalRefund.md) + - [SquareConnect.TerminalRefundQuery](docs/TerminalRefundQuery.md) + - [SquareConnect.TerminalRefundQueryFilter](docs/TerminalRefundQueryFilter.md) + - [SquareConnect.TerminalRefundQuerySort](docs/TerminalRefundQuerySort.md) - [SquareConnect.TimeRange](docs/TimeRange.md) - [SquareConnect.TipSettings](docs/TipSettings.md) - [SquareConnect.Transaction](docs/Transaction.md) @@ -1044,6 +1063,7 @@ Class | Method | HTTP request | Description - [SquareConnect.V1Variation](docs/V1Variation.md) - [SquareConnect.V1VariationInventoryAlertType](docs/V1VariationInventoryAlertType.md) - [SquareConnect.V1VariationPricingType](docs/V1VariationPricingType.md) + - [SquareConnect.VersionedCatalogObject](docs/VersionedCatalogObject.md) - [SquareConnect.VoidTransactionRequest](docs/VoidTransactionRequest.md) - [SquareConnect.VoidTransactionResponse](docs/VoidTransactionResponse.md) - [SquareConnect.WageSetting](docs/WageSetting.md) diff --git a/docs/ApplePayApi.md b/docs/ApplePayApi.md index 43420e0..110c8f1 100644 --- a/docs/ApplePayApi.md +++ b/docs/ApplePayApi.md @@ -26,7 +26,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.ApplePayApi(); -var body = new SquareConnect.RegisterDomainRequest(); // RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.ApplePayApi.constructFromObject({}); // RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.registerDomain(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/BankAccountsApi.md b/docs/BankAccountsApi.md index f63729d..79b9883 100644 --- a/docs/BankAccountsApi.md +++ b/docs/BankAccountsApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description GetBankAccount -Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). +Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. ### Example ```javascript @@ -28,7 +28,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.BankAccountsApi(); -var bankAccountId = "bankAccountId_example"; // String | Square-issued ID of the desired `BankAccount`. +var bankAccountId = SquareConnect.BankAccountsApi.constructFromObject({}); // String | Square-issued ID of the desired `BankAccount`. apiInstance.getBankAccount(bankAccountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -63,7 +63,7 @@ Name | Type | Description | Notes GetBankAccountByV1Id -Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-the-v1-bank-accounts-api). +Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. ### Example ```javascript @@ -76,7 +76,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.BankAccountsApi(); -var v1BankAccountId = "v1BankAccountId_example"; // String | Connect V1 ID of the desired `BankAccount`. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). +var v1BankAccountId = SquareConnect.BankAccountsApi.constructFromObject({}); // String | Connect V1 ID of the desired `BankAccount`. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). apiInstance.getBankAccountByV1Id(v1BankAccountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -111,7 +111,7 @@ Name | Type | Description | Notes ListBankAccounts -Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). +Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. ### Example ```javascript @@ -125,9 +125,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.BankAccountsApi(); var opts = { - 'cursor': "cursor_example", // String | The pagination cursor returned by a previous call to this endpoint. Use it in the next `ListBankAccounts` request to retrieve the next set of results. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. - 'limit': 56, // Number | Upper limit on the number of bank accounts to return in the response. Currently, 1000 is the largest supported limit. You can specify a limit of up to 1000 bank accounts. This is also the default limit. - 'locationId': "locationId_example" // String | Location ID. You can specify this optional filter to retrieve only the linked bank accounts belonging to a specific location. + 'cursor': SquareConnect.BankAccountsApi.constructFromObject({});, // String | The pagination cursor returned by a previous call to this endpoint. Use it in the next `ListBankAccounts` request to retrieve the next set of results. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. + 'limit': SquareConnect.BankAccountsApi.constructFromObject({});, // Number | Upper limit on the number of bank accounts to return in the response. Currently, 1000 is the largest supported limit. You can specify a limit of up to 1000 bank accounts. This is also the default limit. + 'locationId': SquareConnect.BankAccountsApi.constructFromObject({}); // String | Location ID. You can specify this optional filter to retrieve only the linked bank accounts belonging to a specific location. }; apiInstance.listBankAccounts(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/BatchDeleteCatalogObjectsResponse.md b/docs/BatchDeleteCatalogObjectsResponse.md index 4aafa5e..77349de 100644 --- a/docs/BatchDeleteCatalogObjectsResponse.md +++ b/docs/BatchDeleteCatalogObjectsResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | The set of Errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **deleted_object_ids** | **[String]** | The IDs of all CatalogObjects deleted by this request. | [optional] **deleted_at** | **String** | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] diff --git a/docs/BatchRetrieveCatalogObjectsResponse.md b/docs/BatchRetrieveCatalogObjectsResponse.md index 07d846d..fad94f9 100644 --- a/docs/BatchRetrieveCatalogObjectsResponse.md +++ b/docs/BatchRetrieveCatalogObjectsResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | The set of `Error`s encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **objects** | [**[CatalogObject]**](CatalogObject.md) | A list of `CatalogObject`s returned. | [optional] **related_objects** | [**[CatalogObject]**](CatalogObject.md) | A list of `CatalogObject`s referenced by the object in the `objects` field. | [optional] diff --git a/docs/BatchUpsertCatalogObjectsResponse.md b/docs/BatchUpsertCatalogObjectsResponse.md index 80ae9cf..53f9093 100644 --- a/docs/BatchUpsertCatalogObjectsResponse.md +++ b/docs/BatchUpsertCatalogObjectsResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors that encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **objects** | [**[CatalogObject]**](CatalogObject.md) | The created successfully created CatalogObjects. | [optional] **updated_at** | **String** | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **id_mappings** | [**[CatalogIdMapping]**](CatalogIdMapping.md) | The mapping between client and server IDs for this upsert. | [optional] diff --git a/docs/BusinessHoursPeriod.md b/docs/BusinessHoursPeriod.md index 4f172ab..62c76bf 100644 --- a/docs/BusinessHoursPeriod.md +++ b/docs/BusinessHoursPeriod.md @@ -8,7 +8,7 @@ Represents a period of time during which a business location is open. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **day_of_week** | **String** | The day of week for this time period. See [DayOfWeek](#type-dayofweek) for possible values | [optional] -**start_local_time** | **String** | The start time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional] -**end_local_time** | **String** | The end time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional] +**start_local_time** | **String** | The start time of a business hours period, specified in local time using partial-time RFC 3339 format. | [optional] +**end_local_time** | **String** | The end time of a business hours period, specified in local time using partial-time RFC 3339 format. | [optional] diff --git a/docs/CancelPaymentByIdempotencyKeyRequest.md b/docs/CancelPaymentByIdempotencyKeyRequest.md index 7fe8f2f..4fd811e 100644 --- a/docs/CancelPaymentByIdempotencyKeyRequest.md +++ b/docs/CancelPaymentByIdempotencyKeyRequest.md @@ -2,11 +2,11 @@ ### Description -Specifies idempotency key of a payment to cancel. +Specifies the idempotency key of a payment to cancel. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**idempotency_key** | **String** | `idempotency_key` identifying the payment to be canceled. | +**idempotency_key** | **String** | The `idempotency_key` identifying the payment to be canceled. | diff --git a/docs/CancelPaymentByIdempotencyKeyResponse.md b/docs/CancelPaymentByIdempotencyKeyResponse.md index 8e1de99..61c691c 100644 --- a/docs/CancelPaymentByIdempotencyKeyResponse.md +++ b/docs/CancelPaymentByIdempotencyKeyResponse.md @@ -2,7 +2,7 @@ ### Description -Return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` will be empty. +The return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` is empty. ## Properties Name | Type | Description | Notes diff --git a/docs/CancelPaymentRequest.md b/docs/CancelPaymentRequest.md index 2b70a1f..bfcf3a8 100644 --- a/docs/CancelPaymentRequest.md +++ b/docs/CancelPaymentRequest.md @@ -2,7 +2,7 @@ ### Description -Cancels (voids) a payment before it has been completed. Note: only payments created with `autocomplete` set to false can be canceled. +Cancels (voids) a payment before it has been completed. Note: Only payments created with `autocomplete` set to `false` can be canceled. ## Properties Name | Type | Description | Notes diff --git a/docs/CancelPaymentResponse.md b/docs/CancelPaymentResponse.md index 04f477f..6217e0d 100644 --- a/docs/CancelPaymentResponse.md +++ b/docs/CancelPaymentResponse.md @@ -2,12 +2,12 @@ ### Description -Return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint. +The return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] **payment** | [**Payment**](Payment.md) | The successfully canceled `Payment` object. | [optional] diff --git a/docs/CancelTerminalCheckoutRequest.md b/docs/CancelTerminalCheckoutRequest.md index ca013ce..de9a8cd 100644 --- a/docs/CancelTerminalCheckoutRequest.md +++ b/docs/CancelTerminalCheckoutRequest.md @@ -1,7 +1,6 @@ # SquareConnect.CancelTerminalCheckoutRequest ### Description -**Note: This model is in beta.** diff --git a/docs/CancelTerminalCheckoutResponse.md b/docs/CancelTerminalCheckoutResponse.md index 77644c7..dfc1b70 100644 --- a/docs/CancelTerminalCheckoutResponse.md +++ b/docs/CancelTerminalCheckoutResponse.md @@ -1,7 +1,6 @@ # SquareConnect.CancelTerminalCheckoutResponse ### Description -**Note: This model is in beta.** @@ -9,6 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] -**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The updated `TerminalCheckout` | [optional] +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The canceled `TerminalCheckout` | [optional] diff --git a/docs/CancelTerminalRefundRequest.md b/docs/CancelTerminalRefundRequest.md new file mode 100644 index 0000000..d3d9fe7 --- /dev/null +++ b/docs/CancelTerminalRefundRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.CancelTerminalRefundRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/CancelTerminalRefundResponse.md b/docs/CancelTerminalRefundResponse.md new file mode 100644 index 0000000..16303fb --- /dev/null +++ b/docs/CancelTerminalRefundResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CancelTerminalRefundResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**refund** | [**TerminalRefund**](TerminalRefund.md) | The updated `TerminalRefund` | [optional] + + diff --git a/docs/CashDrawersApi.md b/docs/CashDrawersApi.md index a066225..906be9e 100644 --- a/docs/CashDrawersApi.md +++ b/docs/CashDrawersApi.md @@ -28,13 +28,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CashDrawersApi(); -var locationId = "locationId_example"; // String | The ID of the location to list cash drawer shifts for. +var locationId = SquareConnect.CashDrawersApi.constructFromObject({}); // String | The ID of the location to list cash drawer shifts for. -var shiftId = "shiftId_example"; // String | The shift ID. +var shiftId = SquareConnect.CashDrawersApi.constructFromObject({}); // String | The shift ID. var opts = { - 'limit': 56, // Number | Number of resources to be returned in a page of results (200 by default, 1000 max). - 'cursor': "cursor_example" // String | Opaque cursor for fetching the next page of results. + 'limit': SquareConnect.CashDrawersApi.constructFromObject({});, // Number | Number of resources to be returned in a page of results (200 by default, 1000 max). + 'cursor': SquareConnect.CashDrawersApi.constructFromObject({}); // String | Opaque cursor for fetching the next page of results. }; apiInstance.listCashDrawerShiftEvents(locationId, shiftId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -85,14 +85,14 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CashDrawersApi(); -var locationId = "locationId_example"; // String | The ID of the location to query for a list of cash drawer shifts. +var locationId = SquareConnect.CashDrawersApi.constructFromObject({}); // String | The ID of the location to query for a list of cash drawer shifts. var opts = { - 'sortOrder': "sortOrder_example", // String | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC - 'beginTime': "beginTime_example", // String | The inclusive start time of the query on opened_at, in ISO 8601 format. - 'endTime': "endTime_example", // String | The exclusive end date of the query on opened_at, in ISO 8601 format. - 'limit': 56, // Number | Number of cash drawer shift events in a page of results (200 by default, 1000 max). - 'cursor': "cursor_example" // String | Opaque cursor for fetching the next page of results. + 'sortOrder': SquareConnect.CashDrawersApi.constructFromObject({});, // String | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC + 'beginTime': SquareConnect.CashDrawersApi.constructFromObject({});, // String | The inclusive start time of the query on opened_at, in ISO 8601 format. + 'endTime': SquareConnect.CashDrawersApi.constructFromObject({});, // String | The exclusive end date of the query on opened_at, in ISO 8601 format. + 'limit': SquareConnect.CashDrawersApi.constructFromObject({});, // Number | Number of cash drawer shift events in a page of results (200 by default, 1000 max). + 'cursor': SquareConnect.CashDrawersApi.constructFromObject({}); // String | Opaque cursor for fetching the next page of results. }; apiInstance.listCashDrawerShifts(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -145,9 +145,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CashDrawersApi(); -var locationId = "locationId_example"; // String | The ID of the location to retrieve cash drawer shifts from. +var locationId = SquareConnect.CashDrawersApi.constructFromObject({}); // String | The ID of the location to retrieve cash drawer shifts from. -var shiftId = "shiftId_example"; // String | The shift ID. +var shiftId = SquareConnect.CashDrawersApi.constructFromObject({}); // String | The shift ID. apiInstance.retrieveCashDrawerShift(locationId, shiftId).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md index 29cd78a..4c8dc87 100644 --- a/docs/CatalogApi.md +++ b/docs/CatalogApi.md @@ -37,7 +37,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.BatchDeleteCatalogObjectsRequest(); // BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchDeleteCatalogObjects(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -85,7 +85,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.BatchRetrieveCatalogObjectsRequest(); // BatchRetrieveCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // BatchRetrieveCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchRetrieveCatalogObjects(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -133,7 +133,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.BatchUpsertCatalogObjectsRequest(); // BatchUpsertCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // BatchUpsertCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchUpsertCatalogObjects(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -223,7 +223,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var objectId = "objectId_example"; // String | The ID of the catalog object to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a catalog item will delete its catalog item variations). +var objectId = SquareConnect.CatalogApi.constructFromObject({}); // String | The ID of the catalog object to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a catalog item will delete its catalog item variations). apiInstance.deleteCatalogObject(objectId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -272,8 +272,8 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); var opts = { - 'cursor': "cursor_example", // String | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. - 'types': "types_example" // String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the CatalogObjectType enum: `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. + 'cursor': SquareConnect.CatalogApi.constructFromObject({});, // String | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. + 'types': SquareConnect.CatalogApi.constructFromObject({}); // String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the CatalogObjectType enum: `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. }; apiInstance.listCatalog(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -322,10 +322,10 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var objectId = "objectId_example"; // String | The object ID of any type of catalog objects to be retrieved. +var objectId = SquareConnect.CatalogApi.constructFromObject({}); // String | The object ID of any type of catalog objects to be retrieved. var opts = { - 'includeRelatedObjects': true // Boolean | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` + 'includeRelatedObjects': SquareConnect.CatalogApi.constructFromObject({}); // Boolean | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` }; apiInstance.retrieveCatalogObject(objectId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -340,7 +340,7 @@ apiInstance.retrieveCatalogObject(objectId, opts).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **objectId** | **String**| The object ID of any type of catalog objects to be retrieved. | - **includeRelatedObjects** | **Boolean**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` | [optional] + **includeRelatedObjects** | **Boolean**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` | [optional] ### Return type @@ -362,7 +362,7 @@ Name | Type | Description | Notes 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. +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 @@ -375,7 +375,7 @@ 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. +var body = SquareConnect.CatalogApi.constructFromObject({}); // 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); @@ -410,7 +410,7 @@ Name | Type | Description | Notes SearchCatalogObjects -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. +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 @@ -423,7 +423,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.SearchCatalogObjectsRequest(); // SearchCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // SearchCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchCatalogObjects(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -471,7 +471,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.UpdateItemModifierListsRequest(); // UpdateItemModifierListsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // UpdateItemModifierListsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateItemModifierLists(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -519,7 +519,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.UpdateItemTaxesRequest(); // UpdateItemTaxesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // UpdateItemTaxesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateItemTaxes(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -567,7 +567,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CatalogApi(); -var body = new SquareConnect.UpsertCatalogObjectRequest(); // UpsertCatalogObjectRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CatalogApi.constructFromObject({}); // UpsertCatalogObjectRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.upsertCatalogObject(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/CatalogCustomAttributeDefinition.md b/docs/CatalogCustomAttributeDefinition.md index 13407ef..30310ac 100644 --- a/docs/CatalogCustomAttributeDefinition.md +++ b/docs/CatalogCustomAttributeDefinition.md @@ -9,16 +9,16 @@ Contains information defining a custom attribute. Custom attributes are intended Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | The type of this custom attribute. Cannot be modified after creation. Required. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values | -**name** | **String** | The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application_id) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. | +**name** | **String** | The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. | **description** | **String** | Seller-oriented description of the meaning of this Custom Attribute, any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs. | [optional] **source_application** | [**SourceApplication**](SourceApplication.md) | __Read only.__ Contains information about the application that created this custom attribute definition. | [optional] **allowed_object_types** | **[String]** | The set of Catalog Object Types that this Custom Attribute may be applied to. Currently, only `ITEM` and `ITEM_VARIATION` are allowed. At least one type must be included. See [CatalogObjectType](#type-catalogobjecttype) for possible values | **seller_visibility** | **String** | The visibility of a custom attribute in seller-facing UIs (including Square Point of Sale applications and Square Dashboard). May be modified. See [CatalogCustomAttributeDefinitionSellerVisibility](#type-catalogcustomattributedefinitionsellervisibility) for possible values | [optional] **app_visibility** | **String** | The visibility of a custom attribute to applications other than the application that created the attribute. See [CatalogCustomAttributeDefinitionAppVisibility](#type-catalogcustomattributedefinitionappvisibility) for possible values | [optional] **string_config** | [**CatalogCustomAttributeDefinitionStringConfig**](CatalogCustomAttributeDefinitionStringConfig.md) | Optionally, populated when `type` = `STRING`, unset otherwise. | [optional] -**number_config** | [**CatalogCustomAttributeDefinitionNumberConfig**](CatalogCustomAttributeDefinitionNumberConfig.md) | | [optional] +**number_config** | [**CatalogCustomAttributeDefinitionNumberConfig**](CatalogCustomAttributeDefinitionNumberConfig.md) | Optionally, populated when `type` = `NUMBER`, unset otherwise. | [optional] **selection_config** | [**CatalogCustomAttributeDefinitionSelectionConfig**](CatalogCustomAttributeDefinitionSelectionConfig.md) | Populated when `type` is set to `SELECTION`, unset otherwise. | [optional] **custom_attribute_usage_count** | **Number** | __Read-only.__ The number of custom attributes that reference this custom attribute definition. Set by the server in response to a ListCatalog request with `include_counts` set to `true`. If the actual count is greater than 100, `custom_attribute_usage_count` will be set to `100`. | [optional] -**key** | **String** | The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters [a-zA-Z0-9_-]. | [optional] +**key** | **String** | The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`. | [optional] diff --git a/docs/CatalogIdMapping.md b/docs/CatalogIdMapping.md index dd4af56..91c3d57 100644 --- a/docs/CatalogIdMapping.md +++ b/docs/CatalogIdMapping.md @@ -2,7 +2,7 @@ ### Description -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. +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 diff --git a/docs/CatalogInfoResponse.md b/docs/CatalogInfoResponse.md index bf85111..80b6b96 100644 --- a/docs/CatalogInfoResponse.md +++ b/docs/CatalogInfoResponse.md @@ -7,8 +7,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | The set of errors encountered. | [optional] -**limits** | [**CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**limits** | [**CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | Limits that apply to this API. | [optional] **standard_unit_description_group** | [**StandardUnitDescriptionGroup**](StandardUnitDescriptionGroup.md) | Names and abbreviations for standard units. | [optional] diff --git a/docs/CatalogItemOption.md b/docs/CatalogItemOption.md index 5f5ed55..1d9b0c8 100644 --- a/docs/CatalogItemOption.md +++ b/docs/CatalogItemOption.md @@ -13,6 +13,5 @@ Name | Type | Description | Notes **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/CatalogItemOptionValue.md b/docs/CatalogItemOptionValue.md index dbb9c8d..e9708e5 100644 --- a/docs/CatalogItemOptionValue.md +++ b/docs/CatalogItemOptionValue.md @@ -13,6 +13,5 @@ Name | Type | Description | Notes **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 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/CatalogObject.md b/docs/CatalogObject.md index ef8d658..c176bc0 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 `CatalogObject` of the `SUBSCRIPTION_PLAN` type, set the `subscription_plan_data` attribute to yield the `CatalogSubscriptionPlan` 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 `CatalogObject` of the `SUBSCRIPTION_PLAN` type, set the `subscription_plan_data` attribute to yield the `CatalogSubscriptionPlan` 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 @@ -12,7 +12,7 @@ Name | Type | Description | Notes **updated_at** | **String** | Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. | [optional] **version** | **Number** | The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. | [optional] **is_deleted** | **Boolean** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional] -**custom_attribute_values** | [**{String: CatalogCustomAttributeValue}**](CatalogCustomAttributeValue.md) | A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair is a `CatalogCustomAttributeValue` object. The key is the `key` attribute value defined in the associated `CatalogCustomAttributeDefinition` object defined by the application making the request. If the `CatalogCustomAttributeDefinition` object is defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of \"cocoa_brand\" and the defining application ID is \"abcd1234\", the key in the map is \"abcd1234:cocoa_brand\" if the application making the request is different from the application defining the custom attribute definition. Otherwise, the key used in the map is simply \"cocoa-brand\". Application-defined custom attributes that are set at a global (location-independent) level. Custom attribute values are intended to store additional information about a catalog object or associations with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). | [optional] [beta] +**custom_attribute_values** | [**{String: CatalogCustomAttributeValue}**](CatalogCustomAttributeValue.md) | A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair is a `CatalogCustomAttributeValue` object. The key is the `key` attribute value defined in the associated `CatalogCustomAttributeDefinition` object defined by the application making the request. If the `CatalogCustomAttributeDefinition` object is defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of `\"cocoa_brand\"` and the defining application ID is `\"abcd1234\"`, the key in the map is `\"abcd1234:cocoa_brand\"` if the application making the request is different from the application defining the custom attribute definition. Otherwise, the key used in the map is simply `\"cocoa_brand\"`. Application-defined custom attributes that are set at a global (location-independent) level. Custom attribute values are intended to store additional information about a catalog object or associations with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). | [optional] [beta] **catalog_v1_ids** | [**[CatalogV1Id]**](CatalogV1Id.md) | The Connect v1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional] **present_at_all_locations** | **Boolean** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | [optional] **present_at_location_ids** | **[String]** | A list of locations where the object is present, even if `present_at_all_locations` is `false`. | [optional] diff --git a/docs/CatalogPricingRule.md b/docs/CatalogPricingRule.md index f33b222..7507769 100644 --- a/docs/CatalogPricingRule.md +++ b/docs/CatalogPricingRule.md @@ -2,7 +2,7 @@ ### Description -Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period. +Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period. ## Properties Name | Type | Description | Notes @@ -10,13 +10,13 @@ Name | Type | Description | Notes **name** | **String** | User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". | [optional] **time_period_ids** | **[String]** | A list of unique IDs for the catalog time periods when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional] **discount_id** | **String** | Unique ID for the `CatalogDiscount` to take off the price of all matched items. | [optional] -**match_products_id** | **String** | Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule matches within the entire cart. A match rule can match multiple times in the cart. If no `ProductSet` is present, the rule will match all products. | [optional] +**match_products_id** | **String** | Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule matches within the entire cart, and can match multiple times. This field will always be set. | [optional] **apply_products_id** | **String** | __Deprecated__: Please use the `exclude_products_id` field to apply an exclude set instead. Exclude sets allow better control over quantity ranges and offer more flexibility for which matched items receive a discount. `CatalogProductSet` to apply the pricing to. An apply rule matches within the subset of the cart that fits the match rules (the match set). An apply rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional] [deprecated] **exclude_products_id** | **String** | `CatalogProductSet` to exclude from the pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional] -**valid_from_date** | **String** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] -**valid_from_local_time** | **String** | Represents the local time the pricing rule should be valid from. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] -**valid_until_date** | **String** | Represents the date the Pricing Rule is valid until. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] -**valid_until_local_time** | **String** | Represents the local time the pricing rule should be valid until. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] +**valid_from_date** | **String** | Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD). | [optional] +**valid_from_local_time** | **String** | Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] +**valid_until_date** | **String** | Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD). | [optional] +**valid_until_local_time** | **String** | Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] **exclude_strategy** | **String** | If an `exclude_products_id` was given, controls which subset of matched products is excluded from any discounts. Default value: `LEAST_EXPENSIVE` See [ExcludeStrategy](#type-excludestrategy) for possible values | [optional] diff --git a/docs/CatalogQuery.md b/docs/CatalogQuery.md index 3dec33b..3fb161d 100644 --- a/docs/CatalogQuery.md +++ b/docs/CatalogQuery.md @@ -2,19 +2,20 @@ ### Description -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. +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 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] +**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] +**set_query** | [**CatalogQuerySet**](CatalogQuerySet.md) | A set query expression to return objects with attribute name and value matching the specified attribute name and any of the specified attribute values 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] +**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 805f641..82f81b2 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. +The query filter to return the search 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. 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. | +**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/CatalogQuerySet.md b/docs/CatalogQuerySet.md new file mode 100644 index 0000000..c9ff424 --- /dev/null +++ b/docs/CatalogQuerySet.md @@ -0,0 +1,13 @@ +# SquareConnect.CatalogQuerySet + +### Description + +The query filter to return the search result(s) by exact match of the specified `attribute_name` and any of the `attribute_values`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **String** | The name of the attribute to be searched. Matching of the attribute name is exact. | +**attribute_values** | **[String]** | The desired values of the search attribute. Matching of the attribute values is exact and case insensitive. A maximum of 250 values may be searched in a request. | + + diff --git a/docs/CatalogTax.md b/docs/CatalogTax.md index ae58228..7741e11 100644 --- a/docs/CatalogTax.md +++ b/docs/CatalogTax.md @@ -12,6 +12,6 @@ Name | Type | Description | Notes **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] **applies_to_custom_amounts** | **Boolean** | If `true`, the fee applies to custom amounts entered into the Square Point of Sale app that are not associated with a particular `CatalogItem`. | [optional] -**enabled** | **Boolean** | If `true`, the tax will be shown as enabled in the Square Point of Sale app. | [optional] +**enabled** | **Boolean** | A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`). | [optional] diff --git a/docs/CatalogTimePeriod.md b/docs/CatalogTimePeriod.md index 2c7086c..473ddbc 100644 --- a/docs/CatalogTimePeriod.md +++ b/docs/CatalogTimePeriod.md @@ -7,6 +7,6 @@ Represents a time period - either a single period or a repeating period. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event** | **String** | An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. | [optional] +**event** | **String** | An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. | [optional] diff --git a/docs/CheckoutApi.md b/docs/CheckoutApi.md index a24f384..3c59539 100644 --- a/docs/CheckoutApi.md +++ b/docs/CheckoutApi.md @@ -26,9 +26,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CheckoutApi(); -var locationId = "locationId_example"; // String | The ID of the business location to associate the checkout with. +var locationId = SquareConnect.CheckoutApi.constructFromObject({}); // String | The ID of the business location to associate the checkout with. -var body = new SquareConnect.CreateCheckoutRequest(); // CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CheckoutApi.constructFromObject({}); // CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createCheckout(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/CompletePaymentRequest.md b/docs/CompletePaymentRequest.md index 250ed15..388dd12 100644 --- a/docs/CompletePaymentRequest.md +++ b/docs/CompletePaymentRequest.md @@ -2,7 +2,7 @@ ### Description -Completes (captures) a payment. By default, payments are set to autocomplete immediately after they are created. To complete payments manually, set `autocomplete` to false. +Completes (captures) a payment. By default, payments are set to `autocomplete` immediately after they are created. To complete payments manually, set `autocomplete` to `false`. ## Properties Name | Type | Description | Notes diff --git a/docs/CompletePaymentResponse.md b/docs/CompletePaymentResponse.md index 50ea0a8..4148ed3 100644 --- a/docs/CompletePaymentResponse.md +++ b/docs/CompletePaymentResponse.md @@ -2,12 +2,12 @@ ### Description -Return value from a [CompletePayment](#endpoint-payments-completepayment) call. +The return value from a [CompletePayment](#endpoint-payments-completepayment) call. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request | [optional] -**payment** | [**Payment**](Payment.md) | The successfully completed `Payment`. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] +**payment** | [**Payment**](Payment.md) | The successfully completed payment. | [optional] diff --git a/docs/CreateCatalogImageResponse.md b/docs/CreateCatalogImageResponse.md index 452438f..6cf931c 100644 --- a/docs/CreateCatalogImageResponse.md +++ b/docs/CreateCatalogImageResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **image** | [**CatalogObject**](CatalogObject.md) | The newly created `CatalogImage` including a Square-generated URL for each image. | [optional] diff --git a/docs/CreateCustomerRequest.md b/docs/CreateCustomerRequest.md index 17b8140..54e81a4 100644 --- a/docs/CreateCustomerRequest.md +++ b/docs/CreateCustomerRequest.md @@ -17,6 +17,6 @@ Name | Type | Description | Notes **phone_number** | **String** | The 11-digit phone number associated with the customer profile. | [optional] **reference_id** | **String** | An optional, second ID used to associate the customer profile with an entity in another system. | [optional] **note** | **String** | A custom note associated with the customer profile. | [optional] -**birthday** | **String** | The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] +**birthday** | **String** | The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] diff --git a/docs/CreateDeviceCodeRequest.md b/docs/CreateDeviceCodeRequest.md index 0ef7fe3..19ee414 100644 --- a/docs/CreateDeviceCodeRequest.md +++ b/docs/CreateDeviceCodeRequest.md @@ -1,7 +1,6 @@ # SquareConnect.CreateDeviceCodeRequest ### Description -**Note: This model is in beta.** diff --git a/docs/CreateDeviceCodeResponse.md b/docs/CreateDeviceCodeResponse.md index 293a05f..62c4686 100644 --- a/docs/CreateDeviceCodeResponse.md +++ b/docs/CreateDeviceCodeResponse.md @@ -1,7 +1,6 @@ # SquareConnect.CreateDeviceCodeResponse ### Description -**Note: This model is in beta.** diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md index 756df8b..0ebad1a 100644 --- a/docs/CreatePaymentRequest.md +++ b/docs/CreatePaymentRequest.md @@ -2,28 +2,28 @@ ### Description -Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees). +Creates a payment from a provided source (such as a nonce or a card on file). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds APIs Overview](/payments-api/overview). For information about application fees in a payment, see [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_id** | **String** | The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API. | -**idempotency_key** | **String** | A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | -**amount_money** | [**Money**](Money.md) | The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. | -**tip_money** | [**Money**](Money.md) | The amount designated as a tip, in addition to `amount_money` Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. | [optional] -**app_fee_money** | [**Money**](Money.md) | The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Cannot be more than 90% of the total amount of the Payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The fee currency code must match the currency associated with the merchant that is accepting the payment. The application must be from a developer account in the same country, and using the same currency code, as the merchant. For more information about the application fee scenario, see [Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). | [optional] -**delay_duration** | **String** | The duration of time after the payment's creation when Square automatically cancels the payment. This automatic cancellation applies only to payments that don't reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value of 1 minute. Notes: This feature is only supported for card payments. This parameter can only be set for a delayed capture payment (`autocomplete=false`). Default: - Card Present payments: \"PT36H\" (36 hours) from the creation time. - Card Not Present payments: \"P7D\" (7 days) from the creation time. | [optional] [beta] -**autocomplete** | **Boolean** | If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed (captured) or canceled (voided). For more information, see [Delayed Payments](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments). Default: true | [optional] -**order_id** | **String** | Associate a previously created order with this payment | [optional] -**customer_id** | **String** | The `Customer` ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API. | [optional] +**source_id** | **String** | The ID for the source of funds for this payment. This can be a nonce generated by the Square payment form or a card on file made with the Customers API. | +**idempotency_key** | **String** | A unique string that identifies this `CreatePayment` request. Keys can be any valid string but must be unique for every `CreatePayment` request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). | +**amount_money** | [**Money**](Money.md) | The amount of money to accept for this payment, not including `tip_money`. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The currency code must match the currency associated with the business that is accepting the payment. | +**tip_money** | [**Money**](Money.md) | The amount designated as a tip, in addition to `amount_money`. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The currency code must match the currency associated with the business that is accepting the payment. | [optional] +**app_fee_money** | [**Money**](Money.md) | The amount of money that the developer is taking as a fee for facilitating the payment on behalf of the seller. The amount cannot be more than 90% of the total amount of the payment. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The fee currency code must match the currency associated with the seller that is accepting the payment. The application must be from a developer account in the same country and using the same currency code as the seller. For more information about the application fee scenario, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). | [optional] +**delay_duration** | **String** | The duration of time after the payment's creation when Square automatically cancels the payment. This automatic cancellation applies only to payments that do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value of 1 minute. Note: This feature is only supported for card payments. This parameter can only be set for a delayed capture payment (`autocomplete=false`). Default: - Card-present payments: \"PT36H\" (36 hours) from the creation time. - Card-not-present payments: \"P7D\" (7 days) from the creation time. | [optional] [beta] +**autocomplete** | **Boolean** | If set to `true`, this payment will be completed when possible. If set to `false`, this payment is held in an approved state until either explicitly completed (captured) or canceled (voided). For more information, see [Delayed capture](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments). Default: true | [optional] +**order_id** | **String** | Associates a previously created order with this payment. | [optional] +**customer_id** | **String** | The `Customer` ID of the customer associated with the payment. This is required if the `source_id` refers to a card on file created using the Customers API. | [optional] **location_id** | **String** | The location ID to associate with the payment. If not specified, the default location is used. | [optional] -**reference_id** | **String** | A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters. | [optional] -**verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](https://developer.squareup.com/docs/sca-overview). | [optional] -**accept_partial_authorization** | **Boolean** | If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true`. For more information, see [Partial amount with Square gift cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false | [optional] [beta] -**buyer_email_address** | **String** | The buyer's e-mail address | [optional] +**reference_id** | **String** | A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system (for example, you might specify an order ID that is generated by a third-party shopping cart). Limit 40 characters. | [optional] +**verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. For more information, see [SCA Overview](https://developer.squareup.com/docs/sca-overview). | [optional] +**accept_partial_authorization** | **Boolean** | If set to `true` and charging a Square Gift Card, a payment might be returned with `amount_money` equal to less than what was requested. For example, a request for $20 when charging a Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose to prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card payment. This field cannot be `true` when `autocomplete = true`. For more information, see [Partial amount with Square Gift Cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false | [optional] [beta] +**buyer_email_address** | **String** | The buyer's email address. | [optional] **billing_address** | [**Address**](Address.md) | The buyer's billing address. | [optional] **shipping_address** | [**Address**](Address.md) | The buyer's shipping address. | [optional] -**note** | **String** | An optional note to be entered by the developer when creating a payment Limit 500 characters. | [optional] -**statement_description_identifier** | **String** | Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. | [optional] [beta] +**note** | **String** | An optional note to be entered by the developer when creating a payment. Limit 500 characters. | [optional] +**statement_description_identifier** | **String** | Optional additional payment information to include on the customer's card statement as part of the statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` might get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the seller taking the payment. | [optional] [beta] diff --git a/docs/CreatePaymentResponse.md b/docs/CreatePaymentResponse.md index ebec28b..15e16e6 100644 --- a/docs/CreatePaymentResponse.md +++ b/docs/CreatePaymentResponse.md @@ -2,12 +2,12 @@ ### Description -Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: if there are errors processing the request, the payment field may not be present, or it may be present with a status of `FAILED`. +Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: If there are errors processing the request, the payment field might not be present, or it might be present with a status of `FAILED`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] **payment** | [**Payment**](Payment.md) | The newly created payment. | [optional] diff --git a/docs/CreateTerminalCheckoutRequest.md b/docs/CreateTerminalCheckoutRequest.md index ba1d112..f1851c9 100644 --- a/docs/CreateTerminalCheckoutRequest.md +++ b/docs/CreateTerminalCheckoutRequest.md @@ -1,14 +1,13 @@ # SquareConnect.CreateTerminalCheckoutRequest ### Description -**Note: This model is in beta.** ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**idempotency_key** | **String** | A unique string that identifies this CreateCheckout request. Keys can be any valid string but must be unique for every CreateCheckout request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | +**idempotency_key** | **String** | A unique string that identifies this `CreateCheckout` request. Keys can be any valid string but must be unique for every `CreateCheckout` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | **checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The checkout to create. | diff --git a/docs/CreateTerminalCheckoutResponse.md b/docs/CreateTerminalCheckoutResponse.md index e703f9a..b3f93ed 100644 --- a/docs/CreateTerminalCheckoutResponse.md +++ b/docs/CreateTerminalCheckoutResponse.md @@ -1,7 +1,6 @@ # SquareConnect.CreateTerminalCheckoutResponse ### Description -**Note: This model is in beta.** diff --git a/docs/CreateTerminalRefundRequest.md b/docs/CreateTerminalRefundRequest.md new file mode 100644 index 0000000..dc5f5c3 --- /dev/null +++ b/docs/CreateTerminalRefundRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateTerminalRefundRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idempotency_key** | **String** | A unique string that identifies this `CreateRefund` request. Keys can be any valid string but must be unique for every `CreateRefund` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | +**refund** | [**TerminalRefund**](TerminalRefund.md) | The refund to create. | [optional] + + diff --git a/docs/CreateTerminalRefundResponse.md b/docs/CreateTerminalRefundResponse.md new file mode 100644 index 0000000..fa39053 --- /dev/null +++ b/docs/CreateTerminalRefundResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateTerminalRefundResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**refund** | [**TerminalRefund**](TerminalRefund.md) | The created `TerminalRefund` | [optional] + + diff --git a/docs/CustomAttributeFilter.md b/docs/CustomAttributeFilter.md index 1534133..d1fcf02 100644 --- a/docs/CustomAttributeFilter.md +++ b/docs/CustomAttributeFilter.md @@ -3,16 +3,16 @@ ### 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. +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] +**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] +**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/Customer.md b/docs/Customer.md index ec489ed..17a7761 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **email_address** | **String** | The email address associated with the customer profile. | [optional] **address** | [**Address**](Address.md) | The physical address associated with the customer profile. | [optional] **phone_number** | **String** | The 11-digit phone number associated with the customer profile. | [optional] -**birthday** | **String** | The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] +**birthday** | **String** | The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] **reference_id** | **String** | An optional, second ID used to associate the customer profile with an entity in another system. | [optional] **note** | **String** | A custom note associated with the customer profile. | [optional] **preferences** | [**CustomerPreferences**](CustomerPreferences.md) | Represents general customer preferences. | [optional] diff --git a/docs/CustomerGroupsApi.md b/docs/CustomerGroupsApi.md index bdbbb0a..bc7ad56 100644 --- a/docs/CustomerGroupsApi.md +++ b/docs/CustomerGroupsApi.md @@ -31,7 +31,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerGroupsApi(); -var body = new SquareConnect.CreateCustomerGroupRequest(); // CreateCustomerGroupRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomerGroupsApi.constructFromObject({}); // CreateCustomerGroupRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createCustomerGroup(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -80,7 +80,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerGroupsApi(); -var groupId = "groupId_example"; // String | The ID of the customer group to delete. +var groupId = SquareConnect.CustomerGroupsApi.constructFromObject({}); // String | The ID of the customer group to delete. apiInstance.deleteCustomerGroup(groupId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -130,7 +130,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerGroupsApi(); var opts = { - '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 your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. + 'cursor': SquareConnect.CustomerGroupsApi.constructFromObject({}); // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. }; apiInstance.listCustomerGroups(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -179,7 +179,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerGroupsApi(); -var groupId = "groupId_example"; // String | The ID of the customer group to retrieve. +var groupId = SquareConnect.CustomerGroupsApi.constructFromObject({}); // String | The ID of the customer group to retrieve. apiInstance.retrieveCustomerGroup(groupId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -228,9 +228,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerGroupsApi(); -var groupId = "groupId_example"; // String | The ID of the customer group to update. +var groupId = SquareConnect.CustomerGroupsApi.constructFromObject({}); // String | The ID of the customer group to update. -var body = new SquareConnect.UpdateCustomerGroupRequest(); // UpdateCustomerGroupRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomerGroupsApi.constructFromObject({}); // UpdateCustomerGroupRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateCustomerGroup(groupId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/CustomerSegmentsApi.md b/docs/CustomerSegmentsApi.md index 5156a9a..f54a769 100644 --- a/docs/CustomerSegmentsApi.md +++ b/docs/CustomerSegmentsApi.md @@ -29,7 +29,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerSegmentsApi(); var opts = { - 'cursor': "cursor_example" // String | A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. + 'cursor': SquareConnect.CustomerSegmentsApi.constructFromObject({}); // String | A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. }; apiInstance.listCustomerSegments(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -78,7 +78,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerSegmentsApi(); -var segmentId = "segmentId_example"; // String | The Square-issued ID of the customer segment. +var segmentId = SquareConnect.CustomerSegmentsApi.constructFromObject({}); // String | The Square-issued ID of the customer segment. apiInstance.retrieveCustomerSegment(segmentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index 6636ab4..f7e214b 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -36,9 +36,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer to add to a group. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer to add to a group. -var groupId = "groupId_example"; // String | The ID of the customer group to add the customer to. +var groupId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer group to add the customer to. apiInstance.addGroupToCustomer(customerId, groupId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -87,7 +87,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var body = new SquareConnect.CreateCustomerRequest(); // CreateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomersApi.constructFromObject({}); // CreateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createCustomer(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -135,9 +135,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The Square ID of the customer profile the card is linked to. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The Square ID of the customer profile the card is linked to. -var body = new SquareConnect.CreateCustomerCardRequest(); // CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomersApi.constructFromObject({}); // CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createCustomerCard(customerId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -186,7 +186,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer to delete. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer to delete. apiInstance.deleteCustomer(customerId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -234,9 +234,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer that the card on file belongs to. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer that the card on file belongs to. -var cardId = "cardId_example"; // String | The ID of the card on file to delete. +var cardId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the card on file to delete. apiInstance.deleteCustomerCard(customerId, cardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -272,7 +272,7 @@ Name | Type | Description | Notes ListCustomers -Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. +Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. ### Example ```javascript @@ -286,9 +286,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); var opts = { - '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 your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. - 'sortField': "sortField_example", // String | Indicates how Customers should be sorted. Default: `DEFAULT`. - 'sortOrder': "sortOrder_example" // String | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`. + 'cursor': SquareConnect.CustomersApi.constructFromObject({});, // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. + 'sortField': SquareConnect.CustomersApi.constructFromObject({});, // String | Indicates how Customers should be sorted. Default: `DEFAULT`. + 'sortOrder': SquareConnect.CustomersApi.constructFromObject({}); // String | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`. }; apiInstance.listCustomers(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -339,9 +339,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer to remove from the group. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer to remove from the group. -var groupId = "groupId_example"; // String | The ID of the customer group to remove the customer from. +var groupId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer group to remove the customer from. apiInstance.removeGroupFromCustomer(customerId, groupId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -390,7 +390,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer to retrieve. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer to retrieve. apiInstance.retrieveCustomer(customerId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -425,7 +425,7 @@ Name | Type | Description | Notes SearchCustomers -Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. +Searches the customer profiles associated with a Square account using a supported query filter. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. ### Example ```javascript @@ -438,7 +438,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var body = new SquareConnect.SearchCustomersRequest(); // SearchCustomersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomersApi.constructFromObject({}); // SearchCustomersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchCustomers(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -473,7 +473,7 @@ Name | Type | Description | Notes UpdateCustomer -Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint. +Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-Customers-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-Customers-createcustomercard) endpoint. ### Example ```javascript @@ -486,9 +486,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomersApi(); -var customerId = "customerId_example"; // String | The ID of the customer to update. +var customerId = SquareConnect.CustomersApi.constructFromObject({}); // String | The ID of the customer to update. -var body = new SquareConnect.UpdateCustomerRequest(); // UpdateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.CustomersApi.constructFromObject({}); // UpdateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateCustomer(customerId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/DeleteCatalogObjectResponse.md b/docs/DeleteCatalogObjectResponse.md index ab4ab82..4bdb897 100644 --- a/docs/DeleteCatalogObjectResponse.md +++ b/docs/DeleteCatalogObjectResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **deleted_object_ids** | **[String]** | The IDs of all catalog objects deleted by this request. Multiple IDs may be returned when associated objects are also deleted, for example a catalog item variation will be deleted (and its ID included in this field) when its parent catalog item is deleted. | [optional] **deleted_at** | **String** | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. | [optional] diff --git a/docs/DeviceCheckoutOptions.md b/docs/DeviceCheckoutOptions.md index d99a603..3f1304b 100644 --- a/docs/DeviceCheckoutOptions.md +++ b/docs/DeviceCheckoutOptions.md @@ -1,14 +1,13 @@ # SquareConnect.DeviceCheckoutOptions ### Description -**Note: This model is in beta.** ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**device_id** | **String** | The unique Id of the device intended for this `TerminalCheckout`. The Id can be retrieved from /v2/devices api. | +**device_id** | **String** | The unique ID of the device intended for this `TerminalCheckout`. A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint. Match a `DeviceCode.device_id` value with `device_id` to get the associated device code. | **skip_receipt_screen** | **Boolean** | Instruct the device to skip the receipt screen. Defaults to false. | [optional] **tip_settings** | [**TipSettings**](TipSettings.md) | Tip specific settings | [optional] diff --git a/docs/DeviceCode.md b/docs/DeviceCode.md index 118c65b..47a76cc 100644 --- a/docs/DeviceCode.md +++ b/docs/DeviceCode.md @@ -1,7 +1,6 @@ # SquareConnect.DeviceCode ### Description -**Note: This model is in beta.** diff --git a/docs/DeviceCodeStatus.md b/docs/DeviceCodeStatus.md index 4b60cbc..8d0987d 100644 --- a/docs/DeviceCodeStatus.md +++ b/docs/DeviceCodeStatus.md @@ -3,8 +3,12 @@ ## Enum +* `UNKNOWN` (value: `"UNKNOWN"`) + * `UNPAIRED` (value: `"UNPAIRED"`) * `PAIRED` (value: `"PAIRED"`) +* `EXPIRED` (value: `"EXPIRED"`) + diff --git a/docs/DevicesApi.md b/docs/DevicesApi.md index d44e5db..852d1c0 100644 --- a/docs/DevicesApi.md +++ b/docs/DevicesApi.md @@ -11,7 +11,6 @@ Method | HTTP request | Description # **createDeviceCode** -**Note: This endpoint is in beta.** > CreateDeviceCodeResponse createDeviceCode(body) CreateDeviceCode @@ -29,7 +28,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DevicesApi(); -var body = new SquareConnect.CreateDeviceCodeRequest(); // CreateDeviceCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.DevicesApi.constructFromObject({}); // CreateDeviceCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createDeviceCode(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -60,7 +59,6 @@ Name | Type | Description | Notes # **getDeviceCode** -**Note: This endpoint is in beta.** > GetDeviceCodeResponse getDeviceCode(id) GetDeviceCode @@ -78,7 +76,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DevicesApi(); -var id = "id_example"; // String | The unique identifier for the device code. +var id = SquareConnect.DevicesApi.constructFromObject({}); // String | The unique identifier for the device code. apiInstance.getDeviceCode(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -109,7 +107,6 @@ Name | Type | Description | Notes # **listDeviceCodes** -**Note: This endpoint is in beta.** > ListDeviceCodesResponse listDeviceCodes(opts) ListDeviceCodes @@ -128,9 +125,10 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DevicesApi(); var opts = { - '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 your original query. See [Paginating results](#paginatingresults) for more information. - 'locationId': "locationId_example", // String | If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. - 'productType': "productType_example" // String | If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. + 'cursor': SquareConnect.DevicesApi.constructFromObject({});, // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. + 'locationId': SquareConnect.DevicesApi.constructFromObject({});, // String | If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. + 'productType': SquareConnect.DevicesApi.constructFromObject({});, // String | If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. + 'status': SquareConnect.DevicesApi.constructFromObject({}); // String | If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. }; apiInstance.listDeviceCodes(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -147,6 +145,7 @@ Name | Type | Description | Notes **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. | [optional] **locationId** | **String**| If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. | [optional] **productType** | **String**| If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. | [optional] + **status** | **String**| If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. | [optional] ### Return type diff --git a/docs/DisputesApi.md b/docs/DisputesApi.md index 9bcc270..5374bfa 100644 --- a/docs/DisputesApi.md +++ b/docs/DisputesApi.md @@ -34,7 +34,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | ID of the dispute you want to accept. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | ID of the dispute you want to accept. apiInstance.acceptDispute(disputeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -83,9 +83,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute you want to upload evidence for. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute you want to upload evidence for. -var body = new SquareConnect.CreateDisputeEvidenceTextRequest(); // CreateDisputeEvidenceTextRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.DisputesApi.constructFromObject({}); // CreateDisputeEvidenceTextRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createDisputeEvidenceText(disputeId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -135,7 +135,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute. apiInstance.listDisputeEvidence(disputeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -185,9 +185,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); var opts = { - '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. For more information, see [Paginating](https://developer.squareup.com/docs/basics/api101/pagination). - 'states': "states_example", // String | The dispute states to filter the result. If not specified, the endpoint returns all open disputes (dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`). - 'locationId': "locationId_example" // String | The ID of the location for which to return a list of disputes. If not specified, the endpoint returns all open disputes (dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`) associated with all locations. + 'cursor': SquareConnect.DisputesApi.constructFromObject({});, // 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. For more information, see [Paginating](https://developer.squareup.com/docs/basics/api101/pagination). + 'states': SquareConnect.DisputesApi.constructFromObject({});, // String | The dispute states to filter the result. If not specified, the endpoint returns all open disputes (dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`). + 'locationId': SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the location for which to return a list of disputes. If not specified, the endpoint returns all open disputes (dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`) associated with all locations. }; apiInstance.listDisputes(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -238,9 +238,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute you want to remove evidence from. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute you want to remove evidence from. -var evidenceId = "evidenceId_example"; // String | The ID of the evidence you want to remove. +var evidenceId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the evidence you want to remove. apiInstance.removeDisputeEvidence(disputeId, evidenceId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -290,7 +290,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute you want more details about. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute you want more details about. apiInstance.retrieveDispute(disputeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -339,9 +339,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute that you want to retrieve evidence from. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute that you want to retrieve evidence from. -var evidenceId = "evidenceId_example"; // String | The ID of the evidence to retrieve. +var evidenceId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the evidence to retrieve. apiInstance.retrieveDisputeEvidence(disputeId, evidenceId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -391,7 +391,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.DisputesApi(); -var disputeId = "disputeId_example"; // String | The ID of the dispute you want to submit evidence for. +var disputeId = SquareConnect.DisputesApi.constructFromObject({}); // String | The ID of the dispute you want to submit evidence for. apiInstance.submitEvidence(disputeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/EmployeesApi.md b/docs/EmployeesApi.md index b404664..cf5c5eb 100644 --- a/docs/EmployeesApi.md +++ b/docs/EmployeesApi.md @@ -29,10 +29,10 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.EmployeesApi(); var opts = { - 'locationId': "locationId_example", // String | - 'status': "status_example", // String | Specifies the EmployeeStatus to filter the employee by. - 'limit': 56, // Number | The number of employees to be returned on each page. - 'cursor': "cursor_example" // String | The token required to retrieve the specified page of results. + 'locationId': SquareConnect.EmployeesApi.constructFromObject({});, // String | + 'status': SquareConnect.EmployeesApi.constructFromObject({});, // String | Specifies the EmployeeStatus to filter the employee by. + 'limit': SquareConnect.EmployeesApi.constructFromObject({});, // Number | The number of employees to be returned on each page. + 'cursor': SquareConnect.EmployeesApi.constructFromObject({}); // String | The token required to retrieve the specified page of results. }; apiInstance.listEmployees(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -84,7 +84,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.EmployeesApi(); -var id = "id_example"; // String | UUID for the employee that was requested. +var id = SquareConnect.EmployeesApi.constructFromObject({}); // String | UUID for the employee that was requested. apiInstance.retrieveEmployee(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index 5e1f97f..ccbcb1c 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -183,6 +183,10 @@ * `INVALID_CARD_DATA` (value: `"INVALID_CARD_DATA"`) +* `SOURCE_USED` (value: `"SOURCE_USED"`) + +* `SOURCE_EXPIRED` (value: `"SOURCE_EXPIRED"`) + * `LOCATION_MISMATCH` (value: `"LOCATION_MISMATCH"`) * `IDEMPOTENCY_KEY_REUSED` (value: `"IDEMPOTENCY_KEY_REUSED"`) diff --git a/docs/GetDeviceCodeRequest.md b/docs/GetDeviceCodeRequest.md index 5afe8c5..fd4284e 100644 --- a/docs/GetDeviceCodeRequest.md +++ b/docs/GetDeviceCodeRequest.md @@ -1,7 +1,6 @@ # SquareConnect.GetDeviceCodeRequest ### Description -**Note: This model is in beta.** diff --git a/docs/GetDeviceCodeResponse.md b/docs/GetDeviceCodeResponse.md index 0966a94..f48f6cc 100644 --- a/docs/GetDeviceCodeResponse.md +++ b/docs/GetDeviceCodeResponse.md @@ -1,7 +1,6 @@ # SquareConnect.GetDeviceCodeResponse ### Description -**Note: This model is in beta.** diff --git a/docs/GetPaymentRequest.md b/docs/GetPaymentRequest.md index af7cec6..242c2f0 100644 --- a/docs/GetPaymentRequest.md +++ b/docs/GetPaymentRequest.md @@ -2,7 +2,7 @@ ### Description -Retrieve details for a specific Payment. +Retrieve details for a specific payment. ## Properties Name | Type | Description | Notes diff --git a/docs/GetPaymentResponse.md b/docs/GetPaymentResponse.md index b7bab7c..f765bb8 100644 --- a/docs/GetPaymentResponse.md +++ b/docs/GetPaymentResponse.md @@ -7,7 +7,7 @@ Defines the fields that are included in the response body of a request to the [G ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] **payment** | [**Payment**](Payment.md) | The requested `Payment`. | [optional] diff --git a/docs/GetTerminalCheckoutRequest.md b/docs/GetTerminalCheckoutRequest.md index c65d195..771a908 100644 --- a/docs/GetTerminalCheckoutRequest.md +++ b/docs/GetTerminalCheckoutRequest.md @@ -1,7 +1,6 @@ # SquareConnect.GetTerminalCheckoutRequest ### Description -**Note: This model is in beta.** diff --git a/docs/GetTerminalCheckoutResponse.md b/docs/GetTerminalCheckoutResponse.md index ab6a451..809411f 100644 --- a/docs/GetTerminalCheckoutResponse.md +++ b/docs/GetTerminalCheckoutResponse.md @@ -1,7 +1,6 @@ # SquareConnect.GetTerminalCheckoutResponse ### Description -**Note: This model is in beta.** @@ -9,6 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] -**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The requested `Checkout` | [optional] +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The requested `TerminalCheckout` | [optional] diff --git a/docs/GetTerminalRefundRequest.md b/docs/GetTerminalRefundRequest.md new file mode 100644 index 0000000..0bd193e --- /dev/null +++ b/docs/GetTerminalRefundRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.GetTerminalRefundRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/GetTerminalRefundResponse.md b/docs/GetTerminalRefundResponse.md new file mode 100644 index 0000000..a6f35fc --- /dev/null +++ b/docs/GetTerminalRefundResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.GetTerminalRefundResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**refund** | [**TerminalRefund**](TerminalRefund.md) | The requested `Refund` | [optional] + + diff --git a/docs/InlineTypes.md b/docs/InlineTypes.md new file mode 100644 index 0000000..c62bdbb --- /dev/null +++ b/docs/InlineTypes.md @@ -0,0 +1,12 @@ +# SquareConnect.InlineTypes + +## Enum + + +* `NONE` (value: `"INLINE_NONE"`) + +* `VARIATIONS` (value: `"INLINE_VARIATIONS"`) + +* `ALL` (value: `"INLINE_ALL"`) + + diff --git a/docs/InventoryApi.md b/docs/InventoryApi.md index 5479b52..316ed31 100644 --- a/docs/InventoryApi.md +++ b/docs/InventoryApi.md @@ -32,7 +32,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var body = new SquareConnect.BatchChangeInventoryRequest(); // BatchChangeInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.InventoryApi.constructFromObject({}); // BatchChangeInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchChangeInventory(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -80,7 +80,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var body = new SquareConnect.BatchRetrieveInventoryChangesRequest(); // BatchRetrieveInventoryChangesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.InventoryApi.constructFromObject({}); // BatchRetrieveInventoryChangesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchRetrieveInventoryChanges(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -128,7 +128,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var body = new SquareConnect.BatchRetrieveInventoryCountsRequest(); // BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.InventoryApi.constructFromObject({}); // BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchRetrieveInventoryCounts(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -176,7 +176,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var adjustmentId = "adjustmentId_example"; // String | ID of the `InventoryAdjustment` to retrieve. +var adjustmentId = SquareConnect.InventoryApi.constructFromObject({}); // String | ID of the `InventoryAdjustment` to retrieve. apiInstance.retrieveInventoryAdjustment(adjustmentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -224,11 +224,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var catalogObjectId = "catalogObjectId_example"; // String | ID of the `CatalogObject` to retrieve. +var catalogObjectId = SquareConnect.InventoryApi.constructFromObject({}); // String | ID of the `CatalogObject` to retrieve. 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/working-with-apis/pagination) guide for more information. + 'locationIds': SquareConnect.InventoryApi.constructFromObject({});, // String | The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. + 'cursor': SquareConnect.InventoryApi.constructFromObject({}); // 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); @@ -278,11 +278,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var catalogObjectId = "catalogObjectId_example"; // String | ID of the `CatalogObject` to retrieve. +var catalogObjectId = SquareConnect.InventoryApi.constructFromObject({}); // String | ID of the `CatalogObject` to retrieve. 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. + 'locationIds': SquareConnect.InventoryApi.constructFromObject({});, // String | The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. + 'cursor': SquareConnect.InventoryApi.constructFromObject({}); // 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. }; apiInstance.retrieveInventoryCount(catalogObjectId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -332,7 +332,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InventoryApi(); -var physicalCountId = "physicalCountId_example"; // String | ID of the `InventoryPhysicalCount` to retrieve. +var physicalCountId = SquareConnect.InventoryApi.constructFromObject({}); // String | ID of the `InventoryPhysicalCount` to retrieve. apiInstance.retrieveInventoryPhysicalCount(physicalCountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/Invoice.md b/docs/Invoice.md index 7db850a..3cf5e61 100644 --- a/docs/Invoice.md +++ b/docs/Invoice.md @@ -9,11 +9,11 @@ Stores information about an invoice. You use the Invoices API to create and proc 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] +**version** | **Number** | The Square-assigned 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] +**primary_recipient** | [**InvoiceRecipient**](InvoiceRecipient.md) | The customer who gets the invoice. Square uses the contact information to deliver the invoice. This field is required to publish 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 must specify at least one payment request. For invoices with multiple payment requests, you can specify a maximum of 12 `INSTALLMENT` request types. All of 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] diff --git a/docs/InvoicePaymentRequest.md b/docs/InvoicePaymentRequest.md index 3475b7a..8262b18 100644 --- a/docs/InvoicePaymentRequest.md +++ b/docs/InvoicePaymentRequest.md @@ -3,7 +3,7 @@ ### 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. +Describes a specific payment request in an invoice. Invoices that contain multiple payment requests can specify a maximum of 12 `INSTALLMENT` request types. All of the payment requests must specify the same `request_method`. For more information, see [Payment requests](/docs/invoices-api/overview#payment-requests). ## Properties Name | Type | Description | Notes diff --git a/docs/InvoicesApi.md b/docs/InvoicesApi.md index 2b456ae..0643479 100644 --- a/docs/InvoicesApi.md +++ b/docs/InvoicesApi.md @@ -34,9 +34,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InvoicesApi(); -var invoiceId = "invoiceId_example"; // String | The ID of the `invoice` to cancel. +var invoiceId = SquareConnect.InvoicesApi.constructFromObject({}); // 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. +var body = SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -86,7 +86,7 @@ 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. +var body = SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -135,10 +135,10 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InvoicesApi(); -var invoiceId = "invoiceId_example"; // String | The ID of the invoice to delete. +var invoiceId = SquareConnect.InvoicesApi.constructFromObject({}); // 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`. + 'version': SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -188,7 +188,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InvoicesApi(); -var invoiceId = "invoiceId_example"; // String | The id of the invoice to retrieve. +var invoiceId = SquareConnect.InvoicesApi.constructFromObject({}); // String | The id of the invoice to retrieve. apiInstance.getInvoice(invoiceId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -237,11 +237,11 @@ 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 locationId = SquareConnect.InvoicesApi.constructFromObject({}); // 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. + 'cursor': SquareConnect.InvoicesApi.constructFromObject({});, // 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': SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -292,9 +292,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InvoicesApi(); -var invoiceId = "invoiceId_example"; // String | The id of the invoice to publish. +var invoiceId = SquareConnect.InvoicesApi.constructFromObject({}); // 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. +var body = SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -344,7 +344,7 @@ 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. +var body = SquareConnect.InvoicesApi.constructFromObject({}); // 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); @@ -393,9 +393,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.InvoicesApi(); -var invoiceId = "invoiceId_example"; // String | The id of the invoice to update. +var invoiceId = SquareConnect.InvoicesApi.constructFromObject({}); // 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. +var body = SquareConnect.InvoicesApi.constructFromObject({}); // 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); diff --git a/docs/LaborApi.md b/docs/LaborApi.md index 5436aeb..859ae74 100644 --- a/docs/LaborApi.md +++ b/docs/LaborApi.md @@ -41,7 +41,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var body = new SquareConnect.CreateBreakTypeRequest(); // CreateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // CreateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createBreakType(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -89,7 +89,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var body = new SquareConnect.CreateShiftRequest(); // CreateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // CreateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createShift(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -137,7 +137,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `BreakType` being deleted. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `BreakType` being deleted. apiInstance.deleteBreakType(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -185,7 +185,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `Shift` being deleted. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `Shift` being deleted. apiInstance.deleteShift(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -233,7 +233,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `BreakType` being retrieved. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `BreakType` being retrieved. apiInstance.getBreakType(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -282,7 +282,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `EmployeeWage` being retrieved. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `EmployeeWage` being retrieved. apiInstance.getEmployeeWage(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -330,7 +330,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `Shift` being retrieved. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `Shift` being retrieved. apiInstance.getShift(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -378,7 +378,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `TeamMemberWage` being retrieved. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `TeamMemberWage` being retrieved. apiInstance.getTeamMemberWage(id).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -427,9 +427,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); var opts = { - 'locationId': "locationId_example", // String | Filter Break Types returned to only those that are associated with the specified location. - 'limit': 56, // Number | Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200. - 'cursor': "cursor_example" // String | Pointer to the next page of Break Type results to fetch. + 'locationId': SquareConnect.LaborApi.constructFromObject({});, // String | Filter Break Types returned to only those that are associated with the specified location. + 'limit': SquareConnect.LaborApi.constructFromObject({});, // Number | Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200. + 'cursor': SquareConnect.LaborApi.constructFromObject({}); // String | Pointer to the next page of Break Type results to fetch. }; apiInstance.listBreakTypes(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -481,9 +481,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); var opts = { - 'employeeId': "employeeId_example", // String | Filter wages returned to only those that are associated with the specified employee. - 'limit': 56, // Number | Maximum number of Employee Wages to return per page. Can range between 1 and 200. The default is the maximum at 200. - 'cursor': "cursor_example" // String | Pointer to the next page of Employee Wage results to fetch. + 'employeeId': SquareConnect.LaborApi.constructFromObject({});, // String | Filter wages returned to only those that are associated with the specified employee. + 'limit': SquareConnect.LaborApi.constructFromObject({});, // Number | Maximum number of Employee Wages to return per page. Can range between 1 and 200. The default is the maximum at 200. + 'cursor': SquareConnect.LaborApi.constructFromObject({}); // String | Pointer to the next page of Employee Wage results to fetch. }; apiInstance.listEmployeeWages(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -534,9 +534,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); var opts = { - 'teamMemberId': "teamMemberId_example", // String | Filter wages returned to only those that are associated with the specified team member. - 'limit': 56, // Number | Maximum number of Team Member Wages to return per page. Can range between 1 and 200. The default is the maximum at 200. - 'cursor': "cursor_example" // String | Pointer to the next page of Employee Wage results to fetch. + 'teamMemberId': SquareConnect.LaborApi.constructFromObject({});, // String | Filter wages returned to only those that are associated with the specified team member. + 'limit': SquareConnect.LaborApi.constructFromObject({});, // Number | Maximum number of Team Member Wages to return per page. Can range between 1 and 200. The default is the maximum at 200. + 'cursor': SquareConnect.LaborApi.constructFromObject({}); // String | Pointer to the next page of Employee Wage results to fetch. }; apiInstance.listTeamMemberWages(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -587,8 +587,8 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); var opts = { - 'limit': 56, // Number | Maximum number of Workweek Configs to return per page. - 'cursor': "cursor_example" // String | Pointer to the next page of Workweek Config results to fetch. + 'limit': SquareConnect.LaborApi.constructFromObject({});, // Number | Maximum number of Workweek Configs to return per page. + 'cursor': SquareConnect.LaborApi.constructFromObject({}); // String | Pointer to the next page of Workweek Config results to fetch. }; apiInstance.listWorkweekConfigs(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -637,7 +637,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var body = new SquareConnect.SearchShiftsRequest(); // SearchShiftsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // SearchShiftsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchShifts(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -685,9 +685,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `BreakType` being updated. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `BreakType` being updated. -var body = new SquareConnect.UpdateBreakTypeRequest(); // UpdateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // UpdateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateBreakType(id, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -736,9 +736,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | ID of the object being updated. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | ID of the object being updated. -var body = new SquareConnect.UpdateShiftRequest(); // UpdateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // UpdateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateShift(id, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -787,9 +787,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LaborApi(); -var id = "id_example"; // String | UUID for the `WorkweekConfig` object being updated. +var id = SquareConnect.LaborApi.constructFromObject({}); // String | UUID for the `WorkweekConfig` object being updated. -var body = new SquareConnect.UpdateWorkweekConfigRequest(); // UpdateWorkweekConfigRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LaborApi.constructFromObject({}); // UpdateWorkweekConfigRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateWorkweekConfig(id, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/ListCatalogResponse.md b/docs/ListCatalogResponse.md index a0d0ed9..2868f04 100644 --- a/docs/ListCatalogResponse.md +++ b/docs/ListCatalogResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] **objects** | [**[CatalogObject]**](CatalogObject.md) | The CatalogObjects returned. | [optional] diff --git a/docs/ListDeviceCodesRequest.md b/docs/ListDeviceCodesRequest.md index ea0d17c..7ec1c1f 100644 --- a/docs/ListDeviceCodesRequest.md +++ b/docs/ListDeviceCodesRequest.md @@ -1,7 +1,6 @@ # SquareConnect.ListDeviceCodesRequest ### Description -**Note: This model is in beta.** @@ -11,5 +10,6 @@ Name | Type | Description | Notes **cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. | [optional] **location_id** | **String** | If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. | [optional] **product_type** | **String** | If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. See [ProductType](#type-producttype) for possible values | [optional] +**status** | **[String]** | If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. See [DeviceCodeStatus](#type-devicecodestatus) for possible values | [optional] diff --git a/docs/ListDeviceCodesResponse.md b/docs/ListDeviceCodesResponse.md index 3610f85..c7ba2e1 100644 --- a/docs/ListDeviceCodesResponse.md +++ b/docs/ListDeviceCodesResponse.md @@ -1,7 +1,6 @@ # SquareConnect.ListDeviceCodesResponse ### Description -**Note: This model is in beta.** diff --git a/docs/ListPaymentsRequest.md b/docs/ListPaymentsRequest.md index b5d32d3..4c5ecfb 100644 --- a/docs/ListPaymentsRequest.md +++ b/docs/ListPaymentsRequest.md @@ -2,19 +2,19 @@ ### Description -Retrieves a list of payments taken by the account making the request. Max results per page: 100 +Retrieves a list of payments taken by the account making the request. The maximum results per page is 100. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**begin_time** | **String** | Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional] -**end_time** | **String** | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional] -**sort_order** | **String** | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] -**location_id** | **String** | Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. | [optional] -**total** | **Number** | The exact amount in the total_money for a `Payment`. | [optional] -**last_4** | **String** | The last 4 digits of `Payment` card. | [optional] -**card_brand** | **String** | The brand of `Payment` card. For example, `VISA` | [optional] -**limit** | **Number** | Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` | [optional] +**begin_time** | **String** | The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional] +**end_time** | **String** | The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. | [optional] +**sort_order** | **String** | The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). | [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 the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). | [optional] +**location_id** | **String** | Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. | [optional] +**total** | **Number** | The exact amount in the `total_money` for a payment. | [optional] +**last_4** | **String** | The last four digits of a payment card. | [optional] +**card_brand** | **String** | The brand of the payment card (for example, VISA). | [optional] +**limit** | **Number** | The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` | [optional] diff --git a/docs/ListPaymentsResponse.md b/docs/ListPaymentsResponse.md index 8852cb2..022342b 100644 --- a/docs/ListPaymentsResponse.md +++ b/docs/ListPaymentsResponse.md @@ -7,8 +7,8 @@ Defines the fields that are included in the response body of a request to the [L ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] -**payments** | [**[Payment]**](Payment.md) | The requested list of `Payment`s. | [optional] -**cursor** | **String** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] +**errors** | [**[Error]**](Error.md) | Information about errors encountered during the request. | [optional] +**payments** | [**[Payment]**](Payment.md) | The requested list of payments. | [optional] +**cursor** | **String** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). | [optional] diff --git a/docs/Location.md b/docs/Location.md index 3a943b2..b56f9f3 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -29,8 +29,9 @@ Name | Type | Description | Notes **instagram_username** | **String** | The Instagram username of the location without the '@' symbol. | [optional] **facebook_url** | **String** | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. | [optional] **coordinates** | [**Coordinates**](Coordinates.md) | The physical coordinates (latitude and longitude) of the location. | [optional] -**logo_url** | **String** | The URL of the logo image for the location. | [optional] +**logo_url** | **String** | The URL of the logo image for the location. The Seller must choose this logo in the Seller dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices) that Square generates on behalf of the Seller. This image should have an aspect ratio close to 1:1 and is recommended to be at least 200x200 pixels. | [optional] **pos_background_url** | **String** | The URL of the Point of Sale background image for the location. | [optional] **mcc** | **String** | The merchant category code (MCC) of the location, as standardized by ISO 18245. The MCC describes the kind of goods or services sold at the location. | [optional] [beta] +**full_format_logo_url** | **String** | The URL of a full-format logo image for the location. The Seller must choose this logo in the Seller dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices) that Square generates on behalf of the Seller. This image can have an aspect ratio of 2:1 or greater and is recommended to be at least 1280x648 pixels. | [optional] diff --git a/docs/LocationsApi.md b/docs/LocationsApi.md index ff31155..5d96e2a 100644 --- a/docs/LocationsApi.md +++ b/docs/LocationsApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description CreateLocation -Creates a location. For more information about locations, see [Locations API Overview](/locations-api). +Creates a location. ### Example ```javascript @@ -30,7 +30,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LocationsApi(); -var body = new SquareConnect.CreateLocationRequest(); // CreateLocationRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LocationsApi.constructFromObject({}); // CreateLocationRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createLocation(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -65,7 +65,7 @@ Name | Type | Description | Notes ListLocations -Provides information of all locations of a business. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. +Provides information of all locations of a business. Many Square API endpoints require a `location_id` parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. ### Example ```javascript @@ -107,7 +107,7 @@ This endpoint does not need any parameter. RetrieveLocation -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). +Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. ### 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. If you specify the string \"main\", then the endpoint returns the main location. +var locationId = SquareConnect.LocationsApi.constructFromObject({}); // 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); @@ -169,9 +169,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LocationsApi(); -var locationId = "locationId_example"; // String | The ID of the location to update. +var locationId = SquareConnect.LocationsApi.constructFromObject({}); // String | The ID of the location to update. -var body = new SquareConnect.UpdateLocationRequest(); // UpdateLocationRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LocationsApi.constructFromObject({}); // UpdateLocationRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateLocation(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/LoyaltyAccount.md b/docs/LoyaltyAccount.md index 41be56b..bc5d51a 100644 --- a/docs/LoyaltyAccount.md +++ b/docs/LoyaltyAccount.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | The Square-assigned ID of the loyalty account. | [optional] **mappings** | [**[LoyaltyAccountMapping]**](LoyaltyAccountMapping.md) | The list of mappings that the account is associated with. Currently, a buyer can only be mapped to a loyalty account using a phone number. Therefore, the list can only have one mapping. | **program_id** | **String** | The Square-assigned ID of the `loyalty program` to which the account belongs. | -**balance** | **Number** | The available point balance in the loyalty account. | [optional] +**balance** | **Number** | The available point balance in the loyalty account. Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange. | [optional] **lifetime_points** | **Number** | The total points accrued during the lifetime of the account. | [optional] **customer_id** | **String** | The Square-assigned ID of the `customer` that is associated with the account. | [optional] **enrolled_at** | **String** | The timestamp when enrollment occurred, in RFC 3339 format. | [optional] diff --git a/docs/LoyaltyAccountMapping.md b/docs/LoyaltyAccountMapping.md index f85a236..0b71d66 100644 --- a/docs/LoyaltyAccountMapping.md +++ b/docs/LoyaltyAccountMapping.md @@ -3,7 +3,7 @@ ### Description **Note: This model is in beta.** -Associates a loyalty account with the buyer's phone number. or more information, see [Loyalty Overview](/docs/loyalty/overview). +Associates a loyalty account with the buyer's phone number. For more information, see [Loyalty Overview](/docs/loyalty/overview). ## Properties Name | Type | Description | Notes diff --git a/docs/LoyaltyApi.md b/docs/LoyaltyApi.md index 73632ec..685ecb7 100644 --- a/docs/LoyaltyApi.md +++ b/docs/LoyaltyApi.md @@ -26,7 +26,7 @@ Method | HTTP request | Description AccumulateLoyaltyPoints -Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points). +Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call [CalculateLoyaltyPoints](#endpoint-Loyalty-CalculateLoyaltyPoints) to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. ### Example ```javascript @@ -39,9 +39,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var accountId = "accountId_example"; // String | The `loyalty account` ID to which to add the points. +var accountId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The `loyalty account` ID to which to add the points. -var body = new SquareConnect.AccumulateLoyaltyPointsRequest(); // AccumulateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // AccumulateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.accumulateLoyaltyPoints(accountId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -78,7 +78,7 @@ Name | Type | Description | Notes AdjustLoyaltyPoints -Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase. +Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](#endpoint-Loyalty-AccumulateLoyaltyPoints) to add points when a buyer pays for the purchase. ### Example ```javascript @@ -91,9 +91,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var accountId = "accountId_example"; // String | The ID of the `loyalty account` in which to adjust the points. +var accountId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The ID of the `loyalty account` in which to adjust the points. -var body = new SquareConnect.AdjustLoyaltyPointsRequest(); // AdjustLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // AdjustLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.adjustLoyaltyPoints(accountId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -143,9 +143,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var programId = "programId_example"; // String | The `loyalty program` ID, which defines the rules for accruing points. +var programId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The `loyalty program` ID, which defines the rules for accruing points. -var body = new SquareConnect.CalculateLoyaltyPointsRequest(); // CalculateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // CalculateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.calculateLoyaltyPoints(programId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -182,7 +182,7 @@ Name | Type | Description | Notes CreateLoyaltyAccount -Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account). +Creates a loyalty account. ### Example ```javascript @@ -195,7 +195,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var body = new SquareConnect.CreateLoyaltyAccountRequest(); // CreateLoyaltyAccountRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // CreateLoyaltyAccountRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createLoyaltyAccount(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -231,7 +231,7 @@ Name | Type | Description | Notes CreateLoyaltyReward -Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). +Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. ### Example ```javascript @@ -244,7 +244,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var body = new SquareConnect.CreateLoyaltyRewardRequest(); // CreateLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // CreateLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createLoyaltyReward(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -280,7 +280,7 @@ Name | Type | Description | Notes DeleteLoyaltyReward -Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). +Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](#endpoint-Loyalty-CreateLoyaltyReward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). ### Example ```javascript @@ -293,7 +293,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to delete. +var rewardId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The ID of the `loyalty reward` to delete. apiInstance.deleteLoyaltyReward(rewardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -329,7 +329,7 @@ Name | Type | Description | Notes ListLoyaltyPrograms -Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). . +Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. ### Example ```javascript @@ -372,7 +372,7 @@ This endpoint does not need any parameter. RedeemLoyaltyReward -Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). +Redeems a loyalty reward. The endpoint sets the reward to the `REDEEMED` terminal state. If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. ### Example ```javascript @@ -385,9 +385,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to redeem. +var rewardId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The ID of the `loyalty reward` to redeem. -var body = new SquareConnect.RedeemLoyaltyRewardRequest(); // RedeemLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // RedeemLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.redeemLoyaltyReward(rewardId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -437,7 +437,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var accountId = "accountId_example"; // String | The ID of the `loyalty account` to retrieve. +var accountId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The ID of the `loyalty account` to retrieve. apiInstance.retrieveLoyaltyAccount(accountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -486,7 +486,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to retrieve. +var rewardId = SquareConnect.LoyaltyApi.constructFromObject({}); // String | The ID of the `loyalty reward` to retrieve. apiInstance.retrieveLoyaltyReward(rewardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -522,7 +522,7 @@ Name | Type | Description | Notes SearchLoyaltyAccounts -Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned. +Searches for loyalty accounts in a loyalty program. You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely. Search results are sorted by `created_at` in ascending order. ### Example ```javascript @@ -535,7 +535,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var body = new SquareConnect.SearchLoyaltyAccountsRequest(); // SearchLoyaltyAccountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // SearchLoyaltyAccountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchLoyaltyAccounts(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -571,7 +571,7 @@ Name | Type | Description | Notes SearchLoyaltyEvents -Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events). +Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. ### Example ```javascript @@ -584,7 +584,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var body = new SquareConnect.SearchLoyaltyEventsRequest(); // SearchLoyaltyEventsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // SearchLoyaltyEventsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchLoyaltyEvents(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -620,7 +620,7 @@ Name | Type | Description | Notes SearchLoyaltyRewards -Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards). +Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](#endpoint-Loyalty-RetrieveLoyaltyReward) endpoint. ### Example ```javascript @@ -633,7 +633,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.LoyaltyApi(); -var body = new SquareConnect.SearchLoyaltyRewardsRequest(); // SearchLoyaltyRewardsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.LoyaltyApi.constructFromObject({}); // SearchLoyaltyRewardsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchLoyaltyRewards(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/MerchantsApi.md b/docs/MerchantsApi.md index 509ee1b..d43dd1f 100644 --- a/docs/MerchantsApi.md +++ b/docs/MerchantsApi.md @@ -28,7 +28,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.MerchantsApi(); var opts = { - 'cursor': 56 // Number | The cursor generated by the previous response. + 'cursor': SquareConnect.MerchantsApi.constructFromObject({}); // Number | The cursor generated by the previous response. }; apiInstance.listMerchants(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -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. If the string \"me\" is supplied as the ID, then retrieve the merchant that is currently accessible to this call. +var merchantId = SquareConnect.MerchantsApi.constructFromObject({}); // 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); diff --git a/docs/MobileAuthorizationApi.md b/docs/MobileAuthorizationApi.md index 0cea9c2..0ad3d9d 100644 --- a/docs/MobileAuthorizationApi.md +++ b/docs/MobileAuthorizationApi.md @@ -26,7 +26,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.MobileAuthorizationApi(); -var body = new SquareConnect.CreateMobileAuthorizationCodeRequest(); // CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.MobileAuthorizationApi.constructFromObject({}); // CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createMobileAuthorizationCode(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index ede5976..2b92bab 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -23,7 +23,7 @@ var SquareConnect = require('square-connect'); var apiInstance = new SquareConnect.OAuthApi(); -var body = new SquareConnect.ObtainTokenRequest(); // ObtainTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OAuthApi.constructFromObject({}); // ObtainTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.obtainToken(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -73,9 +73,9 @@ oauth2ClientSecret.apiKeyPrefix = 'Client'; var apiInstance = new SquareConnect.OAuthApi(); -var clientId = "clientId_example"; // String | Your application ID, available from the [application dashboard](https://connect.squareup.com/apps). +var clientId = SquareConnect.OAuthApi.constructFromObject({}); // String | Your application ID, available from the [application dashboard](https://connect.squareup.com/apps). -var body = new SquareConnect.RenewTokenRequest(); // RenewTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OAuthApi.constructFromObject({}); // RenewTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.renewToken(clientId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -125,7 +125,7 @@ oauth2ClientSecret.apiKeyPrefix = 'Client'; var apiInstance = new SquareConnect.OAuthApi(); -var body = new SquareConnect.RevokeTokenRequest(); // RevokeTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OAuthApi.constructFromObject({}); // RevokeTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.revokeToken(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index 795da0f..d5464ae 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**calculateOrder**](OrdersApi.md#calculateOrder) | **POST** /v2/orders/calculate | CalculateOrder [**createOrder**](OrdersApi.md#createOrder) | **POST** /v2/orders | CreateOrder [**payOrder**](OrdersApi.md#payOrder) | **POST** /v2/orders/{order_id}/pay | PayOrder +[**retrieveOrder**](OrdersApi.md#retrieveOrder) | **GET** /v2/orders/{order_id} | RetrieveOrder [**searchOrders**](OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders [**updateOrder**](OrdersApi.md#updateOrder) | **PUT** /v2/orders/{order_id} | UpdateOrder @@ -31,7 +32,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var body = new SquareConnect.BatchRetrieveOrdersRequest(); // BatchRetrieveOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // BatchRetrieveOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.batchRetrieveOrders(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -80,7 +81,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var body = new SquareConnect.CalculateOrderRequest(); // CalculateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // CalculateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.calculateOrder(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -128,7 +129,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var body = new SquareConnect.CreateOrderRequest(); // CreateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // CreateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createOrder(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -177,9 +178,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var orderId = "orderId_example"; // String | The ID of the order being paid. +var orderId = SquareConnect.OrdersApi.constructFromObject({}); // String | The ID of the order being paid. -var body = new SquareConnect.PayOrderRequest(); // PayOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // PayOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.payOrder(orderId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -204,6 +205,54 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **retrieveOrder** +> RetrieveOrderResponse retrieveOrder(orderId) + +RetrieveOrder + +Retrieves an [Order](#type-order) by 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.OrdersApi(); + +var orderId = SquareConnect.OrdersApi.constructFromObject({}); // String | The ID of the order to retrieve. + +apiInstance.retrieveOrder(orderId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| The ID of the order to retrieve. | + +### Return type + +[**RetrieveOrderResponse**](RetrieveOrderResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json @@ -228,7 +277,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var body = new SquareConnect.SearchOrdersRequest(); // SearchOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // SearchOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchOrders(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -277,9 +326,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.OrdersApi(); -var orderId = "orderId_example"; // String | The ID of the order to update. +var orderId = SquareConnect.OrdersApi.constructFromObject({}); // String | The ID of the order to update. -var body = new SquareConnect.UpdateOrderRequest(); // UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.OrdersApi.constructFromObject({}); // UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateOrder(orderId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/PaymentOptions.md b/docs/PaymentOptions.md index de9098d..030bc16 100644 --- a/docs/PaymentOptions.md +++ b/docs/PaymentOptions.md @@ -1,13 +1,12 @@ # SquareConnect.PaymentOptions ### Description -**Note: This model is in beta.** ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**autocomplete** | **Boolean** | Indicates whether the Payment objects created from this `TerminalCheckout` will automatically be COMPLETED or left in an APPROVED state for later modification. | [optional] +**autocomplete** | **Boolean** | Indicates whether the Payment objects created from this `TerminalCheckout` will automatically be `COMPLETED` or left in an `APPROVED` state for later modification. | [optional] diff --git a/docs/PaymentsApi.md b/docs/PaymentsApi.md index 0ecd5ca..08a8a40 100644 --- a/docs/PaymentsApi.md +++ b/docs/PaymentsApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description CancelPayment -Cancels (voids) a payment. If you set `autocomplete` to false when creating a payment, you can cancel the payment using this endpoint. +Cancels (voids) a payment. If you set `autocomplete` to `false` when creating a payment, you can cancel the payment using this endpoint. ### Example ```javascript @@ -31,7 +31,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); -var paymentId = "paymentId_example"; // String | `payment_id` identifying the payment to be canceled. +var paymentId = SquareConnect.PaymentsApi.constructFromObject({}); // String | The `payment_id` identifying the payment to be canceled. apiInstance.cancelPayment(paymentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -45,7 +45,7 @@ apiInstance.cancelPayment(paymentId).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **paymentId** | **String**| `payment_id` identifying the payment to be canceled. | + **paymentId** | **String**| The `payment_id` identifying the payment to be canceled. | ### Return type @@ -66,7 +66,7 @@ Name | Type | Description | Notes CancelPaymentByIdempotencyKey -Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end point returns successfully. +Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when the status of a `CreatePayment` request is unknown (for example, after you send a `CreatePayment` request, a network error occurs and you do not get a response). In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your `CreatePayment` request that you want to cancel. After canceling the payment, you can submit your `CreatePayment` request again. Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully. ### Example ```javascript @@ -79,7 +79,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); -var body = new SquareConnect.CancelPaymentByIdempotencyKeyRequest(); // CancelPaymentByIdempotencyKeyRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.PaymentsApi.constructFromObject({}); // CancelPaymentByIdempotencyKeyRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.cancelPaymentByIdempotencyKey(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -114,7 +114,7 @@ Name | Type | Description | Notes CompletePayment -Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete (capture) the payment using this endpoint. +Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set `autocomplete` to `false` when creating a payment, you can complete (capture) the payment using this endpoint. ### Example ```javascript @@ -127,7 +127,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); -var paymentId = "paymentId_example"; // String | Unique ID identifying the payment to be completed. +var paymentId = SquareConnect.PaymentsApi.constructFromObject({}); // String | The unique ID identifying the payment to be completed. apiInstance.completePayment(paymentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -141,7 +141,7 @@ apiInstance.completePayment(paymentId).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **paymentId** | **String**| Unique ID identifying the payment to be completed. | + **paymentId** | **String**| The unique ID identifying the payment to be completed. | ### Return type @@ -162,7 +162,7 @@ Name | Type | Description | Notes CreatePayment -Charges a payment source, for example, a card represented by customer's card on file or a card nonce. In addition to the payment source, the request must also include the amount to accept for the payment. There are several optional parameters that you can include in the request. For example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system. The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. +Charges a payment source (for example, a card represented by customer's card on file or a card nonce). In addition to the payment source, the request must include the amount to accept for the payment. There are several optional parameters that you can include in the request (for example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. ### Example ```javascript @@ -175,7 +175,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); -var body = new SquareConnect.CreatePaymentRequest(); // CreatePaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.PaymentsApi.constructFromObject({}); // CreatePaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createPayment(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -210,7 +210,7 @@ Name | Type | Description | Notes GetPayment -Retrieves details for a specific Payment. +Retrieves details for a specific payment. ### Example ```javascript @@ -223,7 +223,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); -var paymentId = "paymentId_example"; // String | Unique ID for the desired `Payment`. +var paymentId = SquareConnect.PaymentsApi.constructFromObject({}); // String | A unique ID for the desired payment. apiInstance.getPayment(paymentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -237,7 +237,7 @@ apiInstance.getPayment(paymentId).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **paymentId** | **String**| Unique ID for the desired `Payment`. | + **paymentId** | **String**| A unique ID for the desired payment. | ### Return type @@ -258,7 +258,7 @@ Name | Type | Description | Notes ListPayments -Retrieves a list of payments taken by the account making the request. Max results per page: 100 +Retrieves a list of payments taken by the account making the request. The maximum results per page is 100. ### Example ```javascript @@ -272,15 +272,15 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.PaymentsApi(); var opts = { - 'beginTime': "beginTime_example", // String | Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. - 'endTime': "endTime_example", // String | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. - 'sortOrder': "sortOrder_example", // String | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). - '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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. - 'locationId': "locationId_example", // String | Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. - 'total': 789, // Number | The exact amount in the total_money for a `Payment`. - 'last4': "last4_example", // String | The last 4 digits of `Payment` card. - 'cardBrand': "cardBrand_example", // String | The brand of `Payment` card. For example, `VISA` - 'limit': 56 // Number | Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` + 'beginTime': SquareConnect.PaymentsApi.constructFromObject({});, // String | The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. + 'endTime': SquareConnect.PaymentsApi.constructFromObject({});, // String | The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. + 'sortOrder': SquareConnect.PaymentsApi.constructFromObject({});, // String | The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). + 'cursor': SquareConnect.PaymentsApi.constructFromObject({});, // String | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). + 'locationId': SquareConnect.PaymentsApi.constructFromObject({});, // String | Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. + 'total': SquareConnect.PaymentsApi.constructFromObject({});, // Number | The exact amount in the `total_money` for a payment. + 'last4': SquareConnect.PaymentsApi.constructFromObject({});, // String | The last four digits of a payment card. + 'cardBrand': SquareConnect.PaymentsApi.constructFromObject({});, // String | The brand of the payment card (for example, VISA). + 'limit': SquareConnect.PaymentsApi.constructFromObject({}); // Number | The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` }; apiInstance.listPayments(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -294,15 +294,15 @@ apiInstance.listPayments(opts).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **beginTime** | **String**| Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional] - **endTime** | **String**| Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional] - **sortOrder** | **String**| The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] - **locationId** | **String**| Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. | [optional] - **total** | **Number**| The exact amount in the total_money for a `Payment`. | [optional] - **last4** | **String**| The last 4 digits of `Payment` card. | [optional] - **cardBrand** | **String**| The brand of `Payment` card. For example, `VISA` | [optional] - **limit** | **Number**| Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` | [optional] + **beginTime** | **String**| The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional] + **endTime** | **String**| The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. | [optional] + **sortOrder** | **String**| The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). | [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 the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). | [optional] + **locationId** | **String**| Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. | [optional] + **total** | **Number**| The exact amount in the `total_money` for a payment. | [optional] + **last4** | **String**| The last four digits of a payment card. | [optional] + **cardBrand** | **String**| The brand of the payment card (for example, VISA). | [optional] + **limit** | **Number**| The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` | [optional] ### Return type diff --git a/docs/RefundsApi.md b/docs/RefundsApi.md index 84e0005..321b4e0 100644 --- a/docs/RefundsApi.md +++ b/docs/RefundsApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description GetPaymentRefund -Retrieves a specific `Refund` using the `refund_id`. +Retrieves a specific refund using the `refund_id`. ### Example ```javascript @@ -28,7 +28,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.RefundsApi(); -var refundId = "refundId_example"; // String | Unique ID for the desired `PaymentRefund`. +var refundId = SquareConnect.RefundsApi.constructFromObject({}); // String | Unique ID for the desired `PaymentRefund`. apiInstance.getPaymentRefund(refundId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -63,7 +63,7 @@ Name | Type | Description | Notes ListPaymentRefunds -Retrieves a list of refunds for the account making the request. Max results per page: 100 +Retrieves a list of refunds for the account making the request. The maximum results per page is 100. ### Example ```javascript @@ -77,14 +77,14 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.RefundsApi(); var opts = { - 'beginTime': "beginTime_example", // String | Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. - 'endTime': "endTime_example", // String | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. - 'sortOrder': "sortOrder_example", // String | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). - '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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. - 'locationId': "locationId_example", // String | Limit results to the location supplied. By default, results are returned for all locations associated with the merchant. - 'status': "status_example", // String | If provided, only refunds with the given status are returned. For a list of refund status values, see `PaymentRefund`. Default: If omitted refunds are returned regardless of status. - 'sourceType': "sourceType_example", // String | If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. - 'limit': 56 // Number | Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` + 'beginTime': SquareConnect.RefundsApi.constructFromObject({});, // String | Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. + 'endTime': SquareConnect.RefundsApi.constructFromObject({});, // String | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. + 'sortOrder': SquareConnect.RefundsApi.constructFromObject({});, // String | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). + 'cursor': SquareConnect.RefundsApi.constructFromObject({});, // 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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. + 'locationId': SquareConnect.RefundsApi.constructFromObject({});, // String | Limit results to the location supplied. By default, results are returned for all locations associated with the merchant. + 'status': SquareConnect.RefundsApi.constructFromObject({});, // String | If provided, only refunds with the given status are returned. For a list of refund status values, see `PaymentRefund`. Default: If omitted refunds are returned regardless of status. + 'sourceType': SquareConnect.RefundsApi.constructFromObject({});, // String | If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. + 'limit': SquareConnect.RefundsApi.constructFromObject({}); // Number | Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` }; apiInstance.listPaymentRefunds(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -139,7 +139,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.RefundsApi(); -var body = new SquareConnect.RefundPaymentRequest(); // RefundPaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.RefundsApi.constructFromObject({}); // RefundPaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.refundPayment(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/RetrieveCatalogObjectRequest.md b/docs/RetrieveCatalogObjectRequest.md index 34ec4d0..797194b 100644 --- a/docs/RetrieveCatalogObjectRequest.md +++ b/docs/RetrieveCatalogObjectRequest.md @@ -7,6 +7,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**include_related_objects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` | [optional] +**include_related_objects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` | [optional] diff --git a/docs/RetrieveCatalogObjectResponse.md b/docs/RetrieveCatalogObjectResponse.md index f69bdf5..b454958 100644 --- a/docs/RetrieveCatalogObjectResponse.md +++ b/docs/RetrieveCatalogObjectResponse.md @@ -7,8 +7,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] -**object** | [**CatalogObject**](CatalogObject.md) | The CatalogObjects returned. | [optional] -**related_objects** | [**[CatalogObject]**](CatalogObject.md) | A list of CatalogObjects referenced by the object in the `object` field. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**object** | [**CatalogObject**](CatalogObject.md) | The `CatalogObject`s returned. | [optional] +**related_objects** | [**[CatalogObject]**](CatalogObject.md) | A list of `CatalogObject`s referenced by the object in the `object` field. | [optional] diff --git a/docs/RetrieveOrderRequest.md b/docs/RetrieveOrderRequest.md new file mode 100644 index 0000000..a2c1c67 --- /dev/null +++ b/docs/RetrieveOrderRequest.md @@ -0,0 +1,11 @@ +# SquareConnect.RetrieveOrderRequest + +### Description + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/RetrieveOrderResponse.md b/docs/RetrieveOrderResponse.md new file mode 100644 index 0000000..26ab182 --- /dev/null +++ b/docs/RetrieveOrderResponse.md @@ -0,0 +1,13 @@ +# SquareConnect.RetrieveOrderResponse + +### Description + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**Order**](Order.md) | The requested order. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] + + diff --git a/docs/SearchCatalogItemsRequest.md b/docs/SearchCatalogItemsRequest.md index 38a17d6..a78fb8f 100644 --- a/docs/SearchCatalogItemsRequest.md +++ b/docs/SearchCatalogItemsRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **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] +**sort_order** | **String** | The order to sort the results by item names. 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/SearchCatalogItemsResponse.md b/docs/SearchCatalogItemsResponse.md index f8f923d..fc35b54 100644 --- a/docs/SearchCatalogItemsResponse.md +++ b/docs/SearchCatalogItemsResponse.md @@ -8,7 +8,7 @@ Defines the response body returned from the [SearchCatalogItems](#endpoint-Catal ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Errors detected when the call to `SearchCatalogItems` endpoint fails. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [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/SearchCatalogObjectsResponse.md b/docs/SearchCatalogObjectsResponse.md index e6f79c6..8f0ff09 100644 --- a/docs/SearchCatalogObjectsResponse.md +++ b/docs/SearchCatalogObjectsResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] **objects** | [**[CatalogObject]**](CatalogObject.md) | The CatalogObjects returned. | [optional] **related_objects** | [**[CatalogObject]**](CatalogObject.md) | A list of CatalogObjects referenced by the objects in the `objects` field. | [optional] diff --git a/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md b/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md index f20065a..57a8b29 100644 --- a/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md +++ b/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md @@ -8,6 +8,7 @@ The search criteria for the loyalty accounts. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mappings** | [**[LoyaltyAccountMapping]**](LoyaltyAccountMapping.md) | The set of mappings to use in the loyalty account search. | [optional] +**mappings** | [**[LoyaltyAccountMapping]**](LoyaltyAccountMapping.md) | The set of mappings to use in the loyalty account search. This cannot be combined with `customer_ids`. Max: 30 mappings | [optional] +**customer_ids** | **[String]** | The set of customer IDs to use in the loyalty account search. This cannot be combined with `mappings`. Max: 30 customer IDs | [optional] diff --git a/docs/SearchTerminalCheckoutsRequest.md b/docs/SearchTerminalCheckoutsRequest.md index 39e7a1e..537d2e8 100644 --- a/docs/SearchTerminalCheckoutsRequest.md +++ b/docs/SearchTerminalCheckoutsRequest.md @@ -1,15 +1,14 @@ # SquareConnect.SearchTerminalCheckoutsRequest ### Description -**Note: This model is in beta.** ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**query** | [**TerminalCheckoutQuery**](TerminalCheckoutQuery.md) | Query the terminal checkouts based on given conditions and sort order. Calling SearchTerminalCheckouts without an explicitly query parameter will return all available checkouts with the default sort order. | [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. | [optional] +**query** | [**TerminalCheckoutQuery**](TerminalCheckoutQuery.md) | Queries terminal checkouts based on given conditions and sort order. Leaving this unset will return all checkouts with the default sort order. | [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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] **limit** | **Number** | Limit the number of results returned for a single request. | [optional] diff --git a/docs/SearchTerminalCheckoutsResponse.md b/docs/SearchTerminalCheckoutsResponse.md index da529f3..d6289d1 100644 --- a/docs/SearchTerminalCheckoutsResponse.md +++ b/docs/SearchTerminalCheckoutsResponse.md @@ -1,7 +1,6 @@ # SquareConnect.SearchTerminalCheckoutsResponse ### Description -**Note: This model is in beta.** diff --git a/docs/SearchTerminalRefundsRequest.md b/docs/SearchTerminalRefundsRequest.md new file mode 100644 index 0000000..07be9aa --- /dev/null +++ b/docs/SearchTerminalRefundsRequest.md @@ -0,0 +1,15 @@ +# SquareConnect.SearchTerminalRefundsRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query** | [**TerminalRefundQuery**](TerminalRefundQuery.md) | Query the terminal refunds based on given conditions and sort order. Calling `SearchTerminalRefunds` without an explicitly query parameter will return all available refunds with the default sort order. | [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. | [optional] +**limit** | **Number** | Limit the number of results returned for a single request. | [optional] + + diff --git a/docs/SearchTerminalRefundsResponse.md b/docs/SearchTerminalRefundsResponse.md new file mode 100644 index 0000000..55a0dce --- /dev/null +++ b/docs/SearchTerminalRefundsResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.SearchTerminalRefundsResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**refunds** | [**[TerminalRefund]**](TerminalRefund.md) | The requested search result of `TerminalRefund`s. | [optional] +**cursor** | **String** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. | [optional] + + diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index 3d1334a..1d23b79 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -32,7 +32,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var subscriptionId = "subscriptionId_example"; // String | The ID of the subscription to cancel. +var subscriptionId = SquareConnect.SubscriptionsApi.constructFromObject({}); // String | The ID of the subscription to cancel. apiInstance.cancelSubscription(subscriptionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -81,7 +81,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var body = new SquareConnect.CreateSubscriptionRequest(); // CreateSubscriptionRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.SubscriptionsApi.constructFromObject({}); // CreateSubscriptionRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createSubscription(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -130,11 +130,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var subscriptionId = "subscriptionId_example"; // String | The ID of the subscription to retrieve the events for. +var subscriptionId = SquareConnect.SubscriptionsApi.constructFromObject({}); // String | The ID of the subscription to retrieve the events for. var opts = { - '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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). - 'limit': 56 // Number | The upper limit on the number of subscription events to return in the response. Default: `200` + 'cursor': SquareConnect.SubscriptionsApi.constructFromObject({});, // 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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination). + 'limit': SquareConnect.SubscriptionsApi.constructFromObject({}); // Number | The upper limit on the number of subscription events to return in the response. Default: `200` }; apiInstance.listSubscriptionEvents(subscriptionId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -185,7 +185,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var subscriptionId = "subscriptionId_example"; // String | The ID of the subscription to retrieve. +var subscriptionId = SquareConnect.SubscriptionsApi.constructFromObject({}); // String | The ID of the subscription to retrieve. apiInstance.retrieveSubscription(subscriptionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -234,7 +234,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var body = new SquareConnect.SearchSubscriptionsRequest(); // SearchSubscriptionsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.SubscriptionsApi.constructFromObject({}); // SearchSubscriptionsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchSubscriptions(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -283,9 +283,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.SubscriptionsApi(); -var subscriptionId = "subscriptionId_example"; // String | The ID for the subscription to update. +var subscriptionId = SquareConnect.SubscriptionsApi.constructFromObject({}); // String | The ID for the subscription to update. -var body = new SquareConnect.UpdateSubscriptionRequest(); // UpdateSubscriptionRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.SubscriptionsApi.constructFromObject({}); // UpdateSubscriptionRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateSubscription(subscriptionId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/TeamApi.md b/docs/TeamApi.md index 16a8d5e..ccbc431 100644 --- a/docs/TeamApi.md +++ b/docs/TeamApi.md @@ -33,7 +33,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var body = new SquareConnect.BulkCreateTeamMembersRequest(); // BulkCreateTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // BulkCreateTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.bulkCreateTeamMembers(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -81,7 +81,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var body = new SquareConnect.BulkUpdateTeamMembersRequest(); // BulkUpdateTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // BulkUpdateTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.bulkUpdateTeamMembers(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -116,7 +116,7 @@ Name | Type | Description | Notes CreateTeamMember -Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `first_name` - `last_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). +Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `given_name` - `family_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). ### Example ```javascript @@ -129,7 +129,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var body = new SquareConnect.CreateTeamMemberRequest(); // CreateTeamMemberRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // CreateTeamMemberRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createTeamMember(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -164,7 +164,7 @@ Name | Type | Description | Notes RetrieveTeamMember -Retrieve a `TeamMember` object for the given `TeamMember.id` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). +Retrieve a `TeamMember` object for the given `TeamMember.id`. Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). ### Example ```javascript @@ -177,7 +177,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var teamMemberId = "teamMemberId_example"; // String | The ID of the team member to retrieve. +var teamMemberId = SquareConnect.TeamApi.constructFromObject({}); // String | The ID of the team member to retrieve. apiInstance.retrieveTeamMember(teamMemberId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -225,7 +225,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var teamMemberId = "teamMemberId_example"; // String | The ID of the team member to retrieve wage setting for +var teamMemberId = SquareConnect.TeamApi.constructFromObject({}); // String | The ID of the team member to retrieve wage setting for apiInstance.retrieveWageSetting(teamMemberId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -260,7 +260,7 @@ Name | Type | Description | Notes SearchTeamMembers -Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `is_active` +Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `status` ### Example ```javascript @@ -273,7 +273,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var body = new SquareConnect.SearchTeamMembersRequest(); // SearchTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // SearchTeamMembersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchTeamMembers(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -321,9 +321,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var teamMemberId = "teamMemberId_example"; // String | The ID of the team member to update. +var teamMemberId = SquareConnect.TeamApi.constructFromObject({}); // String | The ID of the team member to update. -var body = new SquareConnect.UpdateTeamMemberRequest(); // UpdateTeamMemberRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // UpdateTeamMemberRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateTeamMember(teamMemberId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -372,9 +372,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TeamApi(); -var teamMemberId = "teamMemberId_example"; // String | The ID of the team member to update the `WageSetting` object for. +var teamMemberId = SquareConnect.TeamApi.constructFromObject({}); // String | The ID of the team member to update the `WageSetting` object for. -var body = new SquareConnect.UpdateWageSettingRequest(); // UpdateWageSettingRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TeamApi.constructFromObject({}); // UpdateWageSettingRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateWageSetting(teamMemberId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/Tender.md b/docs/Tender.md index f1f41ee..c7add45 100644 --- a/docs/Tender.md +++ b/docs/Tender.md @@ -19,7 +19,6 @@ Name | Type | Description | Notes **type** | **String** | The type of tender, such as `CARD` or `CASH`. See [TenderType](#type-tendertype) for possible values | **card_details** | [**TenderCardDetails**](TenderCardDetails.md) | The details of the card tender. This value is present only if the value of `type` is `CARD`. | [optional] **cash_details** | [**TenderCashDetails**](TenderCashDetails.md) | The details of the cash tender. This value is present only if the value of `type` is `CASH`. | [optional] -**bank_transfer_details** | [**TenderBankTransferDetails**](TenderBankTransferDetails.md) | The details of the bank transfer tender. This value is present only if the value of `type` is `BANK_TRANSFER`. | [optional] **additional_recipients** | [**[AdditionalRecipient]**](AdditionalRecipient.md) | Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration. | [optional] **payment_id** | **String** | The ID of the `Payment` that corresponds to this tender. This value is only present for payments created with the v2 Payments API. | [optional] diff --git a/docs/TenderBankTransferDetails.md b/docs/TenderBankTransferDetails.md deleted file mode 100644 index e0b101d..0000000 --- a/docs/TenderBankTransferDetails.md +++ /dev/null @@ -1,12 +0,0 @@ -# SquareConnect.TenderBankTransferDetails - -### Description - -Represents the details of a tender with `type` `BANK_TRANSFER`. See [PaymentBankTransferDetails](#type-paymentbanktransferdetails) for more exposed details of a bank transfer payment. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | The bank transfer's current state. See `TenderBankTransferDetailsStatus` for possible values. See [TenderBankTransferDetailsStatus](#type-tenderbanktransferdetailsstatus) for possible values | [optional] - - diff --git a/docs/TenderBankTransferDetailsStatus.md b/docs/TenderBankTransferDetailsStatus.md deleted file mode 100644 index 5af1cfa..0000000 --- a/docs/TenderBankTransferDetailsStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# SquareConnect.TenderBankTransferDetailsStatus - -## Enum - - -* `PENDING` (value: `"PENDING"`) - -* `COMPLETED` (value: `"COMPLETED"`) - -* `FAILED` (value: `"FAILED"`) - - diff --git a/docs/TenderType.md b/docs/TenderType.md index 70e90b6..80ef66b 100644 --- a/docs/TenderType.md +++ b/docs/TenderType.md @@ -13,7 +13,7 @@ * `NO_SALE` (value: `"NO_SALE"`) -* `BANK_TRANSFER` (value: `"BANK_TRANSFER"`) +* `WALLET` (value: `"WALLET"`) * `OTHER` (value: `"OTHER"`) diff --git a/docs/TerminalApi.md b/docs/TerminalApi.md index 1ed61ff..d00516b 100644 --- a/docs/TerminalApi.md +++ b/docs/TerminalApi.md @@ -5,19 +5,22 @@ All URIs are relative to *https://connect.squareup.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**cancelTerminalCheckout**](TerminalApi.md#cancelTerminalCheckout) | **POST** /v2/terminals/checkouts/{checkout_id}/cancel | CancelTerminalCheckout +[**cancelTerminalRefund**](TerminalApi.md#cancelTerminalRefund) | **POST** /v2/terminals/refunds/{terminal_refund_id}/cancel | CancelTerminalRefund [**createTerminalCheckout**](TerminalApi.md#createTerminalCheckout) | **POST** /v2/terminals/checkouts | CreateTerminalCheckout +[**createTerminalRefund**](TerminalApi.md#createTerminalRefund) | **POST** /v2/terminals/refunds | CreateTerminalRefund [**getTerminalCheckout**](TerminalApi.md#getTerminalCheckout) | **GET** /v2/terminals/checkouts/{checkout_id} | GetTerminalCheckout +[**getTerminalRefund**](TerminalApi.md#getTerminalRefund) | **GET** /v2/terminals/refunds/{terminal_refund_id} | GetTerminalRefund [**searchTerminalCheckouts**](TerminalApi.md#searchTerminalCheckouts) | **POST** /v2/terminals/checkouts/search | SearchTerminalCheckouts +[**searchTerminalRefunds**](TerminalApi.md#searchTerminalRefunds) | **POST** /v2/terminals/refunds/search | SearchTerminalRefunds # **cancelTerminalCheckout** -**Note: This endpoint is in beta.** > CancelTerminalCheckoutResponse cancelTerminalCheckout(checkoutId) CancelTerminalCheckout -Cancels a Terminal checkout request, if the status of the request permits it. +Cancels a Terminal checkout request if the status of the request permits it. ### Example ```javascript @@ -30,7 +33,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TerminalApi(); -var checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout` +var checkoutId = SquareConnect.TerminalApi.constructFromObject({}); // String | Unique ID for the desired `TerminalCheckout` apiInstance.cancelTerminalCheckout(checkoutId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -54,6 +57,55 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **cancelTerminalRefund** +**Note: This endpoint is in beta.** +> CancelTerminalRefundResponse cancelTerminalRefund(terminalRefundId) + +CancelTerminalRefund + +Cancels an Interac terminal refund request by refund request ID if the status of the request permits it. + +### 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.TerminalApi(); + +var terminalRefundId = SquareConnect.TerminalApi.constructFromObject({}); // String | Unique ID for the desired `TerminalRefund` + +apiInstance.cancelTerminalRefund(terminalRefundId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **terminalRefundId** | **String**| Unique ID for the desired `TerminalRefund` | + +### Return type + +[**CancelTerminalRefundResponse**](CancelTerminalRefundResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json @@ -61,7 +113,6 @@ Name | Type | Description | Notes # **createTerminalCheckout** -**Note: This endpoint is in beta.** > CreateTerminalCheckoutResponse createTerminalCheckout(body) CreateTerminalCheckout @@ -79,7 +130,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TerminalApi(); -var body = new SquareConnect.CreateTerminalCheckoutRequest(); // CreateTerminalCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TerminalApi.constructFromObject({}); // CreateTerminalCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createTerminalCheckout(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -103,6 +154,55 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createTerminalRefund** +**Note: This endpoint is in beta.** +> CreateTerminalRefundResponse createTerminalRefund(body) + +CreateTerminalRefund + +Creates a request to refund an Interac payment completed on a Square Terminal. + +### 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.TerminalApi(); + +var body = SquareConnect.TerminalApi.constructFromObject({}); // CreateTerminalRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.createTerminalRefund(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateTerminalRefundRequest**](CreateTerminalRefundRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CreateTerminalRefundResponse**](CreateTerminalRefundResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json @@ -110,7 +210,6 @@ Name | Type | Description | Notes # **getTerminalCheckout** -**Note: This endpoint is in beta.** > GetTerminalCheckoutResponse getTerminalCheckout(checkoutId) GetTerminalCheckout @@ -128,7 +227,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TerminalApi(); -var checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout` +var checkoutId = SquareConnect.TerminalApi.constructFromObject({}); // String | Unique ID for the desired `TerminalCheckout` apiInstance.getTerminalCheckout(checkoutId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -152,6 +251,55 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getTerminalRefund** +**Note: This endpoint is in beta.** +> GetTerminalRefundResponse getTerminalRefund(terminalRefundId) + +GetTerminalRefund + +Retrieves an Interac terminal refund object by 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.TerminalApi(); + +var terminalRefundId = SquareConnect.TerminalApi.constructFromObject({}); // String | Unique ID for the desired `TerminalRefund` + +apiInstance.getTerminalRefund(terminalRefundId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **terminalRefundId** | **String**| Unique ID for the desired `TerminalRefund` | + +### Return type + +[**GetTerminalRefundResponse**](GetTerminalRefundResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json @@ -159,7 +307,6 @@ Name | Type | Description | Notes # **searchTerminalCheckouts** -**Note: This endpoint is in beta.** > SearchTerminalCheckoutsResponse searchTerminalCheckouts(body) SearchTerminalCheckouts @@ -177,7 +324,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TerminalApi(); -var body = new SquareConnect.SearchTerminalCheckoutsRequest(); // SearchTerminalCheckoutsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TerminalApi.constructFromObject({}); // SearchTerminalCheckoutsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.searchTerminalCheckouts(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -206,3 +353,52 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **searchTerminalRefunds** +**Note: This endpoint is in beta.** +> SearchTerminalRefundsResponse searchTerminalRefunds(body) + +SearchTerminalRefunds + +Retrieves a filtered list of Terminal Interac refund requests created by the seller making the request. + +### 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.TerminalApi(); + +var body = SquareConnect.TerminalApi.constructFromObject({}); // SearchTerminalRefundsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.searchTerminalRefunds(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SearchTerminalRefundsRequest**](SearchTerminalRefundsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**SearchTerminalRefundsResponse**](SearchTerminalRefundsResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/TerminalCheckout.md b/docs/TerminalCheckout.md index 52aa49f..34a519c 100644 --- a/docs/TerminalCheckout.md +++ b/docs/TerminalCheckout.md @@ -1,7 +1,6 @@ # SquareConnect.TerminalCheckout ### Description -**Note: This model is in beta.** @@ -10,13 +9,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | A unique ID for this `TerminalCheckout` | [optional] **amount_money** | [**Money**](Money.md) | The amount of money (including tax amount) that the Square Terminal device should try to collect. | -**reference_id** | **String** | An optional user-defined reference ID which can be used to associate this TerminalCheckout to another entity in an external system. For example, an order ID generated by a third-party shopping cart. Will also be associated with any payments used to complete the checkout. | [optional] +**reference_id** | **String** | An optional user-defined reference ID which can be used to associate this `TerminalCheckout` to another entity in an external system. For example, an order ID generated by a third-party shopping cart. Will also be associated with any payments used to complete the checkout. | [optional] **note** | **String** | An optional note to associate with the checkout, as well any payments used to complete the checkout. | [optional] **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 [ActionCancelReason](#type-actioncancelreason) for possible values | [optional] -**payment_ids** | **[String]** | A list of payments created by this `TerminalCheckout`. | [optional] +**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`, `CANCEL\\_REQUESTED`, `CANCELED`, `COMPLETED` | [optional] +**cancel_reason** | **String** | Present if the status is `CANCELED`. See [ActionCancelReason](#type-actioncancelreason) for possible values | [optional] +**payment_ids** | **[String]** | A list of ids for 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/TerminalCheckoutQuery.md b/docs/TerminalCheckoutQuery.md index 977c681..fcc21d1 100644 --- a/docs/TerminalCheckoutQuery.md +++ b/docs/TerminalCheckoutQuery.md @@ -1,7 +1,6 @@ # SquareConnect.TerminalCheckoutQuery ### Description -**Note: This model is in beta.** diff --git a/docs/TerminalCheckoutQueryFilter.md b/docs/TerminalCheckoutQueryFilter.md index 6b51323..d343f53 100644 --- a/docs/TerminalCheckoutQueryFilter.md +++ b/docs/TerminalCheckoutQueryFilter.md @@ -1,7 +1,6 @@ # SquareConnect.TerminalCheckoutQueryFilter ### Description -**Note: This model is in beta.** diff --git a/docs/TerminalCheckoutQuerySort.md b/docs/TerminalCheckoutQuerySort.md index 3fb6d04..d0e6031 100644 --- a/docs/TerminalCheckoutQuerySort.md +++ b/docs/TerminalCheckoutQuerySort.md @@ -1,7 +1,6 @@ # SquareConnect.TerminalCheckoutQuerySort ### Description -**Note: This model is in beta.** diff --git a/docs/TerminalRefund.md b/docs/TerminalRefund.md new file mode 100644 index 0000000..626c354 --- /dev/null +++ b/docs/TerminalRefund.md @@ -0,0 +1,24 @@ +# SquareConnect.TerminalRefund + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | A unique ID for this `TerminalRefund` | [optional] +**refund_id** | **String** | The reference to the payment refund created by completing this `TerminalRefund`. | [optional] +**payment_id** | **String** | Unique ID of the payment being refunded. | +**order_id** | **String** | The reference to the Square order id for the payment identified by the `payment_id`. | [optional] +**amount_money** | [**Money**](Money.md) | The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return. This value is limited to the amount taken in the original payment minus any completed or pending refunds. | +**reason** | **String** | A description of the reason for the refund. Note: maximum 192 characters | [optional] +**device_id** | **String** | The unique Id of the device intended for this `TerminalRefund`. The Id can be retrieved from /v2/devices api. | [optional] +**deadline_duration** | **String** | The duration as an RFC 3339 duration, after which the refund will be automatically canceled. TerminalRefunds 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 `TerminalRefund`. Options: `PENDING`, `IN\\_PROGRESS`, `CANCELED`, `COMPLETED` | [optional] +**cancel_reason** | **String** | Present if the status is `CANCELED`. See [ActionCancelReason](#type-actioncancelreason) for possible values | [optional] +**created_at** | **String** | The time when the `TerminalRefund` was created as an RFC 3339 timestamp. | [optional] +**updated_at** | **String** | The time when the `TerminalRefund` was last updated as an RFC 3339 timestamp. | [optional] + + diff --git a/docs/TerminalRefundQuery.md b/docs/TerminalRefundQuery.md new file mode 100644 index 0000000..e1d9b49 --- /dev/null +++ b/docs/TerminalRefundQuery.md @@ -0,0 +1,14 @@ +# SquareConnect.TerminalRefundQuery + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**TerminalRefundQueryFilter**](TerminalRefundQueryFilter.md) | | [optional] +**sort** | [**TerminalRefundQuerySort**](TerminalRefundQuerySort.md) | | [optional] + + diff --git a/docs/TerminalRefundQueryFilter.md b/docs/TerminalRefundQueryFilter.md new file mode 100644 index 0000000..529580c --- /dev/null +++ b/docs/TerminalRefundQueryFilter.md @@ -0,0 +1,15 @@ +# SquareConnect.TerminalRefundQueryFilter + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **String** | `TerminalRefund`s associated with a specific device. If no device is specified then all `TerminalRefund`s for the signed in account will be displayed. | [optional] +**created_at** | [**TimeRange**](TimeRange.md) | Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one day. | [optional] +**status** | **String** | Filtered results with the desired status of the `TerminalRefund` Options: `PENDING`, `IN\\_PROGRESS`, `CANCEL\\_REQUESTED`, `CANCELED`, `COMPLETED` | [optional] + + diff --git a/docs/TerminalRefundQuerySort.md b/docs/TerminalRefundQuerySort.md new file mode 100644 index 0000000..3972078 --- /dev/null +++ b/docs/TerminalRefundQuerySort.md @@ -0,0 +1,13 @@ +# SquareConnect.TerminalRefundQuerySort + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sort_order** | **String** | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [optional] + + diff --git a/docs/TipSettings.md b/docs/TipSettings.md index fb69152..9544b6d 100644 --- a/docs/TipSettings.md +++ b/docs/TipSettings.md @@ -1,7 +1,6 @@ # SquareConnect.TipSettings ### Description -**Note: This model is in beta.** diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 73b9f34..28c50c7 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -33,9 +33,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | -var transactionId = "transactionId_example"; // String | +var transactionId = SquareConnect.TransactionsApi.constructFromObject({}); // String | apiInstance.captureTransaction(locationId, transactionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -85,9 +85,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to associate the created transaction with. +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the location to associate the created transaction with. -var body = new SquareConnect.ChargeRequest(); // ChargeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TransactionsApi.constructFromObject({}); // ChargeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.charge(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -137,11 +137,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the original transaction's associated location. +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the original transaction's associated location. -var transactionId = "transactionId_example"; // String | The ID of the original transaction that includes the tender to refund. +var transactionId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the original transaction that includes the tender to refund. -var body = new SquareConnect.CreateRefundRequest(); // CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.TransactionsApi.constructFromObject({}); // CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createRefund(locationId, transactionId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -192,13 +192,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list refunds for. +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the location to list refunds for. var opts = { - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. - 'endTime': "endTime_example", // String | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. - 'sortOrder': "sortOrder_example", // String | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` - '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 your original query. See [Paginating results](#paginatingresults) for more information. + 'beginTime': SquareConnect.TransactionsApi.constructFromObject({});, // String | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. + 'endTime': SquareConnect.TransactionsApi.constructFromObject({});, // String | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. + 'sortOrder': SquareConnect.TransactionsApi.constructFromObject({});, // String | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` + 'cursor': SquareConnect.TransactionsApi.constructFromObject({}); // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. }; apiInstance.listRefunds(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -251,13 +251,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list transactions for. +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the location to list transactions for. var opts = { - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. - 'endTime': "endTime_example", // String | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. - 'sortOrder': "sortOrder_example", // String | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` - '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 your original query. See [Paginating results](#paginatingresults) for more information. + 'beginTime': SquareConnect.TransactionsApi.constructFromObject({});, // String | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. + 'endTime': SquareConnect.TransactionsApi.constructFromObject({});, // String | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. + 'sortOrder': SquareConnect.TransactionsApi.constructFromObject({});, // String | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` + 'cursor': SquareConnect.TransactionsApi.constructFromObject({}); // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. }; apiInstance.listTransactions(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -310,9 +310,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the transaction's associated location. +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the transaction's associated location. -var transactionId = "transactionId_example"; // String | The ID of the transaction to retrieve. +var transactionId = SquareConnect.TransactionsApi.constructFromObject({}); // String | The ID of the transaction to retrieve. apiInstance.retrieveTransaction(locationId, transactionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -362,9 +362,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.TransactionsApi(); -var locationId = "locationId_example"; // String | +var locationId = SquareConnect.TransactionsApi.constructFromObject({}); // String | -var transactionId = "transactionId_example"; // String | +var transactionId = SquareConnect.TransactionsApi.constructFromObject({}); // String | apiInstance.voidTransaction(locationId, transactionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/UpdateCustomerRequest.md b/docs/UpdateCustomerRequest.md index 6dbb8b2..4e780d1 100644 --- a/docs/UpdateCustomerRequest.md +++ b/docs/UpdateCustomerRequest.md @@ -16,6 +16,6 @@ Name | Type | Description | Notes **phone_number** | **String** | The 11-digit phone number associated with the customer profile. | [optional] **reference_id** | **String** | An optional, second ID used to associate the customer profile with an entity in another system. | [optional] **note** | **String** | A custom note associated with the customer profile. | [optional] -**birthday** | **String** | The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] +**birthday** | **String** | The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. | [optional] diff --git a/docs/UpdateInvoiceRequest.md b/docs/UpdateInvoiceRequest.md index 7d97186..05822af 100644 --- a/docs/UpdateInvoiceRequest.md +++ b/docs/UpdateInvoiceRequest.md @@ -8,7 +8,7 @@ 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). | +**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](https://developer.squareup.com/docs/docs/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/UpdateItemModifierListsResponse.md b/docs/UpdateItemModifierListsResponse.md index ba99fed..19b65ba 100644 --- a/docs/UpdateItemModifierListsResponse.md +++ b/docs/UpdateItemModifierListsResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] -**updated_at** | **String** | | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**updated_at** | **String** | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. | [optional] diff --git a/docs/UpdateItemTaxesResponse.md b/docs/UpdateItemTaxesResponse.md index d997699..9ebad03 100644 --- a/docs/UpdateItemTaxesResponse.md +++ b/docs/UpdateItemTaxesResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **updated_at** | **String** | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. | [optional] diff --git a/docs/UpsertCatalogObjectResponse.md b/docs/UpsertCatalogObjectResponse.md index 100bacd..20ee94a 100644 --- a/docs/UpsertCatalogObjectResponse.md +++ b/docs/UpsertCatalogObjectResponse.md @@ -7,7 +7,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[Error]**](Error.md) | Information on any errors encountered. | [optional] +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] **catalog_object** | [**CatalogObject**](CatalogObject.md) | The successfully created or updated CatalogObject. | [optional] **id_mappings** | [**[CatalogIdMapping]**](CatalogIdMapping.md) | The mapping between client and server IDs for this upsert. | [optional] diff --git a/docs/V1EmployeesApi.md b/docs/V1EmployeesApi.md index f1ee3e2..1f362c1 100644 --- a/docs/V1EmployeesApi.md +++ b/docs/V1EmployeesApi.md @@ -41,7 +41,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var body = new SquareConnect.V1Employee(); // V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createEmployee(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -89,7 +89,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var employeeRole = new SquareConnect.V1EmployeeRole(); // V1EmployeeRole | An EmployeeRole object with a name and permissions, and an optional owner flag. +var employeeRole = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1EmployeeRole | An EmployeeRole object with a name and permissions, and an optional owner flag. apiInstance.createEmployeeRole(employeeRole).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -138,7 +138,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var body = new SquareConnect.V1Timecard(); // V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createTimecard(body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -187,7 +187,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var timecardId = "timecardId_example"; // String | The ID of the timecard to delete. +var timecardId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the timecard to delete. apiInstance.deleteTimecard(timecardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -236,12 +236,12 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var locationId = "locationId_example"; // String | The ID of the location to list cash drawer shifts for. +var locationId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the location to list cash drawer shifts for. var opts = { - 'order': "order_example", // String | The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. - 'endTime': "endTime_example" // String | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. + 'order': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC + 'beginTime': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. + 'endTime': SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. }; apiInstance.listCashDrawerShifts(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -293,9 +293,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); var opts = { - 'order': "order_example", // String | The order in which employees are listed in the response, based on their created_at field.Default value: ASC - 'limit': 56, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | The order in which employees are listed in the response, based on their created_at field.Default value: ASC + 'limit': SquareConnect.V1EmployeesApi.constructFromObject({});, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. + 'batchToken': SquareConnect.V1EmployeesApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listEmployeeRoles(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -346,15 +346,15 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); var opts = { - 'order': "order_example", // String | The order in which employees are listed in the response, based on their created_at field. Default value: ASC - 'beginUpdatedAt': "beginUpdatedAt_example", // String | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format - 'endUpdatedAt': "endUpdatedAt_example", // String | If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. - 'beginCreatedAt': "beginCreatedAt_example", // String | If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. - 'endCreatedAt': "endCreatedAt_example", // String | If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. - 'status': "status_example", // String | If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). - 'externalId': "externalId_example", // String | If provided, the endpoint returns only employee entities with the specified external_id. - 'limit': 56, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | The order in which employees are listed in the response, based on their created_at field. Default value: ASC + 'beginUpdatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format + 'endUpdatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. + 'beginCreatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. + 'endCreatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. + 'status': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). + 'externalId': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If provided, the endpoint returns only employee entities with the specified external_id. + 'limit': SquareConnect.V1EmployeesApi.constructFromObject({});, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. + 'batchToken': SquareConnect.V1EmployeesApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listEmployees(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -411,7 +411,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var timecardId = "timecardId_example"; // String | The ID of the timecard to list events for. +var timecardId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the timecard to list events for. apiInstance.listTimecardEvents(timecardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -461,17 +461,17 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); var opts = { - 'order': "order_example", // String | The order in which timecards are listed in the response, based on their created_at field. - 'employeeId': "employeeId_example", // String | If provided, the endpoint returns only timecards for the employee with the specified ID. - 'beginClockinTime': "beginClockinTime_example", // String | If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. - 'endClockinTime': "endClockinTime_example", // String | If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. - 'beginClockoutTime': "beginClockoutTime_example", // String | If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. - 'endClockoutTime': "endClockoutTime_example", // String | If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. - 'beginUpdatedAt': "beginUpdatedAt_example", // String | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. - 'endUpdatedAt': "endUpdatedAt_example", // String | If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. - 'deleted': true, // Boolean | If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. - 'limit': 56, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | The order in which timecards are listed in the response, based on their created_at field. + 'employeeId': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If provided, the endpoint returns only timecards for the employee with the specified ID. + 'beginClockinTime': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. + 'endClockinTime': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. + 'beginClockoutTime': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. + 'endClockoutTime': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. + 'beginUpdatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. + 'endUpdatedAt': SquareConnect.V1EmployeesApi.constructFromObject({});, // String | If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. + 'deleted': SquareConnect.V1EmployeesApi.constructFromObject({});, // Boolean | If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. + 'limit': SquareConnect.V1EmployeesApi.constructFromObject({});, // Number | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. + 'batchToken': SquareConnect.V1EmployeesApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listTimecards(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -530,9 +530,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var locationId = "locationId_example"; // String | The ID of the location to list cash drawer shifts for. +var locationId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the location to list cash drawer shifts for. -var shiftId = "shiftId_example"; // String | The shift's ID. +var shiftId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The shift's ID. apiInstance.retrieveCashDrawerShift(locationId, shiftId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -581,7 +581,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var employeeId = "employeeId_example"; // String | The employee's ID. +var employeeId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The employee's ID. apiInstance.retrieveEmployee(employeeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -629,7 +629,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var roleId = "roleId_example"; // String | The role's ID. +var roleId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The role's ID. apiInstance.retrieveEmployeeRole(roleId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -678,7 +678,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var timecardId = "timecardId_example"; // String | The timecard's ID. +var timecardId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The timecard's ID. apiInstance.retrieveTimecard(timecardId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -726,9 +726,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var employeeId = "employeeId_example"; // String | The ID of the role to modify. +var employeeId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the role to modify. -var body = new SquareConnect.V1Employee(); // V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateEmployee(employeeId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -777,9 +777,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var roleId = "roleId_example"; // String | The ID of the role to modify. +var roleId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | The ID of the role to modify. -var body = new SquareConnect.V1EmployeeRole(); // V1EmployeeRole | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1EmployeeRole | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateEmployeeRole(roleId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -829,9 +829,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1EmployeesApi(); -var timecardId = "timecardId_example"; // String | TThe ID of the timecard to modify. +var timecardId = SquareConnect.V1EmployeesApi.constructFromObject({}); // String | TThe ID of the timecard to modify. -var body = new SquareConnect.V1Timecard(); // V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1EmployeesApi.constructFromObject({}); // V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateTimecard(timecardId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/V1ItemsApi.md b/docs/V1ItemsApi.md index 93d3a30..ed8624c 100644 --- a/docs/V1ItemsApi.md +++ b/docs/V1ItemsApi.md @@ -66,11 +66,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var variationId = "variationId_example"; // String | The ID of the variation to adjust inventory information for. +var variationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the variation to adjust inventory information for. -var body = new SquareConnect.V1AdjustInventoryRequest(); // V1AdjustInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1AdjustInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.adjustInventory(locationId, variationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -121,11 +121,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the fee's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee's associated location. -var itemId = "itemId_example"; // String | The ID of the item to add the fee to. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to add the fee to. -var feeId = "feeId_example"; // String | The ID of the fee to apply. +var feeId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee to apply. apiInstance.applyFee(locationId, itemId, feeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -176,11 +176,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to apply. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to apply. -var itemId = "itemId_example"; // String | The ID of the item to add the modifier list to. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to add the modifier list to. apiInstance.applyModifierList(locationId, modifierListId, itemId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -231,9 +231,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create an item for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create an item for. -var body = new SquareConnect.V1Category(); // V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createCategory(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -283,9 +283,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create an item for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create an item for. -var body = new SquareConnect.V1Discount(); // V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createDiscount(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -335,9 +335,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create a fee for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create a fee for. -var body = new SquareConnect.V1Fee(); // V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createFee(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -387,9 +387,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create an item for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create an item for. -var body = new SquareConnect.V1Item(); // V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createItem(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -439,9 +439,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create a modifier list for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create a modifier list for. -var body = new SquareConnect.V1ModifierList(); // V1ModifierList | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1ModifierList | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createModifierList(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -491,11 +491,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to edit. -var body = new SquareConnect.V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createModifierOption(locationId, modifierListId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -546,9 +546,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to create an item for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to create an item for. -var body = new SquareConnect.V1Page(); // V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createPage(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -598,11 +598,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The item's ID. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The item's ID. -var body = new SquareConnect.V1Variation(); // V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createVariation(locationId, itemId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -653,9 +653,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var categoryId = "categoryId_example"; // String | The ID of the category to delete. +var categoryId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the category to delete. apiInstance.deleteCategory(locationId, categoryId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -705,9 +705,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var discountId = "discountId_example"; // String | The ID of the discount to delete. +var discountId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the discount to delete. apiInstance.deleteDiscount(locationId, discountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -757,9 +757,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the fee's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee's associated location. -var feeId = "feeId_example"; // String | The ID of the fee to delete. +var feeId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee to delete. apiInstance.deleteFee(locationId, feeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -809,9 +809,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The ID of the item to modify. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to modify. apiInstance.deleteItem(locationId, itemId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -861,9 +861,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to delete. apiInstance.deleteModifierList(locationId, modifierListId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -913,11 +913,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to delete. -var modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit. +var modifierOptionId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to edit. apiInstance.deleteModifierOption(locationId, modifierListId, modifierOptionId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -968,9 +968,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the Favorites page's associated location. -var pageId = "pageId_example"; // String | The ID of the page to delete. +var pageId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the page to delete. apiInstance.deletePage(locationId, pageId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1020,13 +1020,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the Favorites page's associated location. -var pageId = "pageId_example"; // String | The ID of the page to delete. +var pageId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the page to delete. var opts = { - 'row': "row_example", // String | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. - 'column': "column_example" // String | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. + 'row': SquareConnect.V1ItemsApi.constructFromObject({});, // String | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. + 'column': SquareConnect.V1ItemsApi.constructFromObject({}); // String | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. }; apiInstance.deletePageCell(locationId, pageId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1078,11 +1078,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The ID of the item to delete. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to delete. -var variationId = "variationId_example"; // String | The ID of the variation to delete. +var variationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the variation to delete. apiInstance.deleteVariation(locationId, itemId, variationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1133,7 +1133,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list categories for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list categories for. apiInstance.listCategories(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1182,7 +1182,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list categories for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list categories for. apiInstance.listDiscounts(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1231,7 +1231,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list fees for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list fees for. apiInstance.listFees(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1280,11 +1280,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. var opts = { - 'limit': 56, // Number | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'limit': SquareConnect.V1ItemsApi.constructFromObject({});, // Number | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. + 'batchToken': SquareConnect.V1ItemsApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listInventory(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1335,10 +1335,10 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list items for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list items for. var opts = { - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'batchToken': SquareConnect.V1ItemsApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listItems(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1388,7 +1388,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list modifier lists for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list modifier lists for. apiInstance.listModifierLists(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1437,7 +1437,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list Favorites pages for. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the location to list Favorites pages for. apiInstance.listPages(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1486,11 +1486,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the fee's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee's associated location. -var itemId = "itemId_example"; // String | The ID of the item to add the fee to. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to add the fee to. -var feeId = "feeId_example"; // String | The ID of the fee to apply. +var feeId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee to apply. apiInstance.removeFee(locationId, itemId, feeId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1541,11 +1541,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to remove. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to remove. -var itemId = "itemId_example"; // String | The ID of the item to remove the modifier list from. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to remove the modifier list from. apiInstance.removeModifierList(locationId, modifierListId, itemId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1596,9 +1596,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The item's ID. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The item's ID. apiInstance.retrieveItem(locationId, itemId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1648,9 +1648,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The modifier list's ID. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The modifier list's ID. apiInstance.retrieveModifierList(locationId, modifierListId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1700,11 +1700,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the category's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the category's associated location. -var categoryId = "categoryId_example"; // String | The ID of the category to edit. +var categoryId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the category to edit. -var body = new SquareConnect.V1Category(); // V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateCategory(locationId, categoryId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1755,11 +1755,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the category's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the category's associated location. -var discountId = "discountId_example"; // String | The ID of the discount to edit. +var discountId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the discount to edit. -var body = new SquareConnect.V1Discount(); // V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateDiscount(locationId, discountId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1810,11 +1810,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the fee's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee's associated location. -var feeId = "feeId_example"; // String | The ID of the fee to edit. +var feeId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the fee to edit. -var body = new SquareConnect.V1Fee(); // V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateFee(locationId, feeId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1865,11 +1865,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The ID of the item to modify. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to modify. -var body = new SquareConnect.V1Item(); // V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateItem(locationId, itemId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1920,11 +1920,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to edit. -var body = new SquareConnect.V1UpdateModifierListRequest(); // V1UpdateModifierListRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1UpdateModifierListRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateModifierList(locationId, modifierListId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -1975,13 +1975,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit. +var modifierListId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to edit. -var modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit. +var modifierOptionId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the modifier list to edit. -var body = new SquareConnect.V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateModifierOption(locationId, modifierListId, modifierOptionId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -2033,11 +2033,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the Favorites page's associated location -var pageId = "pageId_example"; // String | The ID of the page to modify. +var pageId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the page to modify. -var body = new SquareConnect.V1Page(); // V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updatePage(locationId, pageId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -2088,11 +2088,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the Favorites page's associated location. -var pageId = "pageId_example"; // String | The ID of the page the cell belongs to. +var pageId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the page the cell belongs to. -var body = new SquareConnect.V1PageCell(); // V1PageCell | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1PageCell | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updatePageCell(locationId, pageId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -2143,13 +2143,13 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1ItemsApi(); -var locationId = "locationId_example"; // String | The ID of the item's associated location. +var locationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item's associated location. -var itemId = "itemId_example"; // String | The ID of the item to modify. +var itemId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the item to modify. -var variationId = "variationId_example"; // String | The ID of the variation to modify. +var variationId = SquareConnect.V1ItemsApi.constructFromObject({}); // String | The ID of the variation to modify. -var body = new SquareConnect.V1Variation(); // V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1ItemsApi.constructFromObject({}); // V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateVariation(locationId, itemId, variationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/V1TransactionsApi.md b/docs/V1TransactionsApi.md index a24e26b..d4affb5 100644 --- a/docs/V1TransactionsApi.md +++ b/docs/V1TransactionsApi.md @@ -36,9 +36,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the original payment's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the original payment's associated location. -var body = new SquareConnect.V1CreateRefundRequest(); // V1CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1TransactionsApi.constructFromObject({}); // V1CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.createRefund(locationId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -88,7 +88,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list bank accounts for. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the location to list bank accounts for. apiInstance.listBankAccounts(locationId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -136,12 +136,12 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list online store orders for. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the location to list online store orders for. var opts = { - 'order': "order_example", // String | TThe order in which payments are listed in the response. - 'limit': 56, // Number | The maximum number of payments to return in a single response. This value cannot exceed 200. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | TThe order in which payments are listed in the response. + 'limit': SquareConnect.V1TransactionsApi.constructFromObject({});, // Number | The maximum number of payments to return in a single response. This value cannot exceed 200. + 'batchToken': SquareConnect.V1TransactionsApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listOrders(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -192,15 +192,15 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations. var opts = { - 'order': "order_example", // String | The order in which payments are listed in the response. - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. - 'endTime': "endTime_example", // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. - 'limit': 56, // Number | The maximum number of payments to return in a single response. This value cannot exceed 200. - 'batchToken': "batchToken_example", // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. - 'includePartial': true // Boolean | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. + 'order': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The order in which payments are listed in the response. + 'beginTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. + 'endTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. + 'limit': SquareConnect.V1TransactionsApi.constructFromObject({});, // Number | The maximum number of payments to return in a single response. This value cannot exceed 200. + 'batchToken': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'includePartial': SquareConnect.V1TransactionsApi.constructFromObject({}); // Boolean | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. }; apiInstance.listPayments(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -254,14 +254,14 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list refunds for. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the location to list refunds for. var opts = { - 'order': "order_example", // String | TThe order in which payments are listed in the response. - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. - 'endTime': "endTime_example", // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. - 'limit': 56, // Number | The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | TThe order in which payments are listed in the response. + 'beginTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. + 'endTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. + 'limit': SquareConnect.V1TransactionsApi.constructFromObject({});, // Number | The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. + 'batchToken': SquareConnect.V1TransactionsApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listRefunds(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -314,15 +314,15 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the location to list settlements for. If you specify me, this endpoint returns settlements aggregated from all of the business's locations. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the location to list settlements for. If you specify me, this endpoint returns settlements aggregated from all of the business's locations. var opts = { - 'order': "order_example", // String | The order in which settlements are listed in the response. - 'beginTime': "beginTime_example", // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. - 'endTime': "endTime_example", // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. - 'limit': 56, // Number | The maximum number of settlements to return in a single response. This value cannot exceed 200. - 'status': "status_example", // String | Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED). - 'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. + 'order': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The order in which settlements are listed in the response. + 'beginTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. + 'endTime': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. + 'limit': SquareConnect.V1TransactionsApi.constructFromObject({});, // Number | The maximum number of settlements to return in a single response. This value cannot exceed 200. + 'status': SquareConnect.V1TransactionsApi.constructFromObject({});, // String | Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED). + 'batchToken': SquareConnect.V1TransactionsApi.constructFromObject({}); // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint. }; apiInstance.listSettlements(locationId, opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -377,9 +377,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the bank account's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the bank account's associated location. -var bankAccountId = "bankAccountId_example"; // String | The bank account's Square-issued ID. You obtain this value from Settlement objects returned. +var bankAccountId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The bank account's Square-issued ID. You obtain this value from Settlement objects returned. apiInstance.retrieveBankAccount(locationId, bankAccountId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -428,9 +428,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the order's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the order's associated location. -var orderId = "orderId_example"; // String | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint +var orderId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint apiInstance.retrieveOrder(locationId, orderId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -479,9 +479,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the payment's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the payment's associated location. -var paymentId = "paymentId_example"; // String | The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint. +var paymentId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint. apiInstance.retrievePayment(locationId, paymentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -530,9 +530,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the settlements's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the settlements's associated location. -var settlementId = "settlementId_example"; // String | The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint. +var settlementId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint. apiInstance.retrieveSettlement(locationId, settlementId).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -581,11 +581,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.V1TransactionsApi(); -var locationId = "locationId_example"; // String | The ID of the order's associated location. +var locationId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The ID of the order's associated location. -var orderId = "orderId_example"; // String | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint +var orderId = SquareConnect.V1TransactionsApi.constructFromObject({}); // String | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint -var body = new SquareConnect.V1UpdateOrderRequest(); // V1UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. +var body = SquareConnect.V1TransactionsApi.constructFromObject({}); // V1UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. apiInstance.updateOrder(locationId, orderId, body).then(function(data) { console.log('API called successfully. Returned data: ' + data); diff --git a/docs/VersionedCatalogObject.md b/docs/VersionedCatalogObject.md new file mode 100644 index 0000000..1b7fe87 --- /dev/null +++ b/docs/VersionedCatalogObject.md @@ -0,0 +1,13 @@ +# SquareConnect.VersionedCatalogObject + +### Description + +A reference to a Catalog object at a specific version. In general this is used as an entry point into a graph of catalog objects, where the objects exist at a specific version. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_id** | **String** | The ID of the referenced object. | [optional] +**catalog_version** | **Number** | The version of the object. | [optional] + + diff --git a/package.json b/package.json index 3a0688d..d5c107e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "4.20200923.4", + "version": "4.20201028.5", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index ddfe9a3..a73ea99 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils'); /** * @module ApiClient - * @version 4.20200923.4 + * @version 4.20201028.5 */ /** @@ -49,7 +49,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/4.20200923.4' + 'User-Agent': 'Square-Connect-Javascript/4.20201028.5' }; /** * The default HTTP timeout for all API calls. diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js index 3fe2197..c53f006 100644 --- a/src/api/ApplePayApi.js +++ b/src/api/ApplePayApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/BankAccountsApi.js b/src/api/BankAccountsApi.js index 5756789..b045193 100644 --- a/src/api/BankAccountsApi.js +++ b/src/api/BankAccountsApi.js @@ -35,7 +35,7 @@ module.exports = function(apiClient) { /** * GetBankAccount - * Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). + * Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. * @param {String} bankAccountId Square-issued ID of the desired `BankAccount`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBankAccountResponse} and HTTP response */ @@ -55,7 +55,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -74,7 +74,7 @@ module.exports = function(apiClient) { /** * GetBankAccount - * Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). + * Returns details of a [BankAccount](#type-bankaccount) linked to a Square account. * @param {String} bankAccountId Square-issued ID of the desired `BankAccount`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBankAccountResponse} */ @@ -88,7 +88,7 @@ module.exports = function(apiClient) { /** * GetBankAccountByV1Id - * Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-the-v1-bank-accounts-api). + * Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. * @param {String} v1BankAccountId Connect V1 ID of the desired `BankAccount`. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBankAccountByV1IdResponse} and HTTP response */ @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -127,7 +127,7 @@ module.exports = function(apiClient) { /** * GetBankAccountByV1Id - * Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-the-v1-bank-accounts-api). + * Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID. * @param {String} v1BankAccountId Connect V1 ID of the desired `BankAccount`. For more information, see [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBankAccountByV1IdResponse} */ @@ -141,7 +141,7 @@ module.exports = function(apiClient) { /** * ListBankAccounts - * Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). + * Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. * @param {Object} opts Optional parameters * @param {String} opts.cursor The pagination cursor returned by a previous call to this endpoint. Use it in the next `ListBankAccounts` request to retrieve the next set of results. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. * @param {Number} opts.limit Upper limit on the number of bank accounts to return in the response. Currently, 1000 is the largest supported limit. You can specify a limit of up to 1000 bank accounts. This is also the default limit. @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -181,7 +181,7 @@ module.exports = function(apiClient) { /** * ListBankAccounts - * Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. For more information, see [Bank Accounts API](/docs/bank-accounts-api). + * Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account. * @param {Object} opts Optional parameters * @param {String} opts.cursor The pagination cursor returned by a previous call to this endpoint. Use it in the next `ListBankAccounts` request to retrieve the next set of results. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. * @param {Number} opts.limit Upper limit on the number of bank accounts to return in the response. Currently, 1000 is the largest supported limit. You can specify a limit of up to 1000 bank accounts. This is also the default limit. diff --git a/src/api/CashDrawersApi.js b/src/api/CashDrawersApi.js index b0c466c..4c4a0ee 100644 --- a/src/api/CashDrawersApi.js +++ b/src/api/CashDrawersApi.js @@ -68,7 +68,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -137,7 +137,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -203,7 +203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js index 97abe9c..39a5d04 100644 --- a/src/api/CatalogApi.js +++ b/src/api/CatalogApi.js @@ -71,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -175,7 +175,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -221,7 +221,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -273,7 +273,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -325,7 +325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -363,7 +363,7 @@ module.exports = function(apiClient) { * Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * @param {String} objectId The object ID of any type of catalog objects to be retrieved. * @param {Object} opts Optional parameters - * @param {Boolean} opts.includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` + * @param {Boolean} opts.includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveCatalogObjectResponse} and HTTP response */ this.retrieveCatalogObjectWithHttpInfo = function(objectId, opts) { @@ -384,7 +384,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -406,7 +406,7 @@ module.exports = function(apiClient) { * Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * @param {String} objectId The object ID of any type of catalog objects to be retrieved. * @param {Object} opts Optional parameters - * @param {Boolean} opts.includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` + * @param {Boolean} opts.includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveCatalogObjectResponse} */ this.retrieveCatalogObject = function(objectId, opts) { @@ -420,7 +420,7 @@ 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. + * 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 */ @@ -439,7 +439,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -458,7 +458,7 @@ module.exports = function(apiClient) { /** * 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. + * 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} */ @@ -472,7 +472,7 @@ module.exports = function(apiClient) { /** * SearchCatalogObjects - * 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. + * 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 */ @@ -491,7 +491,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -510,7 +510,7 @@ module.exports = function(apiClient) { /** * SearchCatalogObjects - * 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. + * 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} */ @@ -543,7 +543,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -595,7 +595,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -647,7 +647,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js index 215d517..c72f9d8 100644 --- a/src/api/CheckoutApi.js +++ b/src/api/CheckoutApi.js @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/CustomerGroupsApi.js b/src/api/CustomerGroupsApi.js index dcc579d..2883cd5 100644 --- a/src/api/CustomerGroupsApi.js +++ b/src/api/CustomerGroupsApi.js @@ -59,7 +59,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -164,7 +164,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -279,7 +279,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/CustomerSegmentsApi.js b/src/api/CustomerSegmentsApi.js index 203280a..3964dad 100644 --- a/src/api/CustomerSegmentsApi.js +++ b/src/api/CustomerSegmentsApi.js @@ -52,7 +52,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -107,7 +107,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 025dc53..820602c 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -74,7 +74,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -127,7 +127,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -186,7 +186,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -240,7 +240,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -300,7 +300,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -334,7 +334,7 @@ module.exports = function(apiClient) { /** * ListCustomers - * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. + * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. * @param {Object} opts Optional parameters * @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 your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. * @param {String} opts.sortField Indicates how Customers should be sorted. Default: `DEFAULT`. @@ -355,7 +355,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -374,7 +374,7 @@ module.exports = function(apiClient) { /** * ListCustomers - * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. + * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. * @param {Object} opts Optional parameters * @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 your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. * @param {String} opts.sortField Indicates how Customers should be sorted. Default: `DEFAULT`. @@ -419,7 +419,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -473,7 +473,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -506,7 +506,7 @@ module.exports = function(apiClient) { /** * SearchCustomers - * Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. + * Searches the customer profiles associated with a Square account using a supported query filter. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. * @param {module:model/SearchCustomersRequest} 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/SearchCustomersResponse} and HTTP response */ @@ -525,7 +525,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -544,7 +544,7 @@ module.exports = function(apiClient) { /** * SearchCustomers - * Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages. + * Searches the customer profiles associated with a Square account using a supported query filter. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages. * @param {module:model/SearchCustomersRequest} 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/SearchCustomersResponse} */ @@ -558,7 +558,7 @@ module.exports = function(apiClient) { /** * UpdateCustomer - * Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint. + * Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-Customers-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-Customers-createcustomercard) endpoint. * @param {String} customerId The ID of the customer to update. * @param {module:model/UpdateCustomerRequest} 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/UpdateCustomerResponse} and HTTP response @@ -584,7 +584,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -603,7 +603,7 @@ module.exports = function(apiClient) { /** * UpdateCustomer - * Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint. + * Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-Customers-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-Customers-createcustomercard) endpoint. * @param {String} customerId The ID of the customer to update. * @param {module:model/UpdateCustomerRequest} 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/UpdateCustomerResponse} diff --git a/src/api/DevicesApi.js b/src/api/DevicesApi.js index 20a9b06..97e345f 100644 --- a/src/api/DevicesApi.js +++ b/src/api/DevicesApi.js @@ -36,7 +36,6 @@ module.exports = function(apiClient) { /** * CreateDeviceCode - * Note: This endpoint is in beta. * Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode. * @param {module:model/CreateDeviceCodeRequest} 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/CreateDeviceCodeResponse} and HTTP response @@ -56,7 +55,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -89,7 +88,6 @@ module.exports = function(apiClient) { /** * GetDeviceCode - * Note: This endpoint is in beta. * Retrieves DeviceCode with the associated ID. * @param {String} id The unique identifier for the device code. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceCodeResponse} and HTTP response @@ -110,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -143,12 +141,12 @@ module.exports = function(apiClient) { /** * ListDeviceCodes - * Note: This endpoint is in beta. * Lists all DeviceCodes associated with the merchant. * @param {Object} opts Optional parameters * @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 your original query. See [Paginating results](#paginatingresults) for more information. * @param {String} opts.locationId If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. * @param {String} opts.productType If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. + * @param {String} opts.status If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDeviceCodesResponse} and HTTP response */ this.listDeviceCodesWithHttpInfo = function(opts) { @@ -161,11 +159,12 @@ module.exports = function(apiClient) { var queryParams = { 'cursor': opts['cursor'], 'location_id': opts['locationId'], - 'product_type': opts['productType'] + 'product_type': opts['productType'], + 'status': opts['status'] }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -189,6 +188,7 @@ module.exports = function(apiClient) { * @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 your original query. See [Paginating results](#paginatingresults) for more information. * @param {String} opts.locationId If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. * @param {String} opts.productType If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. + * @param {String} opts.status If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDeviceCodesResponse} */ this.listDeviceCodes = function(opts) { diff --git a/src/api/DisputesApi.js b/src/api/DisputesApi.js index b23610d..d7ea662 100644 --- a/src/api/DisputesApi.js +++ b/src/api/DisputesApi.js @@ -62,7 +62,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -122,7 +122,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -232,7 +232,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -296,7 +296,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -351,7 +351,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -412,7 +412,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js index 27e803d..7b2e6ed 100644 --- a/src/api/EmployeesApi.js +++ b/src/api/EmployeesApi.js @@ -59,7 +59,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js index 1f2233d..6472eab 100644 --- a/src/api/InventoryApi.js +++ b/src/api/InventoryApi.js @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -218,7 +218,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -277,7 +277,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -395,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/InvoicesApi.js b/src/api/InvoicesApi.js index 83a873b..26e1eee 100644 --- a/src/api/InvoicesApi.js +++ b/src/api/InvoicesApi.js @@ -72,7 +72,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -126,7 +126,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -184,7 +184,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -240,7 +240,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -300,7 +300,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -363,7 +363,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -417,7 +417,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -477,7 +477,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js index 03e5e22..f97fffa 100644 --- a/src/api/LaborApi.js +++ b/src/api/LaborApi.js @@ -73,7 +73,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -125,7 +125,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -178,7 +178,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -231,7 +231,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -284,7 +284,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -392,7 +392,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -445,7 +445,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -499,7 +499,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -558,7 +558,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -615,7 +615,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -670,7 +670,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -724,7 +724,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -783,7 +783,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -843,7 +843,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -903,7 +903,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js index 06a159b..d9d3ef2 100644 --- a/src/api/LocationsApi.js +++ b/src/api/LocationsApi.js @@ -39,7 +39,7 @@ module.exports = function(apiClient) { /** * CreateLocation * Note: This endpoint is in beta. - * Creates a location. For more information about locations, see [Locations API Overview](/locations-api). + * Creates a location. * @param {module:model/CreateLocationRequest} 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/CreateLocationResponse} and HTTP response */ @@ -58,7 +58,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -77,7 +77,7 @@ module.exports = function(apiClient) { /** * CreateLocation - * Creates a location. For more information about locations, see [Locations API Overview](/locations-api). + * Creates a location. * @param {module:model/CreateLocationRequest} 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/CreateLocationResponse} */ @@ -91,7 +91,7 @@ module.exports = function(apiClient) { /** * ListLocations - * Provides information of all locations of a business. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. + * Provides information of all locations of a business. Many Square API endpoints require a `location_id` parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLocationsResponse} and HTTP response */ this.listLocationsWithHttpInfo = function() { @@ -104,7 +104,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { /** * ListLocations - * Provides information of all locations of a business. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. + * Provides information of all locations of a business. Many Square API endpoints require a `location_id` parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLocationsResponse} */ this.listLocations = function() { @@ -136,7 +136,7 @@ module.exports = function(apiClient) { /** * RetrieveLocation - * 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). + * Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. * @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 */ @@ -156,7 +156,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -175,7 +175,7 @@ module.exports = function(apiClient) { /** * RetrieveLocation - * 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). + * Retrieves details of a location. You can specify \"main\" as the location ID to retrieve details of the main location. * @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} */ @@ -216,7 +216,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/LoyaltyApi.js b/src/api/LoyaltyApi.js index 9e1eb68..feebc95 100644 --- a/src/api/LoyaltyApi.js +++ b/src/api/LoyaltyApi.js @@ -55,7 +55,7 @@ module.exports = function(apiClient) { /** * AccumulateLoyaltyPoints * Note: This endpoint is in beta. - * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points). + * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call [CalculateLoyaltyPoints](#endpoint-Loyalty-CalculateLoyaltyPoints) to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. * @param {String} accountId The `loyalty account` ID to which to add the points. * @param {module:model/AccumulateLoyaltyPointsRequest} 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/AccumulateLoyaltyPointsResponse} and HTTP response @@ -81,7 +81,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -100,7 +100,7 @@ module.exports = function(apiClient) { /** * AccumulateLoyaltyPoints - * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points). + * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call [CalculateLoyaltyPoints](#endpoint-Loyalty-CalculateLoyaltyPoints) to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. * @param {String} accountId The `loyalty account` ID to which to add the points. * @param {module:model/AccumulateLoyaltyPointsRequest} 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/AccumulateLoyaltyPointsResponse} @@ -116,7 +116,7 @@ module.exports = function(apiClient) { /** * AdjustLoyaltyPoints * Note: This endpoint is in beta. - * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase. + * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](#endpoint-Loyalty-AccumulateLoyaltyPoints) to add points when a buyer pays for the purchase. * @param {String} accountId The ID of the `loyalty account` in which to adjust the points. * @param {module:model/AdjustLoyaltyPointsRequest} 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/AdjustLoyaltyPointsResponse} and HTTP response @@ -142,7 +142,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -161,7 +161,7 @@ module.exports = function(apiClient) { /** * AdjustLoyaltyPoints - * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase. + * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](#endpoint-Loyalty-AccumulateLoyaltyPoints) to add points when a buyer pays for the purchase. * @param {String} accountId The ID of the `loyalty account` in which to adjust the points. * @param {module:model/AdjustLoyaltyPointsRequest} 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/AdjustLoyaltyPointsResponse} @@ -203,7 +203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -238,7 +238,7 @@ module.exports = function(apiClient) { /** * CreateLoyaltyAccount * Note: This endpoint is in beta. - * Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account). + * Creates a loyalty account. * @param {module:model/CreateLoyaltyAccountRequest} 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/CreateLoyaltyAccountResponse} and HTTP response */ @@ -257,7 +257,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -276,7 +276,7 @@ module.exports = function(apiClient) { /** * CreateLoyaltyAccount - * Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account). + * Creates a loyalty account. * @param {module:model/CreateLoyaltyAccountRequest} 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/CreateLoyaltyAccountResponse} */ @@ -291,7 +291,7 @@ module.exports = function(apiClient) { /** * CreateLoyaltyReward * Note: This endpoint is in beta. - * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. * @param {module:model/CreateLoyaltyRewardRequest} 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/CreateLoyaltyRewardResponse} and HTTP response */ @@ -310,7 +310,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -329,7 +329,7 @@ module.exports = function(apiClient) { /** * CreateLoyaltyReward - * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. * @param {module:model/CreateLoyaltyRewardRequest} 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/CreateLoyaltyRewardResponse} */ @@ -344,7 +344,7 @@ module.exports = function(apiClient) { /** * DeleteLoyaltyReward * Note: This endpoint is in beta. - * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](#endpoint-Loyalty-CreateLoyaltyReward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). * @param {String} rewardId The ID of the `loyalty reward` to delete. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteLoyaltyRewardResponse} and HTTP response */ @@ -364,7 +364,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -383,7 +383,7 @@ module.exports = function(apiClient) { /** * DeleteLoyaltyReward - * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](#endpoint-Loyalty-CreateLoyaltyReward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). * @param {String} rewardId The ID of the `loyalty reward` to delete. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteLoyaltyRewardResponse} */ @@ -398,7 +398,7 @@ module.exports = function(apiClient) { /** * ListLoyaltyPrograms * Note: This endpoint is in beta. - * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). . + * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLoyaltyProgramsResponse} and HTTP response */ this.listLoyaltyProgramsWithHttpInfo = function() { @@ -411,7 +411,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -430,7 +430,7 @@ module.exports = function(apiClient) { /** * ListLoyaltyPrograms - * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). . + * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLoyaltyProgramsResponse} */ this.listLoyaltyPrograms = function() { @@ -444,7 +444,7 @@ module.exports = function(apiClient) { /** * RedeemLoyaltyReward * Note: This endpoint is in beta. - * Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Redeems a loyalty reward. The endpoint sets the reward to the `REDEEMED` terminal state. If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. * @param {String} rewardId The ID of the `loyalty reward` to redeem. * @param {module:model/RedeemLoyaltyRewardRequest} 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/RedeemLoyaltyRewardResponse} and HTTP response @@ -470,7 +470,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -489,7 +489,7 @@ module.exports = function(apiClient) { /** * RedeemLoyaltyReward - * Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards). + * Redeems a loyalty reward. The endpoint sets the reward to the `REDEEMED` terminal state. If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. * @param {String} rewardId The ID of the `loyalty reward` to redeem. * @param {module:model/RedeemLoyaltyRewardRequest} 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/RedeemLoyaltyRewardResponse} @@ -525,7 +525,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -579,7 +579,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -613,7 +613,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyAccounts * Note: This endpoint is in beta. - * Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned. + * Searches for loyalty accounts in a loyalty program. You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely. Search results are sorted by `created_at` in ascending order. * @param {module:model/SearchLoyaltyAccountsRequest} 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/SearchLoyaltyAccountsResponse} and HTTP response */ @@ -632,7 +632,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -651,7 +651,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyAccounts - * Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned. + * Searches for loyalty accounts in a loyalty program. You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely. Search results are sorted by `created_at` in ascending order. * @param {module:model/SearchLoyaltyAccountsRequest} 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/SearchLoyaltyAccountsResponse} */ @@ -666,7 +666,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyEvents * Note: This endpoint is in beta. - * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events). + * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. * @param {module:model/SearchLoyaltyEventsRequest} 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/SearchLoyaltyEventsResponse} and HTTP response */ @@ -685,7 +685,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -704,7 +704,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyEvents - * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events). + * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. * @param {module:model/SearchLoyaltyEventsRequest} 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/SearchLoyaltyEventsResponse} */ @@ -719,7 +719,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyRewards * Note: This endpoint is in beta. - * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards). + * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](#endpoint-Loyalty-RetrieveLoyaltyReward) endpoint. * @param {module:model/SearchLoyaltyRewardsRequest} 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/SearchLoyaltyRewardsResponse} and HTTP response */ @@ -738,7 +738,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -757,7 +757,7 @@ module.exports = function(apiClient) { /** * SearchLoyaltyRewards - * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards). + * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](#endpoint-Loyalty-RetrieveLoyaltyReward) endpoint. * @param {module:model/SearchLoyaltyRewardsRequest} 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/SearchLoyaltyRewardsResponse} */ diff --git a/src/api/MerchantsApi.js b/src/api/MerchantsApi.js index 32a848c..5d45009 100644 --- a/src/api/MerchantsApi.js +++ b/src/api/MerchantsApi.js @@ -51,7 +51,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -105,7 +105,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/MobileAuthorizationApi.js b/src/api/MobileAuthorizationApi.js index 8de3d70..002d0a0 100644 --- a/src/api/MobileAuthorizationApi.js +++ b/src/api/MobileAuthorizationApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index 4504f72..d2b13df 100644 --- a/src/api/OAuthApi.js +++ b/src/api/OAuthApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -171,7 +171,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js index 9f3e923..5ea222d 100644 --- a/src/api/OrdersApi.js +++ b/src/api/OrdersApi.js @@ -20,6 +20,7 @@ var CreateOrderRequest = require('../model/CreateOrderRequest'); var CreateOrderResponse = require('../model/CreateOrderResponse'); var PayOrderRequest = require('../model/PayOrderRequest'); var PayOrderResponse = require('../model/PayOrderResponse'); +var RetrieveOrderResponse = require('../model/RetrieveOrderResponse'); var SearchOrdersRequest = require('../model/SearchOrdersRequest'); var SearchOrdersResponse = require('../model/SearchOrdersResponse'); var UpdateOrderRequest = require('../model/UpdateOrderRequest'); @@ -63,7 +64,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -116,7 +117,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -168,7 +169,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -228,7 +229,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -260,6 +261,59 @@ module.exports = function(apiClient) { } + /** + * RetrieveOrder + * Retrieves an [Order](#type-order) by ID. + * @param {String} orderId The ID of the order to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveOrderResponse} and HTTP response + */ + this.retrieveOrderWithHttpInfo = function(orderId) { + var postBody = null; + + // verify the required parameter 'orderId' is set + if (orderId === undefined || orderId === null) { + throw new Error("Missing the required parameter 'orderId' when calling retrieveOrder"); + } + + + var pathParams = { + 'order_id': orderId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-10-28'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = RetrieveOrderResponse; + + return this.apiClient.callApi( + '/v2/orders/{order_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * RetrieveOrder + * Retrieves an [Order](#type-order) by ID. + * @param {String} orderId The ID of the order to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveOrderResponse} + */ + this.retrieveOrder = function(orderId) { + return this.retrieveOrderWithHttpInfo(orderId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * SearchOrders * Search all orders for one or more locations. Orders include all sales, returns, and exchanges regardless of how or when they entered the Square Ecosystem (e.g. Point of Sale, Invoices, Connect APIs, etc). SearchOrders requests need to specify which locations to search and define a [`SearchOrdersQuery`](#type-searchordersquery) object which controls how to sort or filter the results. Your SearchOrdersQuery can: Set filter criteria. Set sort order. Determine whether to return results as complete Order objects, or as [OrderEntry](#type-orderentry) objects. Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was created, not the time it was subsequently transmitted to Square. @@ -281,7 +335,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -341,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/PaymentsApi.js b/src/api/PaymentsApi.js index e687a62..ffd3326 100644 --- a/src/api/PaymentsApi.js +++ b/src/api/PaymentsApi.js @@ -40,8 +40,8 @@ module.exports = function(apiClient) { /** * CancelPayment - * Cancels (voids) a payment. If you set `autocomplete` to false when creating a payment, you can cancel the payment using this endpoint. - * @param {String} paymentId `payment_id` identifying the payment to be canceled. + * Cancels (voids) a payment. If you set `autocomplete` to `false` when creating a payment, you can cancel the payment using this endpoint. + * @param {String} paymentId The `payment_id` identifying the payment to be canceled. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelPaymentResponse} and HTTP response */ this.cancelPaymentWithHttpInfo = function(paymentId) { @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -79,8 +79,8 @@ module.exports = function(apiClient) { /** * CancelPayment - * Cancels (voids) a payment. If you set `autocomplete` to false when creating a payment, you can cancel the payment using this endpoint. - * @param {String} paymentId `payment_id` identifying the payment to be canceled. + * Cancels (voids) a payment. If you set `autocomplete` to `false` when creating a payment, you can cancel the payment using this endpoint. + * @param {String} paymentId The `payment_id` identifying the payment to be canceled. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelPaymentResponse} */ this.cancelPayment = function(paymentId) { @@ -93,7 +93,7 @@ module.exports = function(apiClient) { /** * CancelPaymentByIdempotencyKey - * Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end point returns successfully. + * Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when the status of a `CreatePayment` request is unknown (for example, after you send a `CreatePayment` request, a network error occurs and you do not get a response). In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your `CreatePayment` request that you want to cancel. After canceling the payment, you can submit your `CreatePayment` request again. Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully. * @param {module:model/CancelPaymentByIdempotencyKeyRequest} 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/CancelPaymentByIdempotencyKeyResponse} and HTTP response */ @@ -112,7 +112,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -131,7 +131,7 @@ module.exports = function(apiClient) { /** * CancelPaymentByIdempotencyKey - * Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end point returns successfully. + * Cancels (voids) a payment identified by the idempotency key that is specified in the request. Use this method when the status of a `CreatePayment` request is unknown (for example, after you send a `CreatePayment` request, a network error occurs and you do not get a response). In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your `CreatePayment` request that you want to cancel. After canceling the payment, you can submit your `CreatePayment` request again. Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully. * @param {module:model/CancelPaymentByIdempotencyKeyRequest} 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/CancelPaymentByIdempotencyKeyResponse} */ @@ -145,8 +145,8 @@ module.exports = function(apiClient) { /** * CompletePayment - * Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete (capture) the payment using this endpoint. - * @param {String} paymentId Unique ID identifying the payment to be completed. + * Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set `autocomplete` to `false` when creating a payment, you can complete (capture) the payment using this endpoint. + * @param {String} paymentId The unique ID identifying the payment to be completed. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CompletePaymentResponse} and HTTP response */ this.completePaymentWithHttpInfo = function(paymentId) { @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -184,8 +184,8 @@ module.exports = function(apiClient) { /** * CompletePayment - * Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete (capture) the payment using this endpoint. - * @param {String} paymentId Unique ID identifying the payment to be completed. + * Completes (captures) a payment. By default, payments are set to complete immediately after they are created. If you set `autocomplete` to `false` when creating a payment, you can complete (capture) the payment using this endpoint. + * @param {String} paymentId The unique ID identifying the payment to be completed. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CompletePaymentResponse} */ this.completePayment = function(paymentId) { @@ -198,7 +198,7 @@ module.exports = function(apiClient) { /** * CreatePayment - * Charges a payment source, for example, a card represented by customer's card on file or a card nonce. In addition to the payment source, the request must also include the amount to accept for the payment. There are several optional parameters that you can include in the request. For example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system. The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. + * Charges a payment source (for example, a card represented by customer's card on file or a card nonce). In addition to the payment source, the request must include the amount to accept for the payment. There are several optional parameters that you can include in the request (for example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. * @param {module:model/CreatePaymentRequest} 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/CreatePaymentResponse} and HTTP response */ @@ -217,7 +217,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -236,7 +236,7 @@ module.exports = function(apiClient) { /** * CreatePayment - * Charges a payment source, for example, a card represented by customer's card on file or a card nonce. In addition to the payment source, the request must also include the amount to accept for the payment. There are several optional parameters that you can include in the request. For example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system. The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. + * Charges a payment source (for example, a card represented by customer's card on file or a card nonce). In addition to the payment source, the request must include the amount to accept for the payment. There are several optional parameters that you can include in the request (for example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. * @param {module:model/CreatePaymentRequest} 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/CreatePaymentResponse} */ @@ -250,8 +250,8 @@ module.exports = function(apiClient) { /** * GetPayment - * Retrieves details for a specific Payment. - * @param {String} paymentId Unique ID for the desired `Payment`. + * Retrieves details for a specific payment. + * @param {String} paymentId A unique ID for the desired payment. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetPaymentResponse} and HTTP response */ this.getPaymentWithHttpInfo = function(paymentId) { @@ -270,7 +270,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -289,8 +289,8 @@ module.exports = function(apiClient) { /** * GetPayment - * Retrieves details for a specific Payment. - * @param {String} paymentId Unique ID for the desired `Payment`. + * Retrieves details for a specific payment. + * @param {String} paymentId A unique ID for the desired payment. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetPaymentResponse} */ this.getPayment = function(paymentId) { @@ -303,17 +303,17 @@ module.exports = function(apiClient) { /** * ListPayments - * Retrieves a list of payments taken by the account making the request. Max results per page: 100 + * Retrieves a list of payments taken by the account making the request. The maximum results per page is 100. * @param {Object} opts Optional parameters - * @param {String} opts.beginTime Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. - * @param {String} opts.endTime Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. - * @param {String} opts.sortOrder The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). - * @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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. - * @param {String} opts.locationId Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. - * @param {Number} opts.total The exact amount in the total_money for a `Payment`. - * @param {String} opts.last4 The last 4 digits of `Payment` card. - * @param {String} opts.cardBrand The brand of `Payment` card. For example, `VISA` - * @param {Number} opts.limit Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` + * @param {String} opts.beginTime The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. + * @param {String} opts.endTime The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. + * @param {String} opts.sortOrder The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). + * @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 the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). + * @param {String} opts.locationId Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. + * @param {Number} opts.total The exact amount in the `total_money` for a payment. + * @param {String} opts.last4 The last four digits of a payment card. + * @param {String} opts.cardBrand The brand of the payment card (for example, VISA). + * @param {Number} opts.limit The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentsResponse} and HTTP response */ this.listPaymentsWithHttpInfo = function(opts) { @@ -336,7 +336,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -355,17 +355,17 @@ module.exports = function(apiClient) { /** * ListPayments - * Retrieves a list of payments taken by the account making the request. Max results per page: 100 + * Retrieves a list of payments taken by the account making the request. The maximum results per page is 100. * @param {Object} opts Optional parameters - * @param {String} opts.beginTime Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. - * @param {String} opts.endTime Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. - * @param {String} opts.sortOrder The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). - * @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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. - * @param {String} opts.locationId Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. - * @param {Number} opts.total The exact amount in the total_money for a `Payment`. - * @param {String} opts.last4 The last 4 digits of `Payment` card. - * @param {String} opts.cardBrand The brand of `Payment` card. For example, `VISA` - * @param {Number} opts.limit Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` + * @param {String} opts.beginTime The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. + * @param {String} opts.endTime The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. + * @param {String} opts.sortOrder The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). + * @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 the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). + * @param {String} opts.locationId Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. + * @param {Number} opts.total The exact amount in the `total_money` for a payment. + * @param {String} opts.last4 The last four digits of a payment card. + * @param {String} opts.cardBrand The brand of the payment card (for example, VISA). + * @param {Number} opts.limit The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentsResponse} */ this.listPayments = function(opts) { diff --git a/src/api/RefundsApi.js b/src/api/RefundsApi.js index d365c1b..5d9d3e0 100644 --- a/src/api/RefundsApi.js +++ b/src/api/RefundsApi.js @@ -36,7 +36,7 @@ module.exports = function(apiClient) { /** * GetPaymentRefund - * Retrieves a specific `Refund` using the `refund_id`. + * Retrieves a specific refund using the `refund_id`. * @param {String} refundId Unique ID for the desired `PaymentRefund`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetPaymentRefundResponse} and HTTP response */ @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -75,7 +75,7 @@ module.exports = function(apiClient) { /** * GetPaymentRefund - * Retrieves a specific `Refund` using the `refund_id`. + * Retrieves a specific refund using the `refund_id`. * @param {String} refundId Unique ID for the desired `PaymentRefund`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetPaymentRefundResponse} */ @@ -89,7 +89,7 @@ module.exports = function(apiClient) { /** * ListPaymentRefunds - * Retrieves a list of refunds for the account making the request. Max results per page: 100 + * Retrieves a list of refunds for the account making the request. The maximum results per page is 100. * @param {Object} opts Optional parameters * @param {String} opts.beginTime Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. * @param {String} opts.endTime Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. @@ -120,7 +120,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -139,7 +139,7 @@ module.exports = function(apiClient) { /** * ListPaymentRefunds - * Retrieves a list of refunds for the account making the request. Max results per page: 100 + * Retrieves a list of refunds for the account making the request. The maximum results per page is 100. * @param {Object} opts Optional parameters * @param {String} opts.beginTime Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. * @param {String} opts.endTime Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. @@ -180,7 +180,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/SubscriptionsApi.js b/src/api/SubscriptionsApi.js index 21d2d0c..202d04a 100644 --- a/src/api/SubscriptionsApi.js +++ b/src/api/SubscriptionsApi.js @@ -62,7 +62,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -115,7 +115,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -175,7 +175,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -232,7 +232,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -285,7 +285,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -345,7 +345,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/TeamApi.js b/src/api/TeamApi.js index 44faffa..7b36a79 100644 --- a/src/api/TeamApi.js +++ b/src/api/TeamApi.js @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -117,7 +117,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -150,7 +150,7 @@ module.exports = function(apiClient) { /** * CreateTeamMember - * Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `first_name` - `last_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). + * Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `given_name` - `family_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). * @param {module:model/CreateTeamMemberRequest} 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/CreateTeamMemberResponse} and HTTP response */ @@ -169,7 +169,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -188,7 +188,7 @@ module.exports = function(apiClient) { /** * CreateTeamMember - * Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `first_name` - `last_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). + * Creates a single `TeamMember` object. The `TeamMember` will be returned on successful creates. You must provide the following values in your request to this endpoint: - `given_name` - `family_name` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#createteammember). * @param {module:model/CreateTeamMemberRequest} 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/CreateTeamMemberResponse} */ @@ -202,7 +202,7 @@ module.exports = function(apiClient) { /** * RetrieveTeamMember - * Retrieve a `TeamMember` object for the given `TeamMember.id` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). + * Retrieve a `TeamMember` object for the given `TeamMember.id`. Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). * @param {String} teamMemberId The ID of the team member to retrieve. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveTeamMemberResponse} and HTTP response */ @@ -222,7 +222,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -241,7 +241,7 @@ module.exports = function(apiClient) { /** * RetrieveTeamMember - * Retrieve a `TeamMember` object for the given `TeamMember.id` Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). + * Retrieve a `TeamMember` object for the given `TeamMember.id`. Learn about [Troubleshooting the Teams API](/docs/team/troubleshooting#retrieveteammember). * @param {String} teamMemberId The ID of the team member to retrieve. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveTeamMemberResponse} */ @@ -275,7 +275,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -308,7 +308,7 @@ module.exports = function(apiClient) { /** * SearchTeamMembers - * Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `is_active` + * Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `status` * @param {module:model/SearchTeamMembersRequest} 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/SearchTeamMembersResponse} and HTTP response */ @@ -327,7 +327,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -346,7 +346,7 @@ module.exports = function(apiClient) { /** * SearchTeamMembers - * Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `is_active` + * Returns a paginated list of `TeamMember` objects for a business. The list to be returned can be filtered by: - location IDs **and** - `status` * @param {module:model/SearchTeamMembersRequest} 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/SearchTeamMembersResponse} */ @@ -386,7 +386,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -446,7 +446,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/TerminalApi.js b/src/api/TerminalApi.js index 24b7885..da7ed6c 100644 --- a/src/api/TerminalApi.js +++ b/src/api/TerminalApi.js @@ -13,11 +13,17 @@ */ var ApiClient = require('../ApiClient'); var CancelTerminalCheckoutResponse = require('../model/CancelTerminalCheckoutResponse'); +var CancelTerminalRefundResponse = require('../model/CancelTerminalRefundResponse'); var CreateTerminalCheckoutRequest = require('../model/CreateTerminalCheckoutRequest'); var CreateTerminalCheckoutResponse = require('../model/CreateTerminalCheckoutResponse'); +var CreateTerminalRefundRequest = require('../model/CreateTerminalRefundRequest'); +var CreateTerminalRefundResponse = require('../model/CreateTerminalRefundResponse'); var GetTerminalCheckoutResponse = require('../model/GetTerminalCheckoutResponse'); +var GetTerminalRefundResponse = require('../model/GetTerminalRefundResponse'); var SearchTerminalCheckoutsRequest = require('../model/SearchTerminalCheckoutsRequest'); var SearchTerminalCheckoutsResponse = require('../model/SearchTerminalCheckoutsResponse'); +var SearchTerminalRefundsRequest = require('../model/SearchTerminalRefundsRequest'); +var SearchTerminalRefundsResponse = require('../model/SearchTerminalRefundsResponse'); /** * Terminal service. @@ -38,8 +44,7 @@ module.exports = function(apiClient) { /** * CancelTerminalCheckout - * Note: This endpoint is in beta. - * Cancels a Terminal checkout request, if the status of the request permits it. + * Cancels a Terminal checkout request if the status of the request permits it. * @param {String} checkoutId Unique ID for the desired `TerminalCheckout` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelTerminalCheckoutResponse} and HTTP response */ @@ -59,7 +64,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -78,7 +83,7 @@ module.exports = function(apiClient) { /** * CancelTerminalCheckout - * Cancels a Terminal checkout request, if the status of the request permits it. + * Cancels a Terminal checkout request if the status of the request permits it. * @param {String} checkoutId Unique ID for the desired `TerminalCheckout` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelTerminalCheckoutResponse} */ @@ -91,8 +96,61 @@ module.exports = function(apiClient) { /** - * CreateTerminalCheckout + * CancelTerminalRefund * Note: This endpoint is in beta. + * Cancels an Interac terminal refund request by refund request ID if the status of the request permits it. + * @param {String} terminalRefundId Unique ID for the desired `TerminalRefund` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelTerminalRefundResponse} and HTTP response + */ + this.cancelTerminalRefundWithHttpInfo = function(terminalRefundId) { + var postBody = null; + + // verify the required parameter 'terminalRefundId' is set + if (terminalRefundId === undefined || terminalRefundId === null) { + throw new Error("Missing the required parameter 'terminalRefundId' when calling cancelTerminalRefund"); + } + + + var pathParams = { + 'terminal_refund_id': terminalRefundId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-10-28'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CancelTerminalRefundResponse; + + return this.apiClient.callApi( + '/v2/terminals/refunds/{terminal_refund_id}/cancel', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CancelTerminalRefund + * Cancels an Interac terminal refund request by refund request ID if the status of the request permits it. + * @param {String} terminalRefundId Unique ID for the desired `TerminalRefund` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelTerminalRefundResponse} + */ + this.cancelTerminalRefund = function(terminalRefundId) { + return this.cancelTerminalRefundWithHttpInfo(terminalRefundId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * CreateTerminalCheckout * Creates a new Terminal checkout request and sends it to the specified device to take a payment for the requested amount. * @param {module:model/CreateTerminalCheckoutRequest} 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/CreateTerminalCheckoutResponse} and HTTP response @@ -112,7 +170,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -144,8 +202,60 @@ module.exports = function(apiClient) { /** - * GetTerminalCheckout + * CreateTerminalRefund * Note: This endpoint is in beta. + * Creates a request to refund an Interac payment completed on a Square Terminal. + * @param {module:model/CreateTerminalRefundRequest} 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/CreateTerminalRefundResponse} and HTTP response + */ + this.createTerminalRefundWithHttpInfo = 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 createTerminalRefund"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-10-28'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CreateTerminalRefundResponse; + + return this.apiClient.callApi( + '/v2/terminals/refunds', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CreateTerminalRefund + * Creates a request to refund an Interac payment completed on a Square Terminal. + * @param {module:model/CreateTerminalRefundRequest} 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/CreateTerminalRefundResponse} + */ + this.createTerminalRefund = function(body) { + return this.createTerminalRefundWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * GetTerminalCheckout * Retrieves a Terminal checkout request by checkout_id. * @param {String} checkoutId Unique ID for the desired `TerminalCheckout` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTerminalCheckoutResponse} and HTTP response @@ -166,7 +276,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -198,8 +308,61 @@ module.exports = function(apiClient) { /** - * SearchTerminalCheckouts + * GetTerminalRefund * Note: This endpoint is in beta. + * Retrieves an Interac terminal refund object by ID. + * @param {String} terminalRefundId Unique ID for the desired `TerminalRefund` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTerminalRefundResponse} and HTTP response + */ + this.getTerminalRefundWithHttpInfo = function(terminalRefundId) { + var postBody = null; + + // verify the required parameter 'terminalRefundId' is set + if (terminalRefundId === undefined || terminalRefundId === null) { + throw new Error("Missing the required parameter 'terminalRefundId' when calling getTerminalRefund"); + } + + + var pathParams = { + 'terminal_refund_id': terminalRefundId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-10-28'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = GetTerminalRefundResponse; + + return this.apiClient.callApi( + '/v2/terminals/refunds/{terminal_refund_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * GetTerminalRefund + * Retrieves an Interac terminal refund object by ID. + * @param {String} terminalRefundId Unique ID for the desired `TerminalRefund` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTerminalRefundResponse} + */ + this.getTerminalRefund = function(terminalRefundId) { + return this.getTerminalRefundWithHttpInfo(terminalRefundId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * SearchTerminalCheckouts * Retrieves a filtered list of Terminal checkout requests created by the account making the request. * @param {module:model/SearchTerminalCheckoutsRequest} 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/SearchTerminalCheckoutsResponse} and HTTP response @@ -219,7 +382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -248,4 +411,57 @@ module.exports = function(apiClient) { return response_and_data.data; }); } + + + /** + * SearchTerminalRefunds + * Note: This endpoint is in beta. + * Retrieves a filtered list of Terminal Interac refund requests created by the seller making the request. + * @param {module:model/SearchTerminalRefundsRequest} 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/SearchTerminalRefundsResponse} and HTTP response + */ + this.searchTerminalRefundsWithHttpInfo = 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 searchTerminalRefunds"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-10-28'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = SearchTerminalRefundsResponse; + + return this.apiClient.callApi( + '/v2/terminals/refunds/search', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * SearchTerminalRefunds + * Retrieves a filtered list of Terminal Interac refund requests created by the seller making the request. + * @param {module:model/SearchTerminalRefundsRequest} 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/SearchTerminalRefundsResponse} + */ + this.searchTerminalRefunds = function(body) { + return this.searchTerminalRefundsWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } }; diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index 3576e62..f2b298e 100644 --- a/src/api/TransactionsApi.js +++ b/src/api/TransactionsApi.js @@ -70,7 +70,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -132,7 +132,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -201,7 +201,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -268,7 +268,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -405,7 +405,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -468,7 +468,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js index e1e1263..9a168ff 100644 --- a/src/api/V1EmployeesApi.js +++ b/src/api/V1EmployeesApi.js @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -217,7 +217,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -280,7 +280,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -407,7 +407,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -471,7 +471,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -543,7 +543,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -616,7 +616,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -670,7 +670,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -723,7 +723,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -778,7 +778,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -837,7 +837,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -897,7 +897,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -959,7 +959,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js index 6094a8f..fda14c4 100644 --- a/src/api/V1ItemsApi.js +++ b/src/api/V1ItemsApi.js @@ -79,7 +79,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -150,7 +150,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -221,7 +221,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -284,7 +284,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -346,7 +346,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -408,7 +408,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -470,7 +470,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -532,7 +532,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -601,7 +601,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -664,7 +664,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -733,7 +733,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -797,7 +797,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -860,7 +860,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -923,7 +923,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -986,7 +986,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1049,7 +1049,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1119,7 +1119,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1183,7 +1183,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1252,7 +1252,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1325,7 +1325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1382,7 +1382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1437,7 +1437,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1492,7 +1492,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1553,7 +1553,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1615,7 +1615,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1672,7 +1672,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1727,7 +1727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1796,7 +1796,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1867,7 +1867,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1931,7 +1931,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -1994,7 +1994,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2063,7 +2063,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2133,7 +2133,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2203,7 +2203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2273,7 +2273,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2343,7 +2343,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2420,7 +2420,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2491,7 +2491,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2561,7 +2561,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -2638,7 +2638,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js index 5191ecc..ea1691f 100644 --- a/src/api/V1LocationsApi.js +++ b/src/api/V1LocationsApi.js @@ -48,7 +48,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -95,7 +95,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js index 0baf51e..2d9407e 100644 --- a/src/api/V1TransactionsApi.js +++ b/src/api/V1TransactionsApi.js @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -182,7 +182,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -253,7 +253,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -325,7 +325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -398,7 +398,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -528,7 +528,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -589,7 +589,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -650,7 +650,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; @@ -717,7 +717,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-09-23'; + headerParams['Square-Version'] = '2020-10-28'; var formParams = { }; diff --git a/src/index.js b/src/index.js index 7752d65..d97495f 100644 --- a/src/index.js +++ b/src/index.js @@ -63,6 +63,8 @@ var CancelSubscriptionRequest = require('./model/CancelSubscriptionRequest'); var CancelSubscriptionResponse = require('./model/CancelSubscriptionResponse'); var CancelTerminalCheckoutRequest = require('./model/CancelTerminalCheckoutRequest'); var CancelTerminalCheckoutResponse = require('./model/CancelTerminalCheckoutResponse'); +var CancelTerminalRefundRequest = require('./model/CancelTerminalRefundRequest'); +var CancelTerminalRefundResponse = require('./model/CancelTerminalRefundResponse'); var CaptureTransactionRequest = require('./model/CaptureTransactionRequest'); var CaptureTransactionResponse = require('./model/CaptureTransactionResponse'); var Card = require('./model/Card'); @@ -122,6 +124,7 @@ var CatalogQueryItemsForModifierList = require('./model/CatalogQueryItemsForModi var CatalogQueryItemsForTax = require('./model/CatalogQueryItemsForTax'); var CatalogQueryPrefix = require('./model/CatalogQueryPrefix'); var CatalogQueryRange = require('./model/CatalogQueryRange'); +var CatalogQuerySet = require('./model/CatalogQuerySet'); var CatalogQuerySortedAttribute = require('./model/CatalogQuerySortedAttribute'); var CatalogQueryText = require('./model/CatalogQueryText'); var CatalogQuickAmount = require('./model/CatalogQuickAmount'); @@ -182,6 +185,8 @@ var CreateTeamMemberRequest = require('./model/CreateTeamMemberRequest'); var CreateTeamMemberResponse = require('./model/CreateTeamMemberResponse'); var CreateTerminalCheckoutRequest = require('./model/CreateTerminalCheckoutRequest'); var CreateTerminalCheckoutResponse = require('./model/CreateTerminalCheckoutResponse'); +var CreateTerminalRefundRequest = require('./model/CreateTerminalRefundRequest'); +var CreateTerminalRefundResponse = require('./model/CreateTerminalRefundResponse'); var Currency = require('./model/Currency'); var CustomAttributeFilter = require('./model/CustomAttributeFilter'); var Customer = require('./model/Customer'); @@ -258,6 +263,9 @@ var GetTeamMemberWageRequest = require('./model/GetTeamMemberWageRequest'); var GetTeamMemberWageResponse = require('./model/GetTeamMemberWageResponse'); var GetTerminalCheckoutRequest = require('./model/GetTerminalCheckoutRequest'); var GetTerminalCheckoutResponse = require('./model/GetTerminalCheckoutResponse'); +var GetTerminalRefundRequest = require('./model/GetTerminalRefundRequest'); +var GetTerminalRefundResponse = require('./model/GetTerminalRefundResponse'); +var InlineTypes = require('./model/InlineTypes'); var InventoryAdjustment = require('./model/InventoryAdjustment'); var InventoryAlertType = require('./model/InventoryAlertType'); var InventoryChange = require('./model/InventoryChange'); @@ -480,6 +488,8 @@ var RetrieveLoyaltyRewardRequest = require('./model/RetrieveLoyaltyRewardRequest var RetrieveLoyaltyRewardResponse = require('./model/RetrieveLoyaltyRewardResponse'); var RetrieveMerchantRequest = require('./model/RetrieveMerchantRequest'); var RetrieveMerchantResponse = require('./model/RetrieveMerchantResponse'); +var RetrieveOrderRequest = require('./model/RetrieveOrderRequest'); +var RetrieveOrderResponse = require('./model/RetrieveOrderResponse'); var RetrieveSubscriptionRequest = require('./model/RetrieveSubscriptionRequest'); var RetrieveSubscriptionResponse = require('./model/RetrieveSubscriptionResponse'); var RetrieveTeamMemberRequest = require('./model/RetrieveTeamMemberRequest'); @@ -530,6 +540,8 @@ var SearchTeamMembersRequest = require('./model/SearchTeamMembersRequest'); var SearchTeamMembersResponse = require('./model/SearchTeamMembersResponse'); var SearchTerminalCheckoutsRequest = require('./model/SearchTerminalCheckoutsRequest'); var SearchTerminalCheckoutsResponse = require('./model/SearchTerminalCheckoutsResponse'); +var SearchTerminalRefundsRequest = require('./model/SearchTerminalRefundsRequest'); +var SearchTerminalRefundsResponse = require('./model/SearchTerminalRefundsResponse'); var Shift = require('./model/Shift'); var ShiftFilter = require('./model/ShiftFilter'); var ShiftFilterStatus = require('./model/ShiftFilterStatus'); @@ -560,8 +572,6 @@ var TeamMemberAssignedLocationsAssignmentType = require('./model/TeamMemberAssig var TeamMemberStatus = require('./model/TeamMemberStatus'); var TeamMemberWage = require('./model/TeamMemberWage'); var Tender = require('./model/Tender'); -var TenderBankTransferDetails = require('./model/TenderBankTransferDetails'); -var TenderBankTransferDetailsStatus = require('./model/TenderBankTransferDetailsStatus'); var TenderCardDetails = require('./model/TenderCardDetails'); var TenderCardDetailsEntryMethod = require('./model/TenderCardDetailsEntryMethod'); var TenderCardDetailsStatus = require('./model/TenderCardDetailsStatus'); @@ -571,6 +581,10 @@ var TerminalCheckout = require('./model/TerminalCheckout'); var TerminalCheckoutQuery = require('./model/TerminalCheckoutQuery'); var TerminalCheckoutQueryFilter = require('./model/TerminalCheckoutQueryFilter'); var TerminalCheckoutQuerySort = require('./model/TerminalCheckoutQuerySort'); +var TerminalRefund = require('./model/TerminalRefund'); +var TerminalRefundQuery = require('./model/TerminalRefundQuery'); +var TerminalRefundQueryFilter = require('./model/TerminalRefundQueryFilter'); +var TerminalRefundQuerySort = require('./model/TerminalRefundQuerySort'); var TimeRange = require('./model/TimeRange'); var TipSettings = require('./model/TipSettings'); var Transaction = require('./model/Transaction'); @@ -764,6 +778,7 @@ var V1UpdateVariationRequest = require('./model/V1UpdateVariationRequest'); var V1Variation = require('./model/V1Variation'); var V1VariationInventoryAlertType = require('./model/V1VariationInventoryAlertType'); var V1VariationPricingType = require('./model/V1VariationPricingType'); +var VersionedCatalogObject = require('./model/VersionedCatalogObject'); var VoidTransactionRequest = require('./model/VoidTransactionRequest'); var VoidTransactionResponse = require('./model/VoidTransactionResponse'); var WageSetting = require('./model/WageSetting'); @@ -831,7 +846,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *

* @module index - * @version 4.20200923.4 + * @version 4.20201028.5 */ module.exports = { /** @@ -1089,6 +1104,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CancelTerminalCheckoutResponse} */ CancelTerminalCheckoutResponse: CancelTerminalCheckoutResponse, + /** + * The CancelTerminalRefundRequest model constructor. + * @property {module:model/CancelTerminalRefundRequest} + */ + CancelTerminalRefundRequest: CancelTerminalRefundRequest, + /** + * The CancelTerminalRefundResponse model constructor. + * @property {module:model/CancelTerminalRefundResponse} + */ + CancelTerminalRefundResponse: CancelTerminalRefundResponse, /** * The CaptureTransactionRequest model constructor. * @property {module:model/CaptureTransactionRequest} @@ -1384,6 +1409,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CatalogQueryRange} */ CatalogQueryRange: CatalogQueryRange, + /** + * The CatalogQuerySet model constructor. + * @property {module:model/CatalogQuerySet} + */ + CatalogQuerySet: CatalogQuerySet, /** * The CatalogQuerySortedAttribute model constructor. * @property {module:model/CatalogQuerySortedAttribute} @@ -1684,6 +1714,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CreateTerminalCheckoutResponse} */ CreateTerminalCheckoutResponse: CreateTerminalCheckoutResponse, + /** + * The CreateTerminalRefundRequest model constructor. + * @property {module:model/CreateTerminalRefundRequest} + */ + CreateTerminalRefundRequest: CreateTerminalRefundRequest, + /** + * The CreateTerminalRefundResponse model constructor. + * @property {module:model/CreateTerminalRefundResponse} + */ + CreateTerminalRefundResponse: CreateTerminalRefundResponse, /** * The Currency model constructor. * @property {module:model/Currency} @@ -2064,6 +2104,21 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/GetTerminalCheckoutResponse} */ GetTerminalCheckoutResponse: GetTerminalCheckoutResponse, + /** + * The GetTerminalRefundRequest model constructor. + * @property {module:model/GetTerminalRefundRequest} + */ + GetTerminalRefundRequest: GetTerminalRefundRequest, + /** + * The GetTerminalRefundResponse model constructor. + * @property {module:model/GetTerminalRefundResponse} + */ + GetTerminalRefundResponse: GetTerminalRefundResponse, + /** + * The InlineTypes model constructor. + * @property {module:model/InlineTypes} + */ + InlineTypes: InlineTypes, /** * The InventoryAdjustment model constructor. * @property {module:model/InventoryAdjustment} @@ -3174,6 +3229,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/RetrieveMerchantResponse} */ RetrieveMerchantResponse: RetrieveMerchantResponse, + /** + * The RetrieveOrderRequest model constructor. + * @property {module:model/RetrieveOrderRequest} + */ + RetrieveOrderRequest: RetrieveOrderRequest, + /** + * The RetrieveOrderResponse model constructor. + * @property {module:model/RetrieveOrderResponse} + */ + RetrieveOrderResponse: RetrieveOrderResponse, /** * The RetrieveSubscriptionRequest model constructor. * @property {module:model/RetrieveSubscriptionRequest} @@ -3424,6 +3489,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/SearchTerminalCheckoutsResponse} */ SearchTerminalCheckoutsResponse: SearchTerminalCheckoutsResponse, + /** + * The SearchTerminalRefundsRequest model constructor. + * @property {module:model/SearchTerminalRefundsRequest} + */ + SearchTerminalRefundsRequest: SearchTerminalRefundsRequest, + /** + * The SearchTerminalRefundsResponse model constructor. + * @property {module:model/SearchTerminalRefundsResponse} + */ + SearchTerminalRefundsResponse: SearchTerminalRefundsResponse, /** * The Shift model constructor. * @property {module:model/Shift} @@ -3574,16 +3649,6 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Tender} */ Tender: Tender, - /** - * The TenderBankTransferDetails model constructor. - * @property {module:model/TenderBankTransferDetails} - */ - TenderBankTransferDetails: TenderBankTransferDetails, - /** - * The TenderBankTransferDetailsStatus model constructor. - * @property {module:model/TenderBankTransferDetailsStatus} - */ - TenderBankTransferDetailsStatus: TenderBankTransferDetailsStatus, /** * The TenderCardDetails model constructor. * @property {module:model/TenderCardDetails} @@ -3629,6 +3694,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/TerminalCheckoutQuerySort} */ TerminalCheckoutQuerySort: TerminalCheckoutQuerySort, + /** + * The TerminalRefund model constructor. + * @property {module:model/TerminalRefund} + */ + TerminalRefund: TerminalRefund, + /** + * The TerminalRefundQuery model constructor. + * @property {module:model/TerminalRefundQuery} + */ + TerminalRefundQuery: TerminalRefundQuery, + /** + * The TerminalRefundQueryFilter model constructor. + * @property {module:model/TerminalRefundQueryFilter} + */ + TerminalRefundQueryFilter: TerminalRefundQueryFilter, + /** + * The TerminalRefundQuerySort model constructor. + * @property {module:model/TerminalRefundQuerySort} + */ + TerminalRefundQuerySort: TerminalRefundQuerySort, /** * The TimeRange model constructor. * @property {module:model/TimeRange} @@ -4594,6 +4679,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/V1VariationPricingType} */ V1VariationPricingType: V1VariationPricingType, + /** + * The VersionedCatalogObject model constructor. + * @property {module:model/VersionedCatalogObject} + */ + VersionedCatalogObject: VersionedCatalogObject, /** * The VoidTransactionRequest model constructor. * @property {module:model/VoidTransactionRequest} diff --git a/src/model/BatchDeleteCatalogObjectsResponse.js b/src/model/BatchDeleteCatalogObjectsResponse.js index e7918cd..0f82c42 100644 --- a/src/model/BatchDeleteCatalogObjectsResponse.js +++ b/src/model/BatchDeleteCatalogObjectsResponse.js @@ -61,7 +61,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The set of Errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/BatchRetrieveCatalogObjectsResponse.js b/src/model/BatchRetrieveCatalogObjectsResponse.js index 4d5512e..81f2957 100644 --- a/src/model/BatchRetrieveCatalogObjectsResponse.js +++ b/src/model/BatchRetrieveCatalogObjectsResponse.js @@ -62,7 +62,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The set of `Error`s encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/BatchUpsertCatalogObjectsResponse.js b/src/model/BatchUpsertCatalogObjectsResponse.js index ec4a808..c9cf7a1 100644 --- a/src/model/BatchUpsertCatalogObjectsResponse.js +++ b/src/model/BatchUpsertCatalogObjectsResponse.js @@ -67,7 +67,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors that encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/BusinessHoursPeriod.js b/src/model/BusinessHoursPeriod.js index d30ef10..faf4cc5 100644 --- a/src/model/BusinessHoursPeriod.js +++ b/src/model/BusinessHoursPeriod.js @@ -65,12 +65,12 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['day_of_week'] = undefined; /** - * The start time of a business hours period, specified in local time using partial-time RFC3339 format. + * The start time of a business hours period, specified in local time using partial-time RFC 3339 format. * @member {String} start_local_time */ exports.prototype['start_local_time'] = undefined; /** - * The end time of a business hours period, specified in local time using partial-time RFC3339 format. + * The end time of a business hours period, specified in local time using partial-time RFC 3339 format. * @member {String} end_local_time */ exports.prototype['end_local_time'] = undefined; diff --git a/src/model/CancelPaymentByIdempotencyKeyRequest.js b/src/model/CancelPaymentByIdempotencyKeyRequest.js index 1ebcbe5..12721d6 100644 --- a/src/model/CancelPaymentByIdempotencyKeyRequest.js +++ b/src/model/CancelPaymentByIdempotencyKeyRequest.js @@ -23,10 +23,10 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CancelPaymentByIdempotencyKeyRequest. - * Specifies idempotency key of a payment to cancel. + * Specifies the idempotency key of a payment to cancel. * @alias module:model/CancelPaymentByIdempotencyKeyRequest * @class - * @param idempotencyKey {String} `idempotency_key` identifying the payment to be canceled. + * @param idempotencyKey {String} The `idempotency_key` identifying the payment to be canceled. */ var exports = function(idempotencyKey) { var _this = this; @@ -53,7 +53,7 @@ exports.constructFromObject = function(data, obj) { } /** - * `idempotency_key` identifying the payment to be canceled. + * The `idempotency_key` identifying the payment to be canceled. * @member {String} idempotency_key */ exports.prototype['idempotency_key'] = undefined; diff --git a/src/model/CancelPaymentByIdempotencyKeyResponse.js b/src/model/CancelPaymentByIdempotencyKeyResponse.js index f2041f3..15ae76a 100644 --- a/src/model/CancelPaymentByIdempotencyKeyResponse.js +++ b/src/model/CancelPaymentByIdempotencyKeyResponse.js @@ -24,7 +24,7 @@ var Error = require('./Error'); /** * Constructs a new CancelPaymentByIdempotencyKeyResponse. - * Return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` will be empty. + * The return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` is empty. * @alias module:model/CancelPaymentByIdempotencyKeyResponse * @class */ diff --git a/src/model/CancelPaymentRequest.js b/src/model/CancelPaymentRequest.js index c8bee95..c4dc533 100644 --- a/src/model/CancelPaymentRequest.js +++ b/src/model/CancelPaymentRequest.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CancelPaymentRequest. - * Cancels (voids) a payment before it has been completed. Note: only payments created with `autocomplete` set to false can be canceled. + * Cancels (voids) a payment before it has been completed. Note: Only payments created with `autocomplete` set to `false` can be canceled. * @alias module:model/CancelPaymentRequest * @class */ diff --git a/src/model/CancelPaymentResponse.js b/src/model/CancelPaymentResponse.js index 51fac42..9a54c2a 100644 --- a/src/model/CancelPaymentResponse.js +++ b/src/model/CancelPaymentResponse.js @@ -25,7 +25,7 @@ var Payment = require('./Payment'); /** * Constructs a new CancelPaymentResponse. - * Return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint. + * The return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint. * @alias module:model/CancelPaymentResponse * @class */ @@ -58,7 +58,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on errors encountered during the request. + * Information about errors encountered during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/CancelTerminalCheckoutRequest.js b/src/model/CancelTerminalCheckoutRequest.js index 851a530..fa39e9e 100644 --- a/src/model/CancelTerminalCheckoutRequest.js +++ b/src/model/CancelTerminalCheckoutRequest.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The CancelTerminalCheckoutRequest model module. - * Note: This model is in beta. * @module model/CancelTerminalCheckoutRequest */ diff --git a/src/model/CancelTerminalCheckoutResponse.js b/src/model/CancelTerminalCheckoutResponse.js index bccedeb..16252bc 100644 --- a/src/model/CancelTerminalCheckoutResponse.js +++ b/src/model/CancelTerminalCheckoutResponse.js @@ -20,7 +20,6 @@ var TerminalCheckout = require('./TerminalCheckout'); /** * The CancelTerminalCheckoutResponse model module. - * Note: This model is in beta. * @module model/CancelTerminalCheckoutResponse */ @@ -64,7 +63,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['errors'] = undefined; /** - * The updated `TerminalCheckout` + * The canceled `TerminalCheckout` * @member {module:model/TerminalCheckout} checkout */ exports.prototype['checkout'] = undefined; diff --git a/src/model/CancelTerminalRefundRequest.js b/src/model/CancelTerminalRefundRequest.js new file mode 100644 index 0000000..5442d08 --- /dev/null +++ b/src/model/CancelTerminalRefundRequest.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 CancelTerminalRefundRequest model module. + * Note: This model is in beta. + * @module model/CancelTerminalRefundRequest + */ + +/** + * Constructs a new CancelTerminalRefundRequest. + * + * @alias module:model/CancelTerminalRefundRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a CancelTerminalRefundRequest 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/CancelTerminalRefundRequest} obj Optional instance to populate. + * @return {module:model/CancelTerminalRefundRequest} The populated CancelTerminalRefundRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/CancelTerminalRefundResponse.js b/src/model/CancelTerminalRefundResponse.js new file mode 100644 index 0000000..f630d19 --- /dev/null +++ b/src/model/CancelTerminalRefundResponse.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 TerminalRefund = require('./TerminalRefund'); + + + + +/** + * The CancelTerminalRefundResponse model module. + * Note: This model is in beta. + * @module model/CancelTerminalRefundResponse + */ + +/** + * Constructs a new CancelTerminalRefundResponse. + * + * @alias module:model/CancelTerminalRefundResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CancelTerminalRefundResponse 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/CancelTerminalRefundResponse} obj Optional instance to populate. + * @return {module:model/CancelTerminalRefundResponse} The populated CancelTerminalRefundResponse 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('refund')) { + obj['refund'] = TerminalRefund.constructFromObject(data['refund']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The updated `TerminalRefund` + * @member {module:model/TerminalRefund} refund + */ +exports.prototype['refund'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogCustomAttributeDefinition.js b/src/model/CatalogCustomAttributeDefinition.js index 92c9333..0e6f9db 100644 --- a/src/model/CatalogCustomAttributeDefinition.js +++ b/src/model/CatalogCustomAttributeDefinition.js @@ -32,7 +32,7 @@ var SourceApplication = require('./SourceApplication'); * @alias module:model/CatalogCustomAttributeDefinition * @class * @param type {String} The type of this custom attribute. Cannot be modified after creation. Required. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values - * @param name {String} The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application_id) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. + * @param name {String} The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. * @param allowedObjectTypes {Array.} The set of Catalog Object Types that this Custom Attribute may be applied to. Currently, only `ITEM` and `ITEM_VARIATION` are allowed. At least one type must be included. See [CatalogObjectType](#type-catalogobjecttype) for possible values */ var exports = function(type, name, allowedObjectTypes) { @@ -109,7 +109,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['type'] = undefined; /** - * The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application_id) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. + * The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. * @member {String} name */ exports.prototype['name'] = undefined; @@ -144,7 +144,7 @@ exports.prototype['app_visibility'] = undefined; */ exports.prototype['string_config'] = undefined; /** - * + * Optionally, populated when `type` = `NUMBER`, unset otherwise. * @member {module:model/CatalogCustomAttributeDefinitionNumberConfig} number_config */ exports.prototype['number_config'] = undefined; @@ -159,7 +159,7 @@ exports.prototype['selection_config'] = undefined; */ exports.prototype['custom_attribute_usage_count'] = undefined; /** - * The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters [a-zA-Z0-9_-]. + * The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`. * @member {String} key */ exports.prototype['key'] = undefined; diff --git a/src/model/CatalogIdMapping.js b/src/model/CatalogIdMapping.js index 11650ca..f79d0fd 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 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. + * 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 */ diff --git a/src/model/CatalogInfoResponse.js b/src/model/CatalogInfoResponse.js index 4ffa130..af30304 100644 --- a/src/model/CatalogInfoResponse.js +++ b/src/model/CatalogInfoResponse.js @@ -63,12 +63,12 @@ exports.constructFromObject = function(data, obj) { } /** - * The set of errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; /** - * + * Limits that apply to this API. * @member {module:model/CatalogInfoResponseLimits} limits */ exports.prototype['limits'] = undefined; diff --git a/src/model/CatalogItemOption.js b/src/model/CatalogItemOption.js index d8fa14e..7102040 100644 --- a/src/model/CatalogItemOption.js +++ b/src/model/CatalogItemOption.js @@ -37,7 +37,6 @@ var exports = function() { - }; /** @@ -65,9 +64,6 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('values')) { obj['values'] = ApiClient.convertToType(data['values'], [CatalogObject]); - } - if (data.hasOwnProperty('item_count')) { - obj['item_count'] = ApiClient.convertToType(data['item_count'], 'Number'); } } return obj; @@ -98,11 +94,6 @@ exports.prototype['show_colors'] = undefined; * @member {Array.} values */ exports.prototype['values'] = undefined; -/** - * 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`. - * @member {Number} item_count - */ -exports.prototype['item_count'] = undefined; diff --git a/src/model/CatalogItemOptionValue.js b/src/model/CatalogItemOptionValue.js index eed88d5..9c9fe50 100644 --- a/src/model/CatalogItemOptionValue.js +++ b/src/model/CatalogItemOptionValue.js @@ -36,7 +36,6 @@ var exports = function() { - }; /** @@ -64,9 +63,6 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('ordinal')) { obj['ordinal'] = ApiClient.convertToType(data['ordinal'], 'Number'); - } - if (data.hasOwnProperty('item_variation_count')) { - obj['item_variation_count'] = ApiClient.convertToType(data['item_variation_count'], 'Number'); } } return obj; @@ -97,11 +93,6 @@ exports.prototype['color'] = undefined; * @member {Number} ordinal */ exports.prototype['ordinal'] = undefined; -/** - * 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/CatalogObject.js b/src/model/CatalogObject.js index 81b42ce..580bc6b 100644 --- a/src/model/CatalogObject.js +++ b/src/model/CatalogObject.js @@ -42,7 +42,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 `CatalogObject` of the `SUBSCRIPTION_PLAN` type, set the `subscription_plan_data` attribute to yield the `CatalogSubscriptionPlan` 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 `CatalogObject` of the `SUBSCRIPTION_PLAN` type, set the `subscription_plan_data` attribute to yield the `CatalogSubscriptionPlan` 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 @@ -206,7 +206,7 @@ exports.prototype['version'] = undefined; */ exports.prototype['is_deleted'] = undefined; /** - * A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair is a `CatalogCustomAttributeValue` object. The key is the `key` attribute value defined in the associated `CatalogCustomAttributeDefinition` object defined by the application making the request. If the `CatalogCustomAttributeDefinition` object is defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of \"cocoa_brand\" and the defining application ID is \"abcd1234\", the key in the map is \"abcd1234:cocoa_brand\" if the application making the request is different from the application defining the custom attribute definition. Otherwise, the key used in the map is simply \"cocoa-brand\". Application-defined custom attributes that are set at a global (location-independent) level. Custom attribute values are intended to store additional information about a catalog object or associations with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). + * A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair is a `CatalogCustomAttributeValue` object. The key is the `key` attribute value defined in the associated `CatalogCustomAttributeDefinition` object defined by the application making the request. If the `CatalogCustomAttributeDefinition` object is defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of `\"cocoa_brand\"` and the defining application ID is `\"abcd1234\"`, the key in the map is `\"abcd1234:cocoa_brand\"` if the application making the request is different from the application defining the custom attribute definition. Otherwise, the key used in the map is simply `\"cocoa_brand\"`. Application-defined custom attributes that are set at a global (location-independent) level. Custom attribute values are intended to store additional information about a catalog object or associations with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). * @member {Object.} custom_attribute_values */ exports.prototype['custom_attribute_values'] = undefined; diff --git a/src/model/CatalogPricingRule.js b/src/model/CatalogPricingRule.js index fa05685..a3978cb 100644 --- a/src/model/CatalogPricingRule.js +++ b/src/model/CatalogPricingRule.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CatalogPricingRule. - * Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period. + * Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period. * @alias module:model/CatalogPricingRule * @class */ @@ -107,7 +107,7 @@ exports.prototype['time_period_ids'] = undefined; */ exports.prototype['discount_id'] = undefined; /** - * Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule matches within the entire cart. A match rule can match multiple times in the cart. If no `ProductSet` is present, the rule will match all products. + * Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule matches within the entire cart, and can match multiple times. This field will always be set. * @member {String} match_products_id */ exports.prototype['match_products_id'] = undefined; @@ -122,22 +122,22 @@ exports.prototype['apply_products_id'] = undefined; */ exports.prototype['exclude_products_id'] = undefined; /** - * Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). + * Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD). * @member {String} valid_from_date */ exports.prototype['valid_from_date'] = undefined; /** - * Represents the local time the pricing rule should be valid from. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. + * Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. * @member {String} valid_from_local_time */ exports.prototype['valid_from_local_time'] = undefined; /** - * Represents the date the Pricing Rule is valid until. Represented in RFC3339 full-date format (YYYY-MM-DD). + * Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD). * @member {String} valid_until_date */ exports.prototype['valid_until_date'] = undefined; /** - * Represents the local time the pricing rule should be valid until. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. + * Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. * @member {String} valid_until_local_time */ exports.prototype['valid_until_local_time'] = undefined; diff --git a/src/model/CatalogQuery.js b/src/model/CatalogQuery.js index 411d0a2..f724e56 100644 --- a/src/model/CatalogQuery.js +++ b/src/model/CatalogQuery.js @@ -19,6 +19,7 @@ var CatalogQueryItemsForModifierList = require('./CatalogQueryItemsForModifierLi var CatalogQueryItemsForTax = require('./CatalogQueryItemsForTax'); var CatalogQueryPrefix = require('./CatalogQueryPrefix'); var CatalogQueryRange = require('./CatalogQueryRange'); +var CatalogQuerySet = require('./CatalogQuerySet'); var CatalogQuerySortedAttribute = require('./CatalogQuerySortedAttribute'); var CatalogQueryText = require('./CatalogQueryText'); @@ -32,7 +33,7 @@ var CatalogQueryText = require('./CatalogQueryText'); /** * Constructs a new CatalogQuery. - * 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. + * 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 */ @@ -48,6 +49,7 @@ var exports = function() { + }; /** @@ -66,6 +68,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('exact_query')) { obj['exact_query'] = CatalogQueryExact.constructFromObject(data['exact_query']); + } + if (data.hasOwnProperty('set_query')) { + obj['set_query'] = CatalogQuerySet.constructFromObject(data['set_query']); } if (data.hasOwnProperty('prefix_query')) { obj['prefix_query'] = CatalogQueryPrefix.constructFromObject(data['prefix_query']); @@ -98,22 +103,27 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['sorted_attribute_query'] = undefined; /** - * 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. + * 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 prefix query expression to return objects with attribute values that have a prefix matching the specified string value. Value maching is case insensitive. + * A set query expression to return objects with attribute name and value matching the specified attribute name and any of the specified attribute values exactly. Value matching is case insensitive. + * @member {module:model/CatalogQuerySet} set_query + */ +exports.prototype['set_query'] = undefined; +/** + * 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 range query expression to return objects with numberic values that lie in the specified 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 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. + * 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; @@ -133,7 +143,7 @@ exports.prototype['items_for_modifier_list_query'] = undefined; */ exports.prototype['items_for_item_options_query'] = undefined; /** - * A query expression to return item variations (of the `CatalogItemVariation` that contain all of the specified `CatalogItemOption` IDs. + * 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 9426025..24ad511 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. + * The query filter to return the search 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. 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. + * @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; @@ -63,7 +63,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['attribute_name'] = undefined; /** - * 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. + * 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/CatalogQuerySet.js b/src/model/CatalogQuerySet.js new file mode 100644 index 0000000..ea04754 --- /dev/null +++ b/src/model/CatalogQuerySet.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 CatalogQuerySet model module. + * @module model/CatalogQuerySet + */ + +/** + * Constructs a new CatalogQuerySet. + * The query filter to return the search result(s) by exact match of the specified `attribute_name` and any of the `attribute_values`. + * @alias module:model/CatalogQuerySet + * @class + * @param attributeName {String} The name of the attribute to be searched. Matching of the attribute name is exact. + * @param attributeValues {Array.} The desired values of the search attribute. Matching of the attribute values is exact and case insensitive. A maximum of 250 values may be searched in a request. + */ +var exports = function(attributeName, attributeValues) { + var _this = this; + + _this['attribute_name'] = attributeName; + _this['attribute_values'] = attributeValues; +}; + +/** + * Constructs a CatalogQuerySet 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/CatalogQuerySet} obj Optional instance to populate. + * @return {module:model/CatalogQuerySet} The populated CatalogQuerySet instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('attribute_name')) { + obj['attribute_name'] = ApiClient.convertToType(data['attribute_name'], 'String'); + } + if (data.hasOwnProperty('attribute_values')) { + obj['attribute_values'] = ApiClient.convertToType(data['attribute_values'], ['String']); + } + } + return obj; +} + +/** + * 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 values of the search attribute. Matching of the attribute values is exact and case insensitive. A maximum of 250 values may be searched in a request. + * @member {Array.} attribute_values + */ +exports.prototype['attribute_values'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogTax.js b/src/model/CatalogTax.js index 7316a43..f058ef3 100644 --- a/src/model/CatalogTax.js +++ b/src/model/CatalogTax.js @@ -97,7 +97,7 @@ exports.prototype['percentage'] = undefined; */ exports.prototype['applies_to_custom_amounts'] = undefined; /** - * If `true`, the tax will be shown as enabled in the Square Point of Sale app. + * A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`). * @member {Boolean} enabled */ exports.prototype['enabled'] = undefined; diff --git a/src/model/CatalogTimePeriod.js b/src/model/CatalogTimePeriod.js index 5db6cab..3876a34 100644 --- a/src/model/CatalogTimePeriod.js +++ b/src/model/CatalogTimePeriod.js @@ -52,7 +52,7 @@ exports.constructFromObject = function(data, obj) { } /** - * An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. + * An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. * @member {String} event */ exports.prototype['event'] = undefined; diff --git a/src/model/CompletePaymentRequest.js b/src/model/CompletePaymentRequest.js index cdd70d0..e73aab6 100644 --- a/src/model/CompletePaymentRequest.js +++ b/src/model/CompletePaymentRequest.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CompletePaymentRequest. - * Completes (captures) a payment. By default, payments are set to autocomplete immediately after they are created. To complete payments manually, set `autocomplete` to false. + * Completes (captures) a payment. By default, payments are set to `autocomplete` immediately after they are created. To complete payments manually, set `autocomplete` to `false`. * @alias module:model/CompletePaymentRequest * @class */ diff --git a/src/model/CompletePaymentResponse.js b/src/model/CompletePaymentResponse.js index 7d14edb..077d99e 100644 --- a/src/model/CompletePaymentResponse.js +++ b/src/model/CompletePaymentResponse.js @@ -25,7 +25,7 @@ var Payment = require('./Payment'); /** * Constructs a new CompletePaymentResponse. - * Return value from a [CompletePayment](#endpoint-payments-completepayment) call. + * The return value from a [CompletePayment](#endpoint-payments-completepayment) call. * @alias module:model/CompletePaymentResponse * @class */ @@ -58,12 +58,12 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on errors encountered during the request + * Information about errors encountered during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; /** - * The successfully completed `Payment`. + * The successfully completed payment. * @member {module:model/Payment} payment */ exports.prototype['payment'] = undefined; diff --git a/src/model/CreateCatalogImageResponse.js b/src/model/CreateCatalogImageResponse.js index b1e0a74..98e5862 100644 --- a/src/model/CreateCatalogImageResponse.js +++ b/src/model/CreateCatalogImageResponse.js @@ -58,7 +58,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/CreateCustomerRequest.js b/src/model/CreateCustomerRequest.js index ce19762..a2a6caa 100644 --- a/src/model/CreateCustomerRequest.js +++ b/src/model/CreateCustomerRequest.js @@ -143,7 +143,7 @@ exports.prototype['reference_id'] = undefined; */ exports.prototype['note'] = undefined; /** - * The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. + * The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. * @member {String} birthday */ exports.prototype['birthday'] = undefined; diff --git a/src/model/CreateDeviceCodeRequest.js b/src/model/CreateDeviceCodeRequest.js index 46cc6c7..d0b556d 100644 --- a/src/model/CreateDeviceCodeRequest.js +++ b/src/model/CreateDeviceCodeRequest.js @@ -19,7 +19,6 @@ var DeviceCode = require('./DeviceCode'); /** * The CreateDeviceCodeRequest model module. - * Note: This model is in beta. * @module model/CreateDeviceCodeRequest */ diff --git a/src/model/CreateDeviceCodeResponse.js b/src/model/CreateDeviceCodeResponse.js index 32b5d2f..4036990 100644 --- a/src/model/CreateDeviceCodeResponse.js +++ b/src/model/CreateDeviceCodeResponse.js @@ -20,7 +20,6 @@ var Error = require('./Error'); /** * The CreateDeviceCodeResponse model module. - * Note: This model is in beta. * @module model/CreateDeviceCodeResponse */ diff --git a/src/model/CreatePaymentRequest.js b/src/model/CreatePaymentRequest.js index 446f6a3..4491568 100644 --- a/src/model/CreatePaymentRequest.js +++ b/src/model/CreatePaymentRequest.js @@ -25,12 +25,12 @@ var Money = require('./Money'); /** * Constructs a new CreatePaymentRequest. - * Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees). + * Creates a payment from a provided source (such as a nonce or a card on file). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds APIs Overview](/payments-api/overview). For information about application fees in a payment, see [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees). * @alias module:model/CreatePaymentRequest * @class - * @param sourceId {String} The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API. - * @param idempotencyKey {String} A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. - * @param amountMoney {module:model/Money} The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. + * @param sourceId {String} The ID for the source of funds for this payment. This can be a nonce generated by the Square payment form or a card on file made with the Customers API. + * @param idempotencyKey {String} A unique string that identifies this `CreatePayment` request. Keys can be any valid string but must be unique for every `CreatePayment` request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). + * @param amountMoney {module:model/Money} The amount of money to accept for this payment, not including `tip_money`. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The currency code must match the currency associated with the business that is accepting the payment. */ var exports = function(sourceId, idempotencyKey, amountMoney) { var _this = this; @@ -125,47 +125,47 @@ exports.constructFromObject = function(data, obj) { } /** - * The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API. + * The ID for the source of funds for this payment. This can be a nonce generated by the Square payment form or a card on file made with the Customers API. * @member {String} source_id */ exports.prototype['source_id'] = undefined; /** - * A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. + * A unique string that identifies this `CreatePayment` request. Keys can be any valid string but must be unique for every `CreatePayment` request. Max: 45 characters Note: The number of allowed characters might be less than the stated maximum, if multi-byte characters are used. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). * @member {String} idempotency_key */ exports.prototype['idempotency_key'] = undefined; /** - * The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. + * The amount of money to accept for this payment, not including `tip_money`. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The currency code must match the currency associated with the business that is accepting the payment. * @member {module:model/Money} amount_money */ exports.prototype['amount_money'] = undefined; /** - * The amount designated as a tip, in addition to `amount_money` Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. + * The amount designated as a tip, in addition to `amount_money`. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The currency code must match the currency associated with the business that is accepting the payment. * @member {module:model/Money} tip_money */ exports.prototype['tip_money'] = undefined; /** - * The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Cannot be more than 90% of the total amount of the Payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The fee currency code must match the currency associated with the merchant that is accepting the payment. The application must be from a developer account in the same country, and using the same currency code, as the merchant. For more information about the application fee scenario, see [Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). + * The amount of money that the developer is taking as a fee for facilitating the payment on behalf of the seller. The amount cannot be more than 90% of the total amount of the payment. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The fee currency code must match the currency associated with the seller that is accepting the payment. The application must be from a developer account in the same country and using the same currency code as the seller. For more information about the application fee scenario, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). * @member {module:model/Money} app_fee_money */ exports.prototype['app_fee_money'] = undefined; /** - * The duration of time after the payment's creation when Square automatically cancels the payment. This automatic cancellation applies only to payments that don't reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value of 1 minute. Notes: This feature is only supported for card payments. This parameter can only be set for a delayed capture payment (`autocomplete=false`). Default: - Card Present payments: \"PT36H\" (36 hours) from the creation time. - Card Not Present payments: \"P7D\" (7 days) from the creation time. + * The duration of time after the payment's creation when Square automatically cancels the payment. This automatic cancellation applies only to payments that do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value of 1 minute. Note: This feature is only supported for card payments. This parameter can only be set for a delayed capture payment (`autocomplete=false`). Default: - Card-present payments: \"PT36H\" (36 hours) from the creation time. - Card-not-present payments: \"P7D\" (7 days) from the creation time. * @member {String} delay_duration */ exports.prototype['delay_duration'] = undefined; /** - * If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed (captured) or canceled (voided). For more information, see [Delayed Payments](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments). Default: true + * If set to `true`, this payment will be completed when possible. If set to `false`, this payment is held in an approved state until either explicitly completed (captured) or canceled (voided). For more information, see [Delayed capture](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments). Default: true * @member {Boolean} autocomplete */ exports.prototype['autocomplete'] = undefined; /** - * Associate a previously created order with this payment + * Associates a previously created order with this payment. * @member {String} order_id */ exports.prototype['order_id'] = undefined; /** - * The `Customer` ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API. + * The `Customer` ID of the customer associated with the payment. This is required if the `source_id` refers to a card on file created using the Customers API. * @member {String} customer_id */ exports.prototype['customer_id'] = undefined; @@ -175,22 +175,22 @@ exports.prototype['customer_id'] = undefined; */ exports.prototype['location_id'] = undefined; /** - * A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters. + * A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system (for example, you might specify an order ID that is generated by a third-party shopping cart). Limit 40 characters. * @member {String} reference_id */ exports.prototype['reference_id'] = undefined; /** - * An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](https://developer.squareup.com/docs/sca-overview). + * An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. For more information, see [SCA Overview](https://developer.squareup.com/docs/sca-overview). * @member {String} verification_token */ exports.prototype['verification_token'] = undefined; /** - * If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true`. For more information, see [Partial amount with Square gift cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false + * If set to `true` and charging a Square Gift Card, a payment might be returned with `amount_money` equal to less than what was requested. For example, a request for $20 when charging a Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose to prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card payment. This field cannot be `true` when `autocomplete = true`. For more information, see [Partial amount with Square Gift Cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). Default: false * @member {Boolean} accept_partial_authorization */ exports.prototype['accept_partial_authorization'] = undefined; /** - * The buyer's e-mail address + * The buyer's email address. * @member {String} buyer_email_address */ exports.prototype['buyer_email_address'] = undefined; @@ -205,12 +205,12 @@ exports.prototype['billing_address'] = undefined; */ exports.prototype['shipping_address'] = undefined; /** - * An optional note to be entered by the developer when creating a payment Limit 500 characters. + * An optional note to be entered by the developer when creating a payment. Limit 500 characters. * @member {String} note */ exports.prototype['note'] = undefined; /** - * Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. + * Optional additional payment information to include on the customer's card statement as part of the statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` might get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the seller taking the payment. * @member {String} statement_description_identifier */ exports.prototype['statement_description_identifier'] = undefined; diff --git a/src/model/CreatePaymentResponse.js b/src/model/CreatePaymentResponse.js index 8aeed7d..383c114 100644 --- a/src/model/CreatePaymentResponse.js +++ b/src/model/CreatePaymentResponse.js @@ -25,7 +25,7 @@ var Payment = require('./Payment'); /** * Constructs a new CreatePaymentResponse. - * Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: if there are errors processing the request, the payment field may not be present, or it may be present with a status of `FAILED`. + * Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: If there are errors processing the request, the payment field might not be present, or it might be present with a status of `FAILED`. * @alias module:model/CreatePaymentResponse * @class */ @@ -58,7 +58,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on errors encountered during the request. + * Information about errors encountered during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/CreateTerminalCheckoutRequest.js b/src/model/CreateTerminalCheckoutRequest.js index fd069e2..b899f36 100644 --- a/src/model/CreateTerminalCheckoutRequest.js +++ b/src/model/CreateTerminalCheckoutRequest.js @@ -19,7 +19,6 @@ var TerminalCheckout = require('./TerminalCheckout'); /** * The CreateTerminalCheckoutRequest model module. - * Note: This model is in beta. * @module model/CreateTerminalCheckoutRequest */ @@ -28,7 +27,7 @@ var TerminalCheckout = require('./TerminalCheckout'); * * @alias module:model/CreateTerminalCheckoutRequest * @class - * @param idempotencyKey {String} A unique string that identifies this CreateCheckout request. Keys can be any valid string but must be unique for every CreateCheckout request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. + * @param idempotencyKey {String} A unique string that identifies this `CreateCheckout` request. Keys can be any valid string but must be unique for every `CreateCheckout` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. * @param checkout {module:model/TerminalCheckout} The checkout to create. */ var exports = function(idempotencyKey, checkout) { @@ -60,7 +59,7 @@ exports.constructFromObject = function(data, obj) { } /** - * A unique string that identifies this CreateCheckout request. Keys can be any valid string but must be unique for every CreateCheckout request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. + * A unique string that identifies this `CreateCheckout` request. Keys can be any valid string but must be unique for every `CreateCheckout` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. * @member {String} idempotency_key */ exports.prototype['idempotency_key'] = undefined; diff --git a/src/model/CreateTerminalCheckoutResponse.js b/src/model/CreateTerminalCheckoutResponse.js index 9abf3fd..8501993 100644 --- a/src/model/CreateTerminalCheckoutResponse.js +++ b/src/model/CreateTerminalCheckoutResponse.js @@ -20,7 +20,6 @@ var TerminalCheckout = require('./TerminalCheckout'); /** * The CreateTerminalCheckoutResponse model module. - * Note: This model is in beta. * @module model/CreateTerminalCheckoutResponse */ diff --git a/src/model/CreateTerminalRefundRequest.js b/src/model/CreateTerminalRefundRequest.js new file mode 100644 index 0000000..18c68d4 --- /dev/null +++ b/src/model/CreateTerminalRefundRequest.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 TerminalRefund = require('./TerminalRefund'); + + + + +/** + * The CreateTerminalRefundRequest model module. + * Note: This model is in beta. + * @module model/CreateTerminalRefundRequest + */ + +/** + * Constructs a new CreateTerminalRefundRequest. + * + * @alias module:model/CreateTerminalRefundRequest + * @class + * @param idempotencyKey {String} A unique string that identifies this `CreateRefund` request. Keys can be any valid string but must be unique for every `CreateRefund` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. + */ +var exports = function(idempotencyKey) { + var _this = this; + + _this['idempotency_key'] = idempotencyKey; + +}; + +/** + * Constructs a CreateTerminalRefundRequest 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/CreateTerminalRefundRequest} obj Optional instance to populate. + * @return {module:model/CreateTerminalRefundRequest} The populated CreateTerminalRefundRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('idempotency_key')) { + obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String'); + } + if (data.hasOwnProperty('refund')) { + obj['refund'] = TerminalRefund.constructFromObject(data['refund']); + } + } + return obj; +} + +/** + * A unique string that identifies this `CreateRefund` request. Keys can be any valid string but must be unique for every `CreateRefund` request. See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; +/** + * The refund to create. + * @member {module:model/TerminalRefund} refund + */ +exports.prototype['refund'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateTerminalRefundResponse.js b/src/model/CreateTerminalRefundResponse.js new file mode 100644 index 0000000..11d8427 --- /dev/null +++ b/src/model/CreateTerminalRefundResponse.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 TerminalRefund = require('./TerminalRefund'); + + + + +/** + * The CreateTerminalRefundResponse model module. + * Note: This model is in beta. + * @module model/CreateTerminalRefundResponse + */ + +/** + * Constructs a new CreateTerminalRefundResponse. + * + * @alias module:model/CreateTerminalRefundResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CreateTerminalRefundResponse 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/CreateTerminalRefundResponse} obj Optional instance to populate. + * @return {module:model/CreateTerminalRefundResponse} The populated CreateTerminalRefundResponse 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('refund')) { + obj['refund'] = TerminalRefund.constructFromObject(data['refund']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The created `TerminalRefund` + * @member {module:model/TerminalRefund} refund + */ +exports.prototype['refund'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CustomAttributeFilter.js b/src/model/CustomAttributeFilter.js index 7b4732d..dd2b5dd 100644 --- a/src/model/CustomAttributeFilter.js +++ b/src/model/CustomAttributeFilter.js @@ -25,7 +25,7 @@ var Range = require('./Range'); /** * Constructs a new CustomAttributeFilter. - * Supported custom attribute query expressions for calling the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint to search for items or item variations. + * 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 */ @@ -74,17 +74,17 @@ exports.constructFromObject = function(data, 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. + * 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. + * 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. + * 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; @@ -94,12 +94,12 @@ exports.prototype['string_filter'] = undefined; */ 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. + * 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. + * 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; diff --git a/src/model/Customer.js b/src/model/Customer.js index 9984f4a..f3c7c57 100644 --- a/src/model/Customer.js +++ b/src/model/Customer.js @@ -183,7 +183,7 @@ exports.prototype['address'] = undefined; */ exports.prototype['phone_number'] = undefined; /** - * The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. + * The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. * @member {String} birthday */ exports.prototype['birthday'] = undefined; diff --git a/src/model/DeleteCatalogObjectResponse.js b/src/model/DeleteCatalogObjectResponse.js index 91356cb..0720511 100644 --- a/src/model/DeleteCatalogObjectResponse.js +++ b/src/model/DeleteCatalogObjectResponse.js @@ -61,7 +61,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/DeviceCheckoutOptions.js b/src/model/DeviceCheckoutOptions.js index 8830733..107e4b9 100644 --- a/src/model/DeviceCheckoutOptions.js +++ b/src/model/DeviceCheckoutOptions.js @@ -19,7 +19,6 @@ var TipSettings = require('./TipSettings'); /** * The DeviceCheckoutOptions model module. - * Note: This model is in beta. * @module model/DeviceCheckoutOptions */ @@ -28,7 +27,7 @@ var TipSettings = require('./TipSettings'); * * @alias module:model/DeviceCheckoutOptions * @class - * @param deviceId {String} The unique Id of the device intended for this `TerminalCheckout`. The Id can be retrieved from /v2/devices api. + * @param deviceId {String} The unique ID of the device intended for this `TerminalCheckout`. A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint. Match a `DeviceCode.device_id` value with `device_id` to get the associated device code. */ var exports = function(deviceId) { var _this = this; @@ -63,7 +62,7 @@ exports.constructFromObject = function(data, obj) { } /** - * The unique Id of the device intended for this `TerminalCheckout`. The Id can be retrieved from /v2/devices api. + * The unique ID of the device intended for this `TerminalCheckout`. A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint. Match a `DeviceCode.device_id` value with `device_id` to get the associated device code. * @member {String} device_id */ exports.prototype['device_id'] = undefined; diff --git a/src/model/DeviceCode.js b/src/model/DeviceCode.js index 969054e..7f6a5c3 100644 --- a/src/model/DeviceCode.js +++ b/src/model/DeviceCode.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The DeviceCode model module. - * Note: This model is in beta. * @module model/DeviceCode */ diff --git a/src/model/DeviceCodeStatus.js b/src/model/DeviceCodeStatus.js index b74d09b..9f1990e 100644 --- a/src/model/DeviceCodeStatus.js +++ b/src/model/DeviceCodeStatus.js @@ -20,6 +20,11 @@ var ApiClient = require('../ApiClient'); * @readonly */ var exports = { + /** + * value: "UNKNOWN" + * @const + */ + "UNKNOWN": "UNKNOWN", /** * value: "UNPAIRED" * @const @@ -29,7 +34,12 @@ var exports = { * value: "PAIRED" * @const */ - "PAIRED": "PAIRED"}; + "PAIRED": "PAIRED", + /** + * value: "EXPIRED" + * @const + */ + "EXPIRED": "EXPIRED"}; /** * Returns a DeviceCodeStatus enum value from a Javascript object name. diff --git a/src/model/ErrorCode.js b/src/model/ErrorCode.js index 111a84a..eb04938 100644 --- a/src/model/ErrorCode.js +++ b/src/model/ErrorCode.js @@ -470,6 +470,16 @@ var exports = { * @const */ "INVALID_CARD_DATA": "INVALID_CARD_DATA", + /** + * value: "SOURCE_USED" + * @const + */ + "SOURCE_USED": "SOURCE_USED", + /** + * value: "SOURCE_EXPIRED" + * @const + */ + "SOURCE_EXPIRED": "SOURCE_EXPIRED", /** * value: "LOCATION_MISMATCH" * @const diff --git a/src/model/GetDeviceCodeRequest.js b/src/model/GetDeviceCodeRequest.js index e4b7c6f..497afbe 100644 --- a/src/model/GetDeviceCodeRequest.js +++ b/src/model/GetDeviceCodeRequest.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The GetDeviceCodeRequest model module. - * Note: This model is in beta. * @module model/GetDeviceCodeRequest */ diff --git a/src/model/GetDeviceCodeResponse.js b/src/model/GetDeviceCodeResponse.js index 896b5e8..d7b154e 100644 --- a/src/model/GetDeviceCodeResponse.js +++ b/src/model/GetDeviceCodeResponse.js @@ -20,7 +20,6 @@ var Error = require('./Error'); /** * The GetDeviceCodeResponse model module. - * Note: This model is in beta. * @module model/GetDeviceCodeResponse */ diff --git a/src/model/GetPaymentRequest.js b/src/model/GetPaymentRequest.js index d8029d4..aeb7fad 100644 --- a/src/model/GetPaymentRequest.js +++ b/src/model/GetPaymentRequest.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new GetPaymentRequest. - * Retrieve details for a specific Payment. + * Retrieve details for a specific payment. * @alias module:model/GetPaymentRequest * @class */ diff --git a/src/model/GetPaymentResponse.js b/src/model/GetPaymentResponse.js index e94a2ad..4cb5c82 100644 --- a/src/model/GetPaymentResponse.js +++ b/src/model/GetPaymentResponse.js @@ -58,7 +58,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on errors encountered during the request. + * Information about errors encountered during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/GetTerminalCheckoutRequest.js b/src/model/GetTerminalCheckoutRequest.js index cfb4d05..d4a2244 100644 --- a/src/model/GetTerminalCheckoutRequest.js +++ b/src/model/GetTerminalCheckoutRequest.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The GetTerminalCheckoutRequest model module. - * Note: This model is in beta. * @module model/GetTerminalCheckoutRequest */ diff --git a/src/model/GetTerminalCheckoutResponse.js b/src/model/GetTerminalCheckoutResponse.js index e9e05c5..8ccde3c 100644 --- a/src/model/GetTerminalCheckoutResponse.js +++ b/src/model/GetTerminalCheckoutResponse.js @@ -20,7 +20,6 @@ var TerminalCheckout = require('./TerminalCheckout'); /** * The GetTerminalCheckoutResponse model module. - * Note: This model is in beta. * @module model/GetTerminalCheckoutResponse */ @@ -64,7 +63,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['errors'] = undefined; /** - * The requested `Checkout` + * The requested `TerminalCheckout` * @member {module:model/TerminalCheckout} checkout */ exports.prototype['checkout'] = undefined; diff --git a/src/model/GetTerminalRefundRequest.js b/src/model/GetTerminalRefundRequest.js new file mode 100644 index 0000000..856008d --- /dev/null +++ b/src/model/GetTerminalRefundRequest.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 GetTerminalRefundRequest model module. + * Note: This model is in beta. + * @module model/GetTerminalRefundRequest + */ + +/** + * Constructs a new GetTerminalRefundRequest. + * + * @alias module:model/GetTerminalRefundRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a GetTerminalRefundRequest 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/GetTerminalRefundRequest} obj Optional instance to populate. + * @return {module:model/GetTerminalRefundRequest} The populated GetTerminalRefundRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/GetTerminalRefundResponse.js b/src/model/GetTerminalRefundResponse.js new file mode 100644 index 0000000..406c9d8 --- /dev/null +++ b/src/model/GetTerminalRefundResponse.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 TerminalRefund = require('./TerminalRefund'); + + + + +/** + * The GetTerminalRefundResponse model module. + * Note: This model is in beta. + * @module model/GetTerminalRefundResponse + */ + +/** + * Constructs a new GetTerminalRefundResponse. + * + * @alias module:model/GetTerminalRefundResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a GetTerminalRefundResponse 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/GetTerminalRefundResponse} obj Optional instance to populate. + * @return {module:model/GetTerminalRefundResponse} The populated GetTerminalRefundResponse 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('refund')) { + obj['refund'] = TerminalRefund.constructFromObject(data['refund']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The requested `Refund` + * @member {module:model/TerminalRefund} refund + */ +exports.prototype['refund'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TenderBankTransferDetailsStatus.js b/src/model/InlineTypes.js similarity index 63% rename from src/model/TenderBankTransferDetailsStatus.js rename to src/model/InlineTypes.js index 65df65d..157032e 100644 --- a/src/model/TenderBankTransferDetailsStatus.js +++ b/src/model/InlineTypes.js @@ -15,31 +15,31 @@ var ApiClient = require('../ApiClient'); /** - * Enum class TenderBankTransferDetailsStatus. + * Enum class InlineTypes. * @enum {} * @readonly */ var exports = { /** - * value: "PENDING" + * value: "INLINE_NONE" * @const */ - "PENDING": "PENDING", + "NONE": "INLINE_NONE", /** - * value: "COMPLETED" + * value: "INLINE_VARIATIONS" * @const */ - "COMPLETED": "COMPLETED", + "VARIATIONS": "INLINE_VARIATIONS", /** - * value: "FAILED" + * value: "INLINE_ALL" * @const */ - "FAILED": "FAILED"}; + "ALL": "INLINE_ALL"}; /** - * Returns a TenderBankTransferDetailsStatus enum value from a Javascript object name. + * Returns a InlineTypes enum value from a Javascript object name. * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/TenderBankTransferDetailsStatus} The enum TenderBankTransferDetailsStatus value. + * @return {module:model/InlineTypes} The enum InlineTypes value. */ exports.constructFromObject = function(object) { return object; diff --git a/src/model/Invoice.js b/src/model/Invoice.js index 1074775..409267a 100644 --- a/src/model/Invoice.js +++ b/src/model/Invoice.js @@ -121,7 +121,7 @@ exports.constructFromObject = function(data, obj) { */ exports.prototype['id'] = undefined; /** - * The version number, which is incremented each time an update is committed to the invoice. + * The Square-assigned version number, which is incremented each time an update is committed to the invoice. * @member {Number} version */ exports.prototype['version'] = undefined; @@ -136,12 +136,12 @@ exports.prototype['location_id'] = undefined; */ 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. + * The customer who gets the invoice. Square uses the contact information to deliver the invoice. This field is required to publish 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. + * 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 must specify at least one payment request. For invoices with multiple payment requests, you can specify a maximum of 12 `INSTALLMENT` request types. All of 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; diff --git a/src/model/InvoicePaymentRequest.js b/src/model/InvoicePaymentRequest.js index b3e66e3..2b101f6 100644 --- a/src/model/InvoicePaymentRequest.js +++ b/src/model/InvoicePaymentRequest.js @@ -26,7 +26,7 @@ var Money = require('./Money'); /** * Constructs a new InvoicePaymentRequest. - * Describes a specific payment request in an invoice. You can have up to nine payment requests for an invoice. + * Describes a specific payment request in an invoice. Invoices that contain multiple payment requests can specify a maximum of 12 `INSTALLMENT` request types. All of the payment requests must specify the same `request_method`. For more information, see [Payment requests](/docs/invoices-api/overview#payment-requests). * @alias module:model/InvoicePaymentRequest * @class */ diff --git a/src/model/ListCatalogResponse.js b/src/model/ListCatalogResponse.js index b312879..dc1d2b8 100644 --- a/src/model/ListCatalogResponse.js +++ b/src/model/ListCatalogResponse.js @@ -62,7 +62,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/ListDeviceCodesRequest.js b/src/model/ListDeviceCodesRequest.js index 9734464..71b854a 100644 --- a/src/model/ListDeviceCodesRequest.js +++ b/src/model/ListDeviceCodesRequest.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The ListDeviceCodesRequest model module. - * Note: This model is in beta. * @module model/ListDeviceCodesRequest */ @@ -34,6 +33,7 @@ var exports = function() { + }; /** @@ -55,6 +55,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('product_type')) { obj['product_type'] = ApiClient.convertToType(data['product_type'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], ['String']); } } return obj; @@ -75,6 +78,11 @@ exports.prototype['location_id'] = undefined; * @member {String} product_type */ exports.prototype['product_type'] = undefined; +/** + * If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. See [DeviceCodeStatus](#type-devicecodestatus) for possible values + * @member {Array.} status + */ +exports.prototype['status'] = undefined; diff --git a/src/model/ListDeviceCodesResponse.js b/src/model/ListDeviceCodesResponse.js index 16045cb..4f7753b 100644 --- a/src/model/ListDeviceCodesResponse.js +++ b/src/model/ListDeviceCodesResponse.js @@ -20,7 +20,6 @@ var Error = require('./Error'); /** * The ListDeviceCodesResponse model module. - * Note: This model is in beta. * @module model/ListDeviceCodesResponse */ diff --git a/src/model/ListPaymentsRequest.js b/src/model/ListPaymentsRequest.js index 07e76e0..a7bf1bf 100644 --- a/src/model/ListPaymentsRequest.js +++ b/src/model/ListPaymentsRequest.js @@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new ListPaymentsRequest. - * Retrieves a list of payments taken by the account making the request. Max results per page: 100 + * Retrieves a list of payments taken by the account making the request. The maximum results per page is 100. * @alias module:model/ListPaymentsRequest * @class */ @@ -84,47 +84,47 @@ exports.constructFromObject = function(data, obj) { } /** - * Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. + * The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. * @member {String} begin_time */ exports.prototype['begin_time'] = undefined; /** - * Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. + * The timestamp for the end of the reporting period, in RFC 3339 format. Default: The current time. * @member {String} end_time */ exports.prototype['end_time'] = undefined; /** - * The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). + * The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). * @member {String} sort_order */ exports.prototype['sort_order'] = 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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. + * A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). * @member {String} cursor */ exports.prototype['cursor'] = undefined; /** - * Limit results to the location supplied. By default, results are returned for the default (main) location associated with the merchant. + * Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller. * @member {String} location_id */ exports.prototype['location_id'] = undefined; /** - * The exact amount in the total_money for a `Payment`. + * The exact amount in the `total_money` for a payment. * @member {Number} total */ exports.prototype['total'] = undefined; /** - * The last 4 digits of `Payment` card. + * The last four digits of a payment card. * @member {String} last_4 */ exports.prototype['last_4'] = undefined; /** - * The brand of `Payment` card. For example, `VISA` + * The brand of the payment card (for example, VISA). * @member {String} card_brand */ exports.prototype['card_brand'] = undefined; /** - * Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, at most 100 results will be returned. Default: `100` + * The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead. Default: `100` * @member {Number} limit */ exports.prototype['limit'] = undefined; diff --git a/src/model/ListPaymentsResponse.js b/src/model/ListPaymentsResponse.js index 75c8ce0..1d8f2a5 100644 --- a/src/model/ListPaymentsResponse.js +++ b/src/model/ListPaymentsResponse.js @@ -62,17 +62,17 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on errors encountered during the request. + * Information about errors encountered during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; /** - * The requested list of `Payment`s. + * The requested list of payments. * @member {Array.} payments */ exports.prototype['payments'] = undefined; /** - * The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. + * The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). * @member {String} cursor */ exports.prototype['cursor'] = undefined; diff --git a/src/model/Location.js b/src/model/Location.js index 3979126..6c7dd27 100644 --- a/src/model/Location.js +++ b/src/model/Location.js @@ -56,6 +56,7 @@ var exports = function() { + }; @@ -145,6 +146,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('mcc')) { obj['mcc'] = ApiClient.convertToType(data['mcc'], 'String'); + } + if (data.hasOwnProperty('full_format_logo_url')) { + obj['full_format_logo_url'] = ApiClient.convertToType(data['full_format_logo_url'], 'String'); } } return obj; @@ -261,7 +265,7 @@ exports.prototype['facebook_url'] = undefined; */ exports.prototype['coordinates'] = undefined; /** - * The URL of the logo image for the location. + * The URL of the logo image for the location. The Seller must choose this logo in the Seller dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices) that Square generates on behalf of the Seller. This image should have an aspect ratio close to 1:1 and is recommended to be at least 200x200 pixels. * @member {String} logo_url */ exports.prototype['logo_url'] = undefined; @@ -275,6 +279,11 @@ exports.prototype['pos_background_url'] = undefined; * @member {String} mcc */ exports.prototype['mcc'] = undefined; +/** + * The URL of a full-format logo image for the location. The Seller must choose this logo in the Seller dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices) that Square generates on behalf of the Seller. This image can have an aspect ratio of 2:1 or greater and is recommended to be at least 1280x648 pixels. + * @member {String} full_format_logo_url + */ +exports.prototype['full_format_logo_url'] = undefined; diff --git a/src/model/LoyaltyAccount.js b/src/model/LoyaltyAccount.js index 2475b22..2097fae 100644 --- a/src/model/LoyaltyAccount.js +++ b/src/model/LoyaltyAccount.js @@ -103,7 +103,7 @@ exports.prototype['mappings'] = undefined; */ exports.prototype['program_id'] = undefined; /** - * The available point balance in the loyalty account. + * The available point balance in the loyalty account. Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange. * @member {Number} balance */ exports.prototype['balance'] = undefined; diff --git a/src/model/LoyaltyAccountMapping.js b/src/model/LoyaltyAccountMapping.js index 569280f..806ba3d 100644 --- a/src/model/LoyaltyAccountMapping.js +++ b/src/model/LoyaltyAccountMapping.js @@ -24,7 +24,7 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new LoyaltyAccountMapping. - * Associates a loyalty account with the buyer's phone number. or more information, see [Loyalty Overview](/docs/loyalty/overview). + * Associates a loyalty account with the buyer's phone number. For more information, see [Loyalty Overview](/docs/loyalty/overview). * @alias module:model/LoyaltyAccountMapping * @class * @param type {String} The type of mapping. See [LoyaltyAccountMappingType](#type-loyaltyaccountmappingtype) for possible values diff --git a/src/model/PaymentOptions.js b/src/model/PaymentOptions.js index 38416d3..01457bc 100644 --- a/src/model/PaymentOptions.js +++ b/src/model/PaymentOptions.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The PaymentOptions model module. - * Note: This model is in beta. * @module model/PaymentOptions */ @@ -53,7 +52,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Indicates whether the Payment objects created from this `TerminalCheckout` will automatically be COMPLETED or left in an APPROVED state for later modification. + * Indicates whether the Payment objects created from this `TerminalCheckout` will automatically be `COMPLETED` or left in an `APPROVED` state for later modification. * @member {Boolean} autocomplete */ exports.prototype['autocomplete'] = undefined; diff --git a/src/model/RetrieveCatalogObjectRequest.js b/src/model/RetrieveCatalogObjectRequest.js index 4541cda..de75de5 100644 --- a/src/model/RetrieveCatalogObjectRequest.js +++ b/src/model/RetrieveCatalogObjectRequest.js @@ -52,7 +52,7 @@ exports.constructFromObject = function(data, obj) { } /** - * If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a CatalogItem, its associated CatalogCategory, CatalogTax objects, CatalogImages and CatalogModifierLists will be returned in the `related_objects` field of the response. If the `object` field of the response contains a CatalogItemVariation, its parent CatalogItem will be returned in the `related_objects` field of the response. Default value: `false` + * If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a `CatalogItem`, its associated `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will be returned in the `related_objects` field of the response. If the `object` field of the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned in the `related_objects` field of the response. Default value: `false` * @member {Boolean} include_related_objects */ exports.prototype['include_related_objects'] = undefined; diff --git a/src/model/RetrieveCatalogObjectResponse.js b/src/model/RetrieveCatalogObjectResponse.js index 5bf12e0..6f2bc9f 100644 --- a/src/model/RetrieveCatalogObjectResponse.js +++ b/src/model/RetrieveCatalogObjectResponse.js @@ -62,17 +62,17 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; /** - * The CatalogObjects returned. + * The `CatalogObject`s returned. * @member {module:model/CatalogObject} object */ exports.prototype['object'] = undefined; /** - * A list of CatalogObjects referenced by the object in the `object` field. + * A list of `CatalogObject`s referenced by the object in the `object` field. * @member {Array.} related_objects */ exports.prototype['related_objects'] = undefined; diff --git a/src/model/RetrieveOrderRequest.js b/src/model/RetrieveOrderRequest.js new file mode 100644 index 0000000..04a91c8 --- /dev/null +++ b/src/model/RetrieveOrderRequest.js @@ -0,0 +1,56 @@ +/** + * 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 RetrieveOrderRequest model module. + * @module model/RetrieveOrderRequest + */ + +/** + * Constructs a new RetrieveOrderRequest. + * + * @alias module:model/RetrieveOrderRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a RetrieveOrderRequest 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/RetrieveOrderRequest} obj Optional instance to populate. + * @return {module:model/RetrieveOrderRequest} The populated RetrieveOrderRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/RetrieveOrderResponse.js b/src/model/RetrieveOrderResponse.js new file mode 100644 index 0000000..ae0cc25 --- /dev/null +++ b/src/model/RetrieveOrderResponse.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'); +var Error = require('./Error'); +var Order = require('./Order'); + + + + +/** + * The RetrieveOrderResponse model module. + * @module model/RetrieveOrderResponse + */ + +/** + * Constructs a new RetrieveOrderResponse. + * + * @alias module:model/RetrieveOrderResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a RetrieveOrderResponse 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/RetrieveOrderResponse} obj Optional instance to populate. + * @return {module:model/RetrieveOrderResponse} The populated RetrieveOrderResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order')) { + obj['order'] = Order.constructFromObject(data['order']); + } + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * The requested order. + * @member {module:model/Order} order + */ +exports.prototype['order'] = undefined; +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/SearchCatalogItemsRequest.js b/src/model/SearchCatalogItemsRequest.js index 992f09f..7a1a7b5 100644 --- a/src/model/SearchCatalogItemsRequest.js +++ b/src/model/SearchCatalogItemsRequest.js @@ -116,7 +116,7 @@ exports.prototype['cursor'] = undefined; */ exports.prototype['limit'] = undefined; /** - * The order to sort the resutls. The default sort order is ascending (`ASC`). See [SortOrder](#type-sortorder) for possible values + * The order to sort the results by item names. The default sort order is ascending (`ASC`). See [SortOrder](#type-sortorder) for possible values * @member {String} sort_order */ exports.prototype['sort_order'] = undefined; diff --git a/src/model/SearchCatalogItemsResponse.js b/src/model/SearchCatalogItemsResponse.js index 1d53a7b..f215166 100644 --- a/src/model/SearchCatalogItemsResponse.js +++ b/src/model/SearchCatalogItemsResponse.js @@ -67,7 +67,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Errors detected when the call to `SearchCatalogItems` endpoint fails. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/SearchCatalogObjectsResponse.js b/src/model/SearchCatalogObjectsResponse.js index c21cc55..b1dec82 100644 --- a/src/model/SearchCatalogObjectsResponse.js +++ b/src/model/SearchCatalogObjectsResponse.js @@ -70,7 +70,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js b/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js index 0eedd50..d6a7676 100644 --- a/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js +++ b/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js @@ -33,6 +33,7 @@ var exports = function() { var _this = this; + }; /** @@ -48,16 +49,24 @@ exports.constructFromObject = function(data, obj) { if (data.hasOwnProperty('mappings')) { obj['mappings'] = ApiClient.convertToType(data['mappings'], [LoyaltyAccountMapping]); + } + if (data.hasOwnProperty('customer_ids')) { + obj['customer_ids'] = ApiClient.convertToType(data['customer_ids'], ['String']); } } return obj; } /** - * The set of mappings to use in the loyalty account search. + * The set of mappings to use in the loyalty account search. This cannot be combined with `customer_ids`. Max: 30 mappings * @member {Array.} mappings */ exports.prototype['mappings'] = undefined; +/** + * The set of customer IDs to use in the loyalty account search. This cannot be combined with `mappings`. Max: 30 customer IDs + * @member {Array.} customer_ids + */ +exports.prototype['customer_ids'] = undefined; diff --git a/src/model/SearchTerminalCheckoutsRequest.js b/src/model/SearchTerminalCheckoutsRequest.js index 01a9f3b..3da0b18 100644 --- a/src/model/SearchTerminalCheckoutsRequest.js +++ b/src/model/SearchTerminalCheckoutsRequest.js @@ -19,7 +19,6 @@ var TerminalCheckoutQuery = require('./TerminalCheckoutQuery'); /** * The SearchTerminalCheckoutsRequest model module. - * Note: This model is in beta. * @module model/SearchTerminalCheckoutsRequest */ @@ -62,12 +61,12 @@ exports.constructFromObject = function(data, obj) { } /** - * Query the terminal checkouts based on given conditions and sort order. Calling SearchTerminalCheckouts without an explicitly query parameter will return all available checkouts with the default sort order. + * Queries terminal checkouts based on given conditions and sort order. Leaving this unset will return all checkouts with the default sort order. * @member {module:model/TerminalCheckoutQuery} query */ exports.prototype['query'] = 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. + * 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 [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. * @member {String} cursor */ exports.prototype['cursor'] = undefined; diff --git a/src/model/SearchTerminalCheckoutsResponse.js b/src/model/SearchTerminalCheckoutsResponse.js index 17963b1..9179fb4 100644 --- a/src/model/SearchTerminalCheckoutsResponse.js +++ b/src/model/SearchTerminalCheckoutsResponse.js @@ -20,7 +20,6 @@ var TerminalCheckout = require('./TerminalCheckout'); /** * The SearchTerminalCheckoutsResponse model module. - * Note: This model is in beta. * @module model/SearchTerminalCheckoutsResponse */ diff --git a/src/model/SearchTerminalRefundsRequest.js b/src/model/SearchTerminalRefundsRequest.js new file mode 100644 index 0000000..0f68f14 --- /dev/null +++ b/src/model/SearchTerminalRefundsRequest.js @@ -0,0 +1,85 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var TerminalRefundQuery = require('./TerminalRefundQuery'); + + + + +/** + * The SearchTerminalRefundsRequest model module. + * Note: This model is in beta. + * @module model/SearchTerminalRefundsRequest + */ + +/** + * Constructs a new SearchTerminalRefundsRequest. + * + * @alias module:model/SearchTerminalRefundsRequest + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a SearchTerminalRefundsRequest 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/SearchTerminalRefundsRequest} obj Optional instance to populate. + * @return {module:model/SearchTerminalRefundsRequest} The populated SearchTerminalRefundsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('query')) { + obj['query'] = TerminalRefundQuery.constructFromObject(data['query']); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('limit')) { + obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); + } + } + return obj; +} + +/** + * Query the terminal refunds based on given conditions and sort order. Calling `SearchTerminalRefunds` without an explicitly query parameter will return all available refunds with the default sort order. + * @member {module:model/TerminalRefundQuery} query + */ +exports.prototype['query'] = 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. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * Limit the number of results returned for a single request. + * @member {Number} limit + */ +exports.prototype['limit'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/SearchTerminalRefundsResponse.js b/src/model/SearchTerminalRefundsResponse.js new file mode 100644 index 0000000..a6454b3 --- /dev/null +++ b/src/model/SearchTerminalRefundsResponse.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 TerminalRefund = require('./TerminalRefund'); + + + + +/** + * The SearchTerminalRefundsResponse model module. + * Note: This model is in beta. + * @module model/SearchTerminalRefundsResponse + */ + +/** + * Constructs a new SearchTerminalRefundsResponse. + * + * @alias module:model/SearchTerminalRefundsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a SearchTerminalRefundsResponse 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/SearchTerminalRefundsResponse} obj Optional instance to populate. + * @return {module:model/SearchTerminalRefundsResponse} The populated SearchTerminalRefundsResponse 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('refunds')) { + obj['refunds'] = ApiClient.convertToType(data['refunds'], [TerminalRefund]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The requested search result of `TerminalRefund`s. + * @member {Array.} refunds + */ +exports.prototype['refunds'] = undefined; +/** + * The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/Tender.js b/src/model/Tender.js index 1049a18..b4b5054 100644 --- a/src/model/Tender.js +++ b/src/model/Tender.js @@ -14,7 +14,6 @@ var ApiClient = require('../ApiClient'); var AdditionalRecipient = require('./AdditionalRecipient'); var Money = require('./Money'); -var TenderBankTransferDetails = require('./TenderBankTransferDetails'); var TenderCardDetails = require('./TenderCardDetails'); var TenderCashDetails = require('./TenderCashDetails'); @@ -50,7 +49,6 @@ var exports = function(type) { - }; /** @@ -99,9 +97,6 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('cash_details')) { obj['cash_details'] = TenderCashDetails.constructFromObject(data['cash_details']); - } - if (data.hasOwnProperty('bank_transfer_details')) { - obj['bank_transfer_details'] = TenderBankTransferDetails.constructFromObject(data['bank_transfer_details']); } if (data.hasOwnProperty('additional_recipients')) { obj['additional_recipients'] = ApiClient.convertToType(data['additional_recipients'], [AdditionalRecipient]); @@ -173,11 +168,6 @@ exports.prototype['card_details'] = undefined; * @member {module:model/TenderCashDetails} cash_details */ exports.prototype['cash_details'] = undefined; -/** - * The details of the bank transfer tender. This value is present only if the value of `type` is `BANK_TRANSFER`. - * @member {module:model/TenderBankTransferDetails} bank_transfer_details - */ -exports.prototype['bank_transfer_details'] = undefined; /** * Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration. * @member {Array.} additional_recipients diff --git a/src/model/TenderBankTransferDetails.js b/src/model/TenderBankTransferDetails.js deleted file mode 100644 index ac81da3..0000000 --- a/src/model/TenderBankTransferDetails.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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 TenderBankTransferDetails model module. - * @module model/TenderBankTransferDetails - */ - -/** - * Constructs a new TenderBankTransferDetails. - * Represents the details of a tender with `type` `BANK_TRANSFER`. See [PaymentBankTransferDetails](#type-paymentbanktransferdetails) for more exposed details of a bank transfer payment. - * @alias module:model/TenderBankTransferDetails - * @class - */ -var exports = function() { - var _this = this; - - -}; - -/** - * Constructs a TenderBankTransferDetails 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/TenderBankTransferDetails} obj Optional instance to populate. - * @return {module:model/TenderBankTransferDetails} The populated TenderBankTransferDetails instance. - */ -exports.constructFromObject = function(data, obj) { - if (data) { - obj = obj || new exports(); - - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; -} - -/** - * The bank transfer's current state. See `TenderBankTransferDetailsStatus` for possible values. See [TenderBankTransferDetailsStatus](#type-tenderbanktransferdetailsstatus) for possible values - * @member {String} status - */ -exports.prototype['status'] = undefined; - - - -module.exports = exports; - - - diff --git a/src/model/TenderType.js b/src/model/TenderType.js index 56e4cbd..7c065e9 100644 --- a/src/model/TenderType.js +++ b/src/model/TenderType.js @@ -46,10 +46,10 @@ var exports = { */ "NO_SALE": "NO_SALE", /** - * value: "BANK_TRANSFER" + * value: "WALLET" * @const */ - "BANK_TRANSFER": "BANK_TRANSFER", + "WALLET": "WALLET", /** * value: "OTHER" * @const diff --git a/src/model/TerminalCheckout.js b/src/model/TerminalCheckout.js index 0b5415a..01542c0 100644 --- a/src/model/TerminalCheckout.js +++ b/src/model/TerminalCheckout.js @@ -20,7 +20,6 @@ var Money = require('./Money'); /** * The TerminalCheckout model module. - * Note: This model is in beta. * @module model/TerminalCheckout */ @@ -107,7 +106,7 @@ exports.prototype['id'] = undefined; */ exports.prototype['amount_money'] = undefined; /** - * An optional user-defined reference ID which can be used to associate this TerminalCheckout to another entity in an external system. For example, an order ID generated by a third-party shopping cart. Will also be associated with any payments used to complete the checkout. + * An optional user-defined reference ID which can be used to associate this `TerminalCheckout` to another entity in an external system. For example, an order ID generated by a third-party shopping cart. Will also be associated with any payments used to complete the checkout. * @member {String} reference_id */ exports.prototype['reference_id'] = undefined; @@ -122,22 +121,22 @@ exports.prototype['note'] = undefined; */ exports.prototype['device_options'] = undefined; /** - * 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 + * 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 * @member {String} deadline_duration */ exports.prototype['deadline_duration'] = undefined; /** - * The status of the `TerminalCheckout`. Options: PENDING, IN\\_PROGRESS, CANCELED, COMPLETED + * The status of the `TerminalCheckout`. Options: `PENDING`, `IN\\_PROGRESS`, `CANCEL\\_REQUESTED`, `CANCELED`, `COMPLETED` * @member {String} status */ exports.prototype['status'] = undefined; /** - * Present if the status is CANCELED. See [ActionCancelReason](#type-actioncancelreason) 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; /** - * A list of payments created by this `TerminalCheckout`. + * A list of ids for payments created by this `TerminalCheckout`. * @member {Array.} payment_ids */ exports.prototype['payment_ids'] = undefined; diff --git a/src/model/TerminalCheckoutQuery.js b/src/model/TerminalCheckoutQuery.js index e97039d..29ddfee 100644 --- a/src/model/TerminalCheckoutQuery.js +++ b/src/model/TerminalCheckoutQuery.js @@ -20,7 +20,6 @@ var TerminalCheckoutQuerySort = require('./TerminalCheckoutQuerySort'); /** * The TerminalCheckoutQuery model module. - * Note: This model is in beta. * @module model/TerminalCheckoutQuery */ diff --git a/src/model/TerminalCheckoutQueryFilter.js b/src/model/TerminalCheckoutQueryFilter.js index 2bf62c0..2d3ea67 100644 --- a/src/model/TerminalCheckoutQueryFilter.js +++ b/src/model/TerminalCheckoutQueryFilter.js @@ -19,7 +19,6 @@ var TimeRange = require('./TimeRange'); /** * The TerminalCheckoutQueryFilter model module. - * Note: This model is in beta. * @module model/TerminalCheckoutQueryFilter */ diff --git a/src/model/TerminalCheckoutQuerySort.js b/src/model/TerminalCheckoutQuerySort.js index 3e0705a..4129b20 100644 --- a/src/model/TerminalCheckoutQuerySort.js +++ b/src/model/TerminalCheckoutQuerySort.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The TerminalCheckoutQuerySort model module. - * Note: This model is in beta. * @module model/TerminalCheckoutQuerySort */ diff --git a/src/model/TerminalRefund.js b/src/model/TerminalRefund.js new file mode 100644 index 0000000..a235062 --- /dev/null +++ b/src/model/TerminalRefund.js @@ -0,0 +1,168 @@ +/** + * 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 Money = require('./Money'); + + + + +/** + * The TerminalRefund model module. + * Note: This model is in beta. + * @module model/TerminalRefund + */ + +/** + * Constructs a new TerminalRefund. + * + * @alias module:model/TerminalRefund + * @class + * @param paymentId {String} Unique ID of the payment being refunded. + * @param amountMoney {module:model/Money} The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return. This value is limited to the amount taken in the original payment minus any completed or pending refunds. + */ +var exports = function(paymentId, amountMoney) { + var _this = this; + + + + _this['payment_id'] = paymentId; + + _this['amount_money'] = amountMoney; + + + + + + + +}; + +/** + * Constructs a TerminalRefund 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/TerminalRefund} obj Optional instance to populate. + * @return {module:model/TerminalRefund} The populated TerminalRefund 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('refund_id')) { + obj['refund_id'] = ApiClient.convertToType(data['refund_id'], 'String'); + } + if (data.hasOwnProperty('payment_id')) { + obj['payment_id'] = ApiClient.convertToType(data['payment_id'], 'String'); + } + if (data.hasOwnProperty('order_id')) { + obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String'); + } + if (data.hasOwnProperty('amount_money')) { + obj['amount_money'] = Money.constructFromObject(data['amount_money']); + } + if (data.hasOwnProperty('reason')) { + obj['reason'] = ApiClient.convertToType(data['reason'], 'String'); + } + if (data.hasOwnProperty('device_id')) { + obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); + } + if (data.hasOwnProperty('deadline_duration')) { + obj['deadline_duration'] = ApiClient.convertToType(data['deadline_duration'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('cancel_reason')) { + obj['cancel_reason'] = ApiClient.convertToType(data['cancel_reason'], '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; +} + +/** + * A unique ID for this `TerminalRefund` + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * The reference to the payment refund created by completing this `TerminalRefund`. + * @member {String} refund_id + */ +exports.prototype['refund_id'] = undefined; +/** + * Unique ID of the payment being refunded. + * @member {String} payment_id + */ +exports.prototype['payment_id'] = undefined; +/** + * The reference to the Square order id for the payment identified by the `payment_id`. + * @member {String} order_id + */ +exports.prototype['order_id'] = undefined; +/** + * The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return. This value is limited to the amount taken in the original payment minus any completed or pending refunds. + * @member {module:model/Money} amount_money + */ +exports.prototype['amount_money'] = undefined; +/** + * A description of the reason for the refund. Note: maximum 192 characters + * @member {String} reason + */ +exports.prototype['reason'] = undefined; +/** + * The unique Id of the device intended for this `TerminalRefund`. The Id can be retrieved from /v2/devices api. + * @member {String} device_id + */ +exports.prototype['device_id'] = undefined; +/** + * The duration as an RFC 3339 duration, after which the refund will be automatically canceled. TerminalRefunds that are `PENDING` will be automatically `CANCELED` and have a cancellation reason of `TIMED_OUT` Default: 5 minutes from creation Maximum: 5 minutes + * @member {String} deadline_duration + */ +exports.prototype['deadline_duration'] = undefined; +/** + * The status of the `TerminalRefund`. Options: `PENDING`, `IN\\_PROGRESS`, `CANCELED`, `COMPLETED` + * @member {String} status + */ +exports.prototype['status'] = undefined; +/** + * Present if the status is `CANCELED`. See [ActionCancelReason](#type-actioncancelreason) for possible values + * @member {String} cancel_reason + */ +exports.prototype['cancel_reason'] = undefined; +/** + * The time when the `TerminalRefund` was created as an RFC 3339 timestamp. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * The time when the `TerminalRefund` was last updated as an RFC 3339 timestamp. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TerminalRefundQuery.js b/src/model/TerminalRefundQuery.js new file mode 100644 index 0000000..041b2d5 --- /dev/null +++ b/src/model/TerminalRefundQuery.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 TerminalRefundQueryFilter = require('./TerminalRefundQueryFilter'); +var TerminalRefundQuerySort = require('./TerminalRefundQuerySort'); + + + + +/** + * The TerminalRefundQuery model module. + * Note: This model is in beta. + * @module model/TerminalRefundQuery + */ + +/** + * Constructs a new TerminalRefundQuery. + * + * @alias module:model/TerminalRefundQuery + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a TerminalRefundQuery 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/TerminalRefundQuery} obj Optional instance to populate. + * @return {module:model/TerminalRefundQuery} The populated TerminalRefundQuery instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('filter')) { + obj['filter'] = TerminalRefundQueryFilter.constructFromObject(data['filter']); + } + if (data.hasOwnProperty('sort')) { + obj['sort'] = TerminalRefundQuerySort.constructFromObject(data['sort']); + } + } + return obj; +} + +/** + * + * @member {module:model/TerminalRefundQueryFilter} filter + */ +exports.prototype['filter'] = undefined; +/** + * + * @member {module:model/TerminalRefundQuerySort} sort + */ +exports.prototype['sort'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TerminalRefundQueryFilter.js b/src/model/TerminalRefundQueryFilter.js new file mode 100644 index 0000000..c32f925 --- /dev/null +++ b/src/model/TerminalRefundQueryFilter.js @@ -0,0 +1,85 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var TimeRange = require('./TimeRange'); + + + + +/** + * The TerminalRefundQueryFilter model module. + * Note: This model is in beta. + * @module model/TerminalRefundQueryFilter + */ + +/** + * Constructs a new TerminalRefundQueryFilter. + * + * @alias module:model/TerminalRefundQueryFilter + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a TerminalRefundQueryFilter 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/TerminalRefundQueryFilter} obj Optional instance to populate. + * @return {module:model/TerminalRefundQueryFilter} The populated TerminalRefundQueryFilter instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('device_id')) { + obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = TimeRange.constructFromObject(data['created_at']); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; +} + +/** + * `TerminalRefund`s associated with a specific device. If no device is specified then all `TerminalRefund`s for the signed in account will be displayed. + * @member {String} device_id + */ +exports.prototype['device_id'] = undefined; +/** + * Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one day. + * @member {module:model/TimeRange} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * Filtered results with the desired status of the `TerminalRefund` Options: `PENDING`, `IN\\_PROGRESS`, `CANCEL\\_REQUESTED`, `CANCELED`, `COMPLETED` + * @member {String} status + */ +exports.prototype['status'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TerminalRefundQuerySort.js b/src/model/TerminalRefundQuerySort.js new file mode 100644 index 0000000..c4ed4ce --- /dev/null +++ b/src/model/TerminalRefundQuerySort.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 TerminalRefundQuerySort model module. + * Note: This model is in beta. + * @module model/TerminalRefundQuerySort + */ + +/** + * Constructs a new TerminalRefundQuerySort. + * + * @alias module:model/TerminalRefundQuerySort + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a TerminalRefundQuerySort 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/TerminalRefundQuerySort} obj Optional instance to populate. + * @return {module:model/TerminalRefundQuerySort} The populated TerminalRefundQuerySort instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('sort_order')) { + obj['sort_order'] = ApiClient.convertToType(data['sort_order'], 'String'); + } + } + return obj; +} + +/** + * The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). + * @member {String} sort_order + */ +exports.prototype['sort_order'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TipSettings.js b/src/model/TipSettings.js index 5632d1d..2690098 100644 --- a/src/model/TipSettings.js +++ b/src/model/TipSettings.js @@ -18,7 +18,6 @@ var ApiClient = require('../ApiClient'); /** * The TipSettings model module. - * Note: This model is in beta. * @module model/TipSettings */ diff --git a/src/model/UpdateCustomerRequest.js b/src/model/UpdateCustomerRequest.js index d735114..e19ede5 100644 --- a/src/model/UpdateCustomerRequest.js +++ b/src/model/UpdateCustomerRequest.js @@ -134,7 +134,7 @@ exports.prototype['reference_id'] = undefined; */ exports.prototype['note'] = undefined; /** - * The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. + * The birthday associated with the customer profile, in RFC 3339 format. Year is optional, timezone and times are not allowed. For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st. `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__. * @member {String} birthday */ exports.prototype['birthday'] = undefined; diff --git a/src/model/UpdateInvoiceRequest.js b/src/model/UpdateInvoiceRequest.js index 894cfff..27e2ddf 100644 --- a/src/model/UpdateInvoiceRequest.js +++ b/src/model/UpdateInvoiceRequest.js @@ -28,7 +28,7 @@ var Invoice = require('./Invoice'); * 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). + * @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](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice). */ var exports = function(invoice) { var _this = this; @@ -63,7 +63,7 @@ exports.constructFromObject = function(data, 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). + * 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](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice). * @member {module:model/Invoice} invoice */ exports.prototype['invoice'] = undefined; diff --git a/src/model/UpdateItemModifierListsResponse.js b/src/model/UpdateItemModifierListsResponse.js index fb8fe3c..dffcfa1 100644 --- a/src/model/UpdateItemModifierListsResponse.js +++ b/src/model/UpdateItemModifierListsResponse.js @@ -57,12 +57,12 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; /** - * + * The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. * @member {String} updated_at */ exports.prototype['updated_at'] = undefined; diff --git a/src/model/UpdateItemTaxesResponse.js b/src/model/UpdateItemTaxesResponse.js index 364ee93..6e49f1e 100644 --- a/src/model/UpdateItemTaxesResponse.js +++ b/src/model/UpdateItemTaxesResponse.js @@ -57,7 +57,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/UpsertCatalogObjectResponse.js b/src/model/UpsertCatalogObjectResponse.js index 0e7c776..e5d44d9 100644 --- a/src/model/UpsertCatalogObjectResponse.js +++ b/src/model/UpsertCatalogObjectResponse.js @@ -63,7 +63,7 @@ exports.constructFromObject = function(data, obj) { } /** - * Information on any errors encountered. + * Any errors that occurred during the request. * @member {Array.} errors */ exports.prototype['errors'] = undefined; diff --git a/src/model/VersionedCatalogObject.js b/src/model/VersionedCatalogObject.js new file mode 100644 index 0000000..5f77645 --- /dev/null +++ b/src/model/VersionedCatalogObject.js @@ -0,0 +1,74 @@ +/** + * 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 VersionedCatalogObject model module. + * @module model/VersionedCatalogObject + */ + +/** + * Constructs a new VersionedCatalogObject. + * A reference to a Catalog object at a specific version. In general this is used as an entry point into a graph of catalog objects, where the objects exist at a specific version. + * @alias module:model/VersionedCatalogObject + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a VersionedCatalogObject 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/VersionedCatalogObject} obj Optional instance to populate. + * @return {module:model/VersionedCatalogObject} The populated VersionedCatalogObject instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('object_id')) { + obj['object_id'] = ApiClient.convertToType(data['object_id'], 'String'); + } + if (data.hasOwnProperty('catalog_version')) { + obj['catalog_version'] = ApiClient.convertToType(data['catalog_version'], 'Number'); + } + } + return obj; +} + +/** + * The ID of the referenced object. + * @member {String} object_id + */ +exports.prototype['object_id'] = undefined; +/** + * The version of the object. + * @member {Number} catalog_version + */ +exports.prototype['catalog_version'] = undefined; + + + +module.exports = exports; + + + diff --git a/test/api/LocationsApi.spec.js b/test/api/LocationsApi.spec.js index 13ce102..5ee22bd 100644 --- a/test/api/LocationsApi.spec.js +++ b/test/api/LocationsApi.spec.js @@ -9,7 +9,7 @@ describe('LocationsApi', function () { beforeEach(function () { const defaultClient = SquareConnect.ApiClient.instance; const oauth2 = defaultClient.authentications['oauth2']; - oauth2.accessToken = accounts.production.access_token; + oauth2.accessToken = accounts.sandbox.access_token; this.api = new SquareConnect.LocationsApi(); }); @@ -20,6 +20,6 @@ describe('LocationsApi', function () { const locations = resp.locations; expect(locations).to.exist; const locationIds = locations.map(location => location.id); - expect(locationIds).to.include(accounts.production.location_id); + expect(locationIds).to.include(accounts.sandbox.location_id); }); }); diff --git a/test/api/ReportingApi.spec.js b/test/api/ReportingApi.spec.js new file mode 100644 index 0000000..86db4e2 --- /dev/null +++ b/test/api/ReportingApi.spec.js @@ -0,0 +1,53 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +function addDays(startDate, numberOfDays) { + return new Date( + startDate.getFullYear(), + startDate.getMonth(), + startDate.getDate() + numberOfDays, + startDate.getHours(), + startDate.getMinutes(), + startDate.getSeconds() + ); +} + +describe('ReportingApi', function () { + + beforeEach(function () { + this.account = accounts.production; + this.locationId = this.account.location_id + + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + oauth2.accessToken = this.account.access_token; + + this.api = new SquareConnect.ReportingApi(); + }); + + it('should call listAdditionalRecipientReceivableRefunds successfully', async function () { + const now = new Date(); + const response = await this.api.listAdditionalRecipientReceivableRefunds(this.locationId, { + begin_time: addDays(now, -30), + end_time: now, + sort_order: 'DESC' + }).catch(handleUnexpectedError); + + expect(response.errors).not.to.exist; + }); + + it('should call listAdditionalRecipientReceivables successfully', async function () { + const now = new Date(); + const response = await this.api.listAdditionalRecipientReceivables(this.locationId, { + begin_time: addDays(now, -30), + end_time: now, + sort_order: 'DESC' + }).catch(handleUnexpectedError); + + expect(response.errors).not.to.exist; + }); +}); diff --git a/test/model/AdditionalRecipientReceivable.spec.js b/test/model/AdditionalRecipientReceivable.spec.js new file mode 100644 index 0000000..f527528 --- /dev/null +++ b/test/model/AdditionalRecipientReceivable.spec.js @@ -0,0 +1,59 @@ +/** + * 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('AdditionalRecipientReceivable', function() { + beforeEach(function() { + this.api = new SquareConnect.AdditionalRecipientReceivable(); + }); + + it('should create an instance of AdditionalRecipientReceivable', function() { + // uncomment below and update the code to test AdditionalRecipientReceivable + //var instane = new SquareConnect.AdditionalRecipientReceivable(); + //expect(instance).to.be.a(SquareConnect.AdditionalRecipientReceivable); + }); + + 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.AdditionalRecipientReceivable(); + //expect(instance).to.be(); + }); + it('should have the property transactionId (base name: "transaction_id")', function() { + // uncomment below and update the code to test the property transactionId + //var instane = new SquareConnect.AdditionalRecipientReceivable(); + //expect(instance).to.be(); + }); + it('should have the property transactionLocationId (base name: "transaction_location_id")', function() { + // uncomment below and update the code to test the property transactionLocationId + //var instane = new SquareConnect.AdditionalRecipientReceivable(); + //expect(instance).to.be(); + }); + it('should have the property amountMoney (base name: "amount_money")', function() { + // uncomment below and update the code to test the property amountMoney + //var instane = new SquareConnect.AdditionalRecipientReceivable(); + //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.AdditionalRecipientReceivable(); + //expect(instance).to.be(); + }); + it('should have the property refunds (base name: "refunds")', function() { + // uncomment below and update the code to test the property refunds + //var instane = new SquareConnect.AdditionalRecipientReceivable(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/AdditionalRecipientReceivableRefund.spec.js b/test/model/AdditionalRecipientReceivableRefund.spec.js new file mode 100644 index 0000000..94f1206 --- /dev/null +++ b/test/model/AdditionalRecipientReceivableRefund.spec.js @@ -0,0 +1,59 @@ +/** + * 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('AdditionalRecipientReceivableRefund', function() { + beforeEach(function() { + this.api = new SquareConnect.AdditionalRecipientReceivableRefund(); + }); + + it('should create an instance of AdditionalRecipientReceivableRefund', function() { + // uncomment below and update the code to test AdditionalRecipientReceivableRefund + //var instane = new SquareConnect.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be.a(SquareConnect.AdditionalRecipientReceivableRefund); + }); + + 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.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be(); + }); + it('should have the property receivableId (base name: "receivable_id")', function() { + // uncomment below and update the code to test the property receivableId + //var instane = new SquareConnect.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be(); + }); + it('should have the property refundId (base name: "refund_id")', function() { + // uncomment below and update the code to test the property refundId + //var instane = new SquareConnect.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be(); + }); + it('should have the property transactionLocationId (base name: "transaction_location_id")', function() { + // uncomment below and update the code to test the property transactionLocationId + //var instane = new SquareConnect.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be(); + }); + it('should have the property amountMoney (base name: "amount_money")', function() { + // uncomment below and update the code to test the property amountMoney + //var instane = new SquareConnect.AdditionalRecipientReceivableRefund(); + //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.AdditionalRecipientReceivableRefund(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/CancelTerminalRefundRequest.spec.js b/test/model/CancelTerminalRefundRequest.spec.js new file mode 100644 index 0000000..a09c660 --- /dev/null +++ b/test/model/CancelTerminalRefundRequest.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('CancelTerminalRefundRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelTerminalRefundRequest(); + }); + + it('should create an instance of CancelTerminalRefundRequest', function() { + // uncomment below and update the code to test CancelTerminalRefundRequest + //var instane = new SquareConnect.CancelTerminalRefundRequest(); + //expect(instance).to.be.a(SquareConnect.CancelTerminalRefundRequest); + }); + +}); diff --git a/test/model/CancelTerminalRefundResponse.spec.js b/test/model/CancelTerminalRefundResponse.spec.js new file mode 100644 index 0000000..05644c5 --- /dev/null +++ b/test/model/CancelTerminalRefundResponse.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('CancelTerminalRefundResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelTerminalRefundResponse(); + }); + + it('should create an instance of CancelTerminalRefundResponse', function() { + // uncomment below and update the code to test CancelTerminalRefundResponse + //var instane = new SquareConnect.CancelTerminalRefundResponse(); + //expect(instance).to.be.a(SquareConnect.CancelTerminalRefundResponse); + }); + + 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.CancelTerminalRefundResponse(); + //expect(instance).to.be(); + }); + it('should have the property refund (base name: "refund")', function() { + // uncomment below and update the code to test the property refund + //var instane = new SquareConnect.CancelTerminalRefundResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CatalogQuerySet.spec.js b/test/model/CatalogQuerySet.spec.js new file mode 100644 index 0000000..6b92727 --- /dev/null +++ b/test/model/CatalogQuerySet.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('CatalogQuerySet', function() { + beforeEach(function() { + this.api = new SquareConnect.CatalogQuerySet(); + }); + + it('should create an instance of CatalogQuerySet', function() { + // uncomment below and update the code to test CatalogQuerySet + //var instane = new SquareConnect.CatalogQuerySet(); + //expect(instance).to.be.a(SquareConnect.CatalogQuerySet); + }); + + it('should have the property attributeName (base name: "attribute_name")', function() { + // uncomment below and update the code to test the property attributeName + //var instane = new SquareConnect.CatalogQuerySet(); + //expect(instance).to.be(); + }); + it('should have the property attributeValues (base name: "attribute_values")', function() { + // uncomment below and update the code to test the property attributeValues + //var instane = new SquareConnect.CatalogQuerySet(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateTerminalRefundRequest.spec.js b/test/model/CreateTerminalRefundRequest.spec.js new file mode 100644 index 0000000..3deab5e --- /dev/null +++ b/test/model/CreateTerminalRefundRequest.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('CreateTerminalRefundRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateTerminalRefundRequest(); + }); + + it('should create an instance of CreateTerminalRefundRequest', function() { + // uncomment below and update the code to test CreateTerminalRefundRequest + //var instane = new SquareConnect.CreateTerminalRefundRequest(); + //expect(instance).to.be.a(SquareConnect.CreateTerminalRefundRequest); + }); + + 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.CreateTerminalRefundRequest(); + //expect(instance).to.be(); + }); + it('should have the property refund (base name: "refund")', function() { + // uncomment below and update the code to test the property refund + //var instane = new SquareConnect.CreateTerminalRefundRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateTerminalRefundResponse.spec.js b/test/model/CreateTerminalRefundResponse.spec.js new file mode 100644 index 0000000..ad44658 --- /dev/null +++ b/test/model/CreateTerminalRefundResponse.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('CreateTerminalRefundResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateTerminalRefundResponse(); + }); + + it('should create an instance of CreateTerminalRefundResponse', function() { + // uncomment below and update the code to test CreateTerminalRefundResponse + //var instane = new SquareConnect.CreateTerminalRefundResponse(); + //expect(instance).to.be.a(SquareConnect.CreateTerminalRefundResponse); + }); + + 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.CreateTerminalRefundResponse(); + //expect(instance).to.be(); + }); + it('should have the property refund (base name: "refund")', function() { + // uncomment below and update the code to test the property refund + //var instane = new SquareConnect.CreateTerminalRefundResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/GetTerminalRefundRequest.spec.js b/test/model/GetTerminalRefundRequest.spec.js new file mode 100644 index 0000000..2f59a07 --- /dev/null +++ b/test/model/GetTerminalRefundRequest.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('GetTerminalRefundRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.GetTerminalRefundRequest(); + }); + + it('should create an instance of GetTerminalRefundRequest', function() { + // uncomment below and update the code to test GetTerminalRefundRequest + //var instane = new SquareConnect.GetTerminalRefundRequest(); + //expect(instance).to.be.a(SquareConnect.GetTerminalRefundRequest); + }); + +}); diff --git a/test/model/GetTerminalRefundResponse.spec.js b/test/model/GetTerminalRefundResponse.spec.js new file mode 100644 index 0000000..6b68da2 --- /dev/null +++ b/test/model/GetTerminalRefundResponse.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('GetTerminalRefundResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.GetTerminalRefundResponse(); + }); + + it('should create an instance of GetTerminalRefundResponse', function() { + // uncomment below and update the code to test GetTerminalRefundResponse + //var instane = new SquareConnect.GetTerminalRefundResponse(); + //expect(instance).to.be.a(SquareConnect.GetTerminalRefundResponse); + }); + + 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.GetTerminalRefundResponse(); + //expect(instance).to.be(); + }); + it('should have the property refund (base name: "refund")', function() { + // uncomment below and update the code to test the property refund + //var instane = new SquareConnect.GetTerminalRefundResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/InlineTypes.spec.js b/test/model/InlineTypes.spec.js new file mode 100644 index 0000000..632a3b0 --- /dev/null +++ b/test/model/InlineTypes.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('InlineTypes', function() { + beforeEach(function() { + }); + + it('should create an instance of InlineTypes', function() { + // uncomment below and update the code to test InlineTypes + //var instane = new SquareConnect.InlineTypes(); + //expect(instance).to.be.a(SquareConnect.InlineTypes); + }); + +}); diff --git a/test/model/ListAdditionalRecipientReceivableRefundsRequest.spec.js b/test/model/ListAdditionalRecipientReceivableRefundsRequest.spec.js new file mode 100644 index 0000000..9bdb92b --- /dev/null +++ b/test/model/ListAdditionalRecipientReceivableRefundsRequest.spec.js @@ -0,0 +1,49 @@ +/** + * 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('ListAdditionalRecipientReceivableRefundsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListAdditionalRecipientReceivableRefundsRequest(); + }); + + it('should create an instance of ListAdditionalRecipientReceivableRefundsRequest', function() { + // uncomment below and update the code to test ListAdditionalRecipientReceivableRefundsRequest + //var instane = new SquareConnect.ListAdditionalRecipientReceivableRefundsRequest(); + //expect(instance).to.be.a(SquareConnect.ListAdditionalRecipientReceivableRefundsRequest); + }); + + it('should have the property beginTime (base name: "begin_time")', function() { + // uncomment below and update the code to test the property beginTime + //var instane = new SquareConnect.ListAdditionalRecipientReceivableRefundsRequest(); + //expect(instance).to.be(); + }); + it('should have the property endTime (base name: "end_time")', function() { + // uncomment below and update the code to test the property endTime + //var instane = new SquareConnect.ListAdditionalRecipientReceivableRefundsRequest(); + //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.ListAdditionalRecipientReceivableRefundsRequest(); + //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.ListAdditionalRecipientReceivableRefundsRequest(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/ListAdditionalRecipientReceivableRefundsResponse.spec.js b/test/model/ListAdditionalRecipientReceivableRefundsResponse.spec.js new file mode 100644 index 0000000..e3bedf9 --- /dev/null +++ b/test/model/ListAdditionalRecipientReceivableRefundsResponse.spec.js @@ -0,0 +1,44 @@ +/** + * 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('ListAdditionalRecipientReceivableRefundsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListAdditionalRecipientReceivableRefundsResponse(); + }); + + it('should create an instance of ListAdditionalRecipientReceivableRefundsResponse', function() { + // uncomment below and update the code to test ListAdditionalRecipientReceivableRefundsResponse + //var instane = new SquareConnect.ListAdditionalRecipientReceivableRefundsResponse(); + //expect(instance).to.be.a(SquareConnect.ListAdditionalRecipientReceivableRefundsResponse); + }); + + 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.ListAdditionalRecipientReceivableRefundsResponse(); + //expect(instance).to.be(); + }); + it('should have the property receivableRefunds (base name: "receivable_refunds")', function() { + // uncomment below and update the code to test the property receivableRefunds + //var instane = new SquareConnect.ListAdditionalRecipientReceivableRefundsResponse(); + //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.ListAdditionalRecipientReceivableRefundsResponse(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/ListAdditionalRecipientReceivablesRequest.spec.js b/test/model/ListAdditionalRecipientReceivablesRequest.spec.js new file mode 100644 index 0000000..5dbc5d7 --- /dev/null +++ b/test/model/ListAdditionalRecipientReceivablesRequest.spec.js @@ -0,0 +1,49 @@ +/** + * 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('ListAdditionalRecipientReceivablesRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListAdditionalRecipientReceivablesRequest(); + }); + + it('should create an instance of ListAdditionalRecipientReceivablesRequest', function() { + // uncomment below and update the code to test ListAdditionalRecipientReceivablesRequest + //var instane = new SquareConnect.ListAdditionalRecipientReceivablesRequest(); + //expect(instance).to.be.a(SquareConnect.ListAdditionalRecipientReceivablesRequest); + }); + + it('should have the property beginTime (base name: "begin_time")', function() { + // uncomment below and update the code to test the property beginTime + //var instane = new SquareConnect.ListAdditionalRecipientReceivablesRequest(); + //expect(instance).to.be(); + }); + it('should have the property endTime (base name: "end_time")', function() { + // uncomment below and update the code to test the property endTime + //var instane = new SquareConnect.ListAdditionalRecipientReceivablesRequest(); + //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.ListAdditionalRecipientReceivablesRequest(); + //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.ListAdditionalRecipientReceivablesRequest(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/ListAdditionalRecipientReceivablesResponse.spec.js b/test/model/ListAdditionalRecipientReceivablesResponse.spec.js new file mode 100644 index 0000000..6241163 --- /dev/null +++ b/test/model/ListAdditionalRecipientReceivablesResponse.spec.js @@ -0,0 +1,44 @@ +/** + * 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('ListAdditionalRecipientReceivablesResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListAdditionalRecipientReceivablesResponse(); + }); + + it('should create an instance of ListAdditionalRecipientReceivablesResponse', function() { + // uncomment below and update the code to test ListAdditionalRecipientReceivablesResponse + //var instane = new SquareConnect.ListAdditionalRecipientReceivablesResponse(); + //expect(instance).to.be.a(SquareConnect.ListAdditionalRecipientReceivablesResponse); + }); + + 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.ListAdditionalRecipientReceivablesResponse(); + //expect(instance).to.be(); + }); + it('should have the property receivables (base name: "receivables")', function() { + // uncomment below and update the code to test the property receivables + //var instane = new SquareConnect.ListAdditionalRecipientReceivablesResponse(); + //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.ListAdditionalRecipientReceivablesResponse(); + //expect(instance).to.be(); + }); +}); + diff --git a/test/model/MethodErrorCodes.spec.js b/test/model/MethodErrorCodes.spec.js new file mode 100644 index 0000000..928c907 --- /dev/null +++ b/test/model/MethodErrorCodes.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('MethodErrorCodes', function() { + beforeEach(function() { + this.api = new SquareConnect.MethodErrorCodes(); + }); + + it('should create an instance of MethodErrorCodes', function() { + // uncomment below and update the code to test MethodErrorCodes + //var instane = new SquareConnect.MethodErrorCodes(); + //expect(instance).to.be.a(SquareConnect.MethodErrorCodes); + }); + + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value + //var instane = new SquareConnect.MethodErrorCodes(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/RetrieveOrderRequest.spec.js b/test/model/RetrieveOrderRequest.spec.js new file mode 100644 index 0000000..d4fe998 --- /dev/null +++ b/test/model/RetrieveOrderRequest.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('RetrieveOrderRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveOrderRequest(); + }); + + it('should create an instance of RetrieveOrderRequest', function() { + // uncomment below and update the code to test RetrieveOrderRequest + //var instane = new SquareConnect.RetrieveOrderRequest(); + //expect(instance).to.be.a(SquareConnect.RetrieveOrderRequest); + }); + +}); diff --git a/test/model/RetrieveOrderResponse.spec.js b/test/model/RetrieveOrderResponse.spec.js new file mode 100644 index 0000000..edce1f7 --- /dev/null +++ b/test/model/RetrieveOrderResponse.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('RetrieveOrderResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveOrderResponse(); + }); + + it('should create an instance of RetrieveOrderResponse', function() { + // uncomment below and update the code to test RetrieveOrderResponse + //var instane = new SquareConnect.RetrieveOrderResponse(); + //expect(instance).to.be.a(SquareConnect.RetrieveOrderResponse); + }); + + 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.RetrieveOrderResponse(); + //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.RetrieveOrderResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchTerminalRefundsRequest.spec.js b/test/model/SearchTerminalRefundsRequest.spec.js new file mode 100644 index 0000000..3811d87 --- /dev/null +++ b/test/model/SearchTerminalRefundsRequest.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('SearchTerminalRefundsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchTerminalRefundsRequest(); + }); + + it('should create an instance of SearchTerminalRefundsRequest', function() { + // uncomment below and update the code to test SearchTerminalRefundsRequest + //var instane = new SquareConnect.SearchTerminalRefundsRequest(); + //expect(instance).to.be.a(SquareConnect.SearchTerminalRefundsRequest); + }); + + 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.SearchTerminalRefundsRequest(); + //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.SearchTerminalRefundsRequest(); + //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.SearchTerminalRefundsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchTerminalRefundsResponse.spec.js b/test/model/SearchTerminalRefundsResponse.spec.js new file mode 100644 index 0000000..eed1296 --- /dev/null +++ b/test/model/SearchTerminalRefundsResponse.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('SearchTerminalRefundsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchTerminalRefundsResponse(); + }); + + it('should create an instance of SearchTerminalRefundsResponse', function() { + // uncomment below and update the code to test SearchTerminalRefundsResponse + //var instane = new SquareConnect.SearchTerminalRefundsResponse(); + //expect(instance).to.be.a(SquareConnect.SearchTerminalRefundsResponse); + }); + + 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.SearchTerminalRefundsResponse(); + //expect(instance).to.be(); + }); + it('should have the property refunds (base name: "refunds")', function() { + // uncomment below and update the code to test the property refunds + //var instane = new SquareConnect.SearchTerminalRefundsResponse(); + //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.SearchTerminalRefundsResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalRefund.spec.js b/test/model/TerminalRefund.spec.js new file mode 100644 index 0000000..179a5e2 --- /dev/null +++ b/test/model/TerminalRefund.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('TerminalRefund', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalRefund(); + }); + + it('should create an instance of TerminalRefund', function() { + // uncomment below and update the code to test TerminalRefund + //var instane = new SquareConnect.TerminalRefund(); + //expect(instance).to.be.a(SquareConnect.TerminalRefund); + }); + + 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.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property refundId (base name: "refund_id")', function() { + // uncomment below and update the code to test the property refundId + //var instane = new SquareConnect.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property paymentId (base name: "payment_id")', function() { + // uncomment below and update the code to test the property paymentId + //var instane = new SquareConnect.TerminalRefund(); + //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.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property amountMoney (base name: "amount_money")', function() { + // uncomment below and update the code to test the property amountMoney + //var instane = new SquareConnect.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property reason (base name: "reason")', function() { + // uncomment below and update the code to test the property reason + //var instane = new SquareConnect.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property deviceId (base name: "device_id")', function() { + // uncomment below and update the code to test the property deviceId + //var instane = new SquareConnect.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property deadlineDuration (base name: "deadline_duration")', function() { + // uncomment below and update the code to test the property deadlineDuration + //var instane = new SquareConnect.TerminalRefund(); + //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.TerminalRefund(); + //expect(instance).to.be(); + }); + it('should have the property cancelReason (base name: "cancel_reason")', function() { + // uncomment below and update the code to test the property cancelReason + //var instane = new SquareConnect.TerminalRefund(); + //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.TerminalRefund(); + //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.TerminalRefund(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalRefundQuery.spec.js b/test/model/TerminalRefundQuery.spec.js new file mode 100644 index 0000000..4c05dbb --- /dev/null +++ b/test/model/TerminalRefundQuery.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('TerminalRefundQuery', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalRefundQuery(); + }); + + it('should create an instance of TerminalRefundQuery', function() { + // uncomment below and update the code to test TerminalRefundQuery + //var instane = new SquareConnect.TerminalRefundQuery(); + //expect(instance).to.be.a(SquareConnect.TerminalRefundQuery); + }); + + 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.TerminalRefundQuery(); + //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.TerminalRefundQuery(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalRefundQueryFilter.spec.js b/test/model/TerminalRefundQueryFilter.spec.js new file mode 100644 index 0000000..edd84a2 --- /dev/null +++ b/test/model/TerminalRefundQueryFilter.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('TerminalRefundQueryFilter', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalRefundQueryFilter(); + }); + + it('should create an instance of TerminalRefundQueryFilter', function() { + // uncomment below and update the code to test TerminalRefundQueryFilter + //var instane = new SquareConnect.TerminalRefundQueryFilter(); + //expect(instance).to.be.a(SquareConnect.TerminalRefundQueryFilter); + }); + + it('should have the property deviceId (base name: "device_id")', function() { + // uncomment below and update the code to test the property deviceId + //var instane = new SquareConnect.TerminalRefundQueryFilter(); + //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.TerminalRefundQueryFilter(); + //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.TerminalRefundQueryFilter(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalRefundQuerySort.spec.js b/test/model/TerminalRefundQuerySort.spec.js new file mode 100644 index 0000000..8e4c6e6 --- /dev/null +++ b/test/model/TerminalRefundQuerySort.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('TerminalRefundQuerySort', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalRefundQuerySort(); + }); + + it('should create an instance of TerminalRefundQuerySort', function() { + // uncomment below and update the code to test TerminalRefundQuerySort + //var instane = new SquareConnect.TerminalRefundQuerySort(); + //expect(instance).to.be.a(SquareConnect.TerminalRefundQuerySort); + }); + + 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.TerminalRefundQuerySort(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/VersionedCatalogObject.spec.js b/test/model/VersionedCatalogObject.spec.js new file mode 100644 index 0000000..3704b97 --- /dev/null +++ b/test/model/VersionedCatalogObject.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('VersionedCatalogObject', function() { + beforeEach(function() { + this.api = new SquareConnect.VersionedCatalogObject(); + }); + + it('should create an instance of VersionedCatalogObject', function() { + // uncomment below and update the code to test VersionedCatalogObject + //var instane = new SquareConnect.VersionedCatalogObject(); + //expect(instance).to.be.a(SquareConnect.VersionedCatalogObject); + }); + + it('should have the property objectId (base name: "object_id")', function() { + // uncomment below and update the code to test the property objectId + //var instane = new SquareConnect.VersionedCatalogObject(); + //expect(instance).to.be(); + }); + it('should have the property catalogVersion (base name: "catalog_version")', function() { + // uncomment below and update the code to test the property catalogVersion + //var instane = new SquareConnect.VersionedCatalogObject(); + //expect(instance).to.be(); + }); +});