diff --git a/CHANGES.md b/CHANGES.md index 231c879..c2b7146 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,62 @@ # Change Log +## 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 technical reference, see [Terminal API](${SQUARE_TECH_REF}/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](${SQUARE_TECH_REF}/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 technical reference, see [Customer Groups](${SQUARE_TECH_REF}/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 technical reference, see [Customer Segments]( ${SQUARE_TECH_REF}/customer-segments-api). + + +* **New webhooks.** v2 Webhooks (beta) now supports webhooks for the following APIs: + * Orders API. `order.created`, `order.updated`, and `order.fulfillment.updated` + * Terminal API. `terminal.checkout.created` and `terminal.checkout.updated` + * Devices API. `device.code.paired` + + For more information, see [Subscribe to Events](webhooks-api/subscribe-to-events). + +## Existing API updates +* **Customers API** + * [AddGroupToCustomer](${SQUARE_TECH_REF}/customers-api/add-group-to-customer) endpoint. Added to add customer memberships to a customer group. + * [RemoveGroupFromCustomer](${SQUARE_TECH_REF}/customers-api/remove-group-from-customer) endpoint. Added to remove customer memberships from a customer group. + * [Customer](${SQUARE_TECH_REF}/obects/Customer) object. Updated as follows: + * [`group_ids`](${SQUARE_TECH_REF}/obects/Customer#definition__property-group_ids) field. Added to designate groups the customer is in. + * [`segment_ids`](${SQUARE_TECH_REF}/obects/Customer#definition__property-segment_ids) field. Added to designate segments the customer is in. + * [`groups`](${SQUARE_TECH_REF}/obects/Customer#definition__property-groups) field. Deprecated to be replaced by `group_ids` and `segment_ids`. It remains supported for one year from this release. + * [CustomerQuery](${SQUARE_TECH_REF}/objects/CustomerQuery) object's `filter` parameter. Updated as follows: + * `group_ids` filter. Added to search for customers based on whether they belong to any, all, or none of the specified groups. + + +* **Orders API** + * [OrderFulfillmentPickupDetails](${SQUARE_TECH_REF}/objects/OrderFulfillmentPickupDetails) type updated to support curbside pickup: + * `is_curbside_pickup`. This Boolean field indicates curbside pickup. + * `CurbsidePickupDetails`. This type provides supporting information for curbside pickup, including a buyer description (for example, "buyer is in a red car") and a timestamp when the buyer arrived for the pickup. + + +* **OAuth API** + * [RevokeToken](${SQUARE_TECH_REF}/oauth-api/revoke-token) endpoint. Added a new field called [revoke_only_access_token](${SQUARE_TECH_REF}/oauth-api/revoke-token#request__property-revoke_only_access_token). This field allows a client to revoke an access token but leave the parent authorization active. + * [ObtainToken](${SQUARE_TECH_REF}/oauth-api/obtain-token) endpoint. Added a new field called [scopes](${SQUARE_TECH_REF}/oauth-api/obtain-token#request__property-scopes). This field lets a client change the set of permissions for an access token when making a request to refresh the token. + + +* **Catalog API** + * [CatalogQuickAmountsSettings](${SQUARE_TECH_REF}/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. + + + + + ## Version 3.20200325.0 (2020-03-25) ## Existing API updates * **[Payments API](${SQUARE_TECH_REF}/payments-api).** In support of the existing [Delayed capture](payments-api/take-payments) for payments, the following fields are added to the [Payment](${SQUARE_TECH_REF}/objects/Payment) type: diff --git a/README.md b/README.md index 605c943..57e0dcc 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,6 @@ [![npm version](https://badge.fury.io/js/square-connect.svg)](https://badge.fury.io/js/square-connect) [![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0) ================== -## NOTICE: Square Connect Node.js SDK deprecated -This Square Connect SDK will enter a security maintenance phase in Q3 2020 and will be RETIRED (EOL) in Q1 2021. In the security maintenance phase, this SDK will continue to receive support and security patches but will no longer receive bug fixes or product updates. Once it is retired, support and security patches will no longer be available. A new SDK, more bespoke to the language, will be available once this SDK enters its security maintenance phase. -The SDK itself will continue to work indefinitely until such time that the underlying APIs are retired at which point portions of the SDK may stop functioning. For a full list of API retirement dates, please see our [Square API Lifecycle documentation](https://developer.squareup.com/docs/build-basics/api-lifecycle#deprecated-apis). - -| Security Maintenance | New SDK Release | Retired (EOL) | -| ------------- |-------------| -----| -| Q3, 2020 | Q3, 2020 | Q1, 2021 | **If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://squ.re/2uLSRw5)** @@ -93,14 +86,26 @@ Class | Method | HTTP request | Description *SquareConnect.CatalogApi* | [**updateItemTaxes**](docs/CatalogApi.md#updateItemTaxes) | **POST** /v2/catalog/update-item-taxes | UpdateItemTaxes *SquareConnect.CatalogApi* | [**upsertCatalogObject**](docs/CatalogApi.md#upsertCatalogObject) | **POST** /v2/catalog/object | UpsertCatalogObject *SquareConnect.CheckoutApi* | [**createCheckout**](docs/CheckoutApi.md#createCheckout) | **POST** /v2/locations/{location_id}/checkouts | CreateCheckout +*SquareConnect.CustomerGroupsApi* | [**createCustomerGroup**](docs/CustomerGroupsApi.md#createCustomerGroup) | **POST** /v2/customers/groups | CreateCustomerGroup +*SquareConnect.CustomerGroupsApi* | [**deleteCustomerGroup**](docs/CustomerGroupsApi.md#deleteCustomerGroup) | **DELETE** /v2/customers/groups/{group_id} | DeleteCustomerGroup +*SquareConnect.CustomerGroupsApi* | [**listCustomerGroups**](docs/CustomerGroupsApi.md#listCustomerGroups) | **GET** /v2/customers/groups | ListCustomerGroups +*SquareConnect.CustomerGroupsApi* | [**retrieveCustomerGroup**](docs/CustomerGroupsApi.md#retrieveCustomerGroup) | **GET** /v2/customers/groups/{group_id} | RetrieveCustomerGroup +*SquareConnect.CustomerGroupsApi* | [**updateCustomerGroup**](docs/CustomerGroupsApi.md#updateCustomerGroup) | **PUT** /v2/customers/groups/{group_id} | UpdateCustomerGroup +*SquareConnect.CustomerSegmentsApi* | [**listCustomerSegments**](docs/CustomerSegmentsApi.md#listCustomerSegments) | **GET** /v2/customers/segments | ListCustomerSegments +*SquareConnect.CustomerSegmentsApi* | [**retrieveCustomerSegment**](docs/CustomerSegmentsApi.md#retrieveCustomerSegment) | **GET** /v2/customers/segments/{segment_id} | RetrieveCustomerSegment +*SquareConnect.CustomersApi* | [**addGroupToCustomer**](docs/CustomersApi.md#addGroupToCustomer) | **PUT** /v2/customers/{customer_id}/groups/{group_id} | AddGroupToCustomer *SquareConnect.CustomersApi* | [**createCustomer**](docs/CustomersApi.md#createCustomer) | **POST** /v2/customers | CreateCustomer *SquareConnect.CustomersApi* | [**createCustomerCard**](docs/CustomersApi.md#createCustomerCard) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard *SquareConnect.CustomersApi* | [**deleteCustomer**](docs/CustomersApi.md#deleteCustomer) | **DELETE** /v2/customers/{customer_id} | DeleteCustomer *SquareConnect.CustomersApi* | [**deleteCustomerCard**](docs/CustomersApi.md#deleteCustomerCard) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard *SquareConnect.CustomersApi* | [**listCustomers**](docs/CustomersApi.md#listCustomers) | **GET** /v2/customers | ListCustomers +*SquareConnect.CustomersApi* | [**removeGroupFromCustomer**](docs/CustomersApi.md#removeGroupFromCustomer) | **DELETE** /v2/customers/{customer_id}/groups/{group_id} | RemoveGroupFromCustomer *SquareConnect.CustomersApi* | [**retrieveCustomer**](docs/CustomersApi.md#retrieveCustomer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer *SquareConnect.CustomersApi* | [**searchCustomers**](docs/CustomersApi.md#searchCustomers) | **POST** /v2/customers/search | SearchCustomers *SquareConnect.CustomersApi* | [**updateCustomer**](docs/CustomersApi.md#updateCustomer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer +*SquareConnect.DevicesApi* | [**createDeviceCode**](docs/DevicesApi.md#createDeviceCode) | **POST** /v2/devices/codes | CreateDeviceCode +*SquareConnect.DevicesApi* | [**getDeviceCode**](docs/DevicesApi.md#getDeviceCode) | **GET** /v2/devices/codes/{id} | GetDeviceCode +*SquareConnect.DevicesApi* | [**listDeviceCodes**](docs/DevicesApi.md#listDeviceCodes) | **GET** /v2/devices/codes | ListDeviceCodes *SquareConnect.DisputesApi* | [**acceptDispute**](docs/DisputesApi.md#acceptDispute) | **POST** /v2/disputes/{dispute_id}/accept | AcceptDispute *SquareConnect.DisputesApi* | [**createDisputeEvidenceText**](docs/DisputesApi.md#createDisputeEvidenceText) | **POST** /v2/disputes/{dispute_id}/evidence_text | CreateDisputeEvidenceText *SquareConnect.DisputesApi* | [**listDisputeEvidence**](docs/DisputesApi.md#listDisputeEvidence) | **GET** /v2/disputes/{dispute_id}/evidence | ListDisputeEvidence @@ -158,6 +163,10 @@ Class | Method | HTTP request | Description *SquareConnect.RefundsApi* | [**refundPayment**](docs/RefundsApi.md#refundPayment) | **POST** /v2/refunds | RefundPayment *SquareConnect.ReportingApi* | [**listAdditionalRecipientReceivableRefunds**](docs/ReportingApi.md#listAdditionalRecipientReceivableRefunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds *SquareConnect.ReportingApi* | [**listAdditionalRecipientReceivables**](docs/ReportingApi.md#listAdditionalRecipientReceivables) | **GET** /v2/locations/{location_id}/additional-recipient-receivables | ListAdditionalRecipientReceivables +*SquareConnect.TerminalApi* | [**cancelTerminalCheckout**](docs/TerminalApi.md#cancelTerminalCheckout) | **POST** /v2/terminals/checkouts/{checkout_id}/cancel | CancelTerminalCheckout +*SquareConnect.TerminalApi* | [**createTerminalCheckout**](docs/TerminalApi.md#createTerminalCheckout) | **POST** /v2/terminals/checkouts | CreateTerminalCheckout +*SquareConnect.TerminalApi* | [**getTerminalCheckout**](docs/TerminalApi.md#getTerminalCheckout) | **GET** /v2/terminals/checkouts/{checkout_id} | GetTerminalCheckout +*SquareConnect.TerminalApi* | [**searchTerminalCheckouts**](docs/TerminalApi.md#searchTerminalCheckouts) | **POST** /v2/terminals/checkouts/search | SearchTerminalCheckouts *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 @@ -240,6 +249,8 @@ Class | Method | HTTP request | Description - [SquareConnect.AcceptDisputeRequest](docs/AcceptDisputeRequest.md) - [SquareConnect.AcceptDisputeResponse](docs/AcceptDisputeResponse.md) + - [SquareConnect.AddGroupToCustomerRequest](docs/AddGroupToCustomerRequest.md) + - [SquareConnect.AddGroupToCustomerResponse](docs/AddGroupToCustomerResponse.md) - [SquareConnect.AdditionalRecipient](docs/AdditionalRecipient.md) - [SquareConnect.AdditionalRecipientReceivable](docs/AdditionalRecipientReceivable.md) - [SquareConnect.AdditionalRecipientReceivableRefund](docs/AdditionalRecipientReceivableRefund.md) @@ -269,6 +280,8 @@ Class | Method | HTTP request | Description - [SquareConnect.CancelPaymentByIdempotencyKeyResponse](docs/CancelPaymentByIdempotencyKeyResponse.md) - [SquareConnect.CancelPaymentRequest](docs/CancelPaymentRequest.md) - [SquareConnect.CancelPaymentResponse](docs/CancelPaymentResponse.md) + - [SquareConnect.CancelTerminalCheckoutRequest](docs/CancelTerminalCheckoutRequest.md) + - [SquareConnect.CancelTerminalCheckoutResponse](docs/CancelTerminalCheckoutResponse.md) - [SquareConnect.CaptureTransactionRequest](docs/CaptureTransactionRequest.md) - [SquareConnect.CaptureTransactionResponse](docs/CaptureTransactionResponse.md) - [SquareConnect.Card](docs/Card.md) @@ -334,6 +347,10 @@ Class | Method | HTTP request | Description - [SquareConnect.CatalogQueryRange](docs/CatalogQueryRange.md) - [SquareConnect.CatalogQuerySortedAttribute](docs/CatalogQuerySortedAttribute.md) - [SquareConnect.CatalogQueryText](docs/CatalogQueryText.md) + - [SquareConnect.CatalogQuickAmount](docs/CatalogQuickAmount.md) + - [SquareConnect.CatalogQuickAmountType](docs/CatalogQuickAmountType.md) + - [SquareConnect.CatalogQuickAmountsSettings](docs/CatalogQuickAmountsSettings.md) + - [SquareConnect.CatalogQuickAmountsSettingsOption](docs/CatalogQuickAmountsSettingsOption.md) - [SquareConnect.CatalogTax](docs/CatalogTax.md) - [SquareConnect.CatalogTimePeriod](docs/CatalogTimePeriod.md) - [SquareConnect.CatalogV1Id](docs/CatalogV1Id.md) @@ -353,8 +370,12 @@ Class | Method | HTTP request | Description - [SquareConnect.CreateCheckoutResponse](docs/CreateCheckoutResponse.md) - [SquareConnect.CreateCustomerCardRequest](docs/CreateCustomerCardRequest.md) - [SquareConnect.CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md) + - [SquareConnect.CreateCustomerGroupRequest](docs/CreateCustomerGroupRequest.md) + - [SquareConnect.CreateCustomerGroupResponse](docs/CreateCustomerGroupResponse.md) - [SquareConnect.CreateCustomerRequest](docs/CreateCustomerRequest.md) - [SquareConnect.CreateCustomerResponse](docs/CreateCustomerResponse.md) + - [SquareConnect.CreateDeviceCodeRequest](docs/CreateDeviceCodeRequest.md) + - [SquareConnect.CreateDeviceCodeResponse](docs/CreateDeviceCodeResponse.md) - [SquareConnect.CreateDisputeEvidenceFileRequest](docs/CreateDisputeEvidenceFileRequest.md) - [SquareConnect.CreateDisputeEvidenceFileResponse](docs/CreateDisputeEvidenceFileResponse.md) - [SquareConnect.CreateDisputeEvidenceTextRequest](docs/CreateDisputeEvidenceTextRequest.md) @@ -371,15 +392,19 @@ Class | Method | HTTP request | Description - [SquareConnect.CreateRefundResponse](docs/CreateRefundResponse.md) - [SquareConnect.CreateShiftRequest](docs/CreateShiftRequest.md) - [SquareConnect.CreateShiftResponse](docs/CreateShiftResponse.md) + - [SquareConnect.CreateTerminalCheckoutRequest](docs/CreateTerminalCheckoutRequest.md) + - [SquareConnect.CreateTerminalCheckoutResponse](docs/CreateTerminalCheckoutResponse.md) - [SquareConnect.Currency](docs/Currency.md) - [SquareConnect.Customer](docs/Customer.md) - [SquareConnect.CustomerCreationSource](docs/CustomerCreationSource.md) - [SquareConnect.CustomerCreationSourceFilter](docs/CustomerCreationSourceFilter.md) - [SquareConnect.CustomerFilter](docs/CustomerFilter.md) + - [SquareConnect.CustomerGroup](docs/CustomerGroup.md) - [SquareConnect.CustomerGroupInfo](docs/CustomerGroupInfo.md) - [SquareConnect.CustomerInclusionExclusion](docs/CustomerInclusionExclusion.md) - [SquareConnect.CustomerPreferences](docs/CustomerPreferences.md) - [SquareConnect.CustomerQuery](docs/CustomerQuery.md) + - [SquareConnect.CustomerSegment](docs/CustomerSegment.md) - [SquareConnect.CustomerSort](docs/CustomerSort.md) - [SquareConnect.CustomerSortField](docs/CustomerSortField.md) - [SquareConnect.DateRange](docs/DateRange.md) @@ -390,11 +415,16 @@ Class | Method | HTTP request | Description - [SquareConnect.DeleteCatalogObjectResponse](docs/DeleteCatalogObjectResponse.md) - [SquareConnect.DeleteCustomerCardRequest](docs/DeleteCustomerCardRequest.md) - [SquareConnect.DeleteCustomerCardResponse](docs/DeleteCustomerCardResponse.md) + - [SquareConnect.DeleteCustomerGroupRequest](docs/DeleteCustomerGroupRequest.md) + - [SquareConnect.DeleteCustomerGroupResponse](docs/DeleteCustomerGroupResponse.md) - [SquareConnect.DeleteCustomerRequest](docs/DeleteCustomerRequest.md) - [SquareConnect.DeleteCustomerResponse](docs/DeleteCustomerResponse.md) - [SquareConnect.DeleteShiftRequest](docs/DeleteShiftRequest.md) - [SquareConnect.DeleteShiftResponse](docs/DeleteShiftResponse.md) - [SquareConnect.Device](docs/Device.md) + - [SquareConnect.DeviceCheckoutOptions](docs/DeviceCheckoutOptions.md) + - [SquareConnect.DeviceCode](docs/DeviceCode.md) + - [SquareConnect.DeviceCodeStatus](docs/DeviceCodeStatus.md) - [SquareConnect.DeviceDetails](docs/DeviceDetails.md) - [SquareConnect.Dispute](docs/Dispute.md) - [SquareConnect.DisputeEvidence](docs/DisputeEvidence.md) @@ -411,12 +441,15 @@ Class | Method | HTTP request | Description - [SquareConnect.ErrorCategory](docs/ErrorCategory.md) - [SquareConnect.ErrorCode](docs/ErrorCode.md) - [SquareConnect.ExcludeStrategy](docs/ExcludeStrategy.md) + - [SquareConnect.FilterValue](docs/FilterValue.md) - [SquareConnect.GetBankAccountByV1IdRequest](docs/GetBankAccountByV1IdRequest.md) - [SquareConnect.GetBankAccountByV1IdResponse](docs/GetBankAccountByV1IdResponse.md) - [SquareConnect.GetBankAccountRequest](docs/GetBankAccountRequest.md) - [SquareConnect.GetBankAccountResponse](docs/GetBankAccountResponse.md) - [SquareConnect.GetBreakTypeRequest](docs/GetBreakTypeRequest.md) - [SquareConnect.GetBreakTypeResponse](docs/GetBreakTypeResponse.md) + - [SquareConnect.GetDeviceCodeRequest](docs/GetDeviceCodeRequest.md) + - [SquareConnect.GetDeviceCodeResponse](docs/GetDeviceCodeResponse.md) - [SquareConnect.GetEmployeeWageRequest](docs/GetEmployeeWageRequest.md) - [SquareConnect.GetEmployeeWageResponse](docs/GetEmployeeWageResponse.md) - [SquareConnect.GetPaymentRefundRequest](docs/GetPaymentRefundRequest.md) @@ -425,6 +458,8 @@ Class | Method | HTTP request | Description - [SquareConnect.GetPaymentResponse](docs/GetPaymentResponse.md) - [SquareConnect.GetShiftRequest](docs/GetShiftRequest.md) - [SquareConnect.GetShiftResponse](docs/GetShiftResponse.md) + - [SquareConnect.GetTerminalCheckoutRequest](docs/GetTerminalCheckoutRequest.md) + - [SquareConnect.GetTerminalCheckoutResponse](docs/GetTerminalCheckoutResponse.md) - [SquareConnect.InventoryAdjustment](docs/InventoryAdjustment.md) - [SquareConnect.InventoryAlertType](docs/InventoryAlertType.md) - [SquareConnect.InventoryChange](docs/InventoryChange.md) @@ -448,8 +483,14 @@ Class | Method | HTTP request | Description - [SquareConnect.ListCashDrawerShiftsResponse](docs/ListCashDrawerShiftsResponse.md) - [SquareConnect.ListCatalogRequest](docs/ListCatalogRequest.md) - [SquareConnect.ListCatalogResponse](docs/ListCatalogResponse.md) + - [SquareConnect.ListCustomerGroupsRequest](docs/ListCustomerGroupsRequest.md) + - [SquareConnect.ListCustomerGroupsResponse](docs/ListCustomerGroupsResponse.md) + - [SquareConnect.ListCustomerSegmentsRequest](docs/ListCustomerSegmentsRequest.md) + - [SquareConnect.ListCustomerSegmentsResponse](docs/ListCustomerSegmentsResponse.md) - [SquareConnect.ListCustomersRequest](docs/ListCustomersRequest.md) - [SquareConnect.ListCustomersResponse](docs/ListCustomersResponse.md) + - [SquareConnect.ListDeviceCodesRequest](docs/ListDeviceCodesRequest.md) + - [SquareConnect.ListDeviceCodesResponse](docs/ListDeviceCodesResponse.md) - [SquareConnect.ListDisputeEvidenceRequest](docs/ListDisputeEvidenceRequest.md) - [SquareConnect.ListDisputeEvidenceResponse](docs/ListDisputeEvidenceResponse.md) - [SquareConnect.ListDisputesRequest](docs/ListDisputesRequest.md) @@ -493,14 +534,20 @@ Class | Method | HTTP request | Description - [SquareConnect.ObtainTokenRequest](docs/ObtainTokenRequest.md) - [SquareConnect.ObtainTokenResponse](docs/ObtainTokenResponse.md) - [SquareConnect.Order](docs/Order.md) + - [SquareConnect.OrderCreated](docs/OrderCreated.md) + - [SquareConnect.OrderCreatedObject](docs/OrderCreatedObject.md) - [SquareConnect.OrderEntry](docs/OrderEntry.md) - [SquareConnect.OrderFulfillment](docs/OrderFulfillment.md) - [SquareConnect.OrderFulfillmentPickupDetails](docs/OrderFulfillmentPickupDetails.md) + - [SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails](docs/OrderFulfillmentPickupDetailsCurbsidePickupDetails.md) - [SquareConnect.OrderFulfillmentPickupDetailsScheduleType](docs/OrderFulfillmentPickupDetailsScheduleType.md) - [SquareConnect.OrderFulfillmentRecipient](docs/OrderFulfillmentRecipient.md) - [SquareConnect.OrderFulfillmentShipmentDetails](docs/OrderFulfillmentShipmentDetails.md) - [SquareConnect.OrderFulfillmentState](docs/OrderFulfillmentState.md) - [SquareConnect.OrderFulfillmentType](docs/OrderFulfillmentType.md) + - [SquareConnect.OrderFulfillmentUpdated](docs/OrderFulfillmentUpdated.md) + - [SquareConnect.OrderFulfillmentUpdatedObject](docs/OrderFulfillmentUpdatedObject.md) + - [SquareConnect.OrderFulfillmentUpdatedUpdate](docs/OrderFulfillmentUpdatedUpdate.md) - [SquareConnect.OrderLineItem](docs/OrderLineItem.md) - [SquareConnect.OrderLineItemAppliedDiscount](docs/OrderLineItemAppliedDiscount.md) - [SquareConnect.OrderLineItemAppliedTax](docs/OrderLineItemAppliedTax.md) @@ -524,12 +571,16 @@ Class | Method | HTTP request | Description - [SquareConnect.OrderServiceChargeCalculationPhase](docs/OrderServiceChargeCalculationPhase.md) - [SquareConnect.OrderSource](docs/OrderSource.md) - [SquareConnect.OrderState](docs/OrderState.md) + - [SquareConnect.OrderUpdated](docs/OrderUpdated.md) + - [SquareConnect.OrderUpdatedObject](docs/OrderUpdatedObject.md) - [SquareConnect.PayOrderRequest](docs/PayOrderRequest.md) - [SquareConnect.PayOrderResponse](docs/PayOrderResponse.md) - [SquareConnect.Payment](docs/Payment.md) + - [SquareConnect.PaymentOptions](docs/PaymentOptions.md) - [SquareConnect.PaymentRefund](docs/PaymentRefund.md) - [SquareConnect.ProcessingFee](docs/ProcessingFee.md) - [SquareConnect.Product](docs/Product.md) + - [SquareConnect.ProductType](docs/ProductType.md) - [SquareConnect.Refund](docs/Refund.md) - [SquareConnect.RefundPaymentRequest](docs/RefundPaymentRequest.md) - [SquareConnect.RefundPaymentResponse](docs/RefundPaymentResponse.md) @@ -539,14 +590,20 @@ Class | Method | HTTP request | Description - [SquareConnect.RegisterDomainResponseStatus](docs/RegisterDomainResponseStatus.md) - [SquareConnect.RemoveDisputeEvidenceRequest](docs/RemoveDisputeEvidenceRequest.md) - [SquareConnect.RemoveDisputeEvidenceResponse](docs/RemoveDisputeEvidenceResponse.md) + - [SquareConnect.RemoveGroupFromCustomerRequest](docs/RemoveGroupFromCustomerRequest.md) + - [SquareConnect.RemoveGroupFromCustomerResponse](docs/RemoveGroupFromCustomerResponse.md) - [SquareConnect.RenewTokenRequest](docs/RenewTokenRequest.md) - [SquareConnect.RenewTokenResponse](docs/RenewTokenResponse.md) - [SquareConnect.RetrieveCashDrawerShiftRequest](docs/RetrieveCashDrawerShiftRequest.md) - [SquareConnect.RetrieveCashDrawerShiftResponse](docs/RetrieveCashDrawerShiftResponse.md) - [SquareConnect.RetrieveCatalogObjectRequest](docs/RetrieveCatalogObjectRequest.md) - [SquareConnect.RetrieveCatalogObjectResponse](docs/RetrieveCatalogObjectResponse.md) + - [SquareConnect.RetrieveCustomerGroupRequest](docs/RetrieveCustomerGroupRequest.md) + - [SquareConnect.RetrieveCustomerGroupResponse](docs/RetrieveCustomerGroupResponse.md) - [SquareConnect.RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md) - [SquareConnect.RetrieveCustomerResponse](docs/RetrieveCustomerResponse.md) + - [SquareConnect.RetrieveCustomerSegmentRequest](docs/RetrieveCustomerSegmentRequest.md) + - [SquareConnect.RetrieveCustomerSegmentResponse](docs/RetrieveCustomerSegmentResponse.md) - [SquareConnect.RetrieveDisputeEvidenceRequest](docs/RetrieveDisputeEvidenceRequest.md) - [SquareConnect.RetrieveDisputeEvidenceResponse](docs/RetrieveDisputeEvidenceResponse.md) - [SquareConnect.RetrieveDisputeRequest](docs/RetrieveDisputeRequest.md) @@ -586,6 +643,8 @@ Class | Method | HTTP request | Description - [SquareConnect.SearchOrdersStateFilter](docs/SearchOrdersStateFilter.md) - [SquareConnect.SearchShiftsRequest](docs/SearchShiftsRequest.md) - [SquareConnect.SearchShiftsResponse](docs/SearchShiftsResponse.md) + - [SquareConnect.SearchTerminalCheckoutsRequest](docs/SearchTerminalCheckoutsRequest.md) + - [SquareConnect.SearchTerminalCheckoutsResponse](docs/SearchTerminalCheckoutsResponse.md) - [SquareConnect.Shift](docs/Shift.md) - [SquareConnect.ShiftFilter](docs/ShiftFilter.md) - [SquareConnect.ShiftFilterStatus](docs/ShiftFilterStatus.md) @@ -610,12 +669,20 @@ Class | Method | HTTP request | Description - [SquareConnect.TenderCardDetailsStatus](docs/TenderCardDetailsStatus.md) - [SquareConnect.TenderCashDetails](docs/TenderCashDetails.md) - [SquareConnect.TenderType](docs/TenderType.md) + - [SquareConnect.TerminalCheckout](docs/TerminalCheckout.md) + - [SquareConnect.TerminalCheckoutCancelReason](docs/TerminalCheckoutCancelReason.md) + - [SquareConnect.TerminalCheckoutQuery](docs/TerminalCheckoutQuery.md) + - [SquareConnect.TerminalCheckoutQueryFilter](docs/TerminalCheckoutQueryFilter.md) + - [SquareConnect.TerminalCheckoutQuerySort](docs/TerminalCheckoutQuerySort.md) - [SquareConnect.TimeRange](docs/TimeRange.md) + - [SquareConnect.TipSettings](docs/TipSettings.md) - [SquareConnect.Transaction](docs/Transaction.md) - [SquareConnect.TransactionProduct](docs/TransactionProduct.md) - [SquareConnect.TransactionType](docs/TransactionType.md) - [SquareConnect.UpdateBreakTypeRequest](docs/UpdateBreakTypeRequest.md) - [SquareConnect.UpdateBreakTypeResponse](docs/UpdateBreakTypeResponse.md) + - [SquareConnect.UpdateCustomerGroupRequest](docs/UpdateCustomerGroupRequest.md) + - [SquareConnect.UpdateCustomerGroupResponse](docs/UpdateCustomerGroupResponse.md) - [SquareConnect.UpdateCustomerRequest](docs/UpdateCustomerRequest.md) - [SquareConnect.UpdateCustomerResponse](docs/UpdateCustomerResponse.md) - [SquareConnect.UpdateItemModifierListsRequest](docs/UpdateItemModifierListsRequest.md) @@ -810,6 +877,7 @@ Class | Method | HTTP request | Description - BANK_ACCOUNTS_READ: __HTTP Method__: `GET` Grants read access to bank account information associated with the targeted Square account. For example, to call the Connect v1 ListBankAccounts endpoint. - CUSTOMERS_READ: __HTTP Method__: `GET` Grants read access to customer information. For example, to call the ListCustomers endpoint. - CUSTOMERS_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to customer information. For example, to create and update customer profiles. + - DEVICE_CREDENTIAL_MANAGEMENT: __HTTP Method__: `POST`, `GET` Grants read/write access to device credentials information. For example, to call the CreateDeviceCode endpoint. - EMPLOYEES_READ: __HTTP Method__: `GET` Grants read access to employee profile information. For example, to call the Connect v1 Employees API. - EMPLOYEES_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to employee profile information. For example, to create and modify employee profiles. - INVENTORY_READ: __HTTP Method__: `GET` Grants read access to inventory information. For example, to call the RetrieveInventoryCount endpoint. diff --git a/docs/AddGroupToCustomerRequest.md b/docs/AddGroupToCustomerRequest.md new file mode 100644 index 0000000..faa400d --- /dev/null +++ b/docs/AddGroupToCustomerRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.AddGroupToCustomerRequest + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the request body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/AddGroupToCustomerResponse.md b/docs/AddGroupToCustomerResponse.md new file mode 100644 index 0000000..b049ddb --- /dev/null +++ b/docs/AddGroupToCustomerResponse.md @@ -0,0 +1,13 @@ +# SquareConnect.AddGroupToCustomerResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] + + diff --git a/docs/CancelTerminalCheckoutRequest.md b/docs/CancelTerminalCheckoutRequest.md new file mode 100644 index 0000000..ca013ce --- /dev/null +++ b/docs/CancelTerminalCheckoutRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.CancelTerminalCheckoutRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/CancelTerminalCheckoutResponse.md b/docs/CancelTerminalCheckoutResponse.md new file mode 100644 index 0000000..77644c7 --- /dev/null +++ b/docs/CancelTerminalCheckoutResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CancelTerminalCheckoutResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The updated `TerminalCheckout` | [optional] + + diff --git a/docs/CatalogCustomAttributeDefinition.md b/docs/CatalogCustomAttributeDefinition.md index 99fdfee..c421f5a 100644 --- a/docs/CatalogCustomAttributeDefinition.md +++ b/docs/CatalogCustomAttributeDefinition.md @@ -12,12 +12,12 @@ Name | Type | Description | Notes **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. | **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. See [CatalogObjectType](#type-catalogobjecttype) for possible values | [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 | [optional] **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] **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. | [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/CatalogCustomAttributeValue.md b/docs/CatalogCustomAttributeValue.md index 2f8a6ce..85fff8b 100644 --- a/docs/CatalogCustomAttributeValue.md +++ b/docs/CatalogCustomAttributeValue.md @@ -10,11 +10,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | The name of the custom attribute. | [optional] **string_value** | **String** | The string value of the custom attribute. Populated if `type` = `STRING`. | [optional] -**custom_attribute_definition_id** | **String** | __Read-only.__ The custom attribute definition this value belongs to. | [optional] -**type** | **String** | __Read-only.__ A copy of type from the associated custom attribute definition. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values | [optional] +**custom_attribute_definition_id** | **String** | __Read-only.__ The id of the `CatalogCustomAttributeDefinition` this value belongs to. | [optional] +**type** | **String** | __Read-only.__ A copy of type from the associated `CatalogCustomAttributeDefinition`. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values | [optional] **number_value** | **String** | Populated if `type` = `NUMBER`. Contains a string representation of a decimal number, using a `.` as the decimal separator. | [optional] **boolean_value** | **Boolean** | A `true` or `false` value. Populated if `type` = `BOOLEAN`. | [optional] **selection_uid_values** | **[String]** | One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`. | [optional] -**key** | **String** | __Read-only.__ A copy of key from the associated custom attribute definition. | [optional] +**key** | **String** | __Read-only.__ A copy of key from the associated `CatalogCustomAttributeDefinition`. | [optional] diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index c47fe68..cad8409 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -2,7 +2,7 @@ ### Description -The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid `CatalogItem` object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid `CatalogItemVariation` object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid `CatalogModifier` object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid `CatalogModifierList` object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid `CatalogCategory` object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid `CatalogDiscount` object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid `CatalogTax` object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid `CatalogImage` 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 object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid `CatalogItem` object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid `CatalogItemVariation` object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid `CatalogModifier` object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid `CatalogModifierList` object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid `CatalogCategory` object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid `CatalogDiscount` object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid `CatalogTax` object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid `CatalogImage` object. - if type = `QUICK_AMOUNTS_SETTINGS`, only `quick_amounts_settings_data` will be populated and will contain a valid `CatalogQuickAmountsSettings` 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) | Application-defined key/value attributes that are set at a global (location-independent) level. Values from the `*_data` fields may not be duplicated. Custom Attribute fields 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.). For CustomAttributesDefinitions defined by the app making the request, the map key is the key defined in CustomAttributeDefinition (eg. “reference_id”). For CustomAttributesDefinitions by other apps, the map key is the key defined in CustomAttributeDefinition prefixed with the application ID and a colon (eg. “abcd1234:reference_id”). | [optional] [beta] +**custom_attribute_values** | [**{String: CatalogCustomAttributeValue}**](CatalogCustomAttributeValue.md) | Application-defined key/value 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.). For CustomAttributesDefinitions defined by the app making the request, the map key is the key defined in the `CatalogCustomAttributeDefinition` (e.g. “reference_id”). For custom attributes created by other apps, the map key is the key defined in `CatalogCustomAttributeDefinition` prefixed with the application ID and a colon (eg. “abcd1234:reference_id”). | [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] @@ -33,5 +33,6 @@ Name | Type | Description | Notes **item_option_data** | [**CatalogItemOption**](CatalogItemOption.md) | Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`. | [optional] **item_option_value_data** | [**CatalogItemOptionValue**](CatalogItemOptionValue.md) | Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`. | [optional] **custom_attribute_definition_data** | [**CatalogCustomAttributeDefinition**](CatalogCustomAttributeDefinition.md) | Structured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`. | [optional] +**quick_amounts_settings_data** | [**CatalogQuickAmountsSettings**](CatalogQuickAmountsSettings.md) | Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`. | [optional] diff --git a/docs/CatalogObjectType.md b/docs/CatalogObjectType.md index fefc1e4..4e8c173 100644 --- a/docs/CatalogObjectType.md +++ b/docs/CatalogObjectType.md @@ -31,4 +31,6 @@ * `ITEM_OPTION_VAL` (value: `"ITEM_OPTION_VAL"`) +* `QUICK_AMOUNTS_SETTINGS` (value: `"QUICK_AMOUNTS_SETTINGS"`) + diff --git a/docs/CatalogQuickAmount.md b/docs/CatalogQuickAmount.md new file mode 100644 index 0000000..9d61846 --- /dev/null +++ b/docs/CatalogQuickAmount.md @@ -0,0 +1,16 @@ +# SquareConnect.CatalogQuickAmount + +### Description +**Note: This model is in beta.** + +Represents a Quick Amount in the Catalog. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | Represents the type of the Quick Amount. See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values | +**amount** | [**Money**](Money.md) | Represents the actual amount of the Quick Amount with Money type. | +**score** | **Number** | Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100]. MANUAL type amount will always have score = 100. | [optional] +**ordinal** | **Number** | The order in which this Quick Amount should be displayed. | [optional] + + diff --git a/docs/CatalogQuickAmountType.md b/docs/CatalogQuickAmountType.md new file mode 100644 index 0000000..e48bc24 --- /dev/null +++ b/docs/CatalogQuickAmountType.md @@ -0,0 +1,10 @@ +# SquareConnect.CatalogQuickAmountType + +## Enum + + +* `MANUAL` (value: `"QUICK_AMOUNT_TYPE_MANUAL"`) + +* `AUTO` (value: `"QUICK_AMOUNT_TYPE_AUTO"`) + + diff --git a/docs/CatalogQuickAmountsSettings.md b/docs/CatalogQuickAmountsSettings.md new file mode 100644 index 0000000..a155525 --- /dev/null +++ b/docs/CatalogQuickAmountsSettings.md @@ -0,0 +1,15 @@ +# SquareConnect.CatalogQuickAmountsSettings + +### Description +**Note: This model is in beta.** + +A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**option** | **String** | Represents the option seller currently uses on Quick Amounts. See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values | +**eligible_for_auto_amounts** | **Boolean** | Represents location's eligibility for auto amounts The boolean should be consistent with whether there are AUTO amounts in the `amounts`. | [optional] +**amounts** | [**[CatalogQuickAmount]**](CatalogQuickAmount.md) | Represents a set of Quick Amounts at this location. | [optional] + + diff --git a/docs/CatalogQuickAmountsSettingsOption.md b/docs/CatalogQuickAmountsSettingsOption.md new file mode 100644 index 0000000..def47f5 --- /dev/null +++ b/docs/CatalogQuickAmountsSettingsOption.md @@ -0,0 +1,12 @@ +# SquareConnect.CatalogQuickAmountsSettingsOption + +## Enum + + +* `DISABLED` (value: `"DISABLED"`) + +* `MANUAL` (value: `"MANUAL"`) + +* `AUTO` (value: `"AUTO"`) + + diff --git a/docs/CreateCustomerGroupRequest.md b/docs/CreateCustomerGroupRequest.md new file mode 100644 index 0000000..8232f5d --- /dev/null +++ b/docs/CreateCustomerGroupRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateCustomerGroupRequest + +### Description +**Note: This model is in beta.** + +Defines the body parameters that can be provided in a request to the [CreateCustomerGroup](#endpoint-createcustomegroup) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idempotency_key** | **String** | The idempotency key for the request. See the [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) guide for more information. | [optional] +**group** | [**CustomerGroup**](CustomerGroup.md) | The customer group to create. | + + diff --git a/docs/CreateCustomerGroupResponse.md b/docs/CreateCustomerGroupResponse.md new file mode 100644 index 0000000..2d94ab7 --- /dev/null +++ b/docs/CreateCustomerGroupResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateCustomerGroupResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [CreateCustomerGroup](#endpoint-createcustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**group** | [**CustomerGroup**](CustomerGroup.md) | The successfully created customer group. | [optional] + + diff --git a/docs/CreateDeviceCodeRequest.md b/docs/CreateDeviceCodeRequest.md new file mode 100644 index 0000000..0ef7fe3 --- /dev/null +++ b/docs/CreateDeviceCodeRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateDeviceCodeRequest + +### 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. | +**device_code** | [**DeviceCode**](DeviceCode.md) | The device code to create. | + + diff --git a/docs/CreateDeviceCodeResponse.md b/docs/CreateDeviceCodeResponse.md new file mode 100644 index 0000000..293a05f --- /dev/null +++ b/docs/CreateDeviceCodeResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateDeviceCodeResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**device_code** | [**DeviceCode**](DeviceCode.md) | The created DeviceCode object containing the device code string. | [optional] + + diff --git a/docs/CreateTerminalCheckoutRequest.md b/docs/CreateTerminalCheckoutRequest.md new file mode 100644 index 0000000..ba1d112 --- /dev/null +++ b/docs/CreateTerminalCheckoutRequest.md @@ -0,0 +1,14 @@ +# 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. | +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The checkout to create. | + + diff --git a/docs/CreateTerminalCheckoutResponse.md b/docs/CreateTerminalCheckoutResponse.md new file mode 100644 index 0000000..e703f9a --- /dev/null +++ b/docs/CreateTerminalCheckoutResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.CreateTerminalCheckoutResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The created `TerminalCheckout` | [optional] + + diff --git a/docs/Customer.md b/docs/Customer.md index 4a43ea6..2092b8e 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -7,9 +7,9 @@ Represents a Square customer profile, which can have one or more cards on file a ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | A unique, Square-assigned object ID. | -**created_at** | **String** | The time when the customer profile was created, in RFC 3339 format. | -**updated_at** | **String** | The time when the customer profile was last updated, in RFC 3339 format. | +**id** | **String** | A unique Square-assigned ID for the customer profile. | +**created_at** | **String** | The timestamp when the customer profile was created, in RFC 3339 format. | +**updated_at** | **String** | The timestamp when the customer profile was last updated, in RFC 3339 format. | **cards** | [**[Card]**](Card.md) | Payment details of cards stored on file for the customer profile. | [optional] **given_name** | **String** | The given (i.e., first) name associated with the customer profile. | [optional] **family_name** | **String** | The family (i.e., last) name associated with the customer profile. | [optional] @@ -22,7 +22,9 @@ Name | Type | Description | Notes **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] -**groups** | [**[CustomerGroupInfo]**](CustomerGroupInfo.md) | The groups the customer belongs to. | [optional] +**groups** | [**[CustomerGroupInfo]**](CustomerGroupInfo.md) | The customer groups and segments the customer belongs to. This deprecated field is replaced with dedicated `group_ids` for customer groups and `segment_ids` for customer segments. | [optional] [deprecated] **creation_source** | **String** | A creation source represents the method used to create the customer profile. See [CustomerCreationSource](#type-customercreationsource) for possible values | [optional] +**group_ids** | **[String]** | The IDs of customer groups the customer belongs to. | [optional] [beta] +**segment_ids** | **[String]** | The IDs of segments the customer belongs to. | [optional] [beta] diff --git a/docs/CustomerFilter.md b/docs/CustomerFilter.md index 643c4c8..c9d488b 100644 --- a/docs/CustomerFilter.md +++ b/docs/CustomerFilter.md @@ -2,7 +2,7 @@ ### Description -Represents a set of `CustomerQuery` filters used to limit the set of `Customers` returned by SearchCustomers. +Represents a set of `CustomerQuery` filters used to limit the set of `Customers` returned by `SearchCustomers`. ## Properties Name | Type | Description | Notes @@ -10,5 +10,6 @@ Name | Type | Description | Notes **creation_source** | [**CustomerCreationSourceFilter**](CustomerCreationSourceFilter.md) | A filter to select customers based on their creation source. | [optional] **created_at** | [**TimeRange**](TimeRange.md) | A filter to select customers based on when they were created. | [optional] **updated_at** | [**TimeRange**](TimeRange.md) | A filter to select customers based on when they were updated. | [optional] +**group_ids** | [**FilterValue**](FilterValue.md) | A filter to select customers based on their group membership. The `group_ids` is a JSON object of the following general format: ``` \"group_ids\": { \"any\": [\"{group_a_id}\", \"{group_b_id}\", ...], \"all\": [\"{group_1_id}\", \"{group_2_id}\", ...], 'none\": [\"{group_i_id}\", \"{group_ii_id}\", ...] } ``` You can use any combination of the above `group_ids` fields (also known as `FilterValue` properties) to specify how customers are selected based on their group membership. With the `any` option, the search returns customers in Groups `A` or `B` or ... of the list. With the `all` option, the search returns customers in Groups `1` and `2` and ... of the list With the `none` option, the search returns customers not in Groups `i` and not in `ii` and not in ... of the list. If any of the search conditions is not met, including when an invalid or non-existent group ID is provided, the result is an empty list. You can use the `group_ids` search filter with other available filters. You cannot use the `group_ids` filter to select customers based on segment membership. | [optional] diff --git a/docs/CustomerGroup.md b/docs/CustomerGroup.md new file mode 100644 index 0000000..104c754 --- /dev/null +++ b/docs/CustomerGroup.md @@ -0,0 +1,16 @@ +# SquareConnect.CustomerGroup + +### Description +**Note: This model is in beta.** + +Represents a group of customer profiles. Customer groups can be created, modified, and have their membership defined either via the Customers API or within Customer Directory in the Square Dashboard or Point of Sale. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique Square-generated ID for the customer group. | [optional] +**name** | **String** | Name of the customer group. | +**created_at** | **String** | The timestamp when the customer group was created, in RFC 3339 format. | [optional] +**updated_at** | **String** | The timesamp when the customer group was last updated, in RFC 3339 format. | [optional] + + diff --git a/docs/CustomerGroupInfo.md b/docs/CustomerGroupInfo.md index 801b2b9..403140a 100644 --- a/docs/CustomerGroupInfo.md +++ b/docs/CustomerGroupInfo.md @@ -2,12 +2,12 @@ ### Description -Contains some brief information about a customer group with its identifier included. +Contains some brief information about a Customer Group with its identifier included. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | The ID of the customer group. | -**name** | **String** | The name of the customer group. | +**id** | **String** | The ID of the Customer Group. | +**name** | **String** | The name of the Customer Group. | diff --git a/docs/CustomerGroupsApi.md b/docs/CustomerGroupsApi.md new file mode 100644 index 0000000..2977d27 --- /dev/null +++ b/docs/CustomerGroupsApi.md @@ -0,0 +1,262 @@ +# SquareConnect.CustomerGroupsApi + +All URIs are relative to *https://connect.squareup.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCustomerGroup**](CustomerGroupsApi.md#createCustomerGroup) | **POST** /v2/customers/groups | CreateCustomerGroup +[**deleteCustomerGroup**](CustomerGroupsApi.md#deleteCustomerGroup) | **DELETE** /v2/customers/groups/{group_id} | DeleteCustomerGroup +[**listCustomerGroups**](CustomerGroupsApi.md#listCustomerGroups) | **GET** /v2/customers/groups | ListCustomerGroups +[**retrieveCustomerGroup**](CustomerGroupsApi.md#retrieveCustomerGroup) | **GET** /v2/customers/groups/{group_id} | RetrieveCustomerGroup +[**updateCustomerGroup**](CustomerGroupsApi.md#updateCustomerGroup) | **PUT** /v2/customers/groups/{group_id} | UpdateCustomerGroup + + + +# **createCustomerGroup** +**Note: This endpoint is in beta.** +> CreateCustomerGroupResponse createCustomerGroup(body) + +CreateCustomerGroup + +Creates a new customer group for a business. The request must include at least the `name` value of the group. + +### 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.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. + +apiInstance.createCustomerGroup(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateCustomerGroupRequest**](CreateCustomerGroupRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CreateCustomerGroupResponse**](CreateCustomerGroupResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteCustomerGroup** +**Note: This endpoint is in beta.** +> DeleteCustomerGroupResponse deleteCustomerGroup(groupId) + +DeleteCustomerGroup + +Deletes a customer group as identified by the `group_id` value. + +### 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.CustomerGroupsApi(); + +var groupId = "groupId_example"; // String | The ID of the customer group to delete. + +apiInstance.deleteCustomerGroup(groupId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the customer group to delete. | + +### Return type + +[**DeleteCustomerGroupResponse**](DeleteCustomerGroupResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **listCustomerGroups** +**Note: This endpoint is in beta.** +> ListCustomerGroupsResponse listCustomerGroups(opts) + +ListCustomerGroups + +Retrieves the list of customer groups of a business. + +### 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.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. +}; +apiInstance.listCustomerGroups(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +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 the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. | [optional] + +### Return type + +[**ListCustomerGroupsResponse**](ListCustomerGroupsResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **retrieveCustomerGroup** +**Note: This endpoint is in beta.** +> RetrieveCustomerGroupResponse retrieveCustomerGroup(groupId) + +RetrieveCustomerGroup + +Retrieves a specific customer group as identified by the `group_id` value. + +### 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.CustomerGroupsApi(); + +var groupId = "groupId_example"; // String | The ID of the customer group to retrieve. + +apiInstance.retrieveCustomerGroup(groupId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the customer group to retrieve. | + +### Return type + +[**RetrieveCustomerGroupResponse**](RetrieveCustomerGroupResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateCustomerGroup** +**Note: This endpoint is in beta.** +> UpdateCustomerGroupResponse updateCustomerGroup(groupId, body) + +UpdateCustomerGroup + +Updates a customer group as identified by the `group_id` value. + +### 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.CustomerGroupsApi(); + +var groupId = "groupId_example"; // 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. + +apiInstance.updateCustomerGroup(groupId, body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the customer group to update. | + **body** | [**UpdateCustomerGroupRequest**](UpdateCustomerGroupRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**UpdateCustomerGroupResponse**](UpdateCustomerGroupResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/CustomerSegment.md b/docs/CustomerSegment.md new file mode 100644 index 0000000..13e5c69 --- /dev/null +++ b/docs/CustomerSegment.md @@ -0,0 +1,16 @@ +# SquareConnect.CustomerSegment + +### Description +**Note: This model is in beta.** + +Represents a group of customer profiles that match one or more predefined filter criteria. Segments (also known as Smart Groups) are defined and created within Customer Directory in the Square Dashboard or Point of Sale. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique Square-generated ID for the segment. | [optional] +**name** | **String** | Name of the segment. | +**created_at** | **String** | The timestamp when the segment was created, in RFC 3339 format. | [optional] +**updated_at** | **String** | The timestamp when the segment was last updated, in RFC 3339 format. | [optional] + + diff --git a/docs/CustomerSegmentsApi.md b/docs/CustomerSegmentsApi.md new file mode 100644 index 0000000..ee32a69 --- /dev/null +++ b/docs/CustomerSegmentsApi.md @@ -0,0 +1,111 @@ +# SquareConnect.CustomerSegmentsApi + +All URIs are relative to *https://connect.squareup.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listCustomerSegments**](CustomerSegmentsApi.md#listCustomerSegments) | **GET** /v2/customers/segments | ListCustomerSegments +[**retrieveCustomerSegment**](CustomerSegmentsApi.md#retrieveCustomerSegment) | **GET** /v2/customers/segments/{segment_id} | RetrieveCustomerSegment + + + +# **listCustomerSegments** +**Note: This endpoint is in beta.** +> ListCustomerSegmentsResponse listCustomerSegments(opts) + +ListCustomerSegments + +Retrieves the list of customer segments of a business. + +### 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.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. + 'limit': 789 // Number | Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` +}; +apiInstance.listCustomerSegments(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **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. | [optional] + **limit** | **Number**| Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` | [optional] + +### Return type + +[**ListCustomerSegmentsResponse**](ListCustomerSegmentsResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **retrieveCustomerSegment** +**Note: This endpoint is in beta.** +> RetrieveCustomerSegmentResponse retrieveCustomerSegment(segmentId) + +RetrieveCustomerSegment + +Retrieves a specific customer segment as identified by the `segment_id` value. + +### 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.CustomerSegmentsApi(); + +var segmentId = "segmentId_example"; // String | The Square-issued ID of the customer segment. + +apiInstance.retrieveCustomerSegment(segmentId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **segmentId** | **String**| The Square-issued ID of the customer segment. | + +### Return type + +[**RetrieveCustomerSegmentResponse**](RetrieveCustomerSegmentResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index ee0f8ca..6646306 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -4,16 +4,70 @@ All URIs are relative to *https://connect.squareup.com* Method | HTTP request | Description ------------- | ------------- | ------------- +[**addGroupToCustomer**](CustomersApi.md#addGroupToCustomer) | **PUT** /v2/customers/{customer_id}/groups/{group_id} | AddGroupToCustomer [**createCustomer**](CustomersApi.md#createCustomer) | **POST** /v2/customers | CreateCustomer [**createCustomerCard**](CustomersApi.md#createCustomerCard) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard [**deleteCustomer**](CustomersApi.md#deleteCustomer) | **DELETE** /v2/customers/{customer_id} | DeleteCustomer [**deleteCustomerCard**](CustomersApi.md#deleteCustomerCard) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard [**listCustomers**](CustomersApi.md#listCustomers) | **GET** /v2/customers | ListCustomers +[**removeGroupFromCustomer**](CustomersApi.md#removeGroupFromCustomer) | **DELETE** /v2/customers/{customer_id}/groups/{group_id} | RemoveGroupFromCustomer [**retrieveCustomer**](CustomersApi.md#retrieveCustomer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer [**searchCustomers**](CustomersApi.md#searchCustomers) | **POST** /v2/customers/search | SearchCustomers [**updateCustomer**](CustomersApi.md#updateCustomer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer + +# **addGroupToCustomer** +**Note: This endpoint is in beta.** +> AddGroupToCustomerResponse addGroupToCustomer(customerId, groupId) + +AddGroupToCustomer + +Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + +### 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.CustomersApi(); + +var customerId = "customerId_example"; // 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. + +apiInstance.addGroupToCustomer(customerId, groupId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customerId** | **String**| The ID of the customer to add to a group. | + **groupId** | **String**| The ID of the customer group to add the customer to. | + +### Return type + +[**AddGroupToCustomerResponse**](AddGroupToCustomerResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **createCustomer** > CreateCustomerResponse createCustomer(body) @@ -260,6 +314,58 @@ Name | Type | Description | Notes [oauth2](../README.md#oauth2) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeGroupFromCustomer** +**Note: This endpoint is in beta.** +> RemoveGroupFromCustomerResponse removeGroupFromCustomer(customerId, groupId) + +RemoveGroupFromCustomer + +Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + +### 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.CustomersApi(); + +var customerId = "customerId_example"; // 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. + +apiInstance.removeGroupFromCustomer(customerId, groupId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customerId** | **String**| The ID of the customer to remove from the group. | + **groupId** | **String**| The ID of the customer group to remove the customer from. | + +### Return type + +[**RemoveGroupFromCustomerResponse**](RemoveGroupFromCustomerResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + ### HTTP request headers - **Content-Type**: application/json diff --git a/docs/DeleteCustomerGroupRequest.md b/docs/DeleteCustomerGroupRequest.md new file mode 100644 index 0000000..d22db53 --- /dev/null +++ b/docs/DeleteCustomerGroupRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.DeleteCustomerGroupRequest + +### Description +**Note: This model is in beta.** + +Defines the fields that can be provided in a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/DeleteCustomerGroupResponse.md b/docs/DeleteCustomerGroupResponse.md new file mode 100644 index 0000000..b0b4219 --- /dev/null +++ b/docs/DeleteCustomerGroupResponse.md @@ -0,0 +1,13 @@ +# SquareConnect.DeleteCustomerGroupResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] + + diff --git a/docs/DeviceCheckoutOptions.md b/docs/DeviceCheckoutOptions.md new file mode 100644 index 0000000..d99a603 --- /dev/null +++ b/docs/DeviceCheckoutOptions.md @@ -0,0 +1,15 @@ +# 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. | +**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 new file mode 100644 index 0000000..118c65b --- /dev/null +++ b/docs/DeviceCode.md @@ -0,0 +1,23 @@ +# SquareConnect.DeviceCode + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | The unique id for this device code. | [optional] +**name** | **String** | An optional user-defined name for the device code. | [optional] +**code** | **String** | The unique code that can be used to login. | [optional] +**device_id** | **String** | The unique id of the device that used this code. Populated when the device is paired up. | [optional] +**product_type** | **String** | The targeting product type of the device code. See [ProductType](#type-producttype) for possible values | +**location_id** | **String** | The location assigned to this code. | [optional] +**status** | **String** | The pairing status of the device code. See [DeviceCodeStatus](#type-devicecodestatus) for possible values | [optional] +**pair_by** | **String** | When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. | [optional] +**created_at** | **String** | When this DeviceCode was created. Timestamp in RFC 3339 format. | [optional] +**status_changed_at** | **String** | When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. | [optional] +**paired_at** | **String** | When this DeviceCode was paired. Timestamp in RFC 3339 format. | [optional] + + diff --git a/docs/DeviceCodeStatus.md b/docs/DeviceCodeStatus.md new file mode 100644 index 0000000..4b60cbc --- /dev/null +++ b/docs/DeviceCodeStatus.md @@ -0,0 +1,10 @@ +# SquareConnect.DeviceCodeStatus + +## Enum + + +* `UNPAIRED` (value: `"UNPAIRED"`) + +* `PAIRED` (value: `"PAIRED"`) + + diff --git a/docs/DevicesApi.md b/docs/DevicesApi.md new file mode 100644 index 0000000..d44e5db --- /dev/null +++ b/docs/DevicesApi.md @@ -0,0 +1,163 @@ +# SquareConnect.DevicesApi + +All URIs are relative to *https://connect.squareup.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDeviceCode**](DevicesApi.md#createDeviceCode) | **POST** /v2/devices/codes | CreateDeviceCode +[**getDeviceCode**](DevicesApi.md#getDeviceCode) | **GET** /v2/devices/codes/{id} | GetDeviceCode +[**listDeviceCodes**](DevicesApi.md#listDeviceCodes) | **GET** /v2/devices/codes | ListDeviceCodes + + + +# **createDeviceCode** +**Note: This endpoint is in beta.** +> CreateDeviceCodeResponse createDeviceCode(body) + +CreateDeviceCode + +Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode. + +### 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.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. + +apiInstance.createDeviceCode(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateDeviceCodeRequest**](CreateDeviceCodeRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CreateDeviceCodeResponse**](CreateDeviceCodeResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getDeviceCode** +**Note: This endpoint is in beta.** +> GetDeviceCodeResponse getDeviceCode(id) + +GetDeviceCode + +Retrieves DeviceCode with the associated 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.DevicesApi(); + +var id = "id_example"; // String | The unique identifier for the device code. + +apiInstance.getDeviceCode(id).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The unique identifier for the device code. | + +### Return type + +[**GetDeviceCodeResponse**](GetDeviceCodeResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **listDeviceCodes** +**Note: This endpoint is in beta.** +> ListDeviceCodesResponse listDeviceCodes(opts) + +ListDeviceCodes + +Lists all DeviceCodes associated with the merchant. + +### 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.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. +}; +apiInstance.listDeviceCodes(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +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] + +### Return type + +[**ListDeviceCodesResponse**](ListDeviceCodesResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index 9eee306..893a691 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -11,6 +11,8 @@ * `ACCESS_TOKEN_REVOKED` (value: `"ACCESS_TOKEN_REVOKED"`) +* `CLIENT_DISABLED` (value: `"CLIENT_DISABLED"`) + * `FORBIDDEN` (value: `"FORBIDDEN"`) * `INSUFFICIENT_SCOPES` (value: `"INSUFFICIENT_SCOPES"`) diff --git a/docs/FilterValue.md b/docs/FilterValue.md new file mode 100644 index 0000000..82c71bc --- /dev/null +++ b/docs/FilterValue.md @@ -0,0 +1,15 @@ +# SquareConnect.FilterValue + +### Description +**Note: This model is in beta.** + +A filter to select resources based on an exact field value. For any given value, the value can only be in one property. Depending on the field, either all properties can be set or only a subset will be available. Refer to the documentation of the field. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all** | **[String]** | A list of terms that must be present on the field of the resource. | [optional] +**any** | **[String]** | A list of terms where at least one of them must be present on the field of the resource. | [optional] +**none** | **[String]** | A list of terms that must not be present on the field the resource | [optional] + + diff --git a/docs/GetDeviceCodeRequest.md b/docs/GetDeviceCodeRequest.md new file mode 100644 index 0000000..5afe8c5 --- /dev/null +++ b/docs/GetDeviceCodeRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.GetDeviceCodeRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/GetDeviceCodeResponse.md b/docs/GetDeviceCodeResponse.md new file mode 100644 index 0000000..0966a94 --- /dev/null +++ b/docs/GetDeviceCodeResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.GetDeviceCodeResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**device_code** | [**DeviceCode**](DeviceCode.md) | The queried DeviceCode. | [optional] + + diff --git a/docs/GetTerminalCheckoutRequest.md b/docs/GetTerminalCheckoutRequest.md new file mode 100644 index 0000000..c65d195 --- /dev/null +++ b/docs/GetTerminalCheckoutRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.GetTerminalCheckoutRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/GetTerminalCheckoutResponse.md b/docs/GetTerminalCheckoutResponse.md new file mode 100644 index 0000000..ab6a451 --- /dev/null +++ b/docs/GetTerminalCheckoutResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.GetTerminalCheckoutResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**checkout** | [**TerminalCheckout**](TerminalCheckout.md) | The requested `Checkout` | [optional] + + diff --git a/docs/ListCustomerGroupsRequest.md b/docs/ListCustomerGroupsRequest.md new file mode 100644 index 0000000..978b376 --- /dev/null +++ b/docs/ListCustomerGroupsRequest.md @@ -0,0 +1,13 @@ +# SquareConnect.ListCustomerGroupsRequest + +### Description +**Note: This model is in beta.** + +Defines the query parameters that can be provided in a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint. + +## Properties +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 the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. | [optional] + + diff --git a/docs/ListCustomerGroupsResponse.md b/docs/ListCustomerGroupsResponse.md new file mode 100644 index 0000000..21579e4 --- /dev/null +++ b/docs/ListCustomerGroupsResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.ListCustomerGroupsResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint. One of `errors` or `groups` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**groups** | [**[CustomerGroup]**](CustomerGroup.md) | A list of customer groups belonging to the current merchant. | [optional] +**cursor** | **String** | A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. | [optional] + + diff --git a/docs/ListCustomerSegmentsRequest.md b/docs/ListCustomerSegmentsRequest.md new file mode 100644 index 0000000..1cc8856 --- /dev/null +++ b/docs/ListCustomerSegmentsRequest.md @@ -0,0 +1,14 @@ +# SquareConnect.ListCustomerSegmentsRequest + +### Description +**Note: This model is in beta.** + +Defines the valid parameters for requests to __ListCustomerSegments__. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cursor** | **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. | [optional] +**limit** | **Number** | Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` | [optional] + + diff --git a/docs/ListCustomerSegmentsResponse.md b/docs/ListCustomerSegmentsResponse.md new file mode 100644 index 0000000..5103bdb --- /dev/null +++ b/docs/ListCustomerSegmentsResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.ListCustomerSegmentsResponse + +### Description +**Note: This model is in beta.** + +Defines the fields included in the response body for requests to __ListCustomerSegments__. One of `errors` or `segments` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**segments** | [**[CustomerSegment]**](CustomerSegment.md) | The list of customer segments belonging to the associated Square account. | [optional] +**cursor** | **String** | A pagination cursor to be used in subsequent calls to __ListCustomerSegments__ to retrieve the next set of query results. Only present only if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. | [optional] + + diff --git a/docs/ListDeviceCodesRequest.md b/docs/ListDeviceCodesRequest.md new file mode 100644 index 0000000..ea0d17c --- /dev/null +++ b/docs/ListDeviceCodesRequest.md @@ -0,0 +1,15 @@ +# SquareConnect.ListDeviceCodesRequest + +### Description +**Note: This model is in beta.** + + + +## Properties +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] + + diff --git a/docs/ListDeviceCodesResponse.md b/docs/ListDeviceCodesResponse.md new file mode 100644 index 0000000..3610f85 --- /dev/null +++ b/docs/ListDeviceCodesResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.ListDeviceCodesResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**device_codes** | [**[DeviceCode]**](DeviceCode.md) | The queried DeviceCode. | [optional] +**cursor** | **String** | A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available. See [Paginating results](#paginatingresults) for more information. | [optional] + + diff --git a/docs/ObtainTokenRequest.md b/docs/ObtainTokenRequest.md index a3d0d41..771633d 100644 --- a/docs/ObtainTokenRequest.md +++ b/docs/ObtainTokenRequest.md @@ -14,5 +14,6 @@ Name | Type | Description | Notes **grant_type** | **String** | Specifies the method to request an OAuth access token. Valid values are: `authorization_code`, `refresh_token`, and `migration_token` | **refresh_token** | **String** | A valid refresh token for generating a new OAuth access token. A valid refresh token is required if `grant_type` is set to `refresh_token` , to indicate the application wants a replacement for an expired OAuth access token. | [optional] **migration_token** | **String** | Legacy OAuth access token obtained using a Connect API version prior to 2019-03-13. This parameter is required if `grant_type` is set to `migration_token` to indicate that the application wants to get a replacement OAuth access token. The response also returns a refresh token. For more information, see [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/authz/oauth/migration). | [optional] +**scopes** | **[String]** | __OPTIONAL__ A JSON list of strings that are the permissions the application is requesting. For example: \"`[\"MERCHANT_PROFILE_READ\",\"PAYMENTS_READ\",\"BANK_ACCOUNTS_READ\"]`\" The access token returned in the response will be granted the permissions that comprise the intersection between the given list of permissions, and those that belong to the provided refresh token. | [optional] diff --git a/docs/ObtainTokenResponse.md b/docs/ObtainTokenResponse.md index 5606233..28d1b9c 100644 --- a/docs/ObtainTokenResponse.md +++ b/docs/ObtainTokenResponse.md @@ -14,6 +14,6 @@ Name | Type | Description | Notes **subscription_id** | **String** | __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] **plan_id** | **String** | T__LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] **id_token** | **String** | Then OpenID token belonging to this this person. Only present if the OPENID scope is included in the authorize request. | [optional] -**refresh_token** | **String** | A refresh token. For more information, see [OAuth access token management](https://developer.squareup.com/docs/authz/oauth/how-it-works#oauth-access-token-management). | [optional] +**refresh_token** | **String** | A refresh token. OAuth refresh tokens are 64 bytes long. For more information, see [OAuth access token management](https://developer.squareup.com/docs/authz/oauth/how-it-works#oauth-access-token-management). | [optional] diff --git a/docs/Order.md b/docs/Order.md index 90c8b40..332a769 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **metadata** | **{String: String}** | Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta] **created_at** | **String** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **updated_at** | **String** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] -**closed_at** | **String** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**closed_at** | **String** | Timestamp for when the order reached a terminal [state](#property-state). In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **state** | **String** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional] **version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). | [optional] [beta] **total_money** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional] diff --git a/docs/OrderCreated.md b/docs/OrderCreated.md new file mode 100644 index 0000000..ef86325 --- /dev/null +++ b/docs/OrderCreated.md @@ -0,0 +1,17 @@ +# SquareConnect.OrderCreated + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **String** | The order's unique ID. | [optional] +**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) | [optional] +**location_id** | **String** | The ID of the merchant location this order is associated with. | [optional] +**state** | **String** | The state of the order. See [OrderState](#type-orderstate) for possible values | [optional] +**created_at** | **String** | Timestamp for when the order was created in RFC 3339 format. | [optional] + + diff --git a/docs/OrderCreatedObject.md b/docs/OrderCreatedObject.md new file mode 100644 index 0000000..c791d20 --- /dev/null +++ b/docs/OrderCreatedObject.md @@ -0,0 +1,13 @@ +# SquareConnect.OrderCreatedObject + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_created** | [**OrderCreated**](OrderCreated.md) | Information about the created order. | [optional] + + diff --git a/docs/OrderFulfillmentPickupDetails.md b/docs/OrderFulfillmentPickupDetails.md index b0e9b46..d4aa661 100644 --- a/docs/OrderFulfillmentPickupDetails.md +++ b/docs/OrderFulfillmentPickupDetails.md @@ -23,5 +23,7 @@ Name | Type | Description | Notes **picked_up_at** | **String** | The [timestamp](#workingwithdates) indicating when the fulfillment was picked up by the recipient. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] **canceled_at** | **String** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled. | [optional] **cancel_reason** | **String** | A description of why the pickup was canceled. Max length: 100 characters. | [optional] +**is_curbside_pickup** | **Boolean** | If true, indicates this pickup order is for curbside pickup, not in-store pickup. | [optional] [beta] +**curbside_pickup_details** | [**OrderFulfillmentPickupDetailsCurbsidePickupDetails**](OrderFulfillmentPickupDetailsCurbsidePickupDetails.md) | Specific details for curbside pickup. Can only be populated if `is_curbside_pickup` is true. | [optional] diff --git a/docs/OrderFulfillmentPickupDetailsCurbsidePickupDetails.md b/docs/OrderFulfillmentPickupDetailsCurbsidePickupDetails.md new file mode 100644 index 0000000..7091788 --- /dev/null +++ b/docs/OrderFulfillmentPickupDetailsCurbsidePickupDetails.md @@ -0,0 +1,14 @@ +# SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails + +### Description +**Note: This model is in beta.** + +Specific details for curbside pickup. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**curbside_details** | **String** | Specific details for curbside pickup, such as parking number, vehicle model, etc. | [optional] +**buyer_arrived_at** | **String** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the buyer arrived and is waiting for pickup. | [optional] + + diff --git a/docs/OrderFulfillmentUpdated.md b/docs/OrderFulfillmentUpdated.md new file mode 100644 index 0000000..d66a67a --- /dev/null +++ b/docs/OrderFulfillmentUpdated.md @@ -0,0 +1,19 @@ +# SquareConnect.OrderFulfillmentUpdated + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **String** | The order's unique ID. | [optional] +**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) | [optional] +**location_id** | **String** | The ID of the merchant location this order is associated with. | [optional] +**state** | **String** | The state of the order. See [OrderState](#type-orderstate) for possible values | [optional] +**created_at** | **String** | Timestamp for when the order was created in RFC 3339 format. | [optional] +**updated_at** | **String** | Timestamp for when the order was last updated in RFC 3339 format. | [optional] +**fulfillment_update** | [**[OrderFulfillmentUpdatedUpdate]**](OrderFulfillmentUpdatedUpdate.md) | The fulfillments that were updated with this version change. | [optional] + + diff --git a/docs/OrderFulfillmentUpdatedObject.md b/docs/OrderFulfillmentUpdatedObject.md new file mode 100644 index 0000000..a7c6c25 --- /dev/null +++ b/docs/OrderFulfillmentUpdatedObject.md @@ -0,0 +1,13 @@ +# SquareConnect.OrderFulfillmentUpdatedObject + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_fulfillment_updated** | [**OrderFulfillmentUpdated**](OrderFulfillmentUpdated.md) | Information about the updated order fulfillment. | [optional] + + diff --git a/docs/OrderFulfillmentUpdatedUpdate.md b/docs/OrderFulfillmentUpdatedUpdate.md new file mode 100644 index 0000000..1c1266f --- /dev/null +++ b/docs/OrderFulfillmentUpdatedUpdate.md @@ -0,0 +1,15 @@ +# SquareConnect.OrderFulfillmentUpdatedUpdate + +### Description +**Note: This model is in beta.** + +Information about fulfillment updates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fulfillment_uid** | **String** | Unique ID that identifies the fulfillment only within this order. | [optional] +**old_state** | **String** | The state of the fulfillment before the change. Will not be populated if the fulfillment is created with this new Order version. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional] +**new_state** | **String** | The state of the fulfillment after the change. May be equal to old_state if a non-state field was changed on the fulfillment (e.g. tracking number). See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional] + + diff --git a/docs/OrderUpdated.md b/docs/OrderUpdated.md new file mode 100644 index 0000000..cdf7b43 --- /dev/null +++ b/docs/OrderUpdated.md @@ -0,0 +1,18 @@ +# SquareConnect.OrderUpdated + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **String** | The order's unique ID. | [optional] +**version** | **Number** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) | [optional] +**location_id** | **String** | The ID of the merchant location this order is associated with. | [optional] +**state** | **String** | The state of the order. See [OrderState](#type-orderstate) for possible values | [optional] +**created_at** | **String** | Timestamp for when the order was created in RFC 3339 format. | [optional] +**updated_at** | **String** | Timestamp for when the order was last updated in RFC 3339 format. | [optional] + + diff --git a/docs/OrderUpdatedObject.md b/docs/OrderUpdatedObject.md new file mode 100644 index 0000000..9fc875e --- /dev/null +++ b/docs/OrderUpdatedObject.md @@ -0,0 +1,13 @@ +# SquareConnect.OrderUpdatedObject + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_updated** | [**OrderUpdated**](OrderUpdated.md) | Information about the updated order. | [optional] + + diff --git a/docs/PayOrderRequest.md b/docs/PayOrderRequest.md index 8f51220..b94ca1a 100644 --- a/docs/PayOrderRequest.md +++ b/docs/PayOrderRequest.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **idempotency_key** | **String** | A value you specify that uniquely identifies this request among requests you've sent. If you're unsure whether a particular payment request was completed successfully, you can reattempt it with the same idempotency key without worrying about duplicate payments. See [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information. | **order_version** | **Number** | The version of the order being paid. If not supplied, the latest version will be paid. | [optional] -**payment_ids** | **[String]** | | [optional] +**payment_ids** | **[String]** | The IDs of the `payments` to collect. The payment total must match the order total. | [optional] diff --git a/docs/PaymentOptions.md b/docs/PaymentOptions.md new file mode 100644 index 0000000..de9098d --- /dev/null +++ b/docs/PaymentOptions.md @@ -0,0 +1,13 @@ +# 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] + + diff --git a/docs/ProductType.md b/docs/ProductType.md new file mode 100644 index 0000000..48bac75 --- /dev/null +++ b/docs/ProductType.md @@ -0,0 +1,8 @@ +# SquareConnect.ProductType + +## Enum + + +* `API` (value: `"TERMINAL_API"`) + + diff --git a/docs/RemoveGroupFromCustomerRequest.md b/docs/RemoveGroupFromCustomerRequest.md new file mode 100644 index 0000000..7a479e0 --- /dev/null +++ b/docs/RemoveGroupFromCustomerRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.RemoveGroupFromCustomerRequest + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the request body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/RemoveGroupFromCustomerResponse.md b/docs/RemoveGroupFromCustomerResponse.md new file mode 100644 index 0000000..8dfee4f --- /dev/null +++ b/docs/RemoveGroupFromCustomerResponse.md @@ -0,0 +1,13 @@ +# SquareConnect.RemoveGroupFromCustomerResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] + + diff --git a/docs/RetrieveCustomerGroupRequest.md b/docs/RetrieveCustomerGroupRequest.md new file mode 100644 index 0000000..4981f60 --- /dev/null +++ b/docs/RetrieveCustomerGroupRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.RetrieveCustomerGroupRequest + +### Description +**Note: This model is in beta.** + +Defines the fields that can be provided in a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/RetrieveCustomerGroupResponse.md b/docs/RetrieveCustomerGroupResponse.md new file mode 100644 index 0000000..ec603cc --- /dev/null +++ b/docs/RetrieveCustomerGroupResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.RetrieveCustomerGroupResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**group** | [**CustomerGroup**](CustomerGroup.md) | The retrieved customer group. | [optional] + + diff --git a/docs/RetrieveCustomerSegmentRequest.md b/docs/RetrieveCustomerSegmentRequest.md new file mode 100644 index 0000000..64c734a --- /dev/null +++ b/docs/RetrieveCustomerSegmentRequest.md @@ -0,0 +1,12 @@ +# SquareConnect.RetrieveCustomerSegmentRequest + +### Description +**Note: This model is in beta.** + +Defines the valid parameters for requests to __RetrieveCustomerSegmentRequest__. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/docs/RetrieveCustomerSegmentResponse.md b/docs/RetrieveCustomerSegmentResponse.md new file mode 100644 index 0000000..1107153 --- /dev/null +++ b/docs/RetrieveCustomerSegmentResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.RetrieveCustomerSegmentResponse + +### Description +**Note: This model is in beta.** + +Defines the fields included in the response body for requests to __RetrieveCustomerSegment__. One of `errors` or `segment` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**segment** | [**CustomerSegment**](CustomerSegment.md) | The retrieved customer segment. | [optional] + + diff --git a/docs/RevokeTokenRequest.md b/docs/RevokeTokenRequest.md index 7f13222..941f8a0 100644 --- a/docs/RevokeTokenRequest.md +++ b/docs/RevokeTokenRequest.md @@ -10,5 +10,6 @@ Name | Type | Description | Notes **client_id** | **String** | The Square issued ID for your application, available from the [application dashboard](https://connect.squareup.com/apps). | [optional] **access_token** | **String** | The access token of the merchant whose token you want to revoke. Do not provide a value for merchant_id if you provide this parameter. | [optional] **merchant_id** | **String** | The ID of the merchant whose token you want to revoke. Do not provide a value for access_token if you provide this parameter. | [optional] +**revoke_only_access_token** | **Boolean** | If `true`, terminate the given single access token, but do not terminate the entire authorization. Default: `false` | [optional] diff --git a/docs/SearchTerminalCheckoutsRequest.md b/docs/SearchTerminalCheckoutsRequest.md new file mode 100644 index 0000000..39e7a1e --- /dev/null +++ b/docs/SearchTerminalCheckoutsRequest.md @@ -0,0 +1,15 @@ +# 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] +**limit** | **Number** | Limit the number of results returned for a single request. | [optional] + + diff --git a/docs/SearchTerminalCheckoutsResponse.md b/docs/SearchTerminalCheckoutsResponse.md new file mode 100644 index 0000000..da529f3 --- /dev/null +++ b/docs/SearchTerminalCheckoutsResponse.md @@ -0,0 +1,15 @@ +# SquareConnect.SearchTerminalCheckoutsResponse + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Information on errors encountered during the request. | [optional] +**checkouts** | [**[TerminalCheckout]**](TerminalCheckout.md) | The requested search result of `TerminalCheckout`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/TerminalApi.md b/docs/TerminalApi.md new file mode 100644 index 0000000..1ed61ff --- /dev/null +++ b/docs/TerminalApi.md @@ -0,0 +1,208 @@ +# SquareConnect.TerminalApi + +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 +[**createTerminalCheckout**](TerminalApi.md#createTerminalCheckout) | **POST** /v2/terminals/checkouts | CreateTerminalCheckout +[**getTerminalCheckout**](TerminalApi.md#getTerminalCheckout) | **GET** /v2/terminals/checkouts/{checkout_id} | GetTerminalCheckout +[**searchTerminalCheckouts**](TerminalApi.md#searchTerminalCheckouts) | **POST** /v2/terminals/checkouts/search | SearchTerminalCheckouts + + + +# **cancelTerminalCheckout** +**Note: This endpoint is in beta.** +> CancelTerminalCheckoutResponse cancelTerminalCheckout(checkoutId) + +CancelTerminalCheckout + +Cancels a Terminal checkout request, 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 checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout` + +apiInstance.cancelTerminalCheckout(checkoutId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **checkoutId** | **String**| Unique ID for the desired `TerminalCheckout` | + +### Return type + +[**CancelTerminalCheckoutResponse**](CancelTerminalCheckoutResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createTerminalCheckout** +**Note: This endpoint is in beta.** +> CreateTerminalCheckoutResponse createTerminalCheckout(body) + +CreateTerminalCheckout + +Creates a new Terminal checkout request and sends it to the specified device to take a payment for the requested amount. + +### 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 = new SquareConnect.CreateTerminalCheckoutRequest(); // 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); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateTerminalCheckoutRequest**](CreateTerminalCheckoutRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**CreateTerminalCheckoutResponse**](CreateTerminalCheckoutResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getTerminalCheckout** +**Note: This endpoint is in beta.** +> GetTerminalCheckoutResponse getTerminalCheckout(checkoutId) + +GetTerminalCheckout + +Retrieves a Terminal checkout request by checkout_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 checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout` + +apiInstance.getTerminalCheckout(checkoutId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **checkoutId** | **String**| Unique ID for the desired `TerminalCheckout` | + +### Return type + +[**GetTerminalCheckoutResponse**](GetTerminalCheckoutResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **searchTerminalCheckouts** +**Note: This endpoint is in beta.** +> SearchTerminalCheckoutsResponse searchTerminalCheckouts(body) + +SearchTerminalCheckouts + +Retrieves a filtered list of Terminal checkout requests created by the account 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 = new SquareConnect.SearchTerminalCheckoutsRequest(); // 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); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SearchTerminalCheckoutsRequest**](SearchTerminalCheckoutsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**SearchTerminalCheckoutsResponse**](SearchTerminalCheckoutsResponse.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 new file mode 100644 index 0000000..79905f4 --- /dev/null +++ b/docs/TerminalCheckout.md @@ -0,0 +1,23 @@ +# SquareConnect.TerminalCheckout + +### Description +**Note: This model is in beta.** + + + +## Properties +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] +**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 [TerminalCheckoutCancelReason](#type-terminalcheckoutcancelreason) for possible values | [optional] +**payment_ids** | **[String]** | A list of payments created by this `TerminalCheckout`. | [optional] +**created_at** | **String** | The time when the `TerminalCheckout` was created as an RFC 3339 timestamp. | [optional] +**updated_at** | **String** | The time when the `TerminalCheckout` was last updated as an RFC 3339 timestamp. | [optional] + + diff --git a/docs/TerminalCheckoutCancelReason.md b/docs/TerminalCheckoutCancelReason.md new file mode 100644 index 0000000..067a0b5 --- /dev/null +++ b/docs/TerminalCheckoutCancelReason.md @@ -0,0 +1,12 @@ +# SquareConnect.TerminalCheckoutCancelReason + +## Enum + + +* `BUYER_CANCELED` (value: `"BUYER_CANCELED"`) + +* `SELLER_CANCELED` (value: `"SELLER_CANCELED"`) + +* `TIMED_OUT` (value: `"TIMED_OUT"`) + + diff --git a/docs/TerminalCheckoutQuery.md b/docs/TerminalCheckoutQuery.md new file mode 100644 index 0000000..977c681 --- /dev/null +++ b/docs/TerminalCheckoutQuery.md @@ -0,0 +1,14 @@ +# SquareConnect.TerminalCheckoutQuery + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**TerminalCheckoutQueryFilter**](TerminalCheckoutQueryFilter.md) | Options for filtering returned `TerminalCheckout`s | [optional] +**sort** | [**TerminalCheckoutQuerySort**](TerminalCheckoutQuerySort.md) | Option for sorting returned `TerminalCheckout`s | [optional] + + diff --git a/docs/TerminalCheckoutQueryFilter.md b/docs/TerminalCheckoutQueryFilter.md new file mode 100644 index 0000000..6b51323 --- /dev/null +++ b/docs/TerminalCheckoutQueryFilter.md @@ -0,0 +1,15 @@ +# SquareConnect.TerminalCheckoutQueryFilter + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **String** | `TerminalCheckout`s associated with a specific device. If no device is specified then all `TerminalCheckout`s for the merchant will be displayed. | [optional] +**created_at** | [**TimeRange**](TimeRange.md) | Time range for the beginning of the reporting period. Inclusive. Default: The current time minus one day. | [optional] +**status** | **String** | Filtered results with the desired status of the `TerminalCheckout` Options: PENDING, IN\\_PROGRESS, CANCELED, COMPLETED | [optional] + + diff --git a/docs/TerminalCheckoutQuerySort.md b/docs/TerminalCheckoutQuerySort.md new file mode 100644 index 0000000..3fb6d04 --- /dev/null +++ b/docs/TerminalCheckoutQuerySort.md @@ -0,0 +1,13 @@ +# SquareConnect.TerminalCheckoutQuerySort + +### 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 new file mode 100644 index 0000000..fb69152 --- /dev/null +++ b/docs/TipSettings.md @@ -0,0 +1,15 @@ +# SquareConnect.TipSettings + +### Description +**Note: This model is in beta.** + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_tipping** | **Boolean** | Indicates whether tipping is enabled for this checkout. Defaults to false. | [optional] +**separate_tip_screen** | **Boolean** | Indicates whether tip options should be presented on their own screen before presenting the signature screen during card payment. Defaults to false. | [optional] +**custom_tip_field** | **Boolean** | Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false. | [optional] + + diff --git a/docs/UpdateCustomerGroupRequest.md b/docs/UpdateCustomerGroupRequest.md new file mode 100644 index 0000000..2d2fcb8 --- /dev/null +++ b/docs/UpdateCustomerGroupRequest.md @@ -0,0 +1,13 @@ +# SquareConnect.UpdateCustomerGroupRequest + +### Description +**Note: This model is in beta.** + +Defines the body parameters that can be provided in a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | [**CustomerGroup**](CustomerGroup.md) | The `CustomerGroup` object including all the updates you want to make. | + + diff --git a/docs/UpdateCustomerGroupResponse.md b/docs/UpdateCustomerGroupResponse.md new file mode 100644 index 0000000..3f5be9f --- /dev/null +++ b/docs/UpdateCustomerGroupResponse.md @@ -0,0 +1,14 @@ +# SquareConnect.UpdateCustomerGroupResponse + +### Description +**Note: This model is in beta.** + +Defines the fields that are included in the response body of a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**group** | [**CustomerGroup**](CustomerGroup.md) | The successfully updated customer group. | [optional] + + diff --git a/package.json b/package.json index f37959f..95f28ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "3.20200325.0", + "version": "3.20200422.0", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index 57995a7..6ce378e 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils'); /** * @module ApiClient - * @version 3.20200325.0 + * @version 3.20200422.0 */ /** @@ -49,7 +49,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/3.20200325.0' + 'User-Agent': 'Square-Connect-Javascript/3.20200422.0' }; /** * The default HTTP timeout for all API calls. diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js index c11376b..4e8f926 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/BankAccountsApi.js b/src/api/BankAccountsApi.js index 1a0fe02..a0b4177 100644 --- a/src/api/BankAccountsApi.js +++ b/src/api/BankAccountsApi.js @@ -55,7 +55,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/CashDrawersApi.js b/src/api/CashDrawersApi.js index f516be2..bd4cd46 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -137,7 +137,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -203,7 +203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js index 10f2662..382673d 100644 --- a/src/api/CatalogApi.js +++ b/src/api/CatalogApi.js @@ -69,7 +69,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -173,7 +173,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -271,7 +271,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -323,7 +323,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -382,7 +382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -436,7 +436,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -488,7 +488,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -540,7 +540,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -592,7 +592,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js index ae95922..608ac3b 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/CustomerGroupsApi.js b/src/api/CustomerGroupsApi.js new file mode 100644 index 0000000..ec7169d --- /dev/null +++ b/src/api/CustomerGroupsApi.js @@ -0,0 +1,312 @@ +/** + * 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 CreateCustomerGroupRequest = require('../model/CreateCustomerGroupRequest'); +var CreateCustomerGroupResponse = require('../model/CreateCustomerGroupResponse'); +var DeleteCustomerGroupResponse = require('../model/DeleteCustomerGroupResponse'); +var ListCustomerGroupsResponse = require('../model/ListCustomerGroupsResponse'); +var RetrieveCustomerGroupResponse = require('../model/RetrieveCustomerGroupResponse'); +var UpdateCustomerGroupRequest = require('../model/UpdateCustomerGroupRequest'); +var UpdateCustomerGroupResponse = require('../model/UpdateCustomerGroupResponse'); + +/** + * CustomerGroups service. + * @module api/CustomerGroupsApi + */ + +/** + * Constructs a new CustomerGroupsApi. + * @alias module:api/CustomerGroupsApi + * @class + * @param {module:ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ +module.exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * CreateCustomerGroup + * Note: This endpoint is in beta. + * Creates a new customer group for a business. The request must include at least the `name` value of the group. + * @param {module:model/CreateCustomerGroupRequest} 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/CreateCustomerGroupResponse} and HTTP response + */ + this.createCustomerGroupWithHttpInfo = 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 createCustomerGroup"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CreateCustomerGroupResponse; + + return this.apiClient.callApi( + '/v2/customers/groups', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CreateCustomerGroup + * Creates a new customer group for a business. The request must include at least the `name` value of the group. + * @param {module:model/CreateCustomerGroupRequest} 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/CreateCustomerGroupResponse} + */ + this.createCustomerGroup = function(body) { + return this.createCustomerGroupWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * DeleteCustomerGroup + * Note: This endpoint is in beta. + * Deletes a customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to delete. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCustomerGroupResponse} and HTTP response + */ + this.deleteCustomerGroupWithHttpInfo = function(groupId) { + var postBody = null; + + // verify the required parameter 'groupId' is set + if (groupId === undefined || groupId === null) { + throw new Error("Missing the required parameter 'groupId' when calling deleteCustomerGroup"); + } + + + var pathParams = { + 'group_id': groupId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = DeleteCustomerGroupResponse; + + return this.apiClient.callApi( + '/v2/customers/groups/{group_id}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * DeleteCustomerGroup + * Deletes a customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to delete. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCustomerGroupResponse} + */ + this.deleteCustomerGroup = function(groupId) { + return this.deleteCustomerGroupWithHttpInfo(groupId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * ListCustomerGroups + * Note: This endpoint is in beta. + * Retrieves the list of customer groups of a business. + * @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. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCustomerGroupsResponse} and HTTP response + */ + this.listCustomerGroupsWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'cursor': opts['cursor'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ListCustomerGroupsResponse; + + return this.apiClient.callApi( + '/v2/customers/groups', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * ListCustomerGroups + * Retrieves the list of customer groups of a business. + * @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. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCustomerGroupsResponse} + */ + this.listCustomerGroups = function(opts) { + return this.listCustomerGroupsWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * RetrieveCustomerGroup + * Note: This endpoint is in beta. + * Retrieves a specific customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveCustomerGroupResponse} and HTTP response + */ + this.retrieveCustomerGroupWithHttpInfo = function(groupId) { + var postBody = null; + + // verify the required parameter 'groupId' is set + if (groupId === undefined || groupId === null) { + throw new Error("Missing the required parameter 'groupId' when calling retrieveCustomerGroup"); + } + + + var pathParams = { + 'group_id': groupId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = RetrieveCustomerGroupResponse; + + return this.apiClient.callApi( + '/v2/customers/groups/{group_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * RetrieveCustomerGroup + * Retrieves a specific customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to retrieve. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveCustomerGroupResponse} + */ + this.retrieveCustomerGroup = function(groupId) { + return this.retrieveCustomerGroupWithHttpInfo(groupId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * UpdateCustomerGroup + * Note: This endpoint is in beta. + * Updates a customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to update. + * @param {module:model/UpdateCustomerGroupRequest} 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/UpdateCustomerGroupResponse} and HTTP response + */ + this.updateCustomerGroupWithHttpInfo = function(groupId, body) { + var postBody = body; + + // verify the required parameter 'groupId' is set + if (groupId === undefined || groupId === null) { + throw new Error("Missing the required parameter 'groupId' when calling updateCustomerGroup"); + } + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling updateCustomerGroup"); + } + + + var pathParams = { + 'group_id': groupId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UpdateCustomerGroupResponse; + + return this.apiClient.callApi( + '/v2/customers/groups/{group_id}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * UpdateCustomerGroup + * Updates a customer group as identified by the `group_id` value. + * @param {String} groupId The ID of the customer group to update. + * @param {module:model/UpdateCustomerGroupRequest} 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/UpdateCustomerGroupResponse} + */ + this.updateCustomerGroup = function(groupId, body) { + return this.updateCustomerGroupWithHttpInfo(groupId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } +}; diff --git a/src/api/CustomerSegmentsApi.js b/src/api/CustomerSegmentsApi.js new file mode 100644 index 0000000..f1e9d98 --- /dev/null +++ b/src/api/CustomerSegmentsApi.js @@ -0,0 +1,142 @@ +/** + * 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 ListCustomerSegmentsResponse = require('../model/ListCustomerSegmentsResponse'); +var RetrieveCustomerSegmentResponse = require('../model/RetrieveCustomerSegmentResponse'); + +/** + * CustomerSegments service. + * @module api/CustomerSegmentsApi + */ + +/** + * Constructs a new CustomerSegmentsApi. + * @alias module:api/CustomerSegmentsApi + * @class + * @param {module:ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ +module.exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * ListCustomerSegments + * Note: This endpoint is in beta. + * Retrieves the list of customer segments of a business. + * @param {Object} opts Optional parameters + * @param {String} opts.cursor 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. + * @param {Number} opts.limit Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCustomerSegmentsResponse} and HTTP response + */ + this.listCustomerSegmentsWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'cursor': opts['cursor'], + 'limit': opts['limit'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ListCustomerSegmentsResponse; + + return this.apiClient.callApi( + '/v2/customers/segments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * ListCustomerSegments + * Retrieves the list of customer segments of a business. + * @param {Object} opts Optional parameters + * @param {String} opts.cursor 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. + * @param {Number} opts.limit Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCustomerSegmentsResponse} + */ + this.listCustomerSegments = function(opts) { + return this.listCustomerSegmentsWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * RetrieveCustomerSegment + * Note: This endpoint is in beta. + * Retrieves a specific customer segment as identified by the `segment_id` value. + * @param {String} segmentId The Square-issued ID of the customer segment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveCustomerSegmentResponse} and HTTP response + */ + this.retrieveCustomerSegmentWithHttpInfo = function(segmentId) { + var postBody = null; + + // verify the required parameter 'segmentId' is set + if (segmentId === undefined || segmentId === null) { + throw new Error("Missing the required parameter 'segmentId' when calling retrieveCustomerSegment"); + } + + + var pathParams = { + 'segment_id': segmentId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = RetrieveCustomerSegmentResponse; + + return this.apiClient.callApi( + '/v2/customers/segments/{segment_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * RetrieveCustomerSegment + * Retrieves a specific customer segment as identified by the `segment_id` value. + * @param {String} segmentId The Square-issued ID of the customer segment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveCustomerSegmentResponse} + */ + this.retrieveCustomerSegment = function(segmentId) { + return this.retrieveCustomerSegmentWithHttpInfo(segmentId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } +}; diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 4485f01..6601885 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -12,6 +12,7 @@ * */ var ApiClient = require('../ApiClient'); +var AddGroupToCustomerResponse = require('../model/AddGroupToCustomerResponse'); var CreateCustomerCardRequest = require('../model/CreateCustomerCardRequest'); var CreateCustomerCardResponse = require('../model/CreateCustomerCardResponse'); var CreateCustomerRequest = require('../model/CreateCustomerRequest'); @@ -19,6 +20,7 @@ var CreateCustomerResponse = require('../model/CreateCustomerResponse'); var DeleteCustomerCardResponse = require('../model/DeleteCustomerCardResponse'); var DeleteCustomerResponse = require('../model/DeleteCustomerResponse'); var ListCustomersResponse = require('../model/ListCustomersResponse'); +var RemoveGroupFromCustomerResponse = require('../model/RemoveGroupFromCustomerResponse'); var RetrieveCustomerResponse = require('../model/RetrieveCustomerResponse'); var SearchCustomersRequest = require('../model/SearchCustomersRequest'); var SearchCustomersResponse = require('../model/SearchCustomersResponse'); @@ -42,6 +44,68 @@ module.exports = function(apiClient) { + /** + * AddGroupToCustomer + * Note: This endpoint is in beta. + * Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * @param {String} customerId The ID of the customer to add to a group. + * @param {String} groupId The ID of the customer group to add the customer to. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddGroupToCustomerResponse} and HTTP response + */ + this.addGroupToCustomerWithHttpInfo = function(customerId, groupId) { + var postBody = null; + + // verify the required parameter 'customerId' is set + if (customerId === undefined || customerId === null) { + throw new Error("Missing the required parameter 'customerId' when calling addGroupToCustomer"); + } + + // verify the required parameter 'groupId' is set + if (groupId === undefined || groupId === null) { + throw new Error("Missing the required parameter 'groupId' when calling addGroupToCustomer"); + } + + + var pathParams = { + 'customer_id': customerId, + 'group_id': groupId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = AddGroupToCustomerResponse; + + return this.apiClient.callApi( + '/v2/customers/{customer_id}/groups/{group_id}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * AddGroupToCustomer + * Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * @param {String} customerId The ID of the customer to add to a group. + * @param {String} groupId The ID of the customer group to add the customer to. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddGroupToCustomerResponse} + */ + this.addGroupToCustomer = function(customerId, groupId) { + return this.addGroupToCustomerWithHttpInfo(customerId, groupId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * CreateCustomer * Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - `given_name` - `family_name` - `company_name` - `email_address` - `phone_number` @@ -63,7 +127,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -122,7 +186,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -176,7 +240,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -236,7 +300,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -291,7 +355,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -325,6 +389,68 @@ module.exports = function(apiClient) { } + /** + * RemoveGroupFromCustomer + * Note: This endpoint is in beta. + * Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * @param {String} customerId The ID of the customer to remove from the group. + * @param {String} groupId The ID of the customer group to remove the customer from. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RemoveGroupFromCustomerResponse} and HTTP response + */ + this.removeGroupFromCustomerWithHttpInfo = function(customerId, groupId) { + var postBody = null; + + // verify the required parameter 'customerId' is set + if (customerId === undefined || customerId === null) { + throw new Error("Missing the required parameter 'customerId' when calling removeGroupFromCustomer"); + } + + // verify the required parameter 'groupId' is set + if (groupId === undefined || groupId === null) { + throw new Error("Missing the required parameter 'groupId' when calling removeGroupFromCustomer"); + } + + + var pathParams = { + 'customer_id': customerId, + 'group_id': groupId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = RemoveGroupFromCustomerResponse; + + return this.apiClient.callApi( + '/v2/customers/{customer_id}/groups/{group_id}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * RemoveGroupFromCustomer + * Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * @param {String} customerId The ID of the customer to remove from the group. + * @param {String} groupId The ID of the customer group to remove the customer from. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RemoveGroupFromCustomerResponse} + */ + this.removeGroupFromCustomer = function(customerId, groupId) { + return this.removeGroupFromCustomerWithHttpInfo(customerId, groupId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * RetrieveCustomer * Returns details for a single customer. @@ -347,7 +473,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -399,7 +525,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -458,7 +584,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/DevicesApi.js b/src/api/DevicesApi.js new file mode 100644 index 0000000..196b0b6 --- /dev/null +++ b/src/api/DevicesApi.js @@ -0,0 +1,200 @@ +/** + * 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 CreateDeviceCodeRequest = require('../model/CreateDeviceCodeRequest'); +var CreateDeviceCodeResponse = require('../model/CreateDeviceCodeResponse'); +var GetDeviceCodeResponse = require('../model/GetDeviceCodeResponse'); +var ListDeviceCodesResponse = require('../model/ListDeviceCodesResponse'); + +/** + * Devices service. + * @module api/DevicesApi + */ + +/** + * Constructs a new DevicesApi. + * @alias module:api/DevicesApi + * @class + * @param {module:ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ +module.exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * 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 + */ + this.createDeviceCodeWithHttpInfo = 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 createDeviceCode"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CreateDeviceCodeResponse; + + return this.apiClient.callApi( + '/v2/devices/codes', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CreateDeviceCode + * 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 data of type {@link module:model/CreateDeviceCodeResponse} + */ + this.createDeviceCode = function(body) { + return this.createDeviceCodeWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * 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 + */ + this.getDeviceCodeWithHttpInfo = function(id) { + var postBody = null; + + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling getDeviceCode"); + } + + + var pathParams = { + 'id': id + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = GetDeviceCodeResponse; + + return this.apiClient.callApi( + '/v2/devices/codes/{id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * GetDeviceCode + * 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 data of type {@link module:model/GetDeviceCodeResponse} + */ + this.getDeviceCode = function(id) { + return this.getDeviceCodeWithHttpInfo(id) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * 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. + * @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) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'cursor': opts['cursor'], + 'location_id': opts['locationId'], + 'product_type': opts['productType'] + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ListDeviceCodesResponse; + + return this.apiClient.callApi( + '/v2/devices/codes', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * ListDeviceCodes + * 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. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDeviceCodesResponse} + */ + this.listDeviceCodes = function(opts) { + return this.listDeviceCodesWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } +}; diff --git a/src/api/DisputesApi.js b/src/api/DisputesApi.js index 35d1136..0876811 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -122,7 +122,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -232,7 +232,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -296,7 +296,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -351,7 +351,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -412,7 +412,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js index c22d6eb..bebc6c6 100644 --- a/src/api/EmployeesApi.js +++ b/src/api/EmployeesApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -114,7 +114,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js index 679b91c..5f1dfb9 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -218,7 +218,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -277,7 +277,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -395,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js index dfda26c..7e553b5 100644 --- a/src/api/LaborApi.js +++ b/src/api/LaborApi.js @@ -71,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -229,7 +229,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -282,7 +282,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -335,7 +335,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -388,7 +388,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -442,7 +442,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -499,7 +499,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -554,7 +554,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -608,7 +608,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -667,7 +667,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -727,7 +727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -787,7 +787,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js index c25c202..7dcc7aa 100644 --- a/src/api/LocationsApi.js +++ b/src/api/LocationsApi.js @@ -58,7 +58,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -104,7 +104,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -156,7 +156,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -216,7 +216,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/MerchantsApi.js b/src/api/MerchantsApi.js index b3a4da5..0395fb8 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -105,7 +105,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/MobileAuthorizationApi.js b/src/api/MobileAuthorizationApi.js index c3e2b5c..b0c0429 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index e4bc12a..790fc3a 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -171,7 +171,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js index 39a7769..6d52232 100644 --- a/src/api/OrdersApi.js +++ b/src/api/OrdersApi.js @@ -68,7 +68,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -128,7 +128,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -189,7 +189,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -242,7 +242,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -309,7 +309,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/PaymentsApi.js b/src/api/PaymentsApi.js index eef4dae..19bbc6f 100644 --- a/src/api/PaymentsApi.js +++ b/src/api/PaymentsApi.js @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -172,7 +172,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -225,7 +225,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -278,7 +278,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -342,7 +342,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/RefundsApi.js b/src/api/RefundsApi.js index 717a514..d0bf368 100644 --- a/src/api/RefundsApi.js +++ b/src/api/RefundsApi.js @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -118,7 +118,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -177,7 +177,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/ReportingApi.js b/src/api/ReportingApi.js index 35e2865..95874ce 100644 --- a/src/api/ReportingApi.js +++ b/src/api/ReportingApi.js @@ -66,7 +66,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -136,7 +136,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/TerminalApi.js b/src/api/TerminalApi.js new file mode 100644 index 0000000..7e5c226 --- /dev/null +++ b/src/api/TerminalApi.js @@ -0,0 +1,251 @@ +/** + * 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 CancelTerminalCheckoutResponse = require('../model/CancelTerminalCheckoutResponse'); +var CreateTerminalCheckoutRequest = require('../model/CreateTerminalCheckoutRequest'); +var CreateTerminalCheckoutResponse = require('../model/CreateTerminalCheckoutResponse'); +var GetTerminalCheckoutResponse = require('../model/GetTerminalCheckoutResponse'); +var SearchTerminalCheckoutsRequest = require('../model/SearchTerminalCheckoutsRequest'); +var SearchTerminalCheckoutsResponse = require('../model/SearchTerminalCheckoutsResponse'); + +/** + * Terminal service. + * @module api/TerminalApi + */ + +/** + * Constructs a new TerminalApi. + * @alias module:api/TerminalApi + * @class + * @param {module:ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ +module.exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * CancelTerminalCheckout + * Note: This endpoint is in beta. + * 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 + */ + this.cancelTerminalCheckoutWithHttpInfo = function(checkoutId) { + var postBody = null; + + // verify the required parameter 'checkoutId' is set + if (checkoutId === undefined || checkoutId === null) { + throw new Error("Missing the required parameter 'checkoutId' when calling cancelTerminalCheckout"); + } + + + var pathParams = { + 'checkout_id': checkoutId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CancelTerminalCheckoutResponse; + + return this.apiClient.callApi( + '/v2/terminals/checkouts/{checkout_id}/cancel', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * CancelTerminalCheckout + * 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} + */ + this.cancelTerminalCheckout = function(checkoutId) { + return this.cancelTerminalCheckoutWithHttpInfo(checkoutId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * CreateTerminalCheckout + * Note: This endpoint is in beta. + * 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 + */ + this.createTerminalCheckoutWithHttpInfo = 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 createTerminalCheckout"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = CreateTerminalCheckoutResponse; + + return this.apiClient.callApi( + '/v2/terminals/checkouts', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * 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 data of type {@link module:model/CreateTerminalCheckoutResponse} + */ + this.createTerminalCheckout = function(body) { + return this.createTerminalCheckoutWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * GetTerminalCheckout + * Note: This endpoint is in beta. + * 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 + */ + this.getTerminalCheckoutWithHttpInfo = function(checkoutId) { + var postBody = null; + + // verify the required parameter 'checkoutId' is set + if (checkoutId === undefined || checkoutId === null) { + throw new Error("Missing the required parameter 'checkoutId' when calling getTerminalCheckout"); + } + + + var pathParams = { + 'checkout_id': checkoutId + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = GetTerminalCheckoutResponse; + + return this.apiClient.callApi( + '/v2/terminals/checkouts/{checkout_id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * 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 data of type {@link module:model/GetTerminalCheckoutResponse} + */ + this.getTerminalCheckout = function(checkoutId) { + return this.getTerminalCheckoutWithHttpInfo(checkoutId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * SearchTerminalCheckouts + * Note: This endpoint is in beta. + * 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 + */ + this.searchTerminalCheckoutsWithHttpInfo = 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 searchTerminalCheckouts"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2020-04-22'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = SearchTerminalCheckoutsResponse; + + return this.apiClient.callApi( + '/v2/terminals/checkouts/search', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * 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 data of type {@link module:model/SearchTerminalCheckoutsResponse} + */ + this.searchTerminalCheckouts = function(body) { + return this.searchTerminalCheckoutsWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } +}; diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index cf1cca8..976820e 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -132,7 +132,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -201,7 +201,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -268,7 +268,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -405,7 +405,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -468,7 +468,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js index 192b9ae..e1c013c 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -162,7 +162,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -217,7 +217,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -280,7 +280,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -338,7 +338,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -407,7 +407,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -471,7 +471,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -543,7 +543,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -616,7 +616,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -670,7 +670,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -723,7 +723,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -778,7 +778,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -837,7 +837,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -897,7 +897,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -959,7 +959,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js index 9a0916e..cc12998 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -150,7 +150,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -221,7 +221,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -284,7 +284,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -346,7 +346,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -408,7 +408,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -470,7 +470,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -532,7 +532,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -601,7 +601,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -664,7 +664,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -733,7 +733,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -797,7 +797,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -860,7 +860,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -923,7 +923,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -986,7 +986,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1049,7 +1049,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1119,7 +1119,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1183,7 +1183,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1252,7 +1252,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1325,7 +1325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1382,7 +1382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1437,7 +1437,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1492,7 +1492,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1553,7 +1553,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1615,7 +1615,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1672,7 +1672,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1727,7 +1727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1796,7 +1796,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1867,7 +1867,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1931,7 +1931,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -1994,7 +1994,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2063,7 +2063,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2133,7 +2133,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2203,7 +2203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2273,7 +2273,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2343,7 +2343,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2420,7 +2420,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2491,7 +2491,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2561,7 +2561,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -2638,7 +2638,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js index 0cd92af..1991f14 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -95,7 +95,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js index 7162683..dc95cd1 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-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -182,7 +182,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -253,7 +253,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -325,7 +325,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -398,7 +398,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -467,7 +467,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -528,7 +528,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -589,7 +589,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -650,7 +650,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; @@ -717,7 +717,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2020-03-25'; + headerParams['Square-Version'] = '2020-04-22'; var formParams = { }; diff --git a/src/index.js b/src/index.js index ff8b235..2524a0b 100644 --- a/src/index.js +++ b/src/index.js @@ -15,6 +15,8 @@ var ApiClient = require('./ApiClient'); var AcceptDisputeRequest = require('./model/AcceptDisputeRequest'); var AcceptDisputeResponse = require('./model/AcceptDisputeResponse'); +var AddGroupToCustomerRequest = require('./model/AddGroupToCustomerRequest'); +var AddGroupToCustomerResponse = require('./model/AddGroupToCustomerResponse'); var AdditionalRecipient = require('./model/AdditionalRecipient'); var AdditionalRecipientReceivable = require('./model/AdditionalRecipientReceivable'); var AdditionalRecipientReceivableRefund = require('./model/AdditionalRecipientReceivableRefund'); @@ -44,6 +46,8 @@ var CancelPaymentByIdempotencyKeyRequest = require('./model/CancelPaymentByIdemp var CancelPaymentByIdempotencyKeyResponse = require('./model/CancelPaymentByIdempotencyKeyResponse'); var CancelPaymentRequest = require('./model/CancelPaymentRequest'); var CancelPaymentResponse = require('./model/CancelPaymentResponse'); +var CancelTerminalCheckoutRequest = require('./model/CancelTerminalCheckoutRequest'); +var CancelTerminalCheckoutResponse = require('./model/CancelTerminalCheckoutResponse'); var CaptureTransactionRequest = require('./model/CaptureTransactionRequest'); var CaptureTransactionResponse = require('./model/CaptureTransactionResponse'); var Card = require('./model/Card'); @@ -109,6 +113,10 @@ var CatalogQueryPrefix = require('./model/CatalogQueryPrefix'); var CatalogQueryRange = require('./model/CatalogQueryRange'); var CatalogQuerySortedAttribute = require('./model/CatalogQuerySortedAttribute'); var CatalogQueryText = require('./model/CatalogQueryText'); +var CatalogQuickAmount = require('./model/CatalogQuickAmount'); +var CatalogQuickAmountType = require('./model/CatalogQuickAmountType'); +var CatalogQuickAmountsSettings = require('./model/CatalogQuickAmountsSettings'); +var CatalogQuickAmountsSettingsOption = require('./model/CatalogQuickAmountsSettingsOption'); var CatalogTax = require('./model/CatalogTax'); var CatalogTimePeriod = require('./model/CatalogTimePeriod'); var CatalogV1Id = require('./model/CatalogV1Id'); @@ -128,8 +136,12 @@ var CreateCheckoutRequest = require('./model/CreateCheckoutRequest'); var CreateCheckoutResponse = require('./model/CreateCheckoutResponse'); var CreateCustomerCardRequest = require('./model/CreateCustomerCardRequest'); var CreateCustomerCardResponse = require('./model/CreateCustomerCardResponse'); +var CreateCustomerGroupRequest = require('./model/CreateCustomerGroupRequest'); +var CreateCustomerGroupResponse = require('./model/CreateCustomerGroupResponse'); var CreateCustomerRequest = require('./model/CreateCustomerRequest'); var CreateCustomerResponse = require('./model/CreateCustomerResponse'); +var CreateDeviceCodeRequest = require('./model/CreateDeviceCodeRequest'); +var CreateDeviceCodeResponse = require('./model/CreateDeviceCodeResponse'); var CreateDisputeEvidenceFileRequest = require('./model/CreateDisputeEvidenceFileRequest'); var CreateDisputeEvidenceFileResponse = require('./model/CreateDisputeEvidenceFileResponse'); var CreateDisputeEvidenceTextRequest = require('./model/CreateDisputeEvidenceTextRequest'); @@ -146,15 +158,19 @@ var CreateRefundRequest = require('./model/CreateRefundRequest'); var CreateRefundResponse = require('./model/CreateRefundResponse'); var CreateShiftRequest = require('./model/CreateShiftRequest'); var CreateShiftResponse = require('./model/CreateShiftResponse'); +var CreateTerminalCheckoutRequest = require('./model/CreateTerminalCheckoutRequest'); +var CreateTerminalCheckoutResponse = require('./model/CreateTerminalCheckoutResponse'); var Currency = require('./model/Currency'); var Customer = require('./model/Customer'); var CustomerCreationSource = require('./model/CustomerCreationSource'); var CustomerCreationSourceFilter = require('./model/CustomerCreationSourceFilter'); var CustomerFilter = require('./model/CustomerFilter'); +var CustomerGroup = require('./model/CustomerGroup'); var CustomerGroupInfo = require('./model/CustomerGroupInfo'); var CustomerInclusionExclusion = require('./model/CustomerInclusionExclusion'); var CustomerPreferences = require('./model/CustomerPreferences'); var CustomerQuery = require('./model/CustomerQuery'); +var CustomerSegment = require('./model/CustomerSegment'); var CustomerSort = require('./model/CustomerSort'); var CustomerSortField = require('./model/CustomerSortField'); var DateRange = require('./model/DateRange'); @@ -165,11 +181,16 @@ var DeleteCatalogObjectRequest = require('./model/DeleteCatalogObjectRequest'); var DeleteCatalogObjectResponse = require('./model/DeleteCatalogObjectResponse'); var DeleteCustomerCardRequest = require('./model/DeleteCustomerCardRequest'); var DeleteCustomerCardResponse = require('./model/DeleteCustomerCardResponse'); +var DeleteCustomerGroupRequest = require('./model/DeleteCustomerGroupRequest'); +var DeleteCustomerGroupResponse = require('./model/DeleteCustomerGroupResponse'); var DeleteCustomerRequest = require('./model/DeleteCustomerRequest'); var DeleteCustomerResponse = require('./model/DeleteCustomerResponse'); var DeleteShiftRequest = require('./model/DeleteShiftRequest'); var DeleteShiftResponse = require('./model/DeleteShiftResponse'); var Device = require('./model/Device'); +var DeviceCheckoutOptions = require('./model/DeviceCheckoutOptions'); +var DeviceCode = require('./model/DeviceCode'); +var DeviceCodeStatus = require('./model/DeviceCodeStatus'); var DeviceDetails = require('./model/DeviceDetails'); var Dispute = require('./model/Dispute'); var DisputeEvidence = require('./model/DisputeEvidence'); @@ -186,12 +207,15 @@ var Error = require('./model/Error'); var ErrorCategory = require('./model/ErrorCategory'); var ErrorCode = require('./model/ErrorCode'); var ExcludeStrategy = require('./model/ExcludeStrategy'); +var FilterValue = require('./model/FilterValue'); var GetBankAccountByV1IdRequest = require('./model/GetBankAccountByV1IdRequest'); var GetBankAccountByV1IdResponse = require('./model/GetBankAccountByV1IdResponse'); var GetBankAccountRequest = require('./model/GetBankAccountRequest'); var GetBankAccountResponse = require('./model/GetBankAccountResponse'); var GetBreakTypeRequest = require('./model/GetBreakTypeRequest'); var GetBreakTypeResponse = require('./model/GetBreakTypeResponse'); +var GetDeviceCodeRequest = require('./model/GetDeviceCodeRequest'); +var GetDeviceCodeResponse = require('./model/GetDeviceCodeResponse'); var GetEmployeeWageRequest = require('./model/GetEmployeeWageRequest'); var GetEmployeeWageResponse = require('./model/GetEmployeeWageResponse'); var GetPaymentRefundRequest = require('./model/GetPaymentRefundRequest'); @@ -200,6 +224,8 @@ var GetPaymentRequest = require('./model/GetPaymentRequest'); var GetPaymentResponse = require('./model/GetPaymentResponse'); var GetShiftRequest = require('./model/GetShiftRequest'); var GetShiftResponse = require('./model/GetShiftResponse'); +var GetTerminalCheckoutRequest = require('./model/GetTerminalCheckoutRequest'); +var GetTerminalCheckoutResponse = require('./model/GetTerminalCheckoutResponse'); var InventoryAdjustment = require('./model/InventoryAdjustment'); var InventoryAlertType = require('./model/InventoryAlertType'); var InventoryChange = require('./model/InventoryChange'); @@ -223,8 +249,14 @@ var ListCashDrawerShiftsRequest = require('./model/ListCashDrawerShiftsRequest') var ListCashDrawerShiftsResponse = require('./model/ListCashDrawerShiftsResponse'); var ListCatalogRequest = require('./model/ListCatalogRequest'); var ListCatalogResponse = require('./model/ListCatalogResponse'); +var ListCustomerGroupsRequest = require('./model/ListCustomerGroupsRequest'); +var ListCustomerGroupsResponse = require('./model/ListCustomerGroupsResponse'); +var ListCustomerSegmentsRequest = require('./model/ListCustomerSegmentsRequest'); +var ListCustomerSegmentsResponse = require('./model/ListCustomerSegmentsResponse'); var ListCustomersRequest = require('./model/ListCustomersRequest'); var ListCustomersResponse = require('./model/ListCustomersResponse'); +var ListDeviceCodesRequest = require('./model/ListDeviceCodesRequest'); +var ListDeviceCodesResponse = require('./model/ListDeviceCodesResponse'); var ListDisputeEvidenceRequest = require('./model/ListDisputeEvidenceRequest'); var ListDisputeEvidenceResponse = require('./model/ListDisputeEvidenceResponse'); var ListDisputesRequest = require('./model/ListDisputesRequest'); @@ -268,14 +300,20 @@ var Money = require('./model/Money'); var ObtainTokenRequest = require('./model/ObtainTokenRequest'); var ObtainTokenResponse = require('./model/ObtainTokenResponse'); var Order = require('./model/Order'); +var OrderCreated = require('./model/OrderCreated'); +var OrderCreatedObject = require('./model/OrderCreatedObject'); var OrderEntry = require('./model/OrderEntry'); var OrderFulfillment = require('./model/OrderFulfillment'); var OrderFulfillmentPickupDetails = require('./model/OrderFulfillmentPickupDetails'); +var OrderFulfillmentPickupDetailsCurbsidePickupDetails = require('./model/OrderFulfillmentPickupDetailsCurbsidePickupDetails'); var OrderFulfillmentPickupDetailsScheduleType = require('./model/OrderFulfillmentPickupDetailsScheduleType'); var OrderFulfillmentRecipient = require('./model/OrderFulfillmentRecipient'); var OrderFulfillmentShipmentDetails = require('./model/OrderFulfillmentShipmentDetails'); var OrderFulfillmentState = require('./model/OrderFulfillmentState'); var OrderFulfillmentType = require('./model/OrderFulfillmentType'); +var OrderFulfillmentUpdated = require('./model/OrderFulfillmentUpdated'); +var OrderFulfillmentUpdatedObject = require('./model/OrderFulfillmentUpdatedObject'); +var OrderFulfillmentUpdatedUpdate = require('./model/OrderFulfillmentUpdatedUpdate'); var OrderLineItem = require('./model/OrderLineItem'); var OrderLineItemAppliedDiscount = require('./model/OrderLineItemAppliedDiscount'); var OrderLineItemAppliedTax = require('./model/OrderLineItemAppliedTax'); @@ -299,12 +337,16 @@ var OrderServiceCharge = require('./model/OrderServiceCharge'); var OrderServiceChargeCalculationPhase = require('./model/OrderServiceChargeCalculationPhase'); var OrderSource = require('./model/OrderSource'); var OrderState = require('./model/OrderState'); +var OrderUpdated = require('./model/OrderUpdated'); +var OrderUpdatedObject = require('./model/OrderUpdatedObject'); var PayOrderRequest = require('./model/PayOrderRequest'); var PayOrderResponse = require('./model/PayOrderResponse'); var Payment = require('./model/Payment'); +var PaymentOptions = require('./model/PaymentOptions'); var PaymentRefund = require('./model/PaymentRefund'); var ProcessingFee = require('./model/ProcessingFee'); var Product = require('./model/Product'); +var ProductType = require('./model/ProductType'); var Refund = require('./model/Refund'); var RefundPaymentRequest = require('./model/RefundPaymentRequest'); var RefundPaymentResponse = require('./model/RefundPaymentResponse'); @@ -314,14 +356,20 @@ var RegisterDomainResponse = require('./model/RegisterDomainResponse'); var RegisterDomainResponseStatus = require('./model/RegisterDomainResponseStatus'); var RemoveDisputeEvidenceRequest = require('./model/RemoveDisputeEvidenceRequest'); var RemoveDisputeEvidenceResponse = require('./model/RemoveDisputeEvidenceResponse'); +var RemoveGroupFromCustomerRequest = require('./model/RemoveGroupFromCustomerRequest'); +var RemoveGroupFromCustomerResponse = require('./model/RemoveGroupFromCustomerResponse'); var RenewTokenRequest = require('./model/RenewTokenRequest'); var RenewTokenResponse = require('./model/RenewTokenResponse'); var RetrieveCashDrawerShiftRequest = require('./model/RetrieveCashDrawerShiftRequest'); var RetrieveCashDrawerShiftResponse = require('./model/RetrieveCashDrawerShiftResponse'); var RetrieveCatalogObjectRequest = require('./model/RetrieveCatalogObjectRequest'); var RetrieveCatalogObjectResponse = require('./model/RetrieveCatalogObjectResponse'); +var RetrieveCustomerGroupRequest = require('./model/RetrieveCustomerGroupRequest'); +var RetrieveCustomerGroupResponse = require('./model/RetrieveCustomerGroupResponse'); var RetrieveCustomerRequest = require('./model/RetrieveCustomerRequest'); var RetrieveCustomerResponse = require('./model/RetrieveCustomerResponse'); +var RetrieveCustomerSegmentRequest = require('./model/RetrieveCustomerSegmentRequest'); +var RetrieveCustomerSegmentResponse = require('./model/RetrieveCustomerSegmentResponse'); var RetrieveDisputeEvidenceRequest = require('./model/RetrieveDisputeEvidenceRequest'); var RetrieveDisputeEvidenceResponse = require('./model/RetrieveDisputeEvidenceResponse'); var RetrieveDisputeRequest = require('./model/RetrieveDisputeRequest'); @@ -361,6 +409,8 @@ var SearchOrdersSourceFilter = require('./model/SearchOrdersSourceFilter'); var SearchOrdersStateFilter = require('./model/SearchOrdersStateFilter'); var SearchShiftsRequest = require('./model/SearchShiftsRequest'); var SearchShiftsResponse = require('./model/SearchShiftsResponse'); +var SearchTerminalCheckoutsRequest = require('./model/SearchTerminalCheckoutsRequest'); +var SearchTerminalCheckoutsResponse = require('./model/SearchTerminalCheckoutsResponse'); var Shift = require('./model/Shift'); var ShiftFilter = require('./model/ShiftFilter'); var ShiftFilterStatus = require('./model/ShiftFilterStatus'); @@ -385,12 +435,20 @@ var TenderCardDetailsEntryMethod = require('./model/TenderCardDetailsEntryMethod var TenderCardDetailsStatus = require('./model/TenderCardDetailsStatus'); var TenderCashDetails = require('./model/TenderCashDetails'); var TenderType = require('./model/TenderType'); +var TerminalCheckout = require('./model/TerminalCheckout'); +var TerminalCheckoutCancelReason = require('./model/TerminalCheckoutCancelReason'); +var TerminalCheckoutQuery = require('./model/TerminalCheckoutQuery'); +var TerminalCheckoutQueryFilter = require('./model/TerminalCheckoutQueryFilter'); +var TerminalCheckoutQuerySort = require('./model/TerminalCheckoutQuerySort'); var TimeRange = require('./model/TimeRange'); +var TipSettings = require('./model/TipSettings'); var Transaction = require('./model/Transaction'); var TransactionProduct = require('./model/TransactionProduct'); var TransactionType = require('./model/TransactionType'); var UpdateBreakTypeRequest = require('./model/UpdateBreakTypeRequest'); var UpdateBreakTypeResponse = require('./model/UpdateBreakTypeResponse'); +var UpdateCustomerGroupRequest = require('./model/UpdateCustomerGroupRequest'); +var UpdateCustomerGroupResponse = require('./model/UpdateCustomerGroupResponse'); var UpdateCustomerRequest = require('./model/UpdateCustomerRequest'); var UpdateCustomerResponse = require('./model/UpdateCustomerResponse'); var UpdateItemModifierListsRequest = require('./model/UpdateItemModifierListsRequest'); @@ -577,7 +635,10 @@ var BankAccountsApi = require('./api/BankAccountsApi'); var CashDrawersApi = require('./api/CashDrawersApi'); var CatalogApi = require('./api/CatalogApi'); var CheckoutApi = require('./api/CheckoutApi'); +var CustomerGroupsApi = require('./api/CustomerGroupsApi'); +var CustomerSegmentsApi = require('./api/CustomerSegmentsApi'); var CustomersApi = require('./api/CustomersApi'); +var DevicesApi = require('./api/DevicesApi'); var DisputesApi = require('./api/DisputesApi'); var EmployeesApi = require('./api/EmployeesApi'); var InventoryApi = require('./api/InventoryApi'); @@ -590,6 +651,7 @@ var OrdersApi = require('./api/OrdersApi'); var PaymentsApi = require('./api/PaymentsApi'); var RefundsApi = require('./api/RefundsApi'); var ReportingApi = require('./api/ReportingApi'); +var TerminalApi = require('./api/TerminalApi'); var TransactionsApi = require('./api/TransactionsApi'); var V1EmployeesApi = require('./api/V1EmployeesApi'); var V1ItemsApi = require('./api/V1ItemsApi'); @@ -626,7 +688,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *

* @module index - * @version 3.20200325.0 + * @version 3.20200422.0 */ module.exports = { /** @@ -644,6 +706,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/AcceptDisputeResponse} */ AcceptDisputeResponse: AcceptDisputeResponse, + /** + * The AddGroupToCustomerRequest model constructor. + * @property {module:model/AddGroupToCustomerRequest} + */ + AddGroupToCustomerRequest: AddGroupToCustomerRequest, + /** + * The AddGroupToCustomerResponse model constructor. + * @property {module:model/AddGroupToCustomerResponse} + */ + AddGroupToCustomerResponse: AddGroupToCustomerResponse, /** * The AdditionalRecipient model constructor. * @property {module:model/AdditionalRecipient} @@ -789,6 +861,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CancelPaymentResponse} */ CancelPaymentResponse: CancelPaymentResponse, + /** + * The CancelTerminalCheckoutRequest model constructor. + * @property {module:model/CancelTerminalCheckoutRequest} + */ + CancelTerminalCheckoutRequest: CancelTerminalCheckoutRequest, + /** + * The CancelTerminalCheckoutResponse model constructor. + * @property {module:model/CancelTerminalCheckoutResponse} + */ + CancelTerminalCheckoutResponse: CancelTerminalCheckoutResponse, /** * The CaptureTransactionRequest model constructor. * @property {module:model/CaptureTransactionRequest} @@ -1114,6 +1196,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CatalogQueryText} */ CatalogQueryText: CatalogQueryText, + /** + * The CatalogQuickAmount model constructor. + * @property {module:model/CatalogQuickAmount} + */ + CatalogQuickAmount: CatalogQuickAmount, + /** + * The CatalogQuickAmountType model constructor. + * @property {module:model/CatalogQuickAmountType} + */ + CatalogQuickAmountType: CatalogQuickAmountType, + /** + * The CatalogQuickAmountsSettings model constructor. + * @property {module:model/CatalogQuickAmountsSettings} + */ + CatalogQuickAmountsSettings: CatalogQuickAmountsSettings, + /** + * The CatalogQuickAmountsSettingsOption model constructor. + * @property {module:model/CatalogQuickAmountsSettingsOption} + */ + CatalogQuickAmountsSettingsOption: CatalogQuickAmountsSettingsOption, /** * The CatalogTax model constructor. * @property {module:model/CatalogTax} @@ -1209,6 +1311,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CreateCustomerCardResponse} */ CreateCustomerCardResponse: CreateCustomerCardResponse, + /** + * The CreateCustomerGroupRequest model constructor. + * @property {module:model/CreateCustomerGroupRequest} + */ + CreateCustomerGroupRequest: CreateCustomerGroupRequest, + /** + * The CreateCustomerGroupResponse model constructor. + * @property {module:model/CreateCustomerGroupResponse} + */ + CreateCustomerGroupResponse: CreateCustomerGroupResponse, /** * The CreateCustomerRequest model constructor. * @property {module:model/CreateCustomerRequest} @@ -1219,6 +1331,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CreateCustomerResponse} */ CreateCustomerResponse: CreateCustomerResponse, + /** + * The CreateDeviceCodeRequest model constructor. + * @property {module:model/CreateDeviceCodeRequest} + */ + CreateDeviceCodeRequest: CreateDeviceCodeRequest, + /** + * The CreateDeviceCodeResponse model constructor. + * @property {module:model/CreateDeviceCodeResponse} + */ + CreateDeviceCodeResponse: CreateDeviceCodeResponse, /** * The CreateDisputeEvidenceFileRequest model constructor. * @property {module:model/CreateDisputeEvidenceFileRequest} @@ -1299,6 +1421,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CreateShiftResponse} */ CreateShiftResponse: CreateShiftResponse, + /** + * The CreateTerminalCheckoutRequest model constructor. + * @property {module:model/CreateTerminalCheckoutRequest} + */ + CreateTerminalCheckoutRequest: CreateTerminalCheckoutRequest, + /** + * The CreateTerminalCheckoutResponse model constructor. + * @property {module:model/CreateTerminalCheckoutResponse} + */ + CreateTerminalCheckoutResponse: CreateTerminalCheckoutResponse, /** * The Currency model constructor. * @property {module:model/Currency} @@ -1324,6 +1456,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CustomerFilter} */ CustomerFilter: CustomerFilter, + /** + * The CustomerGroup model constructor. + * @property {module:model/CustomerGroup} + */ + CustomerGroup: CustomerGroup, /** * The CustomerGroupInfo model constructor. * @property {module:model/CustomerGroupInfo} @@ -1344,6 +1481,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/CustomerQuery} */ CustomerQuery: CustomerQuery, + /** + * The CustomerSegment model constructor. + * @property {module:model/CustomerSegment} + */ + CustomerSegment: CustomerSegment, /** * The CustomerSort model constructor. * @property {module:model/CustomerSort} @@ -1394,6 +1536,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/DeleteCustomerCardResponse} */ DeleteCustomerCardResponse: DeleteCustomerCardResponse, + /** + * The DeleteCustomerGroupRequest model constructor. + * @property {module:model/DeleteCustomerGroupRequest} + */ + DeleteCustomerGroupRequest: DeleteCustomerGroupRequest, + /** + * The DeleteCustomerGroupResponse model constructor. + * @property {module:model/DeleteCustomerGroupResponse} + */ + DeleteCustomerGroupResponse: DeleteCustomerGroupResponse, /** * The DeleteCustomerRequest model constructor. * @property {module:model/DeleteCustomerRequest} @@ -1419,6 +1571,21 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Device} */ Device: Device, + /** + * The DeviceCheckoutOptions model constructor. + * @property {module:model/DeviceCheckoutOptions} + */ + DeviceCheckoutOptions: DeviceCheckoutOptions, + /** + * The DeviceCode model constructor. + * @property {module:model/DeviceCode} + */ + DeviceCode: DeviceCode, + /** + * The DeviceCodeStatus model constructor. + * @property {module:model/DeviceCodeStatus} + */ + DeviceCodeStatus: DeviceCodeStatus, /** * The DeviceDetails model constructor. * @property {module:model/DeviceDetails} @@ -1499,6 +1666,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ExcludeStrategy} */ ExcludeStrategy: ExcludeStrategy, + /** + * The FilterValue model constructor. + * @property {module:model/FilterValue} + */ + FilterValue: FilterValue, /** * The GetBankAccountByV1IdRequest model constructor. * @property {module:model/GetBankAccountByV1IdRequest} @@ -1529,6 +1701,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/GetBreakTypeResponse} */ GetBreakTypeResponse: GetBreakTypeResponse, + /** + * The GetDeviceCodeRequest model constructor. + * @property {module:model/GetDeviceCodeRequest} + */ + GetDeviceCodeRequest: GetDeviceCodeRequest, + /** + * The GetDeviceCodeResponse model constructor. + * @property {module:model/GetDeviceCodeResponse} + */ + GetDeviceCodeResponse: GetDeviceCodeResponse, /** * The GetEmployeeWageRequest model constructor. * @property {module:model/GetEmployeeWageRequest} @@ -1569,6 +1751,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/GetShiftResponse} */ GetShiftResponse: GetShiftResponse, + /** + * The GetTerminalCheckoutRequest model constructor. + * @property {module:model/GetTerminalCheckoutRequest} + */ + GetTerminalCheckoutRequest: GetTerminalCheckoutRequest, + /** + * The GetTerminalCheckoutResponse model constructor. + * @property {module:model/GetTerminalCheckoutResponse} + */ + GetTerminalCheckoutResponse: GetTerminalCheckoutResponse, /** * The InventoryAdjustment model constructor. * @property {module:model/InventoryAdjustment} @@ -1684,6 +1876,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ListCatalogResponse} */ ListCatalogResponse: ListCatalogResponse, + /** + * The ListCustomerGroupsRequest model constructor. + * @property {module:model/ListCustomerGroupsRequest} + */ + ListCustomerGroupsRequest: ListCustomerGroupsRequest, + /** + * The ListCustomerGroupsResponse model constructor. + * @property {module:model/ListCustomerGroupsResponse} + */ + ListCustomerGroupsResponse: ListCustomerGroupsResponse, + /** + * The ListCustomerSegmentsRequest model constructor. + * @property {module:model/ListCustomerSegmentsRequest} + */ + ListCustomerSegmentsRequest: ListCustomerSegmentsRequest, + /** + * The ListCustomerSegmentsResponse model constructor. + * @property {module:model/ListCustomerSegmentsResponse} + */ + ListCustomerSegmentsResponse: ListCustomerSegmentsResponse, /** * The ListCustomersRequest model constructor. * @property {module:model/ListCustomersRequest} @@ -1694,6 +1906,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/ListCustomersResponse} */ ListCustomersResponse: ListCustomersResponse, + /** + * The ListDeviceCodesRequest model constructor. + * @property {module:model/ListDeviceCodesRequest} + */ + ListDeviceCodesRequest: ListDeviceCodesRequest, + /** + * The ListDeviceCodesResponse model constructor. + * @property {module:model/ListDeviceCodesResponse} + */ + ListDeviceCodesResponse: ListDeviceCodesResponse, /** * The ListDisputeEvidenceRequest model constructor. * @property {module:model/ListDisputeEvidenceRequest} @@ -1909,6 +2131,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Order} */ Order: Order, + /** + * The OrderCreated model constructor. + * @property {module:model/OrderCreated} + */ + OrderCreated: OrderCreated, + /** + * The OrderCreatedObject model constructor. + * @property {module:model/OrderCreatedObject} + */ + OrderCreatedObject: OrderCreatedObject, /** * The OrderEntry model constructor. * @property {module:model/OrderEntry} @@ -1924,6 +2156,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/OrderFulfillmentPickupDetails} */ OrderFulfillmentPickupDetails: OrderFulfillmentPickupDetails, + /** + * The OrderFulfillmentPickupDetailsCurbsidePickupDetails model constructor. + * @property {module:model/OrderFulfillmentPickupDetailsCurbsidePickupDetails} + */ + OrderFulfillmentPickupDetailsCurbsidePickupDetails: OrderFulfillmentPickupDetailsCurbsidePickupDetails, /** * The OrderFulfillmentPickupDetailsScheduleType model constructor. * @property {module:model/OrderFulfillmentPickupDetailsScheduleType} @@ -1949,6 +2186,21 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/OrderFulfillmentType} */ OrderFulfillmentType: OrderFulfillmentType, + /** + * The OrderFulfillmentUpdated model constructor. + * @property {module:model/OrderFulfillmentUpdated} + */ + OrderFulfillmentUpdated: OrderFulfillmentUpdated, + /** + * The OrderFulfillmentUpdatedObject model constructor. + * @property {module:model/OrderFulfillmentUpdatedObject} + */ + OrderFulfillmentUpdatedObject: OrderFulfillmentUpdatedObject, + /** + * The OrderFulfillmentUpdatedUpdate model constructor. + * @property {module:model/OrderFulfillmentUpdatedUpdate} + */ + OrderFulfillmentUpdatedUpdate: OrderFulfillmentUpdatedUpdate, /** * The OrderLineItem model constructor. * @property {module:model/OrderLineItem} @@ -2064,6 +2316,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/OrderState} */ OrderState: OrderState, + /** + * The OrderUpdated model constructor. + * @property {module:model/OrderUpdated} + */ + OrderUpdated: OrderUpdated, + /** + * The OrderUpdatedObject model constructor. + * @property {module:model/OrderUpdatedObject} + */ + OrderUpdatedObject: OrderUpdatedObject, /** * The PayOrderRequest model constructor. * @property {module:model/PayOrderRequest} @@ -2079,6 +2341,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Payment} */ Payment: Payment, + /** + * The PaymentOptions model constructor. + * @property {module:model/PaymentOptions} + */ + PaymentOptions: PaymentOptions, /** * The PaymentRefund model constructor. * @property {module:model/PaymentRefund} @@ -2094,6 +2361,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Product} */ Product: Product, + /** + * The ProductType model constructor. + * @property {module:model/ProductType} + */ + ProductType: ProductType, /** * The Refund model constructor. * @property {module:model/Refund} @@ -2139,6 +2411,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/RemoveDisputeEvidenceResponse} */ RemoveDisputeEvidenceResponse: RemoveDisputeEvidenceResponse, + /** + * The RemoveGroupFromCustomerRequest model constructor. + * @property {module:model/RemoveGroupFromCustomerRequest} + */ + RemoveGroupFromCustomerRequest: RemoveGroupFromCustomerRequest, + /** + * The RemoveGroupFromCustomerResponse model constructor. + * @property {module:model/RemoveGroupFromCustomerResponse} + */ + RemoveGroupFromCustomerResponse: RemoveGroupFromCustomerResponse, /** * The RenewTokenRequest model constructor. * @property {module:model/RenewTokenRequest} @@ -2169,6 +2451,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/RetrieveCatalogObjectResponse} */ RetrieveCatalogObjectResponse: RetrieveCatalogObjectResponse, + /** + * The RetrieveCustomerGroupRequest model constructor. + * @property {module:model/RetrieveCustomerGroupRequest} + */ + RetrieveCustomerGroupRequest: RetrieveCustomerGroupRequest, + /** + * The RetrieveCustomerGroupResponse model constructor. + * @property {module:model/RetrieveCustomerGroupResponse} + */ + RetrieveCustomerGroupResponse: RetrieveCustomerGroupResponse, /** * The RetrieveCustomerRequest model constructor. * @property {module:model/RetrieveCustomerRequest} @@ -2179,6 +2471,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/RetrieveCustomerResponse} */ RetrieveCustomerResponse: RetrieveCustomerResponse, + /** + * The RetrieveCustomerSegmentRequest model constructor. + * @property {module:model/RetrieveCustomerSegmentRequest} + */ + RetrieveCustomerSegmentRequest: RetrieveCustomerSegmentRequest, + /** + * The RetrieveCustomerSegmentResponse model constructor. + * @property {module:model/RetrieveCustomerSegmentResponse} + */ + RetrieveCustomerSegmentResponse: RetrieveCustomerSegmentResponse, /** * The RetrieveDisputeEvidenceRequest model constructor. * @property {module:model/RetrieveDisputeEvidenceRequest} @@ -2374,6 +2676,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/SearchShiftsResponse} */ SearchShiftsResponse: SearchShiftsResponse, + /** + * The SearchTerminalCheckoutsRequest model constructor. + * @property {module:model/SearchTerminalCheckoutsRequest} + */ + SearchTerminalCheckoutsRequest: SearchTerminalCheckoutsRequest, + /** + * The SearchTerminalCheckoutsResponse model constructor. + * @property {module:model/SearchTerminalCheckoutsResponse} + */ + SearchTerminalCheckoutsResponse: SearchTerminalCheckoutsResponse, /** * The Shift model constructor. * @property {module:model/Shift} @@ -2494,11 +2806,41 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/TenderType} */ TenderType: TenderType, + /** + * The TerminalCheckout model constructor. + * @property {module:model/TerminalCheckout} + */ + TerminalCheckout: TerminalCheckout, + /** + * The TerminalCheckoutCancelReason model constructor. + * @property {module:model/TerminalCheckoutCancelReason} + */ + TerminalCheckoutCancelReason: TerminalCheckoutCancelReason, + /** + * The TerminalCheckoutQuery model constructor. + * @property {module:model/TerminalCheckoutQuery} + */ + TerminalCheckoutQuery: TerminalCheckoutQuery, + /** + * The TerminalCheckoutQueryFilter model constructor. + * @property {module:model/TerminalCheckoutQueryFilter} + */ + TerminalCheckoutQueryFilter: TerminalCheckoutQueryFilter, + /** + * The TerminalCheckoutQuerySort model constructor. + * @property {module:model/TerminalCheckoutQuerySort} + */ + TerminalCheckoutQuerySort: TerminalCheckoutQuerySort, /** * The TimeRange model constructor. * @property {module:model/TimeRange} */ TimeRange: TimeRange, + /** + * The TipSettings model constructor. + * @property {module:model/TipSettings} + */ + TipSettings: TipSettings, /** * The Transaction model constructor. * @property {module:model/Transaction} @@ -2524,6 +2866,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/UpdateBreakTypeResponse} */ UpdateBreakTypeResponse: UpdateBreakTypeResponse, + /** + * The UpdateCustomerGroupRequest model constructor. + * @property {module:model/UpdateCustomerGroupRequest} + */ + UpdateCustomerGroupRequest: UpdateCustomerGroupRequest, + /** + * The UpdateCustomerGroupResponse model constructor. + * @property {module:model/UpdateCustomerGroupResponse} + */ + UpdateCustomerGroupResponse: UpdateCustomerGroupResponse, /** * The UpdateCustomerRequest model constructor. * @property {module:model/UpdateCustomerRequest} @@ -3449,11 +3801,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:api/CheckoutApi} */ CheckoutApi: CheckoutApi, + /** + * The CustomerGroupsApi service constructor. + * @property {module:api/CustomerGroupsApi} + */ + CustomerGroupsApi: CustomerGroupsApi, + /** + * The CustomerSegmentsApi service constructor. + * @property {module:api/CustomerSegmentsApi} + */ + CustomerSegmentsApi: CustomerSegmentsApi, /** * The CustomersApi service constructor. * @property {module:api/CustomersApi} */ CustomersApi: CustomersApi, + /** + * The DevicesApi service constructor. + * @property {module:api/DevicesApi} + */ + DevicesApi: DevicesApi, /** * The DisputesApi service constructor. * @property {module:api/DisputesApi} @@ -3514,6 +3881,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:api/ReportingApi} */ ReportingApi: ReportingApi, + /** + * The TerminalApi service constructor. + * @property {module:api/TerminalApi} + */ + TerminalApi: TerminalApi, /** * The TransactionsApi service constructor. * @property {module:api/TransactionsApi} diff --git a/src/model/AddGroupToCustomerRequest.js b/src/model/AddGroupToCustomerRequest.js new file mode 100644 index 0000000..3e5c074 --- /dev/null +++ b/src/model/AddGroupToCustomerRequest.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 AddGroupToCustomerRequest model module. + * Note: This model is in beta. + * @module model/AddGroupToCustomerRequest + */ + +/** + * Constructs a new AddGroupToCustomerRequest. + * Defines the fields that are included in the request body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. + * @alias module:model/AddGroupToCustomerRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a AddGroupToCustomerRequest 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/AddGroupToCustomerRequest} obj Optional instance to populate. + * @return {module:model/AddGroupToCustomerRequest} The populated AddGroupToCustomerRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/AddGroupToCustomerResponse.js b/src/model/AddGroupToCustomerResponse.js new file mode 100644 index 0000000..99c4b7d --- /dev/null +++ b/src/model/AddGroupToCustomerResponse.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var Error = require('./Error'); + + + + +/** + * The AddGroupToCustomerResponse model module. + * Note: This model is in beta. + * @module model/AddGroupToCustomerResponse + */ + +/** + * Constructs a new AddGroupToCustomerResponse. + * Defines the fields that are included in the response body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. + * @alias module:model/AddGroupToCustomerResponse + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a AddGroupToCustomerResponse 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/AddGroupToCustomerResponse} obj Optional instance to populate. + * @return {module:model/AddGroupToCustomerResponse} The populated AddGroupToCustomerResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CancelTerminalCheckoutRequest.js b/src/model/CancelTerminalCheckoutRequest.js new file mode 100644 index 0000000..851a530 --- /dev/null +++ b/src/model/CancelTerminalCheckoutRequest.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 CancelTerminalCheckoutRequest model module. + * Note: This model is in beta. + * @module model/CancelTerminalCheckoutRequest + */ + +/** + * Constructs a new CancelTerminalCheckoutRequest. + * + * @alias module:model/CancelTerminalCheckoutRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a CancelTerminalCheckoutRequest 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/CancelTerminalCheckoutRequest} obj Optional instance to populate. + * @return {module:model/CancelTerminalCheckoutRequest} The populated CancelTerminalCheckoutRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/CancelTerminalCheckoutResponse.js b/src/model/CancelTerminalCheckoutResponse.js new file mode 100644 index 0000000..bccedeb --- /dev/null +++ b/src/model/CancelTerminalCheckoutResponse.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 TerminalCheckout = require('./TerminalCheckout'); + + + + +/** + * The CancelTerminalCheckoutResponse model module. + * Note: This model is in beta. + * @module model/CancelTerminalCheckoutResponse + */ + +/** + * Constructs a new CancelTerminalCheckoutResponse. + * + * @alias module:model/CancelTerminalCheckoutResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CancelTerminalCheckoutResponse 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/CancelTerminalCheckoutResponse} obj Optional instance to populate. + * @return {module:model/CancelTerminalCheckoutResponse} The populated CancelTerminalCheckoutResponse 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('checkout')) { + obj['checkout'] = TerminalCheckout.constructFromObject(data['checkout']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The updated `TerminalCheckout` + * @member {module:model/TerminalCheckout} checkout + */ +exports.prototype['checkout'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogCustomAttributeDefinition.js b/src/model/CatalogCustomAttributeDefinition.js index 466e5e5..8fe4b1d 100644 --- a/src/model/CatalogCustomAttributeDefinition.js +++ b/src/model/CatalogCustomAttributeDefinition.js @@ -118,7 +118,7 @@ exports.prototype['description'] = undefined; */ exports.prototype['source_application'] = undefined; /** - * The set of Catalog Object Types that this Custom Attribute may be applied to. Currently, only `ITEM` and `ITEM_VARIATION` are allowed. See [CatalogObjectType](#type-catalogobjecttype) for possible values + * 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 * @member {Array.} allowed_object_types */ exports.prototype['allowed_object_types'] = undefined; @@ -148,7 +148,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. + * 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/CatalogCustomAttributeValue.js b/src/model/CatalogCustomAttributeValue.js index edfdb46..f451f00 100644 --- a/src/model/CatalogCustomAttributeValue.js +++ b/src/model/CatalogCustomAttributeValue.js @@ -91,12 +91,12 @@ exports.prototype['name'] = undefined; */ exports.prototype['string_value'] = undefined; /** - * __Read-only.__ The custom attribute definition this value belongs to. + * __Read-only.__ The id of the `CatalogCustomAttributeDefinition` this value belongs to. * @member {String} custom_attribute_definition_id */ exports.prototype['custom_attribute_definition_id'] = undefined; /** - * __Read-only.__ A copy of type from the associated custom attribute definition. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values + * __Read-only.__ A copy of type from the associated `CatalogCustomAttributeDefinition`. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values * @member {String} type */ exports.prototype['type'] = undefined; @@ -116,7 +116,7 @@ exports.prototype['boolean_value'] = undefined; */ exports.prototype['selection_uid_values'] = undefined; /** - * __Read-only.__ A copy of key from the associated custom attribute definition. + * __Read-only.__ A copy of key from the associated `CatalogCustomAttributeDefinition`. * @member {String} key */ exports.prototype['key'] = undefined; diff --git a/src/model/CatalogObject.js b/src/model/CatalogObject.js index 33f4762..78bae69 100644 --- a/src/model/CatalogObject.js +++ b/src/model/CatalogObject.js @@ -26,6 +26,7 @@ var CatalogModifier = require('./CatalogModifier'); var CatalogModifierList = require('./CatalogModifierList'); var CatalogPricingRule = require('./CatalogPricingRule'); var CatalogProductSet = require('./CatalogProductSet'); +var CatalogQuickAmountsSettings = require('./CatalogQuickAmountsSettings'); var CatalogTax = require('./CatalogTax'); var CatalogTimePeriod = require('./CatalogTimePeriod'); var CatalogV1Id = require('./CatalogV1Id'); @@ -40,7 +41,7 @@ var CatalogV1Id = require('./CatalogV1Id'); /** * Constructs a new CatalogObject. - * The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid `CatalogItem` object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid `CatalogItemVariation` object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid `CatalogModifier` object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid `CatalogModifierList` object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid `CatalogCategory` object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid `CatalogDiscount` object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid `CatalogTax` object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid `CatalogImage` 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 object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid `CatalogItem` object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid `CatalogItemVariation` object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid `CatalogModifier` object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid `CatalogModifierList` object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid `CatalogCategory` object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid `CatalogDiscount` object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid `CatalogTax` object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid `CatalogImage` object. - if type = `QUICK_AMOUNTS_SETTINGS`, only `quick_amounts_settings_data` will be populated and will contain a valid `CatalogQuickAmountsSettings` 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 @@ -73,6 +74,7 @@ var exports = function(type, id) { + }; @@ -165,6 +167,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('custom_attribute_definition_data')) { obj['custom_attribute_definition_data'] = CatalogCustomAttributeDefinition.constructFromObject(data['custom_attribute_definition_data']); + } + if (data.hasOwnProperty('quick_amounts_settings_data')) { + obj['quick_amounts_settings_data'] = CatalogQuickAmountsSettings.constructFromObject(data['quick_amounts_settings_data']); } } return obj; @@ -196,7 +201,7 @@ exports.prototype['version'] = undefined; */ exports.prototype['is_deleted'] = undefined; /** - * Application-defined key/value attributes that are set at a global (location-independent) level. Values from the `*_data` fields may not be duplicated. Custom Attribute fields 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.). For CustomAttributesDefinitions defined by the app making the request, the map key is the key defined in CustomAttributeDefinition (eg. “reference_id”). For CustomAttributesDefinitions by other apps, the map key is the key defined in CustomAttributeDefinition prefixed with the application ID and a colon (eg. “abcd1234:reference_id”). + * Application-defined key/value 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.). For CustomAttributesDefinitions defined by the app making the request, the map key is the key defined in the `CatalogCustomAttributeDefinition` (e.g. “reference_id”). For custom attributes created by other apps, the map key is the key defined in `CatalogCustomAttributeDefinition` prefixed with the application ID and a colon (eg. “abcd1234:reference_id”). * @member {Object.} custom_attribute_values */ exports.prototype['custom_attribute_values'] = undefined; @@ -300,6 +305,11 @@ exports.prototype['item_option_value_data'] = undefined; * @member {module:model/CatalogCustomAttributeDefinition} custom_attribute_definition_data */ exports.prototype['custom_attribute_definition_data'] = undefined; +/** + * Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`. + * @member {module:model/CatalogQuickAmountsSettings} quick_amounts_settings_data + */ +exports.prototype['quick_amounts_settings_data'] = undefined; diff --git a/src/model/CatalogObjectType.js b/src/model/CatalogObjectType.js index f2bee04..7e6dc30 100644 --- a/src/model/CatalogObjectType.js +++ b/src/model/CatalogObjectType.js @@ -89,7 +89,12 @@ var exports = { * value: "ITEM_OPTION_VAL" * @const */ - "ITEM_OPTION_VAL": "ITEM_OPTION_VAL"}; + "ITEM_OPTION_VAL": "ITEM_OPTION_VAL", + /** + * value: "QUICK_AMOUNTS_SETTINGS" + * @const + */ + "QUICK_AMOUNTS_SETTINGS": "QUICK_AMOUNTS_SETTINGS"}; /** * Returns a CatalogObjectType enum value from a Javascript object name. diff --git a/src/model/CatalogQuickAmount.js b/src/model/CatalogQuickAmount.js new file mode 100644 index 0000000..6d9d4d5 --- /dev/null +++ b/src/model/CatalogQuickAmount.js @@ -0,0 +1,96 @@ +/** + * 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 CatalogQuickAmount model module. + * Note: This model is in beta. + * @module model/CatalogQuickAmount + */ + +/** + * Constructs a new CatalogQuickAmount. + * Represents a Quick Amount in the Catalog. + * @alias module:model/CatalogQuickAmount + * @class + * @param type {String} Represents the type of the Quick Amount. See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values + * @param amount {module:model/Money} Represents the actual amount of the Quick Amount with Money type. + */ +var exports = function(type, amount) { + var _this = this; + + _this['type'] = type; + _this['amount'] = amount; + + +}; + +/** + * Constructs a CatalogQuickAmount 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/CatalogQuickAmount} obj Optional instance to populate. + * @return {module:model/CatalogQuickAmount} The populated CatalogQuickAmount instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('type')) { + obj['type'] = ApiClient.convertToType(data['type'], 'String'); + } + if (data.hasOwnProperty('amount')) { + obj['amount'] = Money.constructFromObject(data['amount']); + } + if (data.hasOwnProperty('score')) { + obj['score'] = ApiClient.convertToType(data['score'], 'Number'); + } + if (data.hasOwnProperty('ordinal')) { + obj['ordinal'] = ApiClient.convertToType(data['ordinal'], 'Number'); + } + } + return obj; +} + +/** + * Represents the type of the Quick Amount. See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values + * @member {String} type + */ +exports.prototype['type'] = undefined; +/** + * Represents the actual amount of the Quick Amount with Money type. + * @member {module:model/Money} amount + */ +exports.prototype['amount'] = undefined; +/** + * Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100]. MANUAL type amount will always have score = 100. + * @member {Number} score + */ +exports.prototype['score'] = undefined; +/** + * The order in which this Quick Amount should be displayed. + * @member {Number} ordinal + */ +exports.prototype['ordinal'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogQuickAmountType.js b/src/model/CatalogQuickAmountType.js new file mode 100644 index 0000000..1e4583b --- /dev/null +++ b/src/model/CatalogQuickAmountType.js @@ -0,0 +1,45 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class CatalogQuickAmountType. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "QUICK_AMOUNT_TYPE_MANUAL" + * @const + */ + "MANUAL": "QUICK_AMOUNT_TYPE_MANUAL", + /** + * value: "QUICK_AMOUNT_TYPE_AUTO" + * @const + */ + "AUTO": "QUICK_AMOUNT_TYPE_AUTO"}; + +/** + * Returns a CatalogQuickAmountType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/CatalogQuickAmountType} The enum CatalogQuickAmountType value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/CatalogQuickAmountsSettings.js b/src/model/CatalogQuickAmountsSettings.js new file mode 100644 index 0000000..4aed162 --- /dev/null +++ b/src/model/CatalogQuickAmountsSettings.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 CatalogQuickAmount = require('./CatalogQuickAmount'); + + + + +/** + * The CatalogQuickAmountsSettings model module. + * Note: This model is in beta. + * @module model/CatalogQuickAmountsSettings + */ + +/** + * Constructs a new CatalogQuickAmountsSettings. + * A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts. + * @alias module:model/CatalogQuickAmountsSettings + * @class + * @param option {String} Represents the option seller currently uses on Quick Amounts. See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values + */ +var exports = function(option) { + var _this = this; + + _this['option'] = option; + + +}; + +/** + * Constructs a CatalogQuickAmountsSettings 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/CatalogQuickAmountsSettings} obj Optional instance to populate. + * @return {module:model/CatalogQuickAmountsSettings} The populated CatalogQuickAmountsSettings instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('option')) { + obj['option'] = ApiClient.convertToType(data['option'], 'String'); + } + if (data.hasOwnProperty('eligible_for_auto_amounts')) { + obj['eligible_for_auto_amounts'] = ApiClient.convertToType(data['eligible_for_auto_amounts'], 'Boolean'); + } + if (data.hasOwnProperty('amounts')) { + obj['amounts'] = ApiClient.convertToType(data['amounts'], [CatalogQuickAmount]); + } + } + return obj; +} + +/** + * Represents the option seller currently uses on Quick Amounts. See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values + * @member {String} option + */ +exports.prototype['option'] = undefined; +/** + * Represents location's eligibility for auto amounts The boolean should be consistent with whether there are AUTO amounts in the `amounts`. + * @member {Boolean} eligible_for_auto_amounts + */ +exports.prototype['eligible_for_auto_amounts'] = undefined; +/** + * Represents a set of Quick Amounts at this location. + * @member {Array.} amounts + */ +exports.prototype['amounts'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CatalogQuickAmountsSettingsOption.js b/src/model/CatalogQuickAmountsSettingsOption.js new file mode 100644 index 0000000..3c161d9 --- /dev/null +++ b/src/model/CatalogQuickAmountsSettingsOption.js @@ -0,0 +1,50 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class CatalogQuickAmountsSettingsOption. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "DISABLED" + * @const + */ + "DISABLED": "DISABLED", + /** + * value: "MANUAL" + * @const + */ + "MANUAL": "MANUAL", + /** + * value: "AUTO" + * @const + */ + "AUTO": "AUTO"}; + +/** + * Returns a CatalogQuickAmountsSettingsOption enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/CatalogQuickAmountsSettingsOption} The enum CatalogQuickAmountsSettingsOption value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/CreateCustomerGroupRequest.js b/src/model/CreateCustomerGroupRequest.js new file mode 100644 index 0000000..094bb29 --- /dev/null +++ b/src/model/CreateCustomerGroupRequest.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 CustomerGroup = require('./CustomerGroup'); + + + + +/** + * The CreateCustomerGroupRequest model module. + * Note: This model is in beta. + * @module model/CreateCustomerGroupRequest + */ + +/** + * Constructs a new CreateCustomerGroupRequest. + * Defines the body parameters that can be provided in a request to the [CreateCustomerGroup](#endpoint-createcustomegroup) endpoint. + * @alias module:model/CreateCustomerGroupRequest + * @class + * @param group {module:model/CustomerGroup} The customer group to create. + */ +var exports = function(group) { + var _this = this; + + + _this['group'] = group; +}; + +/** + * Constructs a CreateCustomerGroupRequest 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/CreateCustomerGroupRequest} obj Optional instance to populate. + * @return {module:model/CreateCustomerGroupRequest} The populated CreateCustomerGroupRequest 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('group')) { + obj['group'] = CustomerGroup.constructFromObject(data['group']); + } + } + return obj; +} + +/** + * The idempotency key for the request. See the [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) guide for more information. + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; +/** + * The customer group to create. + * @member {module:model/CustomerGroup} group + */ +exports.prototype['group'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateCustomerGroupResponse.js b/src/model/CreateCustomerGroupResponse.js new file mode 100644 index 0000000..80cefd7 --- /dev/null +++ b/src/model/CreateCustomerGroupResponse.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 CustomerGroup = require('./CustomerGroup'); +var Error = require('./Error'); + + + + +/** + * The CreateCustomerGroupResponse model module. + * Note: This model is in beta. + * @module model/CreateCustomerGroupResponse + */ + +/** + * Constructs a new CreateCustomerGroupResponse. + * Defines the fields that are included in the response body of a request to the [CreateCustomerGroup](#endpoint-createcustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + * @alias module:model/CreateCustomerGroupResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CreateCustomerGroupResponse 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/CreateCustomerGroupResponse} obj Optional instance to populate. + * @return {module:model/CreateCustomerGroupResponse} The populated CreateCustomerGroupResponse 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('group')) { + obj['group'] = CustomerGroup.constructFromObject(data['group']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The successfully created customer group. + * @member {module:model/CustomerGroup} group + */ +exports.prototype['group'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateDeviceCodeRequest.js b/src/model/CreateDeviceCodeRequest.js new file mode 100644 index 0000000..46cc6c7 --- /dev/null +++ b/src/model/CreateDeviceCodeRequest.js @@ -0,0 +1,78 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var DeviceCode = require('./DeviceCode'); + + + + +/** + * The CreateDeviceCodeRequest model module. + * Note: This model is in beta. + * @module model/CreateDeviceCodeRequest + */ + +/** + * Constructs a new CreateDeviceCodeRequest. + * + * @alias module:model/CreateDeviceCodeRequest + * @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 deviceCode {module:model/DeviceCode} The device code to create. + */ +var exports = function(idempotencyKey, deviceCode) { + var _this = this; + + _this['idempotency_key'] = idempotencyKey; + _this['device_code'] = deviceCode; +}; + +/** + * Constructs a CreateDeviceCodeRequest 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/CreateDeviceCodeRequest} obj Optional instance to populate. + * @return {module:model/CreateDeviceCodeRequest} The populated CreateDeviceCodeRequest 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('device_code')) { + obj['device_code'] = DeviceCode.constructFromObject(data['device_code']); + } + } + return 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. + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; +/** + * The device code to create. + * @member {module:model/DeviceCode} device_code + */ +exports.prototype['device_code'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateDeviceCodeResponse.js b/src/model/CreateDeviceCodeResponse.js new file mode 100644 index 0000000..32b5d2f --- /dev/null +++ b/src/model/CreateDeviceCodeResponse.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 DeviceCode = require('./DeviceCode'); +var Error = require('./Error'); + + + + +/** + * The CreateDeviceCodeResponse model module. + * Note: This model is in beta. + * @module model/CreateDeviceCodeResponse + */ + +/** + * Constructs a new CreateDeviceCodeResponse. + * + * @alias module:model/CreateDeviceCodeResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CreateDeviceCodeResponse 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/CreateDeviceCodeResponse} obj Optional instance to populate. + * @return {module:model/CreateDeviceCodeResponse} The populated CreateDeviceCodeResponse 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('device_code')) { + obj['device_code'] = DeviceCode.constructFromObject(data['device_code']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The created DeviceCode object containing the device code string. + * @member {module:model/DeviceCode} device_code + */ +exports.prototype['device_code'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateTerminalCheckoutRequest.js b/src/model/CreateTerminalCheckoutRequest.js new file mode 100644 index 0000000..fd069e2 --- /dev/null +++ b/src/model/CreateTerminalCheckoutRequest.js @@ -0,0 +1,78 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var TerminalCheckout = require('./TerminalCheckout'); + + + + +/** + * The CreateTerminalCheckoutRequest model module. + * Note: This model is in beta. + * @module model/CreateTerminalCheckoutRequest + */ + +/** + * Constructs a new CreateTerminalCheckoutRequest. + * + * @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 checkout {module:model/TerminalCheckout} The checkout to create. + */ +var exports = function(idempotencyKey, checkout) { + var _this = this; + + _this['idempotency_key'] = idempotencyKey; + _this['checkout'] = checkout; +}; + +/** + * Constructs a CreateTerminalCheckoutRequest 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/CreateTerminalCheckoutRequest} obj Optional instance to populate. + * @return {module:model/CreateTerminalCheckoutRequest} The populated CreateTerminalCheckoutRequest 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('checkout')) { + obj['checkout'] = TerminalCheckout.constructFromObject(data['checkout']); + } + } + return 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. + * @member {String} idempotency_key + */ +exports.prototype['idempotency_key'] = undefined; +/** + * The checkout to create. + * @member {module:model/TerminalCheckout} checkout + */ +exports.prototype['checkout'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CreateTerminalCheckoutResponse.js b/src/model/CreateTerminalCheckoutResponse.js new file mode 100644 index 0000000..9abf3fd --- /dev/null +++ b/src/model/CreateTerminalCheckoutResponse.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 TerminalCheckout = require('./TerminalCheckout'); + + + + +/** + * The CreateTerminalCheckoutResponse model module. + * Note: This model is in beta. + * @module model/CreateTerminalCheckoutResponse + */ + +/** + * Constructs a new CreateTerminalCheckoutResponse. + * + * @alias module:model/CreateTerminalCheckoutResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a CreateTerminalCheckoutResponse 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/CreateTerminalCheckoutResponse} obj Optional instance to populate. + * @return {module:model/CreateTerminalCheckoutResponse} The populated CreateTerminalCheckoutResponse 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('checkout')) { + obj['checkout'] = TerminalCheckout.constructFromObject(data['checkout']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The created `TerminalCheckout` + * @member {module:model/TerminalCheckout} checkout + */ +exports.prototype['checkout'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/Customer.js b/src/model/Customer.js index 65543ce..f596a59 100644 --- a/src/model/Customer.js +++ b/src/model/Customer.js @@ -30,9 +30,9 @@ var CustomerPreferences = require('./CustomerPreferences'); * Represents a Square customer profile, which can have one or more cards on file associated with it. * @alias module:model/Customer * @class - * @param id {String} A unique, Square-assigned object ID. - * @param createdAt {String} The time when the customer profile was created, in RFC 3339 format. - * @param updatedAt {String} The time when the customer profile was last updated, in RFC 3339 format. + * @param id {String} A unique Square-assigned ID for the customer profile. + * @param createdAt {String} The timestamp when the customer profile was created, in RFC 3339 format. + * @param updatedAt {String} The timestamp when the customer profile was last updated, in RFC 3339 format. */ var exports = function(id, createdAt, updatedAt) { var _this = this; @@ -54,6 +54,8 @@ var exports = function(id, createdAt, updatedAt) { + + }; /** @@ -117,23 +119,29 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('creation_source')) { obj['creation_source'] = ApiClient.convertToType(data['creation_source'], 'String'); + } + if (data.hasOwnProperty('group_ids')) { + obj['group_ids'] = ApiClient.convertToType(data['group_ids'], ['String']); + } + if (data.hasOwnProperty('segment_ids')) { + obj['segment_ids'] = ApiClient.convertToType(data['segment_ids'], ['String']); } } return obj; } /** - * A unique, Square-assigned object ID. + * A unique Square-assigned ID for the customer profile. * @member {String} id */ exports.prototype['id'] = undefined; /** - * The time when the customer profile was created, in RFC 3339 format. + * The timestamp when the customer profile was created, in RFC 3339 format. * @member {String} created_at */ exports.prototype['created_at'] = undefined; /** - * The time when the customer profile was last updated, in RFC 3339 format. + * The timestamp when the customer profile was last updated, in RFC 3339 format. * @member {String} updated_at */ exports.prototype['updated_at'] = undefined; @@ -198,7 +206,7 @@ exports.prototype['note'] = undefined; */ exports.prototype['preferences'] = undefined; /** - * The groups the customer belongs to. + * The customer groups and segments the customer belongs to. This deprecated field is replaced with dedicated `group_ids` for customer groups and `segment_ids` for customer segments. * @member {Array.} groups */ exports.prototype['groups'] = undefined; @@ -207,6 +215,16 @@ exports.prototype['groups'] = undefined; * @member {String} creation_source */ exports.prototype['creation_source'] = undefined; +/** + * The IDs of customer groups the customer belongs to. + * @member {Array.} group_ids + */ +exports.prototype['group_ids'] = undefined; +/** + * The IDs of segments the customer belongs to. + * @member {Array.} segment_ids + */ +exports.prototype['segment_ids'] = undefined; diff --git a/src/model/CustomerFilter.js b/src/model/CustomerFilter.js index 64d8156..98f636e 100644 --- a/src/model/CustomerFilter.js +++ b/src/model/CustomerFilter.js @@ -13,6 +13,7 @@ */ var ApiClient = require('../ApiClient'); var CustomerCreationSourceFilter = require('./CustomerCreationSourceFilter'); +var FilterValue = require('./FilterValue'); var TimeRange = require('./TimeRange'); @@ -25,7 +26,7 @@ var TimeRange = require('./TimeRange'); /** * Constructs a new CustomerFilter. - * Represents a set of `CustomerQuery` filters used to limit the set of `Customers` returned by SearchCustomers. + * Represents a set of `CustomerQuery` filters used to limit the set of `Customers` returned by `SearchCustomers`. * @alias module:model/CustomerFilter * @class */ @@ -35,6 +36,7 @@ var exports = function() { + }; /** @@ -56,6 +58,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('updated_at')) { obj['updated_at'] = TimeRange.constructFromObject(data['updated_at']); + } + if (data.hasOwnProperty('group_ids')) { + obj['group_ids'] = FilterValue.constructFromObject(data['group_ids']); } } return obj; @@ -76,6 +81,11 @@ exports.prototype['created_at'] = undefined; * @member {module:model/TimeRange} updated_at */ exports.prototype['updated_at'] = undefined; +/** + * A filter to select customers based on their group membership. The `group_ids` is a JSON object of the following general format: ``` \"group_ids\": { \"any\": [\"{group_a_id}\", \"{group_b_id}\", ...], \"all\": [\"{group_1_id}\", \"{group_2_id}\", ...], 'none\": [\"{group_i_id}\", \"{group_ii_id}\", ...] } ``` You can use any combination of the above `group_ids` fields (also known as `FilterValue` properties) to specify how customers are selected based on their group membership. With the `any` option, the search returns customers in Groups `A` or `B` or ... of the list. With the `all` option, the search returns customers in Groups `1` and `2` and ... of the list With the `none` option, the search returns customers not in Groups `i` and not in `ii` and not in ... of the list. If any of the search conditions is not met, including when an invalid or non-existent group ID is provided, the result is an empty list. You can use the `group_ids` search filter with other available filters. You cannot use the `group_ids` filter to select customers based on segment membership. + * @member {module:model/FilterValue} group_ids + */ +exports.prototype['group_ids'] = undefined; diff --git a/src/model/CustomerGroup.js b/src/model/CustomerGroup.js new file mode 100644 index 0000000..0aa980f --- /dev/null +++ b/src/model/CustomerGroup.js @@ -0,0 +1,94 @@ +/** + * 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 CustomerGroup model module. + * Note: This model is in beta. + * @module model/CustomerGroup + */ + +/** + * Constructs a new CustomerGroup. + * Represents a group of customer profiles. Customer groups can be created, modified, and have their membership defined either via the Customers API or within Customer Directory in the Square Dashboard or Point of Sale. + * @alias module:model/CustomerGroup + * @class + * @param name {String} Name of the customer group. + */ +var exports = function(name) { + var _this = this; + + + _this['name'] = name; + + +}; + +/** + * Constructs a CustomerGroup 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/CustomerGroup} obj Optional instance to populate. + * @return {module:model/CustomerGroup} The populated CustomerGroup 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('name')) { + obj['name'] = ApiClient.convertToType(data['name'], '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; +} + +/** + * Unique Square-generated ID for the customer group. + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * Name of the customer group. + * @member {String} name + */ +exports.prototype['name'] = undefined; +/** + * The timestamp when the customer group was created, in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * The timesamp when the customer group was last updated, in RFC 3339 format. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/CustomerGroupInfo.js b/src/model/CustomerGroupInfo.js index da337bc..ec21990 100644 --- a/src/model/CustomerGroupInfo.js +++ b/src/model/CustomerGroupInfo.js @@ -23,11 +23,11 @@ var ApiClient = require('../ApiClient'); /** * Constructs a new CustomerGroupInfo. - * Contains some brief information about a customer group with its identifier included. + * Contains some brief information about a Customer Group with its identifier included. * @alias module:model/CustomerGroupInfo * @class - * @param id {String} The ID of the customer group. - * @param name {String} The name of the customer group. + * @param id {String} The ID of the Customer Group. + * @param name {String} The name of the Customer Group. */ var exports = function(id, name) { var _this = this; @@ -58,12 +58,12 @@ exports.constructFromObject = function(data, obj) { } /** - * The ID of the customer group. + * The ID of the Customer Group. * @member {String} id */ exports.prototype['id'] = undefined; /** - * The name of the customer group. + * The name of the Customer Group. * @member {String} name */ exports.prototype['name'] = undefined; diff --git a/src/model/CustomerSegment.js b/src/model/CustomerSegment.js new file mode 100644 index 0000000..5f51038 --- /dev/null +++ b/src/model/CustomerSegment.js @@ -0,0 +1,94 @@ +/** + * 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 CustomerSegment model module. + * Note: This model is in beta. + * @module model/CustomerSegment + */ + +/** + * Constructs a new CustomerSegment. + * Represents a group of customer profiles that match one or more predefined filter criteria. Segments (also known as Smart Groups) are defined and created within Customer Directory in the Square Dashboard or Point of Sale. + * @alias module:model/CustomerSegment + * @class + * @param name {String} Name of the segment. + */ +var exports = function(name) { + var _this = this; + + + _this['name'] = name; + + +}; + +/** + * Constructs a CustomerSegment 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/CustomerSegment} obj Optional instance to populate. + * @return {module:model/CustomerSegment} The populated CustomerSegment 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('name')) { + obj['name'] = ApiClient.convertToType(data['name'], '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; +} + +/** + * Unique Square-generated ID for the segment. + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * Name of the segment. + * @member {String} name + */ +exports.prototype['name'] = undefined; +/** + * The timestamp when the segment was created, in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * The timestamp when the segment was last updated, in RFC 3339 format. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeleteCustomerGroupRequest.js b/src/model/DeleteCustomerGroupRequest.js new file mode 100644 index 0000000..a9fec37 --- /dev/null +++ b/src/model/DeleteCustomerGroupRequest.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 DeleteCustomerGroupRequest model module. + * Note: This model is in beta. + * @module model/DeleteCustomerGroupRequest + */ + +/** + * Constructs a new DeleteCustomerGroupRequest. + * Defines the fields that can be provided in a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. + * @alias module:model/DeleteCustomerGroupRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a DeleteCustomerGroupRequest 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/DeleteCustomerGroupRequest} obj Optional instance to populate. + * @return {module:model/DeleteCustomerGroupRequest} The populated DeleteCustomerGroupRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/DeleteCustomerGroupResponse.js b/src/model/DeleteCustomerGroupResponse.js new file mode 100644 index 0000000..93fd642 --- /dev/null +++ b/src/model/DeleteCustomerGroupResponse.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var Error = require('./Error'); + + + + +/** + * The DeleteCustomerGroupResponse model module. + * Note: This model is in beta. + * @module model/DeleteCustomerGroupResponse + */ + +/** + * Constructs a new DeleteCustomerGroupResponse. + * Defines the fields that are included in the response body of a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. + * @alias module:model/DeleteCustomerGroupResponse + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a DeleteCustomerGroupResponse 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/DeleteCustomerGroupResponse} obj Optional instance to populate. + * @return {module:model/DeleteCustomerGroupResponse} The populated DeleteCustomerGroupResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeviceCheckoutOptions.js b/src/model/DeviceCheckoutOptions.js new file mode 100644 index 0000000..8830733 --- /dev/null +++ b/src/model/DeviceCheckoutOptions.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 TipSettings = require('./TipSettings'); + + + + +/** + * The DeviceCheckoutOptions model module. + * Note: This model is in beta. + * @module model/DeviceCheckoutOptions + */ + +/** + * Constructs a new DeviceCheckoutOptions. + * + * @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. + */ +var exports = function(deviceId) { + var _this = this; + + _this['device_id'] = deviceId; + + +}; + +/** + * Constructs a DeviceCheckoutOptions 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/DeviceCheckoutOptions} obj Optional instance to populate. + * @return {module:model/DeviceCheckoutOptions} The populated DeviceCheckoutOptions 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('skip_receipt_screen')) { + obj['skip_receipt_screen'] = ApiClient.convertToType(data['skip_receipt_screen'], 'Boolean'); + } + if (data.hasOwnProperty('tip_settings')) { + obj['tip_settings'] = TipSettings.constructFromObject(data['tip_settings']); + } + } + return obj; +} + +/** + * The unique Id of the device intended for this `TerminalCheckout`. The Id can be retrieved from /v2/devices api. + * @member {String} device_id + */ +exports.prototype['device_id'] = undefined; +/** + * Instruct the device to skip the receipt screen. Defaults to false. + * @member {Boolean} skip_receipt_screen + */ +exports.prototype['skip_receipt_screen'] = undefined; +/** + * Tip specific settings + * @member {module:model/TipSettings} tip_settings + */ +exports.prototype['tip_settings'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeviceCode.js b/src/model/DeviceCode.js new file mode 100644 index 0000000..969054e --- /dev/null +++ b/src/model/DeviceCode.js @@ -0,0 +1,157 @@ +/** + * 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 DeviceCode model module. + * Note: This model is in beta. + * @module model/DeviceCode + */ + +/** + * Constructs a new DeviceCode. + * + * @alias module:model/DeviceCode + * @class + * @param productType {String} The targeting product type of the device code. See [ProductType](#type-producttype) for possible values + */ +var exports = function(productType) { + var _this = this; + + + + + + _this['product_type'] = productType; + + + + + + +}; + +/** + * Constructs a DeviceCode 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/DeviceCode} obj Optional instance to populate. + * @return {module:model/DeviceCode} The populated DeviceCode 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('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('code')) { + obj['code'] = ApiClient.convertToType(data['code'], 'String'); + } + if (data.hasOwnProperty('device_id')) { + obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); + } + if (data.hasOwnProperty('product_type')) { + obj['product_type'] = ApiClient.convertToType(data['product_type'], 'String'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('pair_by')) { + obj['pair_by'] = ApiClient.convertToType(data['pair_by'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String'); + } + if (data.hasOwnProperty('status_changed_at')) { + obj['status_changed_at'] = ApiClient.convertToType(data['status_changed_at'], 'String'); + } + if (data.hasOwnProperty('paired_at')) { + obj['paired_at'] = ApiClient.convertToType(data['paired_at'], 'String'); + } + } + return obj; +} + +/** + * The unique id for this device code. + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * An optional user-defined name for the device code. + * @member {String} name + */ +exports.prototype['name'] = undefined; +/** + * The unique code that can be used to login. + * @member {String} code + */ +exports.prototype['code'] = undefined; +/** + * The unique id of the device that used this code. Populated when the device is paired up. + * @member {String} device_id + */ +exports.prototype['device_id'] = undefined; +/** + * The targeting product type of the device code. See [ProductType](#type-producttype) for possible values + * @member {String} product_type + */ +exports.prototype['product_type'] = undefined; +/** + * The location assigned to this code. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * The pairing status of the device code. See [DeviceCodeStatus](#type-devicecodestatus) for possible values + * @member {String} status + */ +exports.prototype['status'] = undefined; +/** + * When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. + * @member {String} pair_by + */ +exports.prototype['pair_by'] = undefined; +/** + * When this DeviceCode was created. Timestamp in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. + * @member {String} status_changed_at + */ +exports.prototype['status_changed_at'] = undefined; +/** + * When this DeviceCode was paired. Timestamp in RFC 3339 format. + * @member {String} paired_at + */ +exports.prototype['paired_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/DeviceCodeStatus.js b/src/model/DeviceCodeStatus.js new file mode 100644 index 0000000..b74d09b --- /dev/null +++ b/src/model/DeviceCodeStatus.js @@ -0,0 +1,45 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class DeviceCodeStatus. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "UNPAIRED" + * @const + */ + "UNPAIRED": "UNPAIRED", + /** + * value: "PAIRED" + * @const + */ + "PAIRED": "PAIRED"}; + +/** + * Returns a DeviceCodeStatus enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/DeviceCodeStatus} The enum DeviceCodeStatus value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/ErrorCode.js b/src/model/ErrorCode.js index ae1bbd6..dec18fa 100644 --- a/src/model/ErrorCode.js +++ b/src/model/ErrorCode.js @@ -40,6 +40,11 @@ var exports = { * @const */ "ACCESS_TOKEN_REVOKED": "ACCESS_TOKEN_REVOKED", + /** + * value: "CLIENT_DISABLED" + * @const + */ + "CLIENT_DISABLED": "CLIENT_DISABLED", /** * value: "FORBIDDEN" * @const diff --git a/src/model/FilterValue.js b/src/model/FilterValue.js new file mode 100644 index 0000000..36a9808 --- /dev/null +++ b/src/model/FilterValue.js @@ -0,0 +1,84 @@ +/** + * 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 FilterValue model module. + * Note: This model is in beta. + * @module model/FilterValue + */ + +/** + * Constructs a new FilterValue. + * A filter to select resources based on an exact field value. For any given value, the value can only be in one property. Depending on the field, either all properties can be set or only a subset will be available. Refer to the documentation of the field. + * @alias module:model/FilterValue + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a FilterValue 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/FilterValue} obj Optional instance to populate. + * @return {module:model/FilterValue} The populated FilterValue instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('all')) { + obj['all'] = ApiClient.convertToType(data['all'], ['String']); + } + if (data.hasOwnProperty('any')) { + obj['any'] = ApiClient.convertToType(data['any'], ['String']); + } + if (data.hasOwnProperty('none')) { + obj['none'] = ApiClient.convertToType(data['none'], ['String']); + } + } + return obj; +} + +/** + * A list of terms that must be present on the field of the resource. + * @member {Array.} all + */ +exports.prototype['all'] = undefined; +/** + * A list of terms where at least one of them must be present on the field of the resource. + * @member {Array.} any + */ +exports.prototype['any'] = undefined; +/** + * A list of terms that must not be present on the field the resource + * @member {Array.} none + */ +exports.prototype['none'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/GetDeviceCodeRequest.js b/src/model/GetDeviceCodeRequest.js new file mode 100644 index 0000000..e4b7c6f --- /dev/null +++ b/src/model/GetDeviceCodeRequest.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 GetDeviceCodeRequest model module. + * Note: This model is in beta. + * @module model/GetDeviceCodeRequest + */ + +/** + * Constructs a new GetDeviceCodeRequest. + * + * @alias module:model/GetDeviceCodeRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a GetDeviceCodeRequest 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/GetDeviceCodeRequest} obj Optional instance to populate. + * @return {module:model/GetDeviceCodeRequest} The populated GetDeviceCodeRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/GetDeviceCodeResponse.js b/src/model/GetDeviceCodeResponse.js new file mode 100644 index 0000000..896b5e8 --- /dev/null +++ b/src/model/GetDeviceCodeResponse.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 DeviceCode = require('./DeviceCode'); +var Error = require('./Error'); + + + + +/** + * The GetDeviceCodeResponse model module. + * Note: This model is in beta. + * @module model/GetDeviceCodeResponse + */ + +/** + * Constructs a new GetDeviceCodeResponse. + * + * @alias module:model/GetDeviceCodeResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a GetDeviceCodeResponse 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/GetDeviceCodeResponse} obj Optional instance to populate. + * @return {module:model/GetDeviceCodeResponse} The populated GetDeviceCodeResponse 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('device_code')) { + obj['device_code'] = DeviceCode.constructFromObject(data['device_code']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The queried DeviceCode. + * @member {module:model/DeviceCode} device_code + */ +exports.prototype['device_code'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/GetTerminalCheckoutRequest.js b/src/model/GetTerminalCheckoutRequest.js new file mode 100644 index 0000000..cfb4d05 --- /dev/null +++ b/src/model/GetTerminalCheckoutRequest.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 GetTerminalCheckoutRequest model module. + * Note: This model is in beta. + * @module model/GetTerminalCheckoutRequest + */ + +/** + * Constructs a new GetTerminalCheckoutRequest. + * + * @alias module:model/GetTerminalCheckoutRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a GetTerminalCheckoutRequest 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/GetTerminalCheckoutRequest} obj Optional instance to populate. + * @return {module:model/GetTerminalCheckoutRequest} The populated GetTerminalCheckoutRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/GetTerminalCheckoutResponse.js b/src/model/GetTerminalCheckoutResponse.js new file mode 100644 index 0000000..e9e05c5 --- /dev/null +++ b/src/model/GetTerminalCheckoutResponse.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 TerminalCheckout = require('./TerminalCheckout'); + + + + +/** + * The GetTerminalCheckoutResponse model module. + * Note: This model is in beta. + * @module model/GetTerminalCheckoutResponse + */ + +/** + * Constructs a new GetTerminalCheckoutResponse. + * + * @alias module:model/GetTerminalCheckoutResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a GetTerminalCheckoutResponse 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/GetTerminalCheckoutResponse} obj Optional instance to populate. + * @return {module:model/GetTerminalCheckoutResponse} The populated GetTerminalCheckoutResponse 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('checkout')) { + obj['checkout'] = TerminalCheckout.constructFromObject(data['checkout']); + } + } + return obj; +} + +/** + * Information on errors encountered during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The requested `Checkout` + * @member {module:model/TerminalCheckout} checkout + */ +exports.prototype['checkout'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListCustomerGroupsRequest.js b/src/model/ListCustomerGroupsRequest.js new file mode 100644 index 0000000..4c3b04c --- /dev/null +++ b/src/model/ListCustomerGroupsRequest.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 ListCustomerGroupsRequest model module. + * Note: This model is in beta. + * @module model/ListCustomerGroupsRequest + */ + +/** + * Constructs a new ListCustomerGroupsRequest. + * Defines the query parameters that can be provided in a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint. + * @alias module:model/ListCustomerGroupsRequest + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a ListCustomerGroupsRequest 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/ListCustomerGroupsRequest} obj Optional instance to populate. + * @return {module:model/ListCustomerGroupsRequest} The populated ListCustomerGroupsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * 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. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListCustomerGroupsResponse.js b/src/model/ListCustomerGroupsResponse.js new file mode 100644 index 0000000..62aeb75 --- /dev/null +++ b/src/model/ListCustomerGroupsResponse.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 CustomerGroup = require('./CustomerGroup'); +var Error = require('./Error'); + + + + +/** + * The ListCustomerGroupsResponse model module. + * Note: This model is in beta. + * @module model/ListCustomerGroupsResponse + */ + +/** + * Constructs a new ListCustomerGroupsResponse. + * Defines the fields that are included in the response body of a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint. One of `errors` or `groups` is present in a given response (never both). + * @alias module:model/ListCustomerGroupsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListCustomerGroupsResponse 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/ListCustomerGroupsResponse} obj Optional instance to populate. + * @return {module:model/ListCustomerGroupsResponse} The populated ListCustomerGroupsResponse 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('groups')) { + obj['groups'] = ApiClient.convertToType(data['groups'], [CustomerGroup]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * A list of customer groups belonging to the current merchant. + * @member {Array.} groups + */ +exports.prototype['groups'] = undefined; +/** + * A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListCustomerSegmentsRequest.js b/src/model/ListCustomerSegmentsRequest.js new file mode 100644 index 0000000..d80ad5b --- /dev/null +++ b/src/model/ListCustomerSegmentsRequest.js @@ -0,0 +1,75 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + + + +/** + * The ListCustomerSegmentsRequest model module. + * Note: This model is in beta. + * @module model/ListCustomerSegmentsRequest + */ + +/** + * Constructs a new ListCustomerSegmentsRequest. + * Defines the valid parameters for requests to __ListCustomerSegments__. + * @alias module:model/ListCustomerSegmentsRequest + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a ListCustomerSegmentsRequest 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/ListCustomerSegmentsRequest} obj Optional instance to populate. + * @return {module:model/ListCustomerSegmentsRequest} The populated ListCustomerSegmentsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('limit')) { + obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); + } + } + return obj; +} + +/** + * 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. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` + * @member {Number} limit + */ +exports.prototype['limit'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListCustomerSegmentsResponse.js b/src/model/ListCustomerSegmentsResponse.js new file mode 100644 index 0000000..177b298 --- /dev/null +++ b/src/model/ListCustomerSegmentsResponse.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 CustomerSegment = require('./CustomerSegment'); +var Error = require('./Error'); + + + + +/** + * The ListCustomerSegmentsResponse model module. + * Note: This model is in beta. + * @module model/ListCustomerSegmentsResponse + */ + +/** + * Constructs a new ListCustomerSegmentsResponse. + * Defines the fields included in the response body for requests to __ListCustomerSegments__. One of `errors` or `segments` is present in a given response (never both). + * @alias module:model/ListCustomerSegmentsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListCustomerSegmentsResponse 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/ListCustomerSegmentsResponse} obj Optional instance to populate. + * @return {module:model/ListCustomerSegmentsResponse} The populated ListCustomerSegmentsResponse 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('segments')) { + obj['segments'] = ApiClient.convertToType(data['segments'], [CustomerSegment]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The list of customer segments belonging to the associated Square account. + * @member {Array.} segments + */ +exports.prototype['segments'] = undefined; +/** + * A pagination cursor to be used in subsequent calls to __ListCustomerSegments__ to retrieve the next set of query results. Only present only if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListDeviceCodesRequest.js b/src/model/ListDeviceCodesRequest.js new file mode 100644 index 0000000..9734464 --- /dev/null +++ b/src/model/ListDeviceCodesRequest.js @@ -0,0 +1,84 @@ +/** + * 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 ListDeviceCodesRequest model module. + * Note: This model is in beta. + * @module model/ListDeviceCodesRequest + */ + +/** + * Constructs a new ListDeviceCodesRequest. + * + * @alias module:model/ListDeviceCodesRequest + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListDeviceCodesRequest 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/ListDeviceCodesRequest} obj Optional instance to populate. + * @return {module:model/ListDeviceCodesRequest} The populated ListDeviceCodesRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('product_type')) { + obj['product_type'] = ApiClient.convertToType(data['product_type'], 'String'); + } + } + return obj; +} + +/** + * 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. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; +/** + * If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * 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 + * @member {String} product_type + */ +exports.prototype['product_type'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ListDeviceCodesResponse.js b/src/model/ListDeviceCodesResponse.js new file mode 100644 index 0000000..16045cb --- /dev/null +++ b/src/model/ListDeviceCodesResponse.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 DeviceCode = require('./DeviceCode'); +var Error = require('./Error'); + + + + +/** + * The ListDeviceCodesResponse model module. + * Note: This model is in beta. + * @module model/ListDeviceCodesResponse + */ + +/** + * Constructs a new ListDeviceCodesResponse. + * + * @alias module:model/ListDeviceCodesResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a ListDeviceCodesResponse 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/ListDeviceCodesResponse} obj Optional instance to populate. + * @return {module:model/ListDeviceCodesResponse} The populated ListDeviceCodesResponse 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('device_codes')) { + obj['device_codes'] = ApiClient.convertToType(data['device_codes'], [DeviceCode]); + } + if (data.hasOwnProperty('cursor')) { + obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The queried DeviceCode. + * @member {Array.} device_codes + */ +exports.prototype['device_codes'] = undefined; +/** + * A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available. See [Paginating results](#paginatingresults) for more information. + * @member {String} cursor + */ +exports.prototype['cursor'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/ObtainTokenRequest.js b/src/model/ObtainTokenRequest.js index 8c3a203..7e71112 100644 --- a/src/model/ObtainTokenRequest.js +++ b/src/model/ObtainTokenRequest.js @@ -40,6 +40,7 @@ var exports = function(clientId, clientSecret, grantType) { _this['grant_type'] = grantType; + }; /** @@ -73,6 +74,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('migration_token')) { obj['migration_token'] = ApiClient.convertToType(data['migration_token'], 'String'); + } + if (data.hasOwnProperty('scopes')) { + obj['scopes'] = ApiClient.convertToType(data['scopes'], ['String']); } } return obj; @@ -113,6 +117,11 @@ exports.prototype['refresh_token'] = undefined; * @member {String} migration_token */ exports.prototype['migration_token'] = undefined; +/** + * __OPTIONAL__ A JSON list of strings that are the permissions the application is requesting. For example: \"`[\"MERCHANT_PROFILE_READ\",\"PAYMENTS_READ\",\"BANK_ACCOUNTS_READ\"]`\" The access token returned in the response will be granted the permissions that comprise the intersection between the given list of permissions, and those that belong to the provided refresh token. + * @member {Array.} scopes + */ +exports.prototype['scopes'] = undefined; diff --git a/src/model/ObtainTokenResponse.js b/src/model/ObtainTokenResponse.js index 285ca03..899e886 100644 --- a/src/model/ObtainTokenResponse.js +++ b/src/model/ObtainTokenResponse.js @@ -115,7 +115,7 @@ exports.prototype['plan_id'] = undefined; */ exports.prototype['id_token'] = undefined; /** - * A refresh token. For more information, see [OAuth access token management](https://developer.squareup.com/docs/authz/oauth/how-it-works#oauth-access-token-management). + * A refresh token. OAuth refresh tokens are 64 bytes long. For more information, see [OAuth access token management](https://developer.squareup.com/docs/authz/oauth/how-it-works#oauth-access-token-management). * @member {String} refresh_token */ exports.prototype['refresh_token'] = undefined; diff --git a/src/model/Order.js b/src/model/Order.js index 52d9860..17eefa3 100644 --- a/src/model/Order.js +++ b/src/model/Order.js @@ -260,7 +260,7 @@ exports.prototype['created_at'] = undefined; */ exports.prototype['updated_at'] = undefined; /** - * Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + * Timestamp for when the order reached a terminal [state](#property-state). In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". * @member {String} closed_at */ exports.prototype['closed_at'] = undefined; diff --git a/src/model/OrderCreated.js b/src/model/OrderCreated.js new file mode 100644 index 0000000..343438c --- /dev/null +++ b/src/model/OrderCreated.js @@ -0,0 +1,102 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + + + +/** + * The OrderCreated model module. + * Note: This model is in beta. + * @module model/OrderCreated + */ + +/** + * Constructs a new OrderCreated. + * + * @alias module:model/OrderCreated + * @class + */ +var exports = function() { + var _this = this; + + + + + + +}; + +/** + * Constructs a OrderCreated 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/OrderCreated} obj Optional instance to populate. + * @return {module:model/OrderCreated} The populated OrderCreated instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_id')) { + obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String'); + } + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('state')) { + obj['state'] = ApiClient.convertToType(data['state'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String'); + } + } + return obj; +} + +/** + * The order's unique ID. + * @member {String} order_id + */ +exports.prototype['order_id'] = undefined; +/** + * Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) + * @member {Number} version + */ +exports.prototype['version'] = undefined; +/** + * The ID of the merchant location this order is associated with. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * The state of the order. See [OrderState](#type-orderstate) for possible values + * @member {String} state + */ +exports.prototype['state'] = undefined; +/** + * Timestamp for when the order was created in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderCreatedObject.js b/src/model/OrderCreatedObject.js new file mode 100644 index 0000000..48fc8d9 --- /dev/null +++ b/src/model/OrderCreatedObject.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var OrderCreated = require('./OrderCreated'); + + + + +/** + * The OrderCreatedObject model module. + * Note: This model is in beta. + * @module model/OrderCreatedObject + */ + +/** + * Constructs a new OrderCreatedObject. + * + * @alias module:model/OrderCreatedObject + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a OrderCreatedObject 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/OrderCreatedObject} obj Optional instance to populate. + * @return {module:model/OrderCreatedObject} The populated OrderCreatedObject instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_created')) { + obj['order_created'] = OrderCreated.constructFromObject(data['order_created']); + } + } + return obj; +} + +/** + * Information about the created order. + * @member {module:model/OrderCreated} order_created + */ +exports.prototype['order_created'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderFulfillmentPickupDetails.js b/src/model/OrderFulfillmentPickupDetails.js index 3df67a3..ee77e4f 100644 --- a/src/model/OrderFulfillmentPickupDetails.js +++ b/src/model/OrderFulfillmentPickupDetails.js @@ -12,6 +12,7 @@ * */ var ApiClient = require('../ApiClient'); +var OrderFulfillmentPickupDetailsCurbsidePickupDetails = require('./OrderFulfillmentPickupDetailsCurbsidePickupDetails'); var OrderFulfillmentRecipient = require('./OrderFulfillmentRecipient'); @@ -47,6 +48,8 @@ var exports = function() { + + }; /** @@ -107,6 +110,12 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('cancel_reason')) { obj['cancel_reason'] = ApiClient.convertToType(data['cancel_reason'], 'String'); + } + if (data.hasOwnProperty('is_curbside_pickup')) { + obj['is_curbside_pickup'] = ApiClient.convertToType(data['is_curbside_pickup'], 'Boolean'); + } + if (data.hasOwnProperty('curbside_pickup_details')) { + obj['curbside_pickup_details'] = OrderFulfillmentPickupDetailsCurbsidePickupDetails.constructFromObject(data['curbside_pickup_details']); } } return obj; @@ -192,6 +201,16 @@ exports.prototype['canceled_at'] = undefined; * @member {String} cancel_reason */ exports.prototype['cancel_reason'] = undefined; +/** + * If true, indicates this pickup order is for curbside pickup, not in-store pickup. + * @member {Boolean} is_curbside_pickup + */ +exports.prototype['is_curbside_pickup'] = undefined; +/** + * Specific details for curbside pickup. Can only be populated if `is_curbside_pickup` is true. + * @member {module:model/OrderFulfillmentPickupDetailsCurbsidePickupDetails} curbside_pickup_details + */ +exports.prototype['curbside_pickup_details'] = undefined; diff --git a/src/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.js b/src/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.js new file mode 100644 index 0000000..2dda212 --- /dev/null +++ b/src/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.js @@ -0,0 +1,75 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + + + +/** + * The OrderFulfillmentPickupDetailsCurbsidePickupDetails model module. + * Note: This model is in beta. + * @module model/OrderFulfillmentPickupDetailsCurbsidePickupDetails + */ + +/** + * Constructs a new OrderFulfillmentPickupDetailsCurbsidePickupDetails. + * Specific details for curbside pickup. + * @alias module:model/OrderFulfillmentPickupDetailsCurbsidePickupDetails + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a OrderFulfillmentPickupDetailsCurbsidePickupDetails 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/OrderFulfillmentPickupDetailsCurbsidePickupDetails} obj Optional instance to populate. + * @return {module:model/OrderFulfillmentPickupDetailsCurbsidePickupDetails} The populated OrderFulfillmentPickupDetailsCurbsidePickupDetails instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('curbside_details')) { + obj['curbside_details'] = ApiClient.convertToType(data['curbside_details'], 'String'); + } + if (data.hasOwnProperty('buyer_arrived_at')) { + obj['buyer_arrived_at'] = ApiClient.convertToType(data['buyer_arrived_at'], 'String'); + } + } + return obj; +} + +/** + * Specific details for curbside pickup, such as parking number, vehicle model, etc. + * @member {String} curbside_details + */ +exports.prototype['curbside_details'] = undefined; +/** + * The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the buyer arrived and is waiting for pickup. + * @member {String} buyer_arrived_at + */ +exports.prototype['buyer_arrived_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderFulfillmentUpdated.js b/src/model/OrderFulfillmentUpdated.js new file mode 100644 index 0000000..9c83aee --- /dev/null +++ b/src/model/OrderFulfillmentUpdated.js @@ -0,0 +1,121 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var OrderFulfillmentUpdatedUpdate = require('./OrderFulfillmentUpdatedUpdate'); + + + + +/** + * The OrderFulfillmentUpdated model module. + * Note: This model is in beta. + * @module model/OrderFulfillmentUpdated + */ + +/** + * Constructs a new OrderFulfillmentUpdated. + * + * @alias module:model/OrderFulfillmentUpdated + * @class + */ +var exports = function() { + var _this = this; + + + + + + + + +}; + +/** + * Constructs a OrderFulfillmentUpdated 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/OrderFulfillmentUpdated} obj Optional instance to populate. + * @return {module:model/OrderFulfillmentUpdated} The populated OrderFulfillmentUpdated instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_id')) { + obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String'); + } + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('state')) { + obj['state'] = ApiClient.convertToType(data['state'], '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'); + } + if (data.hasOwnProperty('fulfillment_update')) { + obj['fulfillment_update'] = ApiClient.convertToType(data['fulfillment_update'], [OrderFulfillmentUpdatedUpdate]); + } + } + return obj; +} + +/** + * The order's unique ID. + * @member {String} order_id + */ +exports.prototype['order_id'] = undefined; +/** + * Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) + * @member {Number} version + */ +exports.prototype['version'] = undefined; +/** + * The ID of the merchant location this order is associated with. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * The state of the order. See [OrderState](#type-orderstate) for possible values + * @member {String} state + */ +exports.prototype['state'] = undefined; +/** + * Timestamp for when the order was created in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * Timestamp for when the order was last updated in RFC 3339 format. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; +/** + * The fulfillments that were updated with this version change. + * @member {Array.} fulfillment_update + */ +exports.prototype['fulfillment_update'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderFulfillmentUpdatedObject.js b/src/model/OrderFulfillmentUpdatedObject.js new file mode 100644 index 0000000..5e8f095 --- /dev/null +++ b/src/model/OrderFulfillmentUpdatedObject.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var OrderFulfillmentUpdated = require('./OrderFulfillmentUpdated'); + + + + +/** + * The OrderFulfillmentUpdatedObject model module. + * Note: This model is in beta. + * @module model/OrderFulfillmentUpdatedObject + */ + +/** + * Constructs a new OrderFulfillmentUpdatedObject. + * + * @alias module:model/OrderFulfillmentUpdatedObject + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a OrderFulfillmentUpdatedObject 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/OrderFulfillmentUpdatedObject} obj Optional instance to populate. + * @return {module:model/OrderFulfillmentUpdatedObject} The populated OrderFulfillmentUpdatedObject instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_fulfillment_updated')) { + obj['order_fulfillment_updated'] = OrderFulfillmentUpdated.constructFromObject(data['order_fulfillment_updated']); + } + } + return obj; +} + +/** + * Information about the updated order fulfillment. + * @member {module:model/OrderFulfillmentUpdated} order_fulfillment_updated + */ +exports.prototype['order_fulfillment_updated'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderFulfillmentUpdatedUpdate.js b/src/model/OrderFulfillmentUpdatedUpdate.js new file mode 100644 index 0000000..fe704af --- /dev/null +++ b/src/model/OrderFulfillmentUpdatedUpdate.js @@ -0,0 +1,84 @@ +/** + * 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 OrderFulfillmentUpdatedUpdate model module. + * Note: This model is in beta. + * @module model/OrderFulfillmentUpdatedUpdate + */ + +/** + * Constructs a new OrderFulfillmentUpdatedUpdate. + * Information about fulfillment updates. + * @alias module:model/OrderFulfillmentUpdatedUpdate + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a OrderFulfillmentUpdatedUpdate 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/OrderFulfillmentUpdatedUpdate} obj Optional instance to populate. + * @return {module:model/OrderFulfillmentUpdatedUpdate} The populated OrderFulfillmentUpdatedUpdate instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('fulfillment_uid')) { + obj['fulfillment_uid'] = ApiClient.convertToType(data['fulfillment_uid'], 'String'); + } + if (data.hasOwnProperty('old_state')) { + obj['old_state'] = ApiClient.convertToType(data['old_state'], 'String'); + } + if (data.hasOwnProperty('new_state')) { + obj['new_state'] = ApiClient.convertToType(data['new_state'], 'String'); + } + } + return obj; +} + +/** + * Unique ID that identifies the fulfillment only within this order. + * @member {String} fulfillment_uid + */ +exports.prototype['fulfillment_uid'] = undefined; +/** + * The state of the fulfillment before the change. Will not be populated if the fulfillment is created with this new Order version. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values + * @member {String} old_state + */ +exports.prototype['old_state'] = undefined; +/** + * The state of the fulfillment after the change. May be equal to old_state if a non-state field was changed on the fulfillment (e.g. tracking number). See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values + * @member {String} new_state + */ +exports.prototype['new_state'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderUpdated.js b/src/model/OrderUpdated.js new file mode 100644 index 0000000..551c7e8 --- /dev/null +++ b/src/model/OrderUpdated.js @@ -0,0 +1,111 @@ +/** + * 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 OrderUpdated model module. + * Note: This model is in beta. + * @module model/OrderUpdated + */ + +/** + * Constructs a new OrderUpdated. + * + * @alias module:model/OrderUpdated + * @class + */ +var exports = function() { + var _this = this; + + + + + + + +}; + +/** + * Constructs a OrderUpdated 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/OrderUpdated} obj Optional instance to populate. + * @return {module:model/OrderUpdated} The populated OrderUpdated instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_id')) { + obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String'); + } + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'Number'); + } + if (data.hasOwnProperty('location_id')) { + obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); + } + if (data.hasOwnProperty('state')) { + obj['state'] = ApiClient.convertToType(data['state'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String'); + } + if (data.hasOwnProperty('updated_at')) { + obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String'); + } + } + return obj; +} + +/** + * The order's unique ID. + * @member {String} order_id + */ +exports.prototype['order_id'] = undefined; +/** + * Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders) + * @member {Number} version + */ +exports.prototype['version'] = undefined; +/** + * The ID of the merchant location this order is associated with. + * @member {String} location_id + */ +exports.prototype['location_id'] = undefined; +/** + * The state of the order. See [OrderState](#type-orderstate) for possible values + * @member {String} state + */ +exports.prototype['state'] = undefined; +/** + * Timestamp for when the order was created in RFC 3339 format. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * Timestamp for when the order was last updated in RFC 3339 format. + * @member {String} updated_at + */ +exports.prototype['updated_at'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/OrderUpdatedObject.js b/src/model/OrderUpdatedObject.js new file mode 100644 index 0000000..fcd29b8 --- /dev/null +++ b/src/model/OrderUpdatedObject.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var OrderUpdated = require('./OrderUpdated'); + + + + +/** + * The OrderUpdatedObject model module. + * Note: This model is in beta. + * @module model/OrderUpdatedObject + */ + +/** + * Constructs a new OrderUpdatedObject. + * + * @alias module:model/OrderUpdatedObject + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a OrderUpdatedObject 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/OrderUpdatedObject} obj Optional instance to populate. + * @return {module:model/OrderUpdatedObject} The populated OrderUpdatedObject instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('order_updated')) { + obj['order_updated'] = OrderUpdated.constructFromObject(data['order_updated']); + } + } + return obj; +} + +/** + * Information about the updated order. + * @member {module:model/OrderUpdated} order_updated + */ +exports.prototype['order_updated'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/PayOrderRequest.js b/src/model/PayOrderRequest.js index 508e7a2..f2ca406 100644 --- a/src/model/PayOrderRequest.js +++ b/src/model/PayOrderRequest.js @@ -72,7 +72,7 @@ exports.prototype['idempotency_key'] = undefined; */ exports.prototype['order_version'] = undefined; /** - * + * The IDs of the `payments` to collect. The payment total must match the order total. * @member {Array.} payment_ids */ exports.prototype['payment_ids'] = undefined; diff --git a/src/model/PaymentOptions.js b/src/model/PaymentOptions.js new file mode 100644 index 0000000..38416d3 --- /dev/null +++ b/src/model/PaymentOptions.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 PaymentOptions model module. + * Note: This model is in beta. + * @module model/PaymentOptions + */ + +/** + * Constructs a new PaymentOptions. + * + * @alias module:model/PaymentOptions + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a PaymentOptions 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/PaymentOptions} obj Optional instance to populate. + * @return {module:model/PaymentOptions} The populated PaymentOptions instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('autocomplete')) { + obj['autocomplete'] = ApiClient.convertToType(data['autocomplete'], 'Boolean'); + } + } + return obj; +} + +/** + * 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; + + + +module.exports = exports; + + + diff --git a/src/model/ProductType.js b/src/model/ProductType.js new file mode 100644 index 0000000..dda7c40 --- /dev/null +++ b/src/model/ProductType.js @@ -0,0 +1,40 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class ProductType. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "TERMINAL_API" + * @const + */ + "API": "TERMINAL_API"}; + +/** + * Returns a ProductType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/ProductType} The enum ProductType value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/RemoveGroupFromCustomerRequest.js b/src/model/RemoveGroupFromCustomerRequest.js new file mode 100644 index 0000000..4e3f3c1 --- /dev/null +++ b/src/model/RemoveGroupFromCustomerRequest.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 RemoveGroupFromCustomerRequest model module. + * Note: This model is in beta. + * @module model/RemoveGroupFromCustomerRequest + */ + +/** + * Constructs a new RemoveGroupFromCustomerRequest. + * Defines the fields that are included in the request body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. + * @alias module:model/RemoveGroupFromCustomerRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a RemoveGroupFromCustomerRequest 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/RemoveGroupFromCustomerRequest} obj Optional instance to populate. + * @return {module:model/RemoveGroupFromCustomerRequest} The populated RemoveGroupFromCustomerRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/RemoveGroupFromCustomerResponse.js b/src/model/RemoveGroupFromCustomerResponse.js new file mode 100644 index 0000000..8979c17 --- /dev/null +++ b/src/model/RemoveGroupFromCustomerResponse.js @@ -0,0 +1,67 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); +var Error = require('./Error'); + + + + +/** + * The RemoveGroupFromCustomerResponse model module. + * Note: This model is in beta. + * @module model/RemoveGroupFromCustomerResponse + */ + +/** + * Constructs a new RemoveGroupFromCustomerResponse. + * Defines the fields that are included in the response body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. + * @alias module:model/RemoveGroupFromCustomerResponse + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a RemoveGroupFromCustomerResponse 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/RemoveGroupFromCustomerResponse} obj Optional instance to populate. + * @return {module:model/RemoveGroupFromCustomerResponse} The populated RemoveGroupFromCustomerResponse instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/RetrieveCustomerGroupRequest.js b/src/model/RetrieveCustomerGroupRequest.js new file mode 100644 index 0000000..0803e59 --- /dev/null +++ b/src/model/RetrieveCustomerGroupRequest.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 RetrieveCustomerGroupRequest model module. + * Note: This model is in beta. + * @module model/RetrieveCustomerGroupRequest + */ + +/** + * Constructs a new RetrieveCustomerGroupRequest. + * Defines the fields that can be provided in a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint. + * @alias module:model/RetrieveCustomerGroupRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a RetrieveCustomerGroupRequest 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/RetrieveCustomerGroupRequest} obj Optional instance to populate. + * @return {module:model/RetrieveCustomerGroupRequest} The populated RetrieveCustomerGroupRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/RetrieveCustomerGroupResponse.js b/src/model/RetrieveCustomerGroupResponse.js new file mode 100644 index 0000000..213bbb4 --- /dev/null +++ b/src/model/RetrieveCustomerGroupResponse.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 CustomerGroup = require('./CustomerGroup'); +var Error = require('./Error'); + + + + +/** + * The RetrieveCustomerGroupResponse model module. + * Note: This model is in beta. + * @module model/RetrieveCustomerGroupResponse + */ + +/** + * Constructs a new RetrieveCustomerGroupResponse. + * Defines the fields that are included in the response body of a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + * @alias module:model/RetrieveCustomerGroupResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a RetrieveCustomerGroupResponse 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/RetrieveCustomerGroupResponse} obj Optional instance to populate. + * @return {module:model/RetrieveCustomerGroupResponse} The populated RetrieveCustomerGroupResponse 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('group')) { + obj['group'] = CustomerGroup.constructFromObject(data['group']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The retrieved customer group. + * @member {module:model/CustomerGroup} group + */ +exports.prototype['group'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/RetrieveCustomerSegmentRequest.js b/src/model/RetrieveCustomerSegmentRequest.js new file mode 100644 index 0000000..5c89baa --- /dev/null +++ b/src/model/RetrieveCustomerSegmentRequest.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 RetrieveCustomerSegmentRequest model module. + * Note: This model is in beta. + * @module model/RetrieveCustomerSegmentRequest + */ + +/** + * Constructs a new RetrieveCustomerSegmentRequest. + * Defines the valid parameters for requests to __RetrieveCustomerSegmentRequest__. + * @alias module:model/RetrieveCustomerSegmentRequest + * @class + */ +var exports = function() { + var _this = this; + +}; + +/** + * Constructs a RetrieveCustomerSegmentRequest 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/RetrieveCustomerSegmentRequest} obj Optional instance to populate. + * @return {module:model/RetrieveCustomerSegmentRequest} The populated RetrieveCustomerSegmentRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + } + return obj; +} + + + + +module.exports = exports; + + + diff --git a/src/model/RetrieveCustomerSegmentResponse.js b/src/model/RetrieveCustomerSegmentResponse.js new file mode 100644 index 0000000..a5d600b --- /dev/null +++ b/src/model/RetrieveCustomerSegmentResponse.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 CustomerSegment = require('./CustomerSegment'); +var Error = require('./Error'); + + + + +/** + * The RetrieveCustomerSegmentResponse model module. + * Note: This model is in beta. + * @module model/RetrieveCustomerSegmentResponse + */ + +/** + * Constructs a new RetrieveCustomerSegmentResponse. + * Defines the fields included in the response body for requests to __RetrieveCustomerSegment__. One of `errors` or `segment` is present in a given response (never both). + * @alias module:model/RetrieveCustomerSegmentResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a RetrieveCustomerSegmentResponse 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/RetrieveCustomerSegmentResponse} obj Optional instance to populate. + * @return {module:model/RetrieveCustomerSegmentResponse} The populated RetrieveCustomerSegmentResponse 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('segment')) { + obj['segment'] = CustomerSegment.constructFromObject(data['segment']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The retrieved customer segment. + * @member {module:model/CustomerSegment} segment + */ +exports.prototype['segment'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/RevokeTokenRequest.js b/src/model/RevokeTokenRequest.js index b21945e..b54a4da 100644 --- a/src/model/RevokeTokenRequest.js +++ b/src/model/RevokeTokenRequest.js @@ -33,6 +33,7 @@ var exports = function() { + }; /** @@ -54,6 +55,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('merchant_id')) { obj['merchant_id'] = ApiClient.convertToType(data['merchant_id'], 'String'); + } + if (data.hasOwnProperty('revoke_only_access_token')) { + obj['revoke_only_access_token'] = ApiClient.convertToType(data['revoke_only_access_token'], 'Boolean'); } } return obj; @@ -74,6 +78,11 @@ exports.prototype['access_token'] = undefined; * @member {String} merchant_id */ exports.prototype['merchant_id'] = undefined; +/** + * If `true`, terminate the given single access token, but do not terminate the entire authorization. Default: `false` + * @member {Boolean} revoke_only_access_token + */ +exports.prototype['revoke_only_access_token'] = undefined; diff --git a/src/model/SearchTerminalCheckoutsRequest.js b/src/model/SearchTerminalCheckoutsRequest.js new file mode 100644 index 0000000..01a9f3b --- /dev/null +++ b/src/model/SearchTerminalCheckoutsRequest.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 TerminalCheckoutQuery = require('./TerminalCheckoutQuery'); + + + + +/** + * The SearchTerminalCheckoutsRequest model module. + * Note: This model is in beta. + * @module model/SearchTerminalCheckoutsRequest + */ + +/** + * Constructs a new SearchTerminalCheckoutsRequest. + * + * @alias module:model/SearchTerminalCheckoutsRequest + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a SearchTerminalCheckoutsRequest 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/SearchTerminalCheckoutsRequest} obj Optional instance to populate. + * @return {module:model/SearchTerminalCheckoutsRequest} The populated SearchTerminalCheckoutsRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('query')) { + obj['query'] = TerminalCheckoutQuery.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 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. + * @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. + * @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/SearchTerminalCheckoutsResponse.js b/src/model/SearchTerminalCheckoutsResponse.js new file mode 100644 index 0000000..17963b1 --- /dev/null +++ b/src/model/SearchTerminalCheckoutsResponse.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 TerminalCheckout = require('./TerminalCheckout'); + + + + +/** + * The SearchTerminalCheckoutsResponse model module. + * Note: This model is in beta. + * @module model/SearchTerminalCheckoutsResponse + */ + +/** + * Constructs a new SearchTerminalCheckoutsResponse. + * + * @alias module:model/SearchTerminalCheckoutsResponse + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a SearchTerminalCheckoutsResponse 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/SearchTerminalCheckoutsResponse} obj Optional instance to populate. + * @return {module:model/SearchTerminalCheckoutsResponse} The populated SearchTerminalCheckoutsResponse 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('checkouts')) { + obj['checkouts'] = ApiClient.convertToType(data['checkouts'], [TerminalCheckout]); + } + 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 `TerminalCheckout`s. + * @member {Array.} checkouts + */ +exports.prototype['checkouts'] = 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/TerminalCheckout.js b/src/model/TerminalCheckout.js new file mode 100644 index 0000000..a1755d7 --- /dev/null +++ b/src/model/TerminalCheckout.js @@ -0,0 +1,160 @@ +/** + * 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 DeviceCheckoutOptions = require('./DeviceCheckoutOptions'); +var Money = require('./Money'); + + + + +/** + * The TerminalCheckout model module. + * Note: This model is in beta. + * @module model/TerminalCheckout + */ + +/** + * Constructs a new TerminalCheckout. + * + * @alias module:model/TerminalCheckout + * @class + * @param amountMoney {module:model/Money} The amount of money (including tax amount) that the Square Terminal device should try to collect. + * @param deviceOptions {module:model/DeviceCheckoutOptions} Options to control the display and behavior of the Square Terminal device. + */ +var exports = function(amountMoney, deviceOptions) { + var _this = this; + + + _this['amount_money'] = amountMoney; + + + _this['device_options'] = deviceOptions; + + + + + + +}; + +/** + * Constructs a TerminalCheckout 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/TerminalCheckout} obj Optional instance to populate. + * @return {module:model/TerminalCheckout} The populated TerminalCheckout 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('amount_money')) { + obj['amount_money'] = Money.constructFromObject(data['amount_money']); + } + if (data.hasOwnProperty('reference_id')) { + obj['reference_id'] = ApiClient.convertToType(data['reference_id'], 'String'); + } + if (data.hasOwnProperty('note')) { + obj['note'] = ApiClient.convertToType(data['note'], 'String'); + } + if (data.hasOwnProperty('device_options')) { + obj['device_options'] = DeviceCheckoutOptions.constructFromObject(data['device_options']); + } + 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('payment_ids')) { + obj['payment_ids'] = ApiClient.convertToType(data['payment_ids'], ['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 `TerminalCheckout` + * @member {String} id + */ +exports.prototype['id'] = undefined; +/** + * The amount of money (including tax amount) that the Square Terminal device should try to collect. + * @member {module:model/Money} amount_money + */ +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. + * @member {String} reference_id + */ +exports.prototype['reference_id'] = undefined; +/** + * An optional note to associate with the checkout, as well any payments used to complete the checkout. + * @member {String} note + */ +exports.prototype['note'] = undefined; +/** + * Options to control the display and behavior of the Square Terminal device. + * @member {module:model/DeviceCheckoutOptions} device_options + */ +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 + * @member {String} deadline_duration + */ +exports.prototype['deadline_duration'] = undefined; +/** + * The status of the `TerminalCheckout`. Options: PENDING, IN\\_PROGRESS, CANCELED, COMPLETED + * @member {String} status + */ +exports.prototype['status'] = undefined; +/** + * Present if the status is CANCELED. See [TerminalCheckoutCancelReason](#type-terminalcheckoutcancelreason) for possible values + * @member {String} cancel_reason + */ +exports.prototype['cancel_reason'] = undefined; +/** + * A list of payments created by this `TerminalCheckout`. + * @member {Array.} payment_ids + */ +exports.prototype['payment_ids'] = undefined; +/** + * The time when the `TerminalCheckout` was created as an RFC 3339 timestamp. + * @member {String} created_at + */ +exports.prototype['created_at'] = undefined; +/** + * The time when the `TerminalCheckout` 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/TerminalCheckoutCancelReason.js b/src/model/TerminalCheckoutCancelReason.js new file mode 100644 index 0000000..027c425 --- /dev/null +++ b/src/model/TerminalCheckoutCancelReason.js @@ -0,0 +1,50 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +var ApiClient = require('../ApiClient'); + + +/** + * Enum class TerminalCheckoutCancelReason. + * @enum {} + * @readonly + */ +var exports = { + /** + * value: "BUYER_CANCELED" + * @const + */ + "BUYER_CANCELED": "BUYER_CANCELED", + /** + * value: "SELLER_CANCELED" + * @const + */ + "SELLER_CANCELED": "SELLER_CANCELED", + /** + * value: "TIMED_OUT" + * @const + */ + "TIMED_OUT": "TIMED_OUT"}; + +/** + * Returns a TerminalCheckoutCancelReason enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/TerminalCheckoutCancelReason} The enum TerminalCheckoutCancelReason value. + */ +exports.constructFromObject = function(object) { + return object; +} + +module.exports = exports; + + diff --git a/src/model/TerminalCheckoutQuery.js b/src/model/TerminalCheckoutQuery.js new file mode 100644 index 0000000..e97039d --- /dev/null +++ b/src/model/TerminalCheckoutQuery.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 TerminalCheckoutQueryFilter = require('./TerminalCheckoutQueryFilter'); +var TerminalCheckoutQuerySort = require('./TerminalCheckoutQuerySort'); + + + + +/** + * The TerminalCheckoutQuery model module. + * Note: This model is in beta. + * @module model/TerminalCheckoutQuery + */ + +/** + * Constructs a new TerminalCheckoutQuery. + * + * @alias module:model/TerminalCheckoutQuery + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a TerminalCheckoutQuery 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/TerminalCheckoutQuery} obj Optional instance to populate. + * @return {module:model/TerminalCheckoutQuery} The populated TerminalCheckoutQuery instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('filter')) { + obj['filter'] = TerminalCheckoutQueryFilter.constructFromObject(data['filter']); + } + if (data.hasOwnProperty('sort')) { + obj['sort'] = TerminalCheckoutQuerySort.constructFromObject(data['sort']); + } + } + return obj; +} + +/** + * Options for filtering returned `TerminalCheckout`s + * @member {module:model/TerminalCheckoutQueryFilter} filter + */ +exports.prototype['filter'] = undefined; +/** + * Option for sorting returned `TerminalCheckout`s + * @member {module:model/TerminalCheckoutQuerySort} sort + */ +exports.prototype['sort'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TerminalCheckoutQueryFilter.js b/src/model/TerminalCheckoutQueryFilter.js new file mode 100644 index 0000000..2bf62c0 --- /dev/null +++ b/src/model/TerminalCheckoutQueryFilter.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 TerminalCheckoutQueryFilter model module. + * Note: This model is in beta. + * @module model/TerminalCheckoutQueryFilter + */ + +/** + * Constructs a new TerminalCheckoutQueryFilter. + * + * @alias module:model/TerminalCheckoutQueryFilter + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a TerminalCheckoutQueryFilter 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/TerminalCheckoutQueryFilter} obj Optional instance to populate. + * @return {module:model/TerminalCheckoutQueryFilter} The populated TerminalCheckoutQueryFilter 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; +} + +/** + * `TerminalCheckout`s associated with a specific device. If no device is specified then all `TerminalCheckout`s for the merchant will be displayed. + * @member {String} device_id + */ +exports.prototype['device_id'] = undefined; +/** + * Time range for the beginning of the reporting period. 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 `TerminalCheckout` Options: PENDING, IN\\_PROGRESS, CANCELED, COMPLETED + * @member {String} status + */ +exports.prototype['status'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/TerminalCheckoutQuerySort.js b/src/model/TerminalCheckoutQuerySort.js new file mode 100644 index 0000000..3e0705a --- /dev/null +++ b/src/model/TerminalCheckoutQuerySort.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 TerminalCheckoutQuerySort model module. + * Note: This model is in beta. + * @module model/TerminalCheckoutQuerySort + */ + +/** + * Constructs a new TerminalCheckoutQuerySort. + * + * @alias module:model/TerminalCheckoutQuerySort + * @class + */ +var exports = function() { + var _this = this; + + +}; + +/** + * Constructs a TerminalCheckoutQuerySort 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/TerminalCheckoutQuerySort} obj Optional instance to populate. + * @return {module:model/TerminalCheckoutQuerySort} The populated TerminalCheckoutQuerySort 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 new file mode 100644 index 0000000..5632d1d --- /dev/null +++ b/src/model/TipSettings.js @@ -0,0 +1,84 @@ +/** + * 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 TipSettings model module. + * Note: This model is in beta. + * @module model/TipSettings + */ + +/** + * Constructs a new TipSettings. + * + * @alias module:model/TipSettings + * @class + */ +var exports = function() { + var _this = this; + + + + +}; + +/** + * Constructs a TipSettings 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/TipSettings} obj Optional instance to populate. + * @return {module:model/TipSettings} The populated TipSettings instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('allow_tipping')) { + obj['allow_tipping'] = ApiClient.convertToType(data['allow_tipping'], 'Boolean'); + } + if (data.hasOwnProperty('separate_tip_screen')) { + obj['separate_tip_screen'] = ApiClient.convertToType(data['separate_tip_screen'], 'Boolean'); + } + if (data.hasOwnProperty('custom_tip_field')) { + obj['custom_tip_field'] = ApiClient.convertToType(data['custom_tip_field'], 'Boolean'); + } + } + return obj; +} + +/** + * Indicates whether tipping is enabled for this checkout. Defaults to false. + * @member {Boolean} allow_tipping + */ +exports.prototype['allow_tipping'] = undefined; +/** + * Indicates whether tip options should be presented on their own screen before presenting the signature screen during card payment. Defaults to false. + * @member {Boolean} separate_tip_screen + */ +exports.prototype['separate_tip_screen'] = undefined; +/** + * Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false. + * @member {Boolean} custom_tip_field + */ +exports.prototype['custom_tip_field'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/UpdateCustomerGroupRequest.js b/src/model/UpdateCustomerGroupRequest.js new file mode 100644 index 0000000..cbf4efb --- /dev/null +++ b/src/model/UpdateCustomerGroupRequest.js @@ -0,0 +1,68 @@ +/** + * 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 CustomerGroup = require('./CustomerGroup'); + + + + +/** + * The UpdateCustomerGroupRequest model module. + * Note: This model is in beta. + * @module model/UpdateCustomerGroupRequest + */ + +/** + * Constructs a new UpdateCustomerGroupRequest. + * Defines the body parameters that can be provided in a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint. + * @alias module:model/UpdateCustomerGroupRequest + * @class + * @param group {module:model/CustomerGroup} The `CustomerGroup` object including all the updates you want to make. + */ +var exports = function(group) { + var _this = this; + + _this['group'] = group; +}; + +/** + * Constructs a UpdateCustomerGroupRequest 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/UpdateCustomerGroupRequest} obj Optional instance to populate. + * @return {module:model/UpdateCustomerGroupRequest} The populated UpdateCustomerGroupRequest instance. + */ +exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('group')) { + obj['group'] = CustomerGroup.constructFromObject(data['group']); + } + } + return obj; +} + +/** + * The `CustomerGroup` object including all the updates you want to make. + * @member {module:model/CustomerGroup} group + */ +exports.prototype['group'] = undefined; + + + +module.exports = exports; + + + diff --git a/src/model/UpdateCustomerGroupResponse.js b/src/model/UpdateCustomerGroupResponse.js new file mode 100644 index 0000000..9669849 --- /dev/null +++ b/src/model/UpdateCustomerGroupResponse.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 CustomerGroup = require('./CustomerGroup'); +var Error = require('./Error'); + + + + +/** + * The UpdateCustomerGroupResponse model module. + * Note: This model is in beta. + * @module model/UpdateCustomerGroupResponse + */ + +/** + * Constructs a new UpdateCustomerGroupResponse. + * Defines the fields that are included in the response body of a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint. One of `errors` or `group` is present in a given response (never both). + * @alias module:model/UpdateCustomerGroupResponse + * @class + */ +var exports = function() { + var _this = this; + + + +}; + +/** + * Constructs a UpdateCustomerGroupResponse 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/UpdateCustomerGroupResponse} obj Optional instance to populate. + * @return {module:model/UpdateCustomerGroupResponse} The populated UpdateCustomerGroupResponse 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('group')) { + obj['group'] = CustomerGroup.constructFromObject(data['group']); + } + } + return obj; +} + +/** + * Any errors that occurred during the request. + * @member {Array.} errors + */ +exports.prototype['errors'] = undefined; +/** + * The successfully updated customer group. + * @member {module:model/CustomerGroup} group + */ +exports.prototype['group'] = undefined; + + + +module.exports = exports; + + + diff --git a/test/api/CustomerGroupsApi.spec.js b/test/api/CustomerGroupsApi.spec.js new file mode 100644 index 0000000..3f1a68f --- /dev/null +++ b/test/api/CustomerGroupsApi.spec.js @@ -0,0 +1,86 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ + +describe('CustomerGroupsApi', function() { + beforeEach(function() { + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + // Some APIs do not work with sandbox. Replace `sandbox` with `production` for those test suites. + oauth2.accessToken = accounts.sandbox.access_token; + this.api = new SquareConnect.CustomerGroupsApi(); + }); + + afterEach(function(){ + }); + + describe('CustomerGroupsApi', function() { + describe('createCustomerGroup', function() { + it('should call createCustomerGroup successfully', function(done) { + //uncomment below and update the code to test createCustomerGroup + //instance.createCustomerGroup(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteCustomerGroup', function() { + it('should call deleteCustomerGroup successfully', function(done) { + //uncomment below and update the code to test deleteCustomerGroup + //instance.deleteCustomerGroup(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listCustomerGroups', function() { + it('should call listCustomerGroups successfully', function(done) { + //uncomment below and update the code to test listCustomerGroups + //instance.listCustomerGroups(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('retrieveCustomerGroup', function() { + it('should call retrieveCustomerGroup successfully', function(done) { + //uncomment below and update the code to test retrieveCustomerGroup + //instance.retrieveCustomerGroup(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateCustomerGroup', function() { + it('should call updateCustomerGroup successfully', function(done) { + //uncomment below and update the code to test updateCustomerGroup + //instance.updateCustomerGroup(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); +}); diff --git a/test/api/CustomerSegmentsApi.spec.js b/test/api/CustomerSegmentsApi.spec.js new file mode 100644 index 0000000..12f9746 --- /dev/null +++ b/test/api/CustomerSegmentsApi.spec.js @@ -0,0 +1,56 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ + +describe('CustomerSegmentsApi', function() { + beforeEach(function() { + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + // Some APIs do not work with sandbox. Replace `sandbox` with `production` for those test suites. + oauth2.accessToken = accounts.sandbox.access_token; + this.api = new SquareConnect.CustomerSegmentsApi(); + }); + + afterEach(function(){ + }); + + describe('CustomerSegmentsApi', function() { + describe('listCustomerSegments', function() { + it('should call listCustomerSegments successfully', function(done) { + //uncomment below and update the code to test listCustomerSegments + //instance.listCustomerSegments(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('retrieveCustomerSegment', function() { + it('should call retrieveCustomerSegment successfully', function(done) { + //uncomment below and update the code to test retrieveCustomerSegment + //instance.retrieveCustomerSegment(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); +}); diff --git a/test/api/DevicesApi.spec.js b/test/api/DevicesApi.spec.js new file mode 100644 index 0000000..aff345b --- /dev/null +++ b/test/api/DevicesApi.spec.js @@ -0,0 +1,66 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ + +describe('DevicesApi', function() { + beforeEach(function() { + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + // Some APIs do not work with sandbox. Replace `sandbox` with `production` for those test suites. + oauth2.accessToken = accounts.sandbox.access_token; + this.api = new SquareConnect.DevicesApi(); + }); + + afterEach(function(){ + }); + + describe('DevicesApi', function() { + describe('createDeviceCode', function() { + it('should call createDeviceCode successfully', function(done) { + //uncomment below and update the code to test createDeviceCode + //instance.createDeviceCode(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getDeviceCode', function() { + it('should call getDeviceCode successfully', function(done) { + //uncomment below and update the code to test getDeviceCode + //instance.getDeviceCode(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listDeviceCodes', function() { + it('should call listDeviceCodes successfully', function(done) { + //uncomment below and update the code to test listDeviceCodes + //instance.listDeviceCodes(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); +}); diff --git a/test/api/TerminalApi.spec.js b/test/api/TerminalApi.spec.js new file mode 100644 index 0000000..cda307f --- /dev/null +++ b/test/api/TerminalApi.spec.js @@ -0,0 +1,76 @@ +const SquareConnect = require('../../src/index'); +const { + accounts, + expect, + handleUnexpectedError +} = require('../support/setup'); + +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ + +describe('TerminalApi', function() { + beforeEach(function() { + const defaultClient = SquareConnect.ApiClient.instance; + const oauth2 = defaultClient.authentications['oauth2']; + // Some APIs do not work with sandbox. Replace `sandbox` with `production` for those test suites. + oauth2.accessToken = accounts.sandbox.access_token; + this.api = new SquareConnect.TerminalApi(); + }); + + afterEach(function(){ + }); + + describe('TerminalApi', function() { + describe('cancelTerminalCheckout', function() { + it('should call cancelTerminalCheckout successfully', function(done) { + //uncomment below and update the code to test cancelTerminalCheckout + //instance.cancelTerminalCheckout(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('createTerminalCheckout', function() { + it('should call createTerminalCheckout successfully', function(done) { + //uncomment below and update the code to test createTerminalCheckout + //instance.createTerminalCheckout(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getTerminalCheckout', function() { + it('should call getTerminalCheckout successfully', function(done) { + //uncomment below and update the code to test getTerminalCheckout + //instance.getTerminalCheckout(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('searchTerminalCheckouts', function() { + it('should call searchTerminalCheckouts successfully', function(done) { + //uncomment below and update the code to test searchTerminalCheckouts + //instance.searchTerminalCheckouts(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); +}); diff --git a/test/model/AddGroupToCustomerRequest.spec.js b/test/model/AddGroupToCustomerRequest.spec.js new file mode 100644 index 0000000..1960b77 --- /dev/null +++ b/test/model/AddGroupToCustomerRequest.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('AddGroupToCustomerRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.AddGroupToCustomerRequest(); + }); + + it('should create an instance of AddGroupToCustomerRequest', function() { + // uncomment below and update the code to test AddGroupToCustomerRequest + //var instane = new SquareConnect.AddGroupToCustomerRequest(); + //expect(instance).to.be.a(SquareConnect.AddGroupToCustomerRequest); + }); + +}); diff --git a/test/model/AddGroupToCustomerResponse.spec.js b/test/model/AddGroupToCustomerResponse.spec.js new file mode 100644 index 0000000..3667622 --- /dev/null +++ b/test/model/AddGroupToCustomerResponse.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('AddGroupToCustomerResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.AddGroupToCustomerResponse(); + }); + + it('should create an instance of AddGroupToCustomerResponse', function() { + // uncomment below and update the code to test AddGroupToCustomerResponse + //var instane = new SquareConnect.AddGroupToCustomerResponse(); + //expect(instance).to.be.a(SquareConnect.AddGroupToCustomerResponse); + }); + + 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.AddGroupToCustomerResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CancelTerminalCheckoutRequest.spec.js b/test/model/CancelTerminalCheckoutRequest.spec.js new file mode 100644 index 0000000..368e5eb --- /dev/null +++ b/test/model/CancelTerminalCheckoutRequest.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('CancelTerminalCheckoutRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelTerminalCheckoutRequest(); + }); + + it('should create an instance of CancelTerminalCheckoutRequest', function() { + // uncomment below and update the code to test CancelTerminalCheckoutRequest + //var instane = new SquareConnect.CancelTerminalCheckoutRequest(); + //expect(instance).to.be.a(SquareConnect.CancelTerminalCheckoutRequest); + }); + +}); diff --git a/test/model/CancelTerminalCheckoutResponse.spec.js b/test/model/CancelTerminalCheckoutResponse.spec.js new file mode 100644 index 0000000..7889a9a --- /dev/null +++ b/test/model/CancelTerminalCheckoutResponse.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('CancelTerminalCheckoutResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CancelTerminalCheckoutResponse(); + }); + + it('should create an instance of CancelTerminalCheckoutResponse', function() { + // uncomment below and update the code to test CancelTerminalCheckoutResponse + //var instane = new SquareConnect.CancelTerminalCheckoutResponse(); + //expect(instance).to.be.a(SquareConnect.CancelTerminalCheckoutResponse); + }); + + 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.CancelTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); + it('should have the property checkout (base name: "checkout")', function() { + // uncomment below and update the code to test the property checkout + //var instane = new SquareConnect.CancelTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CashPaymentDetails.spec.js b/test/model/CashPaymentDetails.spec.js index cfbfe6d..cebee0f 100644 --- a/test/model/CashPaymentDetails.spec.js +++ b/test/model/CashPaymentDetails.spec.js @@ -20,7 +20,7 @@ describe('CashPaymentDetails', function() { it('should create an instance of CashPaymentDetails', function() { // uncomment below and update the code to test CashPaymentDetails - //var instance = new SquareConnect.CashPaymentDetails(); + //var instane = new SquareConnect.CashPaymentDetails(); //expect(instance).to.be.a(SquareConnect.CashPaymentDetails); }); diff --git a/test/model/CatalogQuickAmount.spec.js b/test/model/CatalogQuickAmount.spec.js new file mode 100644 index 0000000..e8da0d0 --- /dev/null +++ b/test/model/CatalogQuickAmount.spec.js @@ -0,0 +1,47 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('CatalogQuickAmount', function() { + beforeEach(function() { + this.api = new SquareConnect.CatalogQuickAmount(); + }); + + it('should create an instance of CatalogQuickAmount', function() { + // uncomment below and update the code to test CatalogQuickAmount + //var instane = new SquareConnect.CatalogQuickAmount(); + //expect(instance).to.be.a(SquareConnect.CatalogQuickAmount); + }); + + it('should have the property type (base name: "type")', function() { + // uncomment below and update the code to test the property type + //var instane = new SquareConnect.CatalogQuickAmount(); + //expect(instance).to.be(); + }); + it('should have the property amount (base name: "amount")', function() { + // uncomment below and update the code to test the property amount + //var instane = new SquareConnect.CatalogQuickAmount(); + //expect(instance).to.be(); + }); + it('should have the property score (base name: "score")', function() { + // uncomment below and update the code to test the property score + //var instane = new SquareConnect.CatalogQuickAmount(); + //expect(instance).to.be(); + }); + it('should have the property ordinal (base name: "ordinal")', function() { + // uncomment below and update the code to test the property ordinal + //var instane = new SquareConnect.CatalogQuickAmount(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CatalogQuickAmountType.spec.js b/test/model/CatalogQuickAmountType.spec.js new file mode 100644 index 0000000..05b740e --- /dev/null +++ b/test/model/CatalogQuickAmountType.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('CatalogQuickAmountType', function() { + beforeEach(function() { + }); + + it('should create an instance of CatalogQuickAmountType', function() { + // uncomment below and update the code to test CatalogQuickAmountType + //var instane = new SquareConnect.CatalogQuickAmountType(); + //expect(instance).to.be.a(SquareConnect.CatalogQuickAmountType); + }); + +}); diff --git a/test/model/CatalogQuickAmountsSettings.spec.js b/test/model/CatalogQuickAmountsSettings.spec.js new file mode 100644 index 0000000..fbfb343 --- /dev/null +++ b/test/model/CatalogQuickAmountsSettings.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('CatalogQuickAmountsSettings', function() { + beforeEach(function() { + this.api = new SquareConnect.CatalogQuickAmountsSettings(); + }); + + it('should create an instance of CatalogQuickAmountsSettings', function() { + // uncomment below and update the code to test CatalogQuickAmountsSettings + //var instane = new SquareConnect.CatalogQuickAmountsSettings(); + //expect(instance).to.be.a(SquareConnect.CatalogQuickAmountsSettings); + }); + + it('should have the property option (base name: "option")', function() { + // uncomment below and update the code to test the property option + //var instane = new SquareConnect.CatalogQuickAmountsSettings(); + //expect(instance).to.be(); + }); + it('should have the property eligibleForAutoAmounts (base name: "eligible_for_auto_amounts")', function() { + // uncomment below and update the code to test the property eligibleForAutoAmounts + //var instane = new SquareConnect.CatalogQuickAmountsSettings(); + //expect(instance).to.be(); + }); + it('should have the property amounts (base name: "amounts")', function() { + // uncomment below and update the code to test the property amounts + //var instane = new SquareConnect.CatalogQuickAmountsSettings(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CatalogQuickAmountsSettingsOption.spec.js b/test/model/CatalogQuickAmountsSettingsOption.spec.js new file mode 100644 index 0000000..53eee32 --- /dev/null +++ b/test/model/CatalogQuickAmountsSettingsOption.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('CatalogQuickAmountsSettingsOption', function() { + beforeEach(function() { + }); + + it('should create an instance of CatalogQuickAmountsSettingsOption', function() { + // uncomment below and update the code to test CatalogQuickAmountsSettingsOption + //var instane = new SquareConnect.CatalogQuickAmountsSettingsOption(); + //expect(instance).to.be.a(SquareConnect.CatalogQuickAmountsSettingsOption); + }); + +}); diff --git a/test/model/CreateCustomerGroupRequest.spec.js b/test/model/CreateCustomerGroupRequest.spec.js new file mode 100644 index 0000000..fb2ae12 --- /dev/null +++ b/test/model/CreateCustomerGroupRequest.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('CreateCustomerGroupRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateCustomerGroupRequest(); + }); + + it('should create an instance of CreateCustomerGroupRequest', function() { + // uncomment below and update the code to test CreateCustomerGroupRequest + //var instane = new SquareConnect.CreateCustomerGroupRequest(); + //expect(instance).to.be.a(SquareConnect.CreateCustomerGroupRequest); + }); + + 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.CreateCustomerGroupRequest(); + //expect(instance).to.be(); + }); + it('should have the property group (base name: "group")', function() { + // uncomment below and update the code to test the property group + //var instane = new SquareConnect.CreateCustomerGroupRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateCustomerGroupResponse.spec.js b/test/model/CreateCustomerGroupResponse.spec.js new file mode 100644 index 0000000..2b4bdd1 --- /dev/null +++ b/test/model/CreateCustomerGroupResponse.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('CreateCustomerGroupResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateCustomerGroupResponse(); + }); + + it('should create an instance of CreateCustomerGroupResponse', function() { + // uncomment below and update the code to test CreateCustomerGroupResponse + //var instane = new SquareConnect.CreateCustomerGroupResponse(); + //expect(instance).to.be.a(SquareConnect.CreateCustomerGroupResponse); + }); + + 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.CreateCustomerGroupResponse(); + //expect(instance).to.be(); + }); + it('should have the property group (base name: "group")', function() { + // uncomment below and update the code to test the property group + //var instane = new SquareConnect.CreateCustomerGroupResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateDeviceCodeRequest.spec.js b/test/model/CreateDeviceCodeRequest.spec.js new file mode 100644 index 0000000..41d47c7 --- /dev/null +++ b/test/model/CreateDeviceCodeRequest.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('CreateDeviceCodeRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateDeviceCodeRequest(); + }); + + it('should create an instance of CreateDeviceCodeRequest', function() { + // uncomment below and update the code to test CreateDeviceCodeRequest + //var instane = new SquareConnect.CreateDeviceCodeRequest(); + //expect(instance).to.be.a(SquareConnect.CreateDeviceCodeRequest); + }); + + 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.CreateDeviceCodeRequest(); + //expect(instance).to.be(); + }); + it('should have the property deviceCode (base name: "device_code")', function() { + // uncomment below and update the code to test the property deviceCode + //var instane = new SquareConnect.CreateDeviceCodeRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateDeviceCodeResponse.spec.js b/test/model/CreateDeviceCodeResponse.spec.js new file mode 100644 index 0000000..00a61c9 --- /dev/null +++ b/test/model/CreateDeviceCodeResponse.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('CreateDeviceCodeResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateDeviceCodeResponse(); + }); + + it('should create an instance of CreateDeviceCodeResponse', function() { + // uncomment below and update the code to test CreateDeviceCodeResponse + //var instane = new SquareConnect.CreateDeviceCodeResponse(); + //expect(instance).to.be.a(SquareConnect.CreateDeviceCodeResponse); + }); + + 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.CreateDeviceCodeResponse(); + //expect(instance).to.be(); + }); + it('should have the property deviceCode (base name: "device_code")', function() { + // uncomment below and update the code to test the property deviceCode + //var instane = new SquareConnect.CreateDeviceCodeResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateTerminalCheckoutRequest.spec.js b/test/model/CreateTerminalCheckoutRequest.spec.js new file mode 100644 index 0000000..24ea06c --- /dev/null +++ b/test/model/CreateTerminalCheckoutRequest.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('CreateTerminalCheckoutRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateTerminalCheckoutRequest(); + }); + + it('should create an instance of CreateTerminalCheckoutRequest', function() { + // uncomment below and update the code to test CreateTerminalCheckoutRequest + //var instane = new SquareConnect.CreateTerminalCheckoutRequest(); + //expect(instance).to.be.a(SquareConnect.CreateTerminalCheckoutRequest); + }); + + 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.CreateTerminalCheckoutRequest(); + //expect(instance).to.be(); + }); + it('should have the property checkout (base name: "checkout")', function() { + // uncomment below and update the code to test the property checkout + //var instane = new SquareConnect.CreateTerminalCheckoutRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CreateTerminalCheckoutResponse.spec.js b/test/model/CreateTerminalCheckoutResponse.spec.js new file mode 100644 index 0000000..8fd4868 --- /dev/null +++ b/test/model/CreateTerminalCheckoutResponse.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('CreateTerminalCheckoutResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.CreateTerminalCheckoutResponse(); + }); + + it('should create an instance of CreateTerminalCheckoutResponse', function() { + // uncomment below and update the code to test CreateTerminalCheckoutResponse + //var instane = new SquareConnect.CreateTerminalCheckoutResponse(); + //expect(instance).to.be.a(SquareConnect.CreateTerminalCheckoutResponse); + }); + + 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.CreateTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); + it('should have the property checkout (base name: "checkout")', function() { + // uncomment below and update the code to test the property checkout + //var instane = new SquareConnect.CreateTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CustomerGroup.spec.js b/test/model/CustomerGroup.spec.js new file mode 100644 index 0000000..c585a1a --- /dev/null +++ b/test/model/CustomerGroup.spec.js @@ -0,0 +1,47 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('CustomerGroup', function() { + beforeEach(function() { + this.api = new SquareConnect.CustomerGroup(); + }); + + it('should create an instance of CustomerGroup', function() { + // uncomment below and update the code to test CustomerGroup + //var instane = new SquareConnect.CustomerGroup(); + //expect(instance).to.be.a(SquareConnect.CustomerGroup); + }); + + 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.CustomerGroup(); + //expect(instance).to.be(); + }); + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instane = new SquareConnect.CustomerGroup(); + //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.CustomerGroup(); + //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.CustomerGroup(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/CustomerSegment.spec.js b/test/model/CustomerSegment.spec.js new file mode 100644 index 0000000..6437ac4 --- /dev/null +++ b/test/model/CustomerSegment.spec.js @@ -0,0 +1,47 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('CustomerSegment', function() { + beforeEach(function() { + this.api = new SquareConnect.CustomerSegment(); + }); + + it('should create an instance of CustomerSegment', function() { + // uncomment below and update the code to test CustomerSegment + //var instane = new SquareConnect.CustomerSegment(); + //expect(instance).to.be.a(SquareConnect.CustomerSegment); + }); + + 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.CustomerSegment(); + //expect(instance).to.be(); + }); + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instane = new SquareConnect.CustomerSegment(); + //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.CustomerSegment(); + //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.CustomerSegment(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeleteCustomerGroupRequest.spec.js b/test/model/DeleteCustomerGroupRequest.spec.js new file mode 100644 index 0000000..d2bad1c --- /dev/null +++ b/test/model/DeleteCustomerGroupRequest.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('DeleteCustomerGroupRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.DeleteCustomerGroupRequest(); + }); + + it('should create an instance of DeleteCustomerGroupRequest', function() { + // uncomment below and update the code to test DeleteCustomerGroupRequest + //var instane = new SquareConnect.DeleteCustomerGroupRequest(); + //expect(instance).to.be.a(SquareConnect.DeleteCustomerGroupRequest); + }); + +}); diff --git a/test/model/DeleteCustomerGroupResponse.spec.js b/test/model/DeleteCustomerGroupResponse.spec.js new file mode 100644 index 0000000..2b62a45 --- /dev/null +++ b/test/model/DeleteCustomerGroupResponse.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('DeleteCustomerGroupResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.DeleteCustomerGroupResponse(); + }); + + it('should create an instance of DeleteCustomerGroupResponse', function() { + // uncomment below and update the code to test DeleteCustomerGroupResponse + //var instane = new SquareConnect.DeleteCustomerGroupResponse(); + //expect(instance).to.be.a(SquareConnect.DeleteCustomerGroupResponse); + }); + + 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.DeleteCustomerGroupResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeviceCheckoutOptions.spec.js b/test/model/DeviceCheckoutOptions.spec.js new file mode 100644 index 0000000..e69a092 --- /dev/null +++ b/test/model/DeviceCheckoutOptions.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('DeviceCheckoutOptions', function() { + beforeEach(function() { + this.api = new SquareConnect.DeviceCheckoutOptions(); + }); + + it('should create an instance of DeviceCheckoutOptions', function() { + // uncomment below and update the code to test DeviceCheckoutOptions + //var instane = new SquareConnect.DeviceCheckoutOptions(); + //expect(instance).to.be.a(SquareConnect.DeviceCheckoutOptions); + }); + + 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.DeviceCheckoutOptions(); + //expect(instance).to.be(); + }); + it('should have the property skipReceiptScreen (base name: "skip_receipt_screen")', function() { + // uncomment below and update the code to test the property skipReceiptScreen + //var instane = new SquareConnect.DeviceCheckoutOptions(); + //expect(instance).to.be(); + }); + it('should have the property tipSettings (base name: "tip_settings")', function() { + // uncomment below and update the code to test the property tipSettings + //var instane = new SquareConnect.DeviceCheckoutOptions(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeviceCode.spec.js b/test/model/DeviceCode.spec.js new file mode 100644 index 0000000..c8fb8f3 --- /dev/null +++ b/test/model/DeviceCode.spec.js @@ -0,0 +1,82 @@ +/** + * 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('DeviceCode', function() { + beforeEach(function() { + this.api = new SquareConnect.DeviceCode(); + }); + + it('should create an instance of DeviceCode', function() { + // uncomment below and update the code to test DeviceCode + //var instane = new SquareConnect.DeviceCode(); + //expect(instance).to.be.a(SquareConnect.DeviceCode); + }); + + 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.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instane = new SquareConnect.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property code (base name: "code")', function() { + // uncomment below and update the code to test the property code + //var instane = new SquareConnect.DeviceCode(); + //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.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property productType (base name: "product_type")', function() { + // uncomment below and update the code to test the property productType + //var instane = new SquareConnect.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.DeviceCode(); + //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.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property pairBy (base name: "pair_by")', function() { + // uncomment below and update the code to test the property pairBy + //var instane = new SquareConnect.DeviceCode(); + //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.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property statusChangedAt (base name: "status_changed_at")', function() { + // uncomment below and update the code to test the property statusChangedAt + //var instane = new SquareConnect.DeviceCode(); + //expect(instance).to.be(); + }); + it('should have the property pairedAt (base name: "paired_at")', function() { + // uncomment below and update the code to test the property pairedAt + //var instane = new SquareConnect.DeviceCode(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/DeviceCodeStatus.spec.js b/test/model/DeviceCodeStatus.spec.js new file mode 100644 index 0000000..1d16dd7 --- /dev/null +++ b/test/model/DeviceCodeStatus.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('DeviceCodeStatus', function() { + beforeEach(function() { + }); + + it('should create an instance of DeviceCodeStatus', function() { + // uncomment below and update the code to test DeviceCodeStatus + //var instane = new SquareConnect.DeviceCodeStatus(); + //expect(instance).to.be.a(SquareConnect.DeviceCodeStatus); + }); + +}); diff --git a/test/model/FilterValue.spec.js b/test/model/FilterValue.spec.js new file mode 100644 index 0000000..a602c7b --- /dev/null +++ b/test/model/FilterValue.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('FilterValue', function() { + beforeEach(function() { + this.api = new SquareConnect.FilterValue(); + }); + + it('should create an instance of FilterValue', function() { + // uncomment below and update the code to test FilterValue + //var instane = new SquareConnect.FilterValue(); + //expect(instance).to.be.a(SquareConnect.FilterValue); + }); + + it('should have the property all (base name: "all")', function() { + // uncomment below and update the code to test the property all + //var instane = new SquareConnect.FilterValue(); + //expect(instance).to.be(); + }); + it('should have the property any (base name: "any")', function() { + // uncomment below and update the code to test the property any + //var instane = new SquareConnect.FilterValue(); + //expect(instance).to.be(); + }); + it('should have the property none (base name: "none")', function() { + // uncomment below and update the code to test the property none + //var instane = new SquareConnect.FilterValue(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/GetDeviceCodeRequest.spec.js b/test/model/GetDeviceCodeRequest.spec.js new file mode 100644 index 0000000..837e226 --- /dev/null +++ b/test/model/GetDeviceCodeRequest.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('GetDeviceCodeRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.GetDeviceCodeRequest(); + }); + + it('should create an instance of GetDeviceCodeRequest', function() { + // uncomment below and update the code to test GetDeviceCodeRequest + //var instane = new SquareConnect.GetDeviceCodeRequest(); + //expect(instance).to.be.a(SquareConnect.GetDeviceCodeRequest); + }); + +}); diff --git a/test/model/GetDeviceCodeResponse.spec.js b/test/model/GetDeviceCodeResponse.spec.js new file mode 100644 index 0000000..ecd7a44 --- /dev/null +++ b/test/model/GetDeviceCodeResponse.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('GetDeviceCodeResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.GetDeviceCodeResponse(); + }); + + it('should create an instance of GetDeviceCodeResponse', function() { + // uncomment below and update the code to test GetDeviceCodeResponse + //var instane = new SquareConnect.GetDeviceCodeResponse(); + //expect(instance).to.be.a(SquareConnect.GetDeviceCodeResponse); + }); + + 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.GetDeviceCodeResponse(); + //expect(instance).to.be(); + }); + it('should have the property deviceCode (base name: "device_code")', function() { + // uncomment below and update the code to test the property deviceCode + //var instane = new SquareConnect.GetDeviceCodeResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/GetTerminalCheckoutRequest.spec.js b/test/model/GetTerminalCheckoutRequest.spec.js new file mode 100644 index 0000000..b7024b4 --- /dev/null +++ b/test/model/GetTerminalCheckoutRequest.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('GetTerminalCheckoutRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.GetTerminalCheckoutRequest(); + }); + + it('should create an instance of GetTerminalCheckoutRequest', function() { + // uncomment below and update the code to test GetTerminalCheckoutRequest + //var instane = new SquareConnect.GetTerminalCheckoutRequest(); + //expect(instance).to.be.a(SquareConnect.GetTerminalCheckoutRequest); + }); + +}); diff --git a/test/model/GetTerminalCheckoutResponse.spec.js b/test/model/GetTerminalCheckoutResponse.spec.js new file mode 100644 index 0000000..8a7417b --- /dev/null +++ b/test/model/GetTerminalCheckoutResponse.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('GetTerminalCheckoutResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.GetTerminalCheckoutResponse(); + }); + + it('should create an instance of GetTerminalCheckoutResponse', function() { + // uncomment below and update the code to test GetTerminalCheckoutResponse + //var instane = new SquareConnect.GetTerminalCheckoutResponse(); + //expect(instance).to.be.a(SquareConnect.GetTerminalCheckoutResponse); + }); + + 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.GetTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); + it('should have the property checkout (base name: "checkout")', function() { + // uncomment below and update the code to test the property checkout + //var instane = new SquareConnect.GetTerminalCheckoutResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListCustomerGroupsRequest.spec.js b/test/model/ListCustomerGroupsRequest.spec.js new file mode 100644 index 0000000..cbbf01b --- /dev/null +++ b/test/model/ListCustomerGroupsRequest.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('ListCustomerGroupsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListCustomerGroupsRequest(); + }); + + it('should create an instance of ListCustomerGroupsRequest', function() { + // uncomment below and update the code to test ListCustomerGroupsRequest + //var instane = new SquareConnect.ListCustomerGroupsRequest(); + //expect(instance).to.be.a(SquareConnect.ListCustomerGroupsRequest); + }); + + 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.ListCustomerGroupsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListCustomerGroupsResponse.spec.js b/test/model/ListCustomerGroupsResponse.spec.js new file mode 100644 index 0000000..99b8e2c --- /dev/null +++ b/test/model/ListCustomerGroupsResponse.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('ListCustomerGroupsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListCustomerGroupsResponse(); + }); + + it('should create an instance of ListCustomerGroupsResponse', function() { + // uncomment below and update the code to test ListCustomerGroupsResponse + //var instane = new SquareConnect.ListCustomerGroupsResponse(); + //expect(instance).to.be.a(SquareConnect.ListCustomerGroupsResponse); + }); + + 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.ListCustomerGroupsResponse(); + //expect(instance).to.be(); + }); + it('should have the property groups (base name: "groups")', function() { + // uncomment below and update the code to test the property groups + //var instane = new SquareConnect.ListCustomerGroupsResponse(); + //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.ListCustomerGroupsResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListCustomerSegmentsRequest.spec.js b/test/model/ListCustomerSegmentsRequest.spec.js new file mode 100644 index 0000000..285125b --- /dev/null +++ b/test/model/ListCustomerSegmentsRequest.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('ListCustomerSegmentsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListCustomerSegmentsRequest(); + }); + + it('should create an instance of ListCustomerSegmentsRequest', function() { + // uncomment below and update the code to test ListCustomerSegmentsRequest + //var instane = new SquareConnect.ListCustomerSegmentsRequest(); + //expect(instance).to.be.a(SquareConnect.ListCustomerSegmentsRequest); + }); + + 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.ListCustomerSegmentsRequest(); + //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.ListCustomerSegmentsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListCustomerSegmentsResponse.spec.js b/test/model/ListCustomerSegmentsResponse.spec.js new file mode 100644 index 0000000..379867d --- /dev/null +++ b/test/model/ListCustomerSegmentsResponse.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('ListCustomerSegmentsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListCustomerSegmentsResponse(); + }); + + it('should create an instance of ListCustomerSegmentsResponse', function() { + // uncomment below and update the code to test ListCustomerSegmentsResponse + //var instane = new SquareConnect.ListCustomerSegmentsResponse(); + //expect(instance).to.be.a(SquareConnect.ListCustomerSegmentsResponse); + }); + + 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.ListCustomerSegmentsResponse(); + //expect(instance).to.be(); + }); + it('should have the property segments (base name: "segments")', function() { + // uncomment below and update the code to test the property segments + //var instane = new SquareConnect.ListCustomerSegmentsResponse(); + //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.ListCustomerSegmentsResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListDeviceCodesRequest.spec.js b/test/model/ListDeviceCodesRequest.spec.js new file mode 100644 index 0000000..14abd16 --- /dev/null +++ b/test/model/ListDeviceCodesRequest.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('ListDeviceCodesRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.ListDeviceCodesRequest(); + }); + + it('should create an instance of ListDeviceCodesRequest', function() { + // uncomment below and update the code to test ListDeviceCodesRequest + //var instane = new SquareConnect.ListDeviceCodesRequest(); + //expect(instance).to.be.a(SquareConnect.ListDeviceCodesRequest); + }); + + 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.ListDeviceCodesRequest(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.ListDeviceCodesRequest(); + //expect(instance).to.be(); + }); + it('should have the property productType (base name: "product_type")', function() { + // uncomment below and update the code to test the property productType + //var instane = new SquareConnect.ListDeviceCodesRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ListDeviceCodesResponse.spec.js b/test/model/ListDeviceCodesResponse.spec.js new file mode 100644 index 0000000..e9b7403 --- /dev/null +++ b/test/model/ListDeviceCodesResponse.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('ListDeviceCodesResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.ListDeviceCodesResponse(); + }); + + it('should create an instance of ListDeviceCodesResponse', function() { + // uncomment below and update the code to test ListDeviceCodesResponse + //var instane = new SquareConnect.ListDeviceCodesResponse(); + //expect(instance).to.be.a(SquareConnect.ListDeviceCodesResponse); + }); + + 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.ListDeviceCodesResponse(); + //expect(instance).to.be(); + }); + it('should have the property deviceCodes (base name: "device_codes")', function() { + // uncomment below and update the code to test the property deviceCodes + //var instane = new SquareConnect.ListDeviceCodesResponse(); + //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.ListDeviceCodesResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderCreated.spec.js b/test/model/OrderCreated.spec.js new file mode 100644 index 0000000..4a9911e --- /dev/null +++ b/test/model/OrderCreated.spec.js @@ -0,0 +1,52 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('OrderCreated', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderCreated(); + }); + + it('should create an instance of OrderCreated', function() { + // uncomment below and update the code to test OrderCreated + //var instane = new SquareConnect.OrderCreated(); + //expect(instance).to.be.a(SquareConnect.OrderCreated); + }); + + 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.OrderCreated(); + //expect(instance).to.be(); + }); + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.OrderCreated(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.OrderCreated(); + //expect(instance).to.be(); + }); + it('should have the property state (base name: "state")', function() { + // uncomment below and update the code to test the property state + //var instane = new SquareConnect.OrderCreated(); + //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.OrderCreated(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderCreatedObject.spec.js b/test/model/OrderCreatedObject.spec.js new file mode 100644 index 0000000..0d7fe5a --- /dev/null +++ b/test/model/OrderCreatedObject.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('OrderCreatedObject', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderCreatedObject(); + }); + + it('should create an instance of OrderCreatedObject', function() { + // uncomment below and update the code to test OrderCreatedObject + //var instane = new SquareConnect.OrderCreatedObject(); + //expect(instance).to.be.a(SquareConnect.OrderCreatedObject); + }); + + it('should have the property orderCreated (base name: "order_created")', function() { + // uncomment below and update the code to test the property orderCreated + //var instane = new SquareConnect.OrderCreatedObject(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.spec.js b/test/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.spec.js new file mode 100644 index 0000000..e3c889b --- /dev/null +++ b/test/model/OrderFulfillmentPickupDetailsCurbsidePickupDetails.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('OrderFulfillmentPickupDetailsCurbsidePickupDetails', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails(); + }); + + it('should create an instance of OrderFulfillmentPickupDetailsCurbsidePickupDetails', function() { + // uncomment below and update the code to test OrderFulfillmentPickupDetailsCurbsidePickupDetails + //var instane = new SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails(); + //expect(instance).to.be.a(SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails); + }); + + it('should have the property curbsideDetails (base name: "curbside_details")', function() { + // uncomment below and update the code to test the property curbsideDetails + //var instane = new SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails(); + //expect(instance).to.be(); + }); + it('should have the property buyerArrivedAt (base name: "buyer_arrived_at")', function() { + // uncomment below and update the code to test the property buyerArrivedAt + //var instane = new SquareConnect.OrderFulfillmentPickupDetailsCurbsidePickupDetails(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderFulfillmentUpdated.spec.js b/test/model/OrderFulfillmentUpdated.spec.js new file mode 100644 index 0000000..b845bbc --- /dev/null +++ b/test/model/OrderFulfillmentUpdated.spec.js @@ -0,0 +1,62 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('OrderFulfillmentUpdated', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderFulfillmentUpdated(); + }); + + it('should create an instance of OrderFulfillmentUpdated', function() { + // uncomment below and update the code to test OrderFulfillmentUpdated + //var instane = new SquareConnect.OrderFulfillmentUpdated(); + //expect(instance).to.be.a(SquareConnect.OrderFulfillmentUpdated); + }); + + 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.OrderFulfillmentUpdated(); + //expect(instance).to.be(); + }); + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.OrderFulfillmentUpdated(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.OrderFulfillmentUpdated(); + //expect(instance).to.be(); + }); + it('should have the property state (base name: "state")', function() { + // uncomment below and update the code to test the property state + //var instane = new SquareConnect.OrderFulfillmentUpdated(); + //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.OrderFulfillmentUpdated(); + //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.OrderFulfillmentUpdated(); + //expect(instance).to.be(); + }); + it('should have the property fulfillmentUpdate (base name: "fulfillment_update")', function() { + // uncomment below and update the code to test the property fulfillmentUpdate + //var instane = new SquareConnect.OrderFulfillmentUpdated(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderFulfillmentUpdatedObject.spec.js b/test/model/OrderFulfillmentUpdatedObject.spec.js new file mode 100644 index 0000000..d5b71a1 --- /dev/null +++ b/test/model/OrderFulfillmentUpdatedObject.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('OrderFulfillmentUpdatedObject', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderFulfillmentUpdatedObject(); + }); + + it('should create an instance of OrderFulfillmentUpdatedObject', function() { + // uncomment below and update the code to test OrderFulfillmentUpdatedObject + //var instane = new SquareConnect.OrderFulfillmentUpdatedObject(); + //expect(instance).to.be.a(SquareConnect.OrderFulfillmentUpdatedObject); + }); + + it('should have the property orderFulfillmentUpdated (base name: "order_fulfillment_updated")', function() { + // uncomment below and update the code to test the property orderFulfillmentUpdated + //var instane = new SquareConnect.OrderFulfillmentUpdatedObject(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderFulfillmentUpdatedUpdate.spec.js b/test/model/OrderFulfillmentUpdatedUpdate.spec.js new file mode 100644 index 0000000..bd750fb --- /dev/null +++ b/test/model/OrderFulfillmentUpdatedUpdate.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('OrderFulfillmentUpdatedUpdate', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderFulfillmentUpdatedUpdate(); + }); + + it('should create an instance of OrderFulfillmentUpdatedUpdate', function() { + // uncomment below and update the code to test OrderFulfillmentUpdatedUpdate + //var instane = new SquareConnect.OrderFulfillmentUpdatedUpdate(); + //expect(instance).to.be.a(SquareConnect.OrderFulfillmentUpdatedUpdate); + }); + + it('should have the property fulfillmentUid (base name: "fulfillment_uid")', function() { + // uncomment below and update the code to test the property fulfillmentUid + //var instane = new SquareConnect.OrderFulfillmentUpdatedUpdate(); + //expect(instance).to.be(); + }); + it('should have the property oldState (base name: "old_state")', function() { + // uncomment below and update the code to test the property oldState + //var instane = new SquareConnect.OrderFulfillmentUpdatedUpdate(); + //expect(instance).to.be(); + }); + it('should have the property newState (base name: "new_state")', function() { + // uncomment below and update the code to test the property newState + //var instane = new SquareConnect.OrderFulfillmentUpdatedUpdate(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderUpdated.spec.js b/test/model/OrderUpdated.spec.js new file mode 100644 index 0000000..37004cf --- /dev/null +++ b/test/model/OrderUpdated.spec.js @@ -0,0 +1,57 @@ +/** + * Square Connect API + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.3.0-SNAPSHOT + * + */ +const SquareConnect = require('../../src/index'); + +describe('OrderUpdated', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderUpdated(); + }); + + it('should create an instance of OrderUpdated', function() { + // uncomment below and update the code to test OrderUpdated + //var instane = new SquareConnect.OrderUpdated(); + //expect(instance).to.be.a(SquareConnect.OrderUpdated); + }); + + 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.OrderUpdated(); + //expect(instance).to.be(); + }); + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instane = new SquareConnect.OrderUpdated(); + //expect(instance).to.be(); + }); + it('should have the property locationId (base name: "location_id")', function() { + // uncomment below and update the code to test the property locationId + //var instane = new SquareConnect.OrderUpdated(); + //expect(instance).to.be(); + }); + it('should have the property state (base name: "state")', function() { + // uncomment below and update the code to test the property state + //var instane = new SquareConnect.OrderUpdated(); + //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.OrderUpdated(); + //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.OrderUpdated(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/OrderUpdatedObject.spec.js b/test/model/OrderUpdatedObject.spec.js new file mode 100644 index 0000000..67e8cba --- /dev/null +++ b/test/model/OrderUpdatedObject.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('OrderUpdatedObject', function() { + beforeEach(function() { + this.api = new SquareConnect.OrderUpdatedObject(); + }); + + it('should create an instance of OrderUpdatedObject', function() { + // uncomment below and update the code to test OrderUpdatedObject + //var instane = new SquareConnect.OrderUpdatedObject(); + //expect(instance).to.be.a(SquareConnect.OrderUpdatedObject); + }); + + it('should have the property orderUpdated (base name: "order_updated")', function() { + // uncomment below and update the code to test the property orderUpdated + //var instane = new SquareConnect.OrderUpdatedObject(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/PaymentOptions.spec.js b/test/model/PaymentOptions.spec.js new file mode 100644 index 0000000..df1a880 --- /dev/null +++ b/test/model/PaymentOptions.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('PaymentOptions', function() { + beforeEach(function() { + this.api = new SquareConnect.PaymentOptions(); + }); + + it('should create an instance of PaymentOptions', function() { + // uncomment below and update the code to test PaymentOptions + //var instane = new SquareConnect.PaymentOptions(); + //expect(instance).to.be.a(SquareConnect.PaymentOptions); + }); + + it('should have the property autocomplete (base name: "autocomplete")', function() { + // uncomment below and update the code to test the property autocomplete + //var instane = new SquareConnect.PaymentOptions(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/ProductType.spec.js b/test/model/ProductType.spec.js new file mode 100644 index 0000000..d503732 --- /dev/null +++ b/test/model/ProductType.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('ProductType', function() { + beforeEach(function() { + }); + + it('should create an instance of ProductType', function() { + // uncomment below and update the code to test ProductType + //var instane = new SquareConnect.ProductType(); + //expect(instance).to.be.a(SquareConnect.ProductType); + }); + +}); diff --git a/test/model/RemoveGroupFromCustomerRequest.spec.js b/test/model/RemoveGroupFromCustomerRequest.spec.js new file mode 100644 index 0000000..28fda8a --- /dev/null +++ b/test/model/RemoveGroupFromCustomerRequest.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('RemoveGroupFromCustomerRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.RemoveGroupFromCustomerRequest(); + }); + + it('should create an instance of RemoveGroupFromCustomerRequest', function() { + // uncomment below and update the code to test RemoveGroupFromCustomerRequest + //var instane = new SquareConnect.RemoveGroupFromCustomerRequest(); + //expect(instance).to.be.a(SquareConnect.RemoveGroupFromCustomerRequest); + }); + +}); diff --git a/test/model/RemoveGroupFromCustomerResponse.spec.js b/test/model/RemoveGroupFromCustomerResponse.spec.js new file mode 100644 index 0000000..98b4874 --- /dev/null +++ b/test/model/RemoveGroupFromCustomerResponse.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('RemoveGroupFromCustomerResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.RemoveGroupFromCustomerResponse(); + }); + + it('should create an instance of RemoveGroupFromCustomerResponse', function() { + // uncomment below and update the code to test RemoveGroupFromCustomerResponse + //var instane = new SquareConnect.RemoveGroupFromCustomerResponse(); + //expect(instance).to.be.a(SquareConnect.RemoveGroupFromCustomerResponse); + }); + + 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.RemoveGroupFromCustomerResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/RetrieveCustomerGroupRequest.spec.js b/test/model/RetrieveCustomerGroupRequest.spec.js new file mode 100644 index 0000000..dc0f758 --- /dev/null +++ b/test/model/RetrieveCustomerGroupRequest.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('RetrieveCustomerGroupRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveCustomerGroupRequest(); + }); + + it('should create an instance of RetrieveCustomerGroupRequest', function() { + // uncomment below and update the code to test RetrieveCustomerGroupRequest + //var instane = new SquareConnect.RetrieveCustomerGroupRequest(); + //expect(instance).to.be.a(SquareConnect.RetrieveCustomerGroupRequest); + }); + +}); diff --git a/test/model/RetrieveCustomerGroupResponse.spec.js b/test/model/RetrieveCustomerGroupResponse.spec.js new file mode 100644 index 0000000..c189b17 --- /dev/null +++ b/test/model/RetrieveCustomerGroupResponse.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('RetrieveCustomerGroupResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveCustomerGroupResponse(); + }); + + it('should create an instance of RetrieveCustomerGroupResponse', function() { + // uncomment below and update the code to test RetrieveCustomerGroupResponse + //var instane = new SquareConnect.RetrieveCustomerGroupResponse(); + //expect(instance).to.be.a(SquareConnect.RetrieveCustomerGroupResponse); + }); + + 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.RetrieveCustomerGroupResponse(); + //expect(instance).to.be(); + }); + it('should have the property group (base name: "group")', function() { + // uncomment below and update the code to test the property group + //var instane = new SquareConnect.RetrieveCustomerGroupResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/RetrieveCustomerSegmentRequest.spec.js b/test/model/RetrieveCustomerSegmentRequest.spec.js new file mode 100644 index 0000000..05301b5 --- /dev/null +++ b/test/model/RetrieveCustomerSegmentRequest.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('RetrieveCustomerSegmentRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveCustomerSegmentRequest(); + }); + + it('should create an instance of RetrieveCustomerSegmentRequest', function() { + // uncomment below and update the code to test RetrieveCustomerSegmentRequest + //var instane = new SquareConnect.RetrieveCustomerSegmentRequest(); + //expect(instance).to.be.a(SquareConnect.RetrieveCustomerSegmentRequest); + }); + +}); diff --git a/test/model/RetrieveCustomerSegmentResponse.spec.js b/test/model/RetrieveCustomerSegmentResponse.spec.js new file mode 100644 index 0000000..36cce24 --- /dev/null +++ b/test/model/RetrieveCustomerSegmentResponse.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('RetrieveCustomerSegmentResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.RetrieveCustomerSegmentResponse(); + }); + + it('should create an instance of RetrieveCustomerSegmentResponse', function() { + // uncomment below and update the code to test RetrieveCustomerSegmentResponse + //var instane = new SquareConnect.RetrieveCustomerSegmentResponse(); + //expect(instance).to.be.a(SquareConnect.RetrieveCustomerSegmentResponse); + }); + + 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.RetrieveCustomerSegmentResponse(); + //expect(instance).to.be(); + }); + it('should have the property segment (base name: "segment")', function() { + // uncomment below and update the code to test the property segment + //var instane = new SquareConnect.RetrieveCustomerSegmentResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchTerminalCheckoutsRequest.spec.js b/test/model/SearchTerminalCheckoutsRequest.spec.js new file mode 100644 index 0000000..a80b883 --- /dev/null +++ b/test/model/SearchTerminalCheckoutsRequest.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('SearchTerminalCheckoutsRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchTerminalCheckoutsRequest(); + }); + + it('should create an instance of SearchTerminalCheckoutsRequest', function() { + // uncomment below and update the code to test SearchTerminalCheckoutsRequest + //var instane = new SquareConnect.SearchTerminalCheckoutsRequest(); + //expect(instance).to.be.a(SquareConnect.SearchTerminalCheckoutsRequest); + }); + + 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.SearchTerminalCheckoutsRequest(); + //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.SearchTerminalCheckoutsRequest(); + //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.SearchTerminalCheckoutsRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/SearchTerminalCheckoutsResponse.spec.js b/test/model/SearchTerminalCheckoutsResponse.spec.js new file mode 100644 index 0000000..93f582a --- /dev/null +++ b/test/model/SearchTerminalCheckoutsResponse.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('SearchTerminalCheckoutsResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.SearchTerminalCheckoutsResponse(); + }); + + it('should create an instance of SearchTerminalCheckoutsResponse', function() { + // uncomment below and update the code to test SearchTerminalCheckoutsResponse + //var instane = new SquareConnect.SearchTerminalCheckoutsResponse(); + //expect(instance).to.be.a(SquareConnect.SearchTerminalCheckoutsResponse); + }); + + 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.SearchTerminalCheckoutsResponse(); + //expect(instance).to.be(); + }); + it('should have the property checkouts (base name: "checkouts")', function() { + // uncomment below and update the code to test the property checkouts + //var instane = new SquareConnect.SearchTerminalCheckoutsResponse(); + //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.SearchTerminalCheckoutsResponse(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalCheckout.spec.js b/test/model/TerminalCheckout.spec.js new file mode 100644 index 0000000..28c88f4 --- /dev/null +++ b/test/model/TerminalCheckout.spec.js @@ -0,0 +1,82 @@ +/** + * 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('TerminalCheckout', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalCheckout(); + }); + + it('should create an instance of TerminalCheckout', function() { + // uncomment below and update the code to test TerminalCheckout + //var instane = new SquareConnect.TerminalCheckout(); + //expect(instance).to.be.a(SquareConnect.TerminalCheckout); + }); + + 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.TerminalCheckout(); + //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.TerminalCheckout(); + //expect(instance).to.be(); + }); + it('should have the property referenceId (base name: "reference_id")', function() { + // uncomment below and update the code to test the property referenceId + //var instane = new SquareConnect.TerminalCheckout(); + //expect(instance).to.be(); + }); + it('should have the property note (base name: "note")', function() { + // uncomment below and update the code to test the property note + //var instane = new SquareConnect.TerminalCheckout(); + //expect(instance).to.be(); + }); + it('should have the property deviceOptions (base name: "device_options")', function() { + // uncomment below and update the code to test the property deviceOptions + //var instane = new SquareConnect.TerminalCheckout(); + //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.TerminalCheckout(); + //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.TerminalCheckout(); + //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.TerminalCheckout(); + //expect(instance).to.be(); + }); + it('should have the property paymentIds (base name: "payment_ids")', function() { + // uncomment below and update the code to test the property paymentIds + //var instane = new SquareConnect.TerminalCheckout(); + //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.TerminalCheckout(); + //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.TerminalCheckout(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalCheckoutCancelReason.spec.js b/test/model/TerminalCheckoutCancelReason.spec.js new file mode 100644 index 0000000..b2b977b --- /dev/null +++ b/test/model/TerminalCheckoutCancelReason.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('TerminalCheckoutCancelReason', function() { + beforeEach(function() { + }); + + it('should create an instance of TerminalCheckoutCancelReason', function() { + // uncomment below and update the code to test TerminalCheckoutCancelReason + //var instane = new SquareConnect.TerminalCheckoutCancelReason(); + //expect(instance).to.be.a(SquareConnect.TerminalCheckoutCancelReason); + }); + +}); diff --git a/test/model/TerminalCheckoutQuery.spec.js b/test/model/TerminalCheckoutQuery.spec.js new file mode 100644 index 0000000..1f3daaf --- /dev/null +++ b/test/model/TerminalCheckoutQuery.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('TerminalCheckoutQuery', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalCheckoutQuery(); + }); + + it('should create an instance of TerminalCheckoutQuery', function() { + // uncomment below and update the code to test TerminalCheckoutQuery + //var instane = new SquareConnect.TerminalCheckoutQuery(); + //expect(instance).to.be.a(SquareConnect.TerminalCheckoutQuery); + }); + + 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.TerminalCheckoutQuery(); + //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.TerminalCheckoutQuery(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalCheckoutQueryFilter.spec.js b/test/model/TerminalCheckoutQueryFilter.spec.js new file mode 100644 index 0000000..e9bfca0 --- /dev/null +++ b/test/model/TerminalCheckoutQueryFilter.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('TerminalCheckoutQueryFilter', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalCheckoutQueryFilter(); + }); + + it('should create an instance of TerminalCheckoutQueryFilter', function() { + // uncomment below and update the code to test TerminalCheckoutQueryFilter + //var instane = new SquareConnect.TerminalCheckoutQueryFilter(); + //expect(instance).to.be.a(SquareConnect.TerminalCheckoutQueryFilter); + }); + + 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.TerminalCheckoutQueryFilter(); + //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.TerminalCheckoutQueryFilter(); + //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.TerminalCheckoutQueryFilter(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TerminalCheckoutQuerySort.spec.js b/test/model/TerminalCheckoutQuerySort.spec.js new file mode 100644 index 0000000..f567760 --- /dev/null +++ b/test/model/TerminalCheckoutQuerySort.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('TerminalCheckoutQuerySort', function() { + beforeEach(function() { + this.api = new SquareConnect.TerminalCheckoutQuerySort(); + }); + + it('should create an instance of TerminalCheckoutQuerySort', function() { + // uncomment below and update the code to test TerminalCheckoutQuerySort + //var instane = new SquareConnect.TerminalCheckoutQuerySort(); + //expect(instance).to.be.a(SquareConnect.TerminalCheckoutQuerySort); + }); + + 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.TerminalCheckoutQuerySort(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/TipSettings.spec.js b/test/model/TipSettings.spec.js new file mode 100644 index 0000000..9bcb016 --- /dev/null +++ b/test/model/TipSettings.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('TipSettings', function() { + beforeEach(function() { + this.api = new SquareConnect.TipSettings(); + }); + + it('should create an instance of TipSettings', function() { + // uncomment below and update the code to test TipSettings + //var instane = new SquareConnect.TipSettings(); + //expect(instance).to.be.a(SquareConnect.TipSettings); + }); + + it('should have the property allowTipping (base name: "allow_tipping")', function() { + // uncomment below and update the code to test the property allowTipping + //var instane = new SquareConnect.TipSettings(); + //expect(instance).to.be(); + }); + it('should have the property separateTipScreen (base name: "separate_tip_screen")', function() { + // uncomment below and update the code to test the property separateTipScreen + //var instane = new SquareConnect.TipSettings(); + //expect(instance).to.be(); + }); + it('should have the property customTipField (base name: "custom_tip_field")', function() { + // uncomment below and update the code to test the property customTipField + //var instane = new SquareConnect.TipSettings(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/UpdateCustomerGroupRequest.spec.js b/test/model/UpdateCustomerGroupRequest.spec.js new file mode 100644 index 0000000..330d5cd --- /dev/null +++ b/test/model/UpdateCustomerGroupRequest.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('UpdateCustomerGroupRequest', function() { + beforeEach(function() { + this.api = new SquareConnect.UpdateCustomerGroupRequest(); + }); + + it('should create an instance of UpdateCustomerGroupRequest', function() { + // uncomment below and update the code to test UpdateCustomerGroupRequest + //var instane = new SquareConnect.UpdateCustomerGroupRequest(); + //expect(instance).to.be.a(SquareConnect.UpdateCustomerGroupRequest); + }); + + it('should have the property group (base name: "group")', function() { + // uncomment below and update the code to test the property group + //var instane = new SquareConnect.UpdateCustomerGroupRequest(); + //expect(instance).to.be(); + }); +}); diff --git a/test/model/UpdateCustomerGroupResponse.spec.js b/test/model/UpdateCustomerGroupResponse.spec.js new file mode 100644 index 0000000..da9c5b5 --- /dev/null +++ b/test/model/UpdateCustomerGroupResponse.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('UpdateCustomerGroupResponse', function() { + beforeEach(function() { + this.api = new SquareConnect.UpdateCustomerGroupResponse(); + }); + + it('should create an instance of UpdateCustomerGroupResponse', function() { + // uncomment below and update the code to test UpdateCustomerGroupResponse + //var instane = new SquareConnect.UpdateCustomerGroupResponse(); + //expect(instance).to.be.a(SquareConnect.UpdateCustomerGroupResponse); + }); + + 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.UpdateCustomerGroupResponse(); + //expect(instance).to.be(); + }); + it('should have the property group (base name: "group")', function() { + // uncomment below and update the code to test the property group + //var instane = new SquareConnect.UpdateCustomerGroupResponse(); + //expect(instance).to.be(); + }); +});