From ad5d5c2968a3b0aafff2faa7dc31163912ab190c Mon Sep 17 00:00:00 2001
From: Connect API Specification Generator
Date: Thu, 28 May 2020 15:41:47 +0000
Subject: [PATCH 1/3] Release 3.20200528.0
---
CHANGES.md | 69 +-
README.md | 85 +-
docs/AccumulateLoyaltyPointsRequest.md | 15 +
docs/AccumulateLoyaltyPointsResponse.md | 14 +
docs/AdjustLoyaltyPointsRequest.md | 14 +
docs/AdjustLoyaltyPointsResponse.md | 14 +
docs/CalculateLoyaltyPointsRequest.md | 14 +
docs/CalculateLoyaltyPointsResponse.md | 14 +
docs/CalculateOrderRequest.md | 14 +
docs/CalculateOrderResponse.md | 14 +
docs/CatalogCustomAttributeDefinition.md | 3 +-
...ogCustomAttributeDefinitionNumberConfig.md | 13 +
...ustomAttributeDefinitionSelectionConfig.md | 2 +-
docs/CatalogObjectType.md | 2 +
docs/CreateLoyaltyAccountRequest.md | 14 +
docs/CreateLoyaltyAccountResponse.md | 14 +
docs/CreateLoyaltyRewardRequest.md | 14 +
docs/CreateLoyaltyRewardResponse.md | 14 +
docs/CreatePaymentRequest.md | 6 +-
docs/Customer.md | 8 +-
docs/CustomerFilter.md | 5 +-
docs/CustomerQuery.md | 6 +-
docs/CustomerSort.md | 6 +-
docs/CustomerTextFilter.md | 14 +
docs/CustomersApi.md | 4 +-
docs/DeleteLoyaltyRewardRequest.md | 12 +
docs/DeleteLoyaltyRewardResponse.md | 13 +
docs/ListLoyaltyProgramsRequest.md | 12 +
docs/ListLoyaltyProgramsResponse.md | 14 +
docs/ListPaymentsRequest.md | 2 +-
docs/LoyaltyAccount.md | 21 +
docs/LoyaltyAccountMapping.md | 16 +
docs/LoyaltyAccountMappingType.md | 8 +
docs/LoyaltyApi.md | 664 +++++++++++++++
docs/LoyaltyEvent.md | 25 +
docs/LoyaltyEventAccumulatePoints.md | 15 +
docs/LoyaltyEventAdjustPoints.md | 15 +
docs/LoyaltyEventCreateReward.md | 15 +
docs/LoyaltyEventDateTimeFilter.md | 13 +
docs/LoyaltyEventDeleteReward.md | 15 +
docs/LoyaltyEventExpirePoints.md | 14 +
docs/LoyaltyEventFilter.md | 17 +
docs/LoyaltyEventLocationFilter.md | 13 +
docs/LoyaltyEventLoyaltyAccountFilter.md | 13 +
docs/LoyaltyEventOrderFilter.md | 13 +
docs/LoyaltyEventOther.md | 14 +
docs/LoyaltyEventQuery.md | 13 +
docs/LoyaltyEventRedeemReward.md | 15 +
docs/LoyaltyEventSource.md | 10 +
docs/LoyaltyEventType.md | 20 +
docs/LoyaltyEventTypeFilter.md | 13 +
docs/LoyaltyProgram.md | 21 +
docs/LoyaltyProgramAccrualRule.md | 17 +
docs/LoyaltyProgramAccrualRuleType.md | 14 +
docs/LoyaltyProgramExpirationPolicy.md | 13 +
docs/LoyaltyProgramRewardDefinition.md | 18 +
docs/LoyaltyProgramRewardDefinitionScope.md | 12 +
docs/LoyaltyProgramRewardDefinitionType.md | 10 +
docs/LoyaltyProgramRewardTier.md | 17 +
docs/LoyaltyProgramStatus.md | 10 +
docs/LoyaltyProgramTerminology.md | 14 +
docs/LoyaltyReward.md | 21 +
docs/LoyaltyRewardStatus.md | 12 +
docs/Order.md | 1 +
docs/OrderLineItemDiscount.md | 1 +
docs/OrderReward.md | 14 +
docs/OrdersApi.md | 50 ++
docs/Payment.md | 6 +-
docs/RedeemLoyaltyRewardRequest.md | 14 +
docs/RedeemLoyaltyRewardResponse.md | 14 +
docs/RetrieveLoyaltyAccountRequest.md | 12 +
docs/RetrieveLoyaltyAccountResponse.md | 14 +
docs/RetrieveLoyaltyRewardRequest.md | 12 +
docs/RetrieveLoyaltyRewardResponse.md | 14 +
docs/SearchLoyaltyAccountsRequest.md | 15 +
...yaltyAccountsRequestLoyaltyAccountQuery.md | 13 +
docs/SearchLoyaltyAccountsResponse.md | 15 +
docs/SearchLoyaltyEventsRequest.md | 15 +
docs/SearchLoyaltyEventsResponse.md | 15 +
docs/SearchLoyaltyRewardsRequest.md | 15 +
...LoyaltyRewardsRequestLoyaltyRewardQuery.md | 14 +
docs/SearchLoyaltyRewardsResponse.md | 15 +
docs/SearchOrdersFulfillmentFilter.md | 2 +-
package.json | 2 +-
src/ApiClient.js | 4 +-
src/api/ApplePayApi.js | 2 +-
src/api/BankAccountsApi.js | 6 +-
src/api/CashDrawersApi.js | 6 +-
src/api/CatalogApi.js | 22 +-
src/api/CheckoutApi.js | 2 +-
src/api/CustomerGroupsApi.js | 10 +-
src/api/CustomerSegmentsApi.js | 4 +-
src/api/CustomersApi.js | 28 +-
src/api/DevicesApi.js | 6 +-
src/api/DisputesApi.js | 16 +-
src/api/EmployeesApi.js | 4 +-
src/api/InventoryApi.js | 14 +-
src/api/LaborApi.js | 28 +-
src/api/LocationsApi.js | 8 +-
src/api/LoyaltyApi.js | 770 ++++++++++++++++++
src/api/MerchantsApi.js | 4 +-
src/api/MobileAuthorizationApi.js | 2 +-
src/api/OAuthApi.js | 6 +-
src/api/OrdersApi.js | 65 +-
src/api/PaymentsApi.js | 12 +-
src/api/RefundsApi.js | 6 +-
src/api/ReportingApi.js | 4 +-
src/api/TerminalApi.js | 8 +-
src/api/TransactionsApi.js | 14 +-
src/api/V1EmployeesApi.js | 32 +-
src/api/V1ItemsApi.js | 80 +-
src/api/V1LocationsApi.js | 4 +-
src/api/V1TransactionsApi.js | 22 +-
src/index.js | 398 ++++++++-
src/model/AccumulateLoyaltyPointsRequest.js | 88 ++
src/model/AccumulateLoyaltyPointsResponse.js | 77 ++
src/model/AdjustLoyaltyPointsRequest.js | 78 ++
src/model/AdjustLoyaltyPointsResponse.js | 77 ++
src/model/CalculateLoyaltyPointsRequest.js | 76 ++
src/model/CalculateLoyaltyPointsResponse.js | 76 ++
src/model/CalculateOrderRequest.js | 78 ++
src/model/CalculateOrderResponse.js | 77 ++
src/model/CatalogCustomAttributeDefinition.js | 13 +-
...ogCustomAttributeDefinitionNumberConfig.js | 66 ++
...ustomAttributeDefinitionSelectionConfig.js | 2 +-
src/model/CatalogObjectType.js | 5 +
src/model/CreateLoyaltyAccountRequest.js | 78 ++
src/model/CreateLoyaltyAccountResponse.js | 77 ++
src/model/CreateLoyaltyRewardRequest.js | 78 ++
src/model/CreateLoyaltyRewardResponse.js | 77 ++
src/model/CreatePaymentRequest.js | 6 +-
src/model/Customer.js | 13 +-
src/model/CustomerFilter.js | 30 +-
src/model/CustomerQuery.js | 6 +-
src/model/CustomerSort.js | 6 +-
src/model/CustomerTextFilter.js | 75 ++
src/model/DeleteLoyaltyRewardRequest.js | 57 ++
src/model/DeleteLoyaltyRewardResponse.js | 67 ++
src/model/ListLoyaltyProgramsRequest.js | 57 ++
src/model/ListLoyaltyProgramsResponse.js | 77 ++
src/model/ListPaymentsRequest.js | 2 +-
src/model/LoyaltyAccount.js | 141 ++++
src/model/LoyaltyAccountMapping.js | 95 +++
src/model/LoyaltyAccountMappingType.js | 40 +
src/model/LoyaltyEvent.js | 186 +++++
src/model/LoyaltyEventAccumulatePoints.js | 84 ++
src/model/LoyaltyEventAdjustPoints.js | 85 ++
src/model/LoyaltyEventCreateReward.js | 86 ++
src/model/LoyaltyEventDateTimeFilter.js | 68 ++
src/model/LoyaltyEventDeleteReward.js | 86 ++
src/model/LoyaltyEventExpirePoints.js | 77 ++
src/model/LoyaltyEventFilter.js | 107 +++
src/model/LoyaltyEventLocationFilter.js | 67 ++
src/model/LoyaltyEventLoyaltyAccountFilter.js | 67 ++
src/model/LoyaltyEventOrderFilter.js | 67 ++
src/model/LoyaltyEventOther.js | 77 ++
src/model/LoyaltyEventQuery.js | 67 ++
src/model/LoyaltyEventRedeemReward.js | 85 ++
src/model/LoyaltyEventSource.js | 45 +
src/model/LoyaltyEventType.js | 70 ++
src/model/LoyaltyEventTypeFilter.js | 67 ++
src/model/LoyaltyProgram.js | 150 ++++
src/model/LoyaltyProgramAccrualRule.js | 104 +++
src/model/LoyaltyProgramAccrualRuleType.js | 55 ++
src/model/LoyaltyProgramExpirationPolicy.js | 67 ++
src/model/LoyaltyProgramRewardDefinition.js | 114 +++
.../LoyaltyProgramRewardDefinitionScope.js | 50 ++
.../LoyaltyProgramRewardDefinitionType.js | 45 +
src/model/LoyaltyProgramRewardTier.js | 108 +++
src/model/LoyaltyProgramStatus.js | 45 +
src/model/LoyaltyProgramTerminology.js | 77 ++
src/model/LoyaltyReward.js | 140 ++++
src/model/LoyaltyRewardStatus.js | 50 ++
src/model/Order.js | 10 +
src/model/OrderLineItemDiscount.js | 9 +
src/model/OrderReward.js | 77 ++
src/model/Payment.js | 6 +-
src/model/RedeemLoyaltyRewardRequest.js | 77 ++
src/model/RedeemLoyaltyRewardResponse.js | 77 ++
src/model/RetrieveLoyaltyAccountRequest.js | 57 ++
src/model/RetrieveLoyaltyAccountResponse.js | 77 ++
src/model/RetrieveLoyaltyRewardRequest.js | 57 ++
src/model/RetrieveLoyaltyRewardResponse.js | 77 ++
src/model/SearchLoyaltyAccountsRequest.js | 85 ++
...yaltyAccountsRequestLoyaltyAccountQuery.js | 67 ++
src/model/SearchLoyaltyAccountsResponse.js | 86 ++
src/model/SearchLoyaltyEventsRequest.js | 85 ++
src/model/SearchLoyaltyEventsResponse.js | 86 ++
src/model/SearchLoyaltyRewardsRequest.js | 85 ++
...LoyaltyRewardsRequestLoyaltyRewardQuery.js | 76 ++
src/model/SearchLoyaltyRewardsResponse.js | 86 ++
src/model/SearchOrdersFulfillmentFilter.js | 5 +-
test/api/LoyaltyApi.spec.js | 166 ++++
.../AccumulateLoyaltyPointsRequest.spec.js | 42 +
.../AccumulateLoyaltyPointsResponse.spec.js | 37 +
test/model/AdjustLoyaltyPointsRequest.spec.js | 37 +
.../model/AdjustLoyaltyPointsResponse.spec.js | 37 +
.../CalculateLoyaltyPointsRequest.spec.js | 37 +
.../CalculateLoyaltyPointsResponse.spec.js | 37 +
test/model/CalculateOrderRequest.spec.js | 37 +
test/model/CalculateOrderResponse.spec.js | 37 +
...tomAttributeDefinitionNumberConfig.spec.js | 32 +
.../model/CreateLoyaltyAccountRequest.spec.js | 37 +
.../CreateLoyaltyAccountResponse.spec.js | 37 +
test/model/CreateLoyaltyRewardRequest.spec.js | 37 +
.../model/CreateLoyaltyRewardResponse.spec.js | 37 +
test/model/CustomerTextFilter.spec.js | 37 +
test/model/DeleteLoyaltyRewardRequest.spec.js | 27 +
.../model/DeleteLoyaltyRewardResponse.spec.js | 32 +
test/model/ListLoyaltyProgramsRequest.spec.js | 27 +
.../model/ListLoyaltyProgramsResponse.spec.js | 37 +
test/model/LoyaltyAccount.spec.js | 72 ++
test/model/LoyaltyAccountMapping.spec.js | 47 ++
test/model/LoyaltyAccountMappingType.spec.js | 26 +
test/model/LoyaltyEvent.spec.js | 92 +++
.../LoyaltyEventAccumulatePoints.spec.js | 42 +
test/model/LoyaltyEventAdjustPoints.spec.js | 42 +
test/model/LoyaltyEventCreateReward.spec.js | 42 +
test/model/LoyaltyEventDateTimeFilter.spec.js | 32 +
test/model/LoyaltyEventDeleteReward.spec.js | 42 +
test/model/LoyaltyEventExpirePoints.spec.js | 37 +
test/model/LoyaltyEventFilter.spec.js | 52 ++
test/model/LoyaltyEventLocationFilter.spec.js | 32 +
.../LoyaltyEventLoyaltyAccountFilter.spec.js | 32 +
test/model/LoyaltyEventOrderFilter.spec.js | 32 +
test/model/LoyaltyEventOther.spec.js | 37 +
test/model/LoyaltyEventQuery.spec.js | 32 +
test/model/LoyaltyEventRedeemReward.spec.js | 42 +
test/model/LoyaltyEventSource.spec.js | 26 +
test/model/LoyaltyEventType.spec.js | 26 +
test/model/LoyaltyEventTypeFilter.spec.js | 32 +
test/model/LoyaltyProgram.spec.js | 72 ++
test/model/LoyaltyProgramAccrualRule.spec.js | 52 ++
.../LoyaltyProgramAccrualRuleType.spec.js | 26 +
.../LoyaltyProgramExpirationPolicy.spec.js | 32 +
.../LoyaltyProgramRewardDefinition.spec.js | 57 ++
...oyaltyProgramRewardDefinitionScope.spec.js | 26 +
...LoyaltyProgramRewardDefinitionType.spec.js | 26 +
test/model/LoyaltyProgramRewardTier.spec.js | 52 ++
test/model/LoyaltyProgramStatus.spec.js | 26 +
test/model/LoyaltyProgramTerminology.spec.js | 37 +
test/model/LoyaltyReward.spec.js | 72 ++
test/model/LoyaltyRewardStatus.spec.js | 26 +
test/model/OrderReward.spec.js | 37 +
test/model/RedeemLoyaltyRewardRequest.spec.js | 37 +
.../model/RedeemLoyaltyRewardResponse.spec.js | 37 +
.../RetrieveLoyaltyAccountRequest.spec.js | 27 +
.../RetrieveLoyaltyAccountResponse.spec.js | 37 +
.../RetrieveLoyaltyRewardRequest.spec.js | 27 +
.../RetrieveLoyaltyRewardResponse.spec.js | 37 +
.../SearchLoyaltyAccountsRequest.spec.js | 42 +
...AccountsRequestLoyaltyAccountQuery.spec.js | 32 +
.../SearchLoyaltyAccountsResponse.spec.js | 42 +
test/model/SearchLoyaltyEventsRequest.spec.js | 42 +
.../model/SearchLoyaltyEventsResponse.spec.js | 42 +
.../model/SearchLoyaltyRewardsRequest.spec.js | 42 +
...tyRewardsRequestLoyaltyRewardQuery.spec.js | 37 +
.../SearchLoyaltyRewardsResponse.spec.js | 42 +
258 files changed, 11155 insertions(+), 255 deletions(-)
create mode 100644 docs/AccumulateLoyaltyPointsRequest.md
create mode 100644 docs/AccumulateLoyaltyPointsResponse.md
create mode 100644 docs/AdjustLoyaltyPointsRequest.md
create mode 100644 docs/AdjustLoyaltyPointsResponse.md
create mode 100644 docs/CalculateLoyaltyPointsRequest.md
create mode 100644 docs/CalculateLoyaltyPointsResponse.md
create mode 100644 docs/CalculateOrderRequest.md
create mode 100644 docs/CalculateOrderResponse.md
create mode 100644 docs/CatalogCustomAttributeDefinitionNumberConfig.md
create mode 100644 docs/CreateLoyaltyAccountRequest.md
create mode 100644 docs/CreateLoyaltyAccountResponse.md
create mode 100644 docs/CreateLoyaltyRewardRequest.md
create mode 100644 docs/CreateLoyaltyRewardResponse.md
create mode 100644 docs/CustomerTextFilter.md
create mode 100644 docs/DeleteLoyaltyRewardRequest.md
create mode 100644 docs/DeleteLoyaltyRewardResponse.md
create mode 100644 docs/ListLoyaltyProgramsRequest.md
create mode 100644 docs/ListLoyaltyProgramsResponse.md
create mode 100644 docs/LoyaltyAccount.md
create mode 100644 docs/LoyaltyAccountMapping.md
create mode 100644 docs/LoyaltyAccountMappingType.md
create mode 100644 docs/LoyaltyApi.md
create mode 100644 docs/LoyaltyEvent.md
create mode 100644 docs/LoyaltyEventAccumulatePoints.md
create mode 100644 docs/LoyaltyEventAdjustPoints.md
create mode 100644 docs/LoyaltyEventCreateReward.md
create mode 100644 docs/LoyaltyEventDateTimeFilter.md
create mode 100644 docs/LoyaltyEventDeleteReward.md
create mode 100644 docs/LoyaltyEventExpirePoints.md
create mode 100644 docs/LoyaltyEventFilter.md
create mode 100644 docs/LoyaltyEventLocationFilter.md
create mode 100644 docs/LoyaltyEventLoyaltyAccountFilter.md
create mode 100644 docs/LoyaltyEventOrderFilter.md
create mode 100644 docs/LoyaltyEventOther.md
create mode 100644 docs/LoyaltyEventQuery.md
create mode 100644 docs/LoyaltyEventRedeemReward.md
create mode 100644 docs/LoyaltyEventSource.md
create mode 100644 docs/LoyaltyEventType.md
create mode 100644 docs/LoyaltyEventTypeFilter.md
create mode 100644 docs/LoyaltyProgram.md
create mode 100644 docs/LoyaltyProgramAccrualRule.md
create mode 100644 docs/LoyaltyProgramAccrualRuleType.md
create mode 100644 docs/LoyaltyProgramExpirationPolicy.md
create mode 100644 docs/LoyaltyProgramRewardDefinition.md
create mode 100644 docs/LoyaltyProgramRewardDefinitionScope.md
create mode 100644 docs/LoyaltyProgramRewardDefinitionType.md
create mode 100644 docs/LoyaltyProgramRewardTier.md
create mode 100644 docs/LoyaltyProgramStatus.md
create mode 100644 docs/LoyaltyProgramTerminology.md
create mode 100644 docs/LoyaltyReward.md
create mode 100644 docs/LoyaltyRewardStatus.md
create mode 100644 docs/OrderReward.md
create mode 100644 docs/RedeemLoyaltyRewardRequest.md
create mode 100644 docs/RedeemLoyaltyRewardResponse.md
create mode 100644 docs/RetrieveLoyaltyAccountRequest.md
create mode 100644 docs/RetrieveLoyaltyAccountResponse.md
create mode 100644 docs/RetrieveLoyaltyRewardRequest.md
create mode 100644 docs/RetrieveLoyaltyRewardResponse.md
create mode 100644 docs/SearchLoyaltyAccountsRequest.md
create mode 100644 docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md
create mode 100644 docs/SearchLoyaltyAccountsResponse.md
create mode 100644 docs/SearchLoyaltyEventsRequest.md
create mode 100644 docs/SearchLoyaltyEventsResponse.md
create mode 100644 docs/SearchLoyaltyRewardsRequest.md
create mode 100644 docs/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md
create mode 100644 docs/SearchLoyaltyRewardsResponse.md
create mode 100644 src/api/LoyaltyApi.js
create mode 100644 src/model/AccumulateLoyaltyPointsRequest.js
create mode 100644 src/model/AccumulateLoyaltyPointsResponse.js
create mode 100644 src/model/AdjustLoyaltyPointsRequest.js
create mode 100644 src/model/AdjustLoyaltyPointsResponse.js
create mode 100644 src/model/CalculateLoyaltyPointsRequest.js
create mode 100644 src/model/CalculateLoyaltyPointsResponse.js
create mode 100644 src/model/CalculateOrderRequest.js
create mode 100644 src/model/CalculateOrderResponse.js
create mode 100644 src/model/CatalogCustomAttributeDefinitionNumberConfig.js
create mode 100644 src/model/CreateLoyaltyAccountRequest.js
create mode 100644 src/model/CreateLoyaltyAccountResponse.js
create mode 100644 src/model/CreateLoyaltyRewardRequest.js
create mode 100644 src/model/CreateLoyaltyRewardResponse.js
create mode 100644 src/model/CustomerTextFilter.js
create mode 100644 src/model/DeleteLoyaltyRewardRequest.js
create mode 100644 src/model/DeleteLoyaltyRewardResponse.js
create mode 100644 src/model/ListLoyaltyProgramsRequest.js
create mode 100644 src/model/ListLoyaltyProgramsResponse.js
create mode 100644 src/model/LoyaltyAccount.js
create mode 100644 src/model/LoyaltyAccountMapping.js
create mode 100644 src/model/LoyaltyAccountMappingType.js
create mode 100644 src/model/LoyaltyEvent.js
create mode 100644 src/model/LoyaltyEventAccumulatePoints.js
create mode 100644 src/model/LoyaltyEventAdjustPoints.js
create mode 100644 src/model/LoyaltyEventCreateReward.js
create mode 100644 src/model/LoyaltyEventDateTimeFilter.js
create mode 100644 src/model/LoyaltyEventDeleteReward.js
create mode 100644 src/model/LoyaltyEventExpirePoints.js
create mode 100644 src/model/LoyaltyEventFilter.js
create mode 100644 src/model/LoyaltyEventLocationFilter.js
create mode 100644 src/model/LoyaltyEventLoyaltyAccountFilter.js
create mode 100644 src/model/LoyaltyEventOrderFilter.js
create mode 100644 src/model/LoyaltyEventOther.js
create mode 100644 src/model/LoyaltyEventQuery.js
create mode 100644 src/model/LoyaltyEventRedeemReward.js
create mode 100644 src/model/LoyaltyEventSource.js
create mode 100644 src/model/LoyaltyEventType.js
create mode 100644 src/model/LoyaltyEventTypeFilter.js
create mode 100644 src/model/LoyaltyProgram.js
create mode 100644 src/model/LoyaltyProgramAccrualRule.js
create mode 100644 src/model/LoyaltyProgramAccrualRuleType.js
create mode 100644 src/model/LoyaltyProgramExpirationPolicy.js
create mode 100644 src/model/LoyaltyProgramRewardDefinition.js
create mode 100644 src/model/LoyaltyProgramRewardDefinitionScope.js
create mode 100644 src/model/LoyaltyProgramRewardDefinitionType.js
create mode 100644 src/model/LoyaltyProgramRewardTier.js
create mode 100644 src/model/LoyaltyProgramStatus.js
create mode 100644 src/model/LoyaltyProgramTerminology.js
create mode 100644 src/model/LoyaltyReward.js
create mode 100644 src/model/LoyaltyRewardStatus.js
create mode 100644 src/model/OrderReward.js
create mode 100644 src/model/RedeemLoyaltyRewardRequest.js
create mode 100644 src/model/RedeemLoyaltyRewardResponse.js
create mode 100644 src/model/RetrieveLoyaltyAccountRequest.js
create mode 100644 src/model/RetrieveLoyaltyAccountResponse.js
create mode 100644 src/model/RetrieveLoyaltyRewardRequest.js
create mode 100644 src/model/RetrieveLoyaltyRewardResponse.js
create mode 100644 src/model/SearchLoyaltyAccountsRequest.js
create mode 100644 src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js
create mode 100644 src/model/SearchLoyaltyAccountsResponse.js
create mode 100644 src/model/SearchLoyaltyEventsRequest.js
create mode 100644 src/model/SearchLoyaltyEventsResponse.js
create mode 100644 src/model/SearchLoyaltyRewardsRequest.js
create mode 100644 src/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.js
create mode 100644 src/model/SearchLoyaltyRewardsResponse.js
create mode 100644 test/api/LoyaltyApi.spec.js
create mode 100644 test/model/AccumulateLoyaltyPointsRequest.spec.js
create mode 100644 test/model/AccumulateLoyaltyPointsResponse.spec.js
create mode 100644 test/model/AdjustLoyaltyPointsRequest.spec.js
create mode 100644 test/model/AdjustLoyaltyPointsResponse.spec.js
create mode 100644 test/model/CalculateLoyaltyPointsRequest.spec.js
create mode 100644 test/model/CalculateLoyaltyPointsResponse.spec.js
create mode 100644 test/model/CalculateOrderRequest.spec.js
create mode 100644 test/model/CalculateOrderResponse.spec.js
create mode 100644 test/model/CatalogCustomAttributeDefinitionNumberConfig.spec.js
create mode 100644 test/model/CreateLoyaltyAccountRequest.spec.js
create mode 100644 test/model/CreateLoyaltyAccountResponse.spec.js
create mode 100644 test/model/CreateLoyaltyRewardRequest.spec.js
create mode 100644 test/model/CreateLoyaltyRewardResponse.spec.js
create mode 100644 test/model/CustomerTextFilter.spec.js
create mode 100644 test/model/DeleteLoyaltyRewardRequest.spec.js
create mode 100644 test/model/DeleteLoyaltyRewardResponse.spec.js
create mode 100644 test/model/ListLoyaltyProgramsRequest.spec.js
create mode 100644 test/model/ListLoyaltyProgramsResponse.spec.js
create mode 100644 test/model/LoyaltyAccount.spec.js
create mode 100644 test/model/LoyaltyAccountMapping.spec.js
create mode 100644 test/model/LoyaltyAccountMappingType.spec.js
create mode 100644 test/model/LoyaltyEvent.spec.js
create mode 100644 test/model/LoyaltyEventAccumulatePoints.spec.js
create mode 100644 test/model/LoyaltyEventAdjustPoints.spec.js
create mode 100644 test/model/LoyaltyEventCreateReward.spec.js
create mode 100644 test/model/LoyaltyEventDateTimeFilter.spec.js
create mode 100644 test/model/LoyaltyEventDeleteReward.spec.js
create mode 100644 test/model/LoyaltyEventExpirePoints.spec.js
create mode 100644 test/model/LoyaltyEventFilter.spec.js
create mode 100644 test/model/LoyaltyEventLocationFilter.spec.js
create mode 100644 test/model/LoyaltyEventLoyaltyAccountFilter.spec.js
create mode 100644 test/model/LoyaltyEventOrderFilter.spec.js
create mode 100644 test/model/LoyaltyEventOther.spec.js
create mode 100644 test/model/LoyaltyEventQuery.spec.js
create mode 100644 test/model/LoyaltyEventRedeemReward.spec.js
create mode 100644 test/model/LoyaltyEventSource.spec.js
create mode 100644 test/model/LoyaltyEventType.spec.js
create mode 100644 test/model/LoyaltyEventTypeFilter.spec.js
create mode 100644 test/model/LoyaltyProgram.spec.js
create mode 100644 test/model/LoyaltyProgramAccrualRule.spec.js
create mode 100644 test/model/LoyaltyProgramAccrualRuleType.spec.js
create mode 100644 test/model/LoyaltyProgramExpirationPolicy.spec.js
create mode 100644 test/model/LoyaltyProgramRewardDefinition.spec.js
create mode 100644 test/model/LoyaltyProgramRewardDefinitionScope.spec.js
create mode 100644 test/model/LoyaltyProgramRewardDefinitionType.spec.js
create mode 100644 test/model/LoyaltyProgramRewardTier.spec.js
create mode 100644 test/model/LoyaltyProgramStatus.spec.js
create mode 100644 test/model/LoyaltyProgramTerminology.spec.js
create mode 100644 test/model/LoyaltyReward.spec.js
create mode 100644 test/model/LoyaltyRewardStatus.spec.js
create mode 100644 test/model/OrderReward.spec.js
create mode 100644 test/model/RedeemLoyaltyRewardRequest.spec.js
create mode 100644 test/model/RedeemLoyaltyRewardResponse.spec.js
create mode 100644 test/model/RetrieveLoyaltyAccountRequest.spec.js
create mode 100644 test/model/RetrieveLoyaltyAccountResponse.spec.js
create mode 100644 test/model/RetrieveLoyaltyRewardRequest.spec.js
create mode 100644 test/model/RetrieveLoyaltyRewardResponse.spec.js
create mode 100644 test/model/SearchLoyaltyAccountsRequest.spec.js
create mode 100644 test/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.spec.js
create mode 100644 test/model/SearchLoyaltyAccountsResponse.spec.js
create mode 100644 test/model/SearchLoyaltyEventsRequest.spec.js
create mode 100644 test/model/SearchLoyaltyEventsResponse.spec.js
create mode 100644 test/model/SearchLoyaltyRewardsRequest.spec.js
create mode 100644 test/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.spec.js
create mode 100644 test/model/SearchLoyaltyRewardsResponse.spec.js
diff --git a/CHANGES.md b/CHANGES.md
index a9f4cdd..2a6200d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,41 @@
# Change Log
+## Version 3.20200528.0 (2020-05-28)
+## API releases
+
+* Loyalty API (beta):
+ * For an overview, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview).
+ * For technical reference, see [Loyalty API](https://developer.squareup.com/reference/square/loyalty-api).
+
+## Existing API updates
+
+* **Orders API**
+ * [CalculateOrder (beta)](https://developer.squareup.com/reference/square/orders-api/calculate-order) endpoint. Use the endpoint to calculate adjustments (for example, taxes and discounts) to an order for preview purposes. In response, the endpoint returns the order showing the calculated totals. You can use this endpoint with an existing order or an order that has not been created.
+ The endpoint does not update an existing order. It only returns a calculated view of the order that you provided in the request. To create or update an order, use the [CreateOrder](https://developer.squareup.com/reference/square/orders-api/create-order) and [UpdateOrder](https://developer.squareup.com/reference/square/orders-api/update-order) endpoints, respectively.
+ * [Order](https://developer.squareup.com/reference/square_2020-05-28/objects/Order) type. Two fields are added in support of the Loyalty API integration. For more information, see [Deferred reward creation](https://developer.squareup.com/docs/loyalty-api/overview#deferred-reward-creation). For an example, see [Redeem Points](https://developer.squareup.com/docs/loyalty-api/walkthrough1/redeem-points).
+ * `Order.rewards` represents rewards added to an order by calling the [CreateLoyaltyReward](https://developer.squareup.com/reference/square/loyalty-api/create-loyalty-reward) endpoint.
+ * `Order.discount.reward_ids` indicates that a discount is the result of the specified rewards that were added to an order using the `CreateLoyaltyReward` endpoint.
+
+* **Customers API**
+ * The [Search Customers](https://developer.squareup.com/reference/square/customers-api/search-customers) endpoint supports search by email address, phone number, and reference ID with the following additional query filters:
+ * The [`email_address` query filter](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#search-by-email-address) (beta) supports an [exact](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#exact-search-by-email-address) or [fuzzy](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#fuzzy-search-by-email-address) search for customer profiles by their email addresses.
+ * The [`phone_number` query filter](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#search-by-phone-number) (beta) supports an [exact](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#exact-search-by-phone-number) or [fuzzy](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#fuzzy-search-by-phone-number) search for customer profiles by their phone numbers.
+ * The [`reference_id` query filter](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#search-by-reference-id) (beta) supports an [exact](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#exact-search-by-reference-id) or [fuzzy](https://developer.squareup.com/docs/customers-api/cookbook/search-customers#fuzzy-search-by-reference-id) search for customer profiles by their reference IDs.
+ * The [`created_at`](https://developer.squareup.com/reference/square/objects/Customer#definition__property-created_at), [`updated_at`](https://developer.squareup.com/reference/square/objects/Customer#definition__property-updated_at), and [`id`](https://developer.squareup.com/reference/square/objects/Customer#definition__property-id) attributes on the [Customer](https://developer.squareup.com/reference/square_2020-05-28/objects/customers) resource are updated to be optional. As a result, they no longer are required input parameters when you call the Square SDKs to create a `Customer` object. You might need to update the dependent SDKs to the latest version to mediate breaking your existing code.
+
+
+## Square Webhooks
+
+* [Square Webhooks](https://developer.squareup.com/reference/square_2020-05-28/webhooks) (formerly v2 Webhooks). The status is changed from beta to general availability (GA).
+* [v1 Webhooks](webhooks-api/v1-tech-ref). The v1 Inventory and Timecards webooks are now deprecated and replaced by [inventory.count.updated](https://developer.squareup.com/reference/square_2020-05-28/webhooks/inventory.count.updated) and [labor.shift.updated](https://developer.squareup.com/reference/square_2020-05-28/webhooks/labor.shift.updated).
+
+
+
## Version 3.20200422.2 (2020-04-25)
## Existing API updates
* **OAuth API**
- * [Obtain Token](${SQUARE_TECH_REF}/oauth-api/revoke-token) endpoint: Removed the `scopes` property from the request body.
+ * [Obtain Token](https://developer.squareup.com/reference/square/oauth-api/revoke-token) endpoint: Removed the `scopes` property from the request body.
## Version 3.20200422.1 (2020-04-22)
@@ -19,17 +50,17 @@
## 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).
+ * For technical reference, see [Terminal API](https://developer.squareup.com/reference/square/terminal-api).
-* **Devices API.** The new Devices API lets a custom third-party POS app generate a code used to sign in to a Square Terminal to create a pairing that lets the POS app send terminal checkout requests. For technical reference, see [Devices API](${SQUARE_TECH_REF}/devices-api).
+* **Devices API.** The new Devices API lets a custom third-party POS app generate a code used to sign in to a Square Terminal to create a pairing that lets the POS app send terminal checkout requests. For technical reference, see [Devices API](https://developer.squareup.com/reference/square/devices-api).
* **Customer Groups API (beta).** The new Customer Groups API (Beta) enables full CRUD management of customer groups, including the ability to list, retrieve, create, update, and delete customer groups. Previously, this functionality was only available through the Square dashboard and point-of-sale product interfaces.
* For an overview, see [Overview](/customer-groups-api/what-it-does)
- * For technical reference, see [Customer Groups](${SQUARE_TECH_REF}/customer-groups-api).
+ * For technical reference, see [Customer Groups](https://developer.squareup.com/reference/square/customer-groups-api).
* **Customer Segments API (beta).** The new Customer Segments API (Beta) lets you list and retrieve customer segment (also called smart groups) information. Coupled with the new `segment_ids` field on the customer resource, this API lets you better understand and track the customer segments to which a customer belongs.
* For an overview, see [Overview](/customer-segmentss-api/what-it-does)
- * For technical reference, see [Customer Segments]( ${SQUARE_TECH_REF}/customer-segments-api).
+ * For technical reference, see [Customer Segments]( https://developer.squareup.com/reference/square/customer-segments-api).
* **New webhooks.** v2 Webhooks (beta) now supports webhooks for the following APIs:
@@ -41,29 +72,29 @@
## 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:
+ * [AddGroupToCustomer](https://developer.squareup.com/reference/square/customers-api/add-group-to-customer) endpoint. Added to add customer memberships to a customer group.
+ * [RemoveGroupFromCustomer](https://developer.squareup.com/reference/square/customers-api/remove-group-from-customer) endpoint. Added to remove customer memberships from a customer group.
+ * [Customer](https://developer.squareup.com/reference/square/obects/Customer) object. Updated as follows:
+ * [`group_ids`](https://developer.squareup.com/reference/square/obects/Customer#definition__property-group_ids) field. Added to designate groups the customer is in.
+ * [`segment_ids`](https://developer.squareup.com/reference/square/obects/Customer#definition__property-segment_ids) field. Added to designate segments the customer is in.
+ * [`groups`](https://developer.squareup.com/reference/square/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](https://developer.squareup.com/reference/square/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:
+ * [OrderFulfillmentPickupDetails](https://developer.squareup.com/reference/square/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.
+ * [RevokeToken](https://developer.squareup.com/reference/square/oauth-api/revoke-token) endpoint. Added a new field called [revoke_only_access_token](https://developer.squareup.com/reference/square/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](https://developer.squareup.com/reference/square/oauth-api/obtain-token) endpoint. Added a new field called [scopes](https://developer.squareup.com/reference/square/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.
+ * [CatalogQuickAmountsSettings](https://developer.squareup.com/reference/square/objects/CatalogQuickAmountsSettings) type. Added to support predefined custom payment amounts in the Square Register checkout dialog box.
* ENUM`CatalogItemProductType`. The ENUM value `GIFT_CARD` is now deprecated.
* **Payments API.** See [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees) for updated information about permission requirements, Square reporting of the application fee collected by an app, and how to collect fees internationally.
@@ -74,8 +105,8 @@
## 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:
- * `delay_duration`. In a [CreatePayment](${SQUARE_TECH_REF}/payments-api/create-payment) request, you can set `autocomplete` to false to get payment approval but not charge the payment source. You can now add this field to specify a time period to complete (or cancel) the payment. For more information, see [Delay capture](payments-api/take-payments).
+* **[Payments API](https://developer.squareup.com/reference/square/payments-api).** In support of the existing [Delayed capture](payments-api/take-payments) for payments, the following fields are added to the [Payment](https://developer.squareup.com/reference/square/objects/Payment) type:
+ * `delay_duration`. In a [CreatePayment](https://developer.squareup.com/reference/square/payments-api/create-payment) request, you can set `autocomplete` to false to get payment approval but not charge the payment source. You can now add this field to specify a time period to complete (or cancel) the payment. For more information, see [Delay capture](payments-api/take-payments).
* `delay_action`. Defines the action that Square takes on the payment when the `delay_duration` elapses. In this release, the API supports only the cancel payment action.
* `delayed_until`. Provides the date and time on Square servers when Square applies `delay_action` on the payment.
@@ -130,7 +161,7 @@ All SDKs have been updated to support the following changes:
Square is excited to announce the public release of customized SDKs for [Java](https://github.com/square/square-java-sdk) and [.NET](https://github.com/square/square-dotnet-sdk). For more information, see [Square SDKs](/sdks).
!!!
-* __GA release:__ SDKs updated to support new `receipt_url` and `receipt_number` fields added to the [Payment](${SQUARE_TECH_REF}/objects/Payment) type.
+* __GA release:__ SDKs updated to support new `receipt_url` and `receipt_number` fields added to the [Payment](https://developer.squareup.com/reference/square/objects/Payment) type.
* __Beta release:__ SDKs updated to support the new [CashDrawerShifts](cashdrawershift-api/reporting) API.
diff --git a/README.md b/README.md
index 878bfa1..29c8bfe 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,7 @@
[![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 will be replaced in Q3, 2020
+## 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.
@@ -151,6 +150,19 @@ Class | Method | HTTP request | Description
*SquareConnect.LocationsApi* | [**listLocations**](docs/LocationsApi.md#listLocations) | **GET** /v2/locations | ListLocations
*SquareConnect.LocationsApi* | [**retrieveLocation**](docs/LocationsApi.md#retrieveLocation) | **GET** /v2/locations/{location_id} | RetrieveLocation
*SquareConnect.LocationsApi* | [**updateLocation**](docs/LocationsApi.md#updateLocation) | **PUT** /v2/locations/{location_id} | UpdateLocation
+*SquareConnect.LoyaltyApi* | [**accumulateLoyaltyPoints**](docs/LoyaltyApi.md#accumulateLoyaltyPoints) | **POST** /v2/loyalty/accounts/{account_id}/accumulate | AccumulateLoyaltyPoints
+*SquareConnect.LoyaltyApi* | [**adjustLoyaltyPoints**](docs/LoyaltyApi.md#adjustLoyaltyPoints) | **POST** /v2/loyalty/accounts/{account_id}/adjust | AdjustLoyaltyPoints
+*SquareConnect.LoyaltyApi* | [**calculateLoyaltyPoints**](docs/LoyaltyApi.md#calculateLoyaltyPoints) | **POST** /v2/loyalty/programs/{program_id}/calculate | CalculateLoyaltyPoints
+*SquareConnect.LoyaltyApi* | [**createLoyaltyAccount**](docs/LoyaltyApi.md#createLoyaltyAccount) | **POST** /v2/loyalty/accounts | CreateLoyaltyAccount
+*SquareConnect.LoyaltyApi* | [**createLoyaltyReward**](docs/LoyaltyApi.md#createLoyaltyReward) | **POST** /v2/loyalty/rewards | CreateLoyaltyReward
+*SquareConnect.LoyaltyApi* | [**deleteLoyaltyReward**](docs/LoyaltyApi.md#deleteLoyaltyReward) | **DELETE** /v2/loyalty/rewards/{reward_id} | DeleteLoyaltyReward
+*SquareConnect.LoyaltyApi* | [**listLoyaltyPrograms**](docs/LoyaltyApi.md#listLoyaltyPrograms) | **GET** /v2/loyalty/programs | ListLoyaltyPrograms
+*SquareConnect.LoyaltyApi* | [**redeemLoyaltyReward**](docs/LoyaltyApi.md#redeemLoyaltyReward) | **POST** /v2/loyalty/rewards/{reward_id}/redeem | RedeemLoyaltyReward
+*SquareConnect.LoyaltyApi* | [**retrieveLoyaltyAccount**](docs/LoyaltyApi.md#retrieveLoyaltyAccount) | **GET** /v2/loyalty/accounts/{account_id} | RetrieveLoyaltyAccount
+*SquareConnect.LoyaltyApi* | [**retrieveLoyaltyReward**](docs/LoyaltyApi.md#retrieveLoyaltyReward) | **GET** /v2/loyalty/rewards/{reward_id} | RetrieveLoyaltyReward
+*SquareConnect.LoyaltyApi* | [**searchLoyaltyAccounts**](docs/LoyaltyApi.md#searchLoyaltyAccounts) | **POST** /v2/loyalty/accounts/search | SearchLoyaltyAccounts
+*SquareConnect.LoyaltyApi* | [**searchLoyaltyEvents**](docs/LoyaltyApi.md#searchLoyaltyEvents) | **POST** /v2/loyalty/events/search | SearchLoyaltyEvents
+*SquareConnect.LoyaltyApi* | [**searchLoyaltyRewards**](docs/LoyaltyApi.md#searchLoyaltyRewards) | **POST** /v2/loyalty/rewards/search | SearchLoyaltyRewards
*SquareConnect.MerchantsApi* | [**listMerchants**](docs/MerchantsApi.md#listMerchants) | **GET** /v2/merchants | ListMerchants
*SquareConnect.MerchantsApi* | [**retrieveMerchant**](docs/MerchantsApi.md#retrieveMerchant) | **GET** /v2/merchants/{merchant_id} | RetrieveMerchant
*SquareConnect.MobileAuthorizationApi* | [**createMobileAuthorizationCode**](docs/MobileAuthorizationApi.md#createMobileAuthorizationCode) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode
@@ -158,6 +170,7 @@ Class | Method | HTTP request | Description
*SquareConnect.OAuthApi* | [**renewToken**](docs/OAuthApi.md#renewToken) | **POST** /oauth2/clients/{client_id}/access-token/renew | RenewToken
*SquareConnect.OAuthApi* | [**revokeToken**](docs/OAuthApi.md#revokeToken) | **POST** /oauth2/revoke | RevokeToken
*SquareConnect.OrdersApi* | [**batchRetrieveOrders**](docs/OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
+*SquareConnect.OrdersApi* | [**calculateOrder**](docs/OrdersApi.md#calculateOrder) | **POST** /v2/orders/calculate | CalculateOrder
*SquareConnect.OrdersApi* | [**createOrder**](docs/OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
*SquareConnect.OrdersApi* | [**payOrder**](docs/OrdersApi.md#payOrder) | **POST** /v2/orders/{order_id}/pay | PayOrder
*SquareConnect.OrdersApi* | [**searchOrders**](docs/OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders
@@ -259,12 +272,16 @@ Class | Method | HTTP request | Description
- [SquareConnect.AcceptDisputeRequest](docs/AcceptDisputeRequest.md)
- [SquareConnect.AcceptDisputeResponse](docs/AcceptDisputeResponse.md)
+ - [SquareConnect.AccumulateLoyaltyPointsRequest](docs/AccumulateLoyaltyPointsRequest.md)
+ - [SquareConnect.AccumulateLoyaltyPointsResponse](docs/AccumulateLoyaltyPointsResponse.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)
- [SquareConnect.Address](docs/Address.md)
+ - [SquareConnect.AdjustLoyaltyPointsRequest](docs/AdjustLoyaltyPointsRequest.md)
+ - [SquareConnect.AdjustLoyaltyPointsResponse](docs/AdjustLoyaltyPointsResponse.md)
- [SquareConnect.BalancePaymentDetails](docs/BalancePaymentDetails.md)
- [SquareConnect.BankAccount](docs/BankAccount.md)
- [SquareConnect.BankAccountStatus](docs/BankAccountStatus.md)
@@ -286,6 +303,10 @@ Class | Method | HTTP request | Description
- [SquareConnect.BreakType](docs/BreakType.md)
- [SquareConnect.BusinessHours](docs/BusinessHours.md)
- [SquareConnect.BusinessHoursPeriod](docs/BusinessHoursPeriod.md)
+ - [SquareConnect.CalculateLoyaltyPointsRequest](docs/CalculateLoyaltyPointsRequest.md)
+ - [SquareConnect.CalculateLoyaltyPointsResponse](docs/CalculateLoyaltyPointsResponse.md)
+ - [SquareConnect.CalculateOrderRequest](docs/CalculateOrderRequest.md)
+ - [SquareConnect.CalculateOrderResponse](docs/CalculateOrderResponse.md)
- [SquareConnect.CancelPaymentByIdempotencyKeyRequest](docs/CancelPaymentByIdempotencyKeyRequest.md)
- [SquareConnect.CancelPaymentByIdempotencyKeyResponse](docs/CancelPaymentByIdempotencyKeyResponse.md)
- [SquareConnect.CancelPaymentRequest](docs/CancelPaymentRequest.md)
@@ -308,6 +329,7 @@ Class | Method | HTTP request | Description
- [SquareConnect.CatalogCategory](docs/CatalogCategory.md)
- [SquareConnect.CatalogCustomAttributeDefinition](docs/CatalogCustomAttributeDefinition.md)
- [SquareConnect.CatalogCustomAttributeDefinitionAppVisibility](docs/CatalogCustomAttributeDefinitionAppVisibility.md)
+ - [SquareConnect.CatalogCustomAttributeDefinitionNumberConfig](docs/CatalogCustomAttributeDefinitionNumberConfig.md)
- [SquareConnect.CatalogCustomAttributeDefinitionSelectionConfig](docs/CatalogCustomAttributeDefinitionSelectionConfig.md)
- [SquareConnect.CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection](docs/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md)
- [SquareConnect.CatalogCustomAttributeDefinitionSellerVisibility](docs/CatalogCustomAttributeDefinitionSellerVisibility.md)
@@ -392,6 +414,10 @@ Class | Method | HTTP request | Description
- [SquareConnect.CreateDisputeEvidenceTextResponse](docs/CreateDisputeEvidenceTextResponse.md)
- [SquareConnect.CreateLocationRequest](docs/CreateLocationRequest.md)
- [SquareConnect.CreateLocationResponse](docs/CreateLocationResponse.md)
+ - [SquareConnect.CreateLoyaltyAccountRequest](docs/CreateLoyaltyAccountRequest.md)
+ - [SquareConnect.CreateLoyaltyAccountResponse](docs/CreateLoyaltyAccountResponse.md)
+ - [SquareConnect.CreateLoyaltyRewardRequest](docs/CreateLoyaltyRewardRequest.md)
+ - [SquareConnect.CreateLoyaltyRewardResponse](docs/CreateLoyaltyRewardResponse.md)
- [SquareConnect.CreateMobileAuthorizationCodeRequest](docs/CreateMobileAuthorizationCodeRequest.md)
- [SquareConnect.CreateMobileAuthorizationCodeResponse](docs/CreateMobileAuthorizationCodeResponse.md)
- [SquareConnect.CreateOrderRequest](docs/CreateOrderRequest.md)
@@ -417,6 +443,7 @@ Class | Method | HTTP request | Description
- [SquareConnect.CustomerSegment](docs/CustomerSegment.md)
- [SquareConnect.CustomerSort](docs/CustomerSort.md)
- [SquareConnect.CustomerSortField](docs/CustomerSortField.md)
+ - [SquareConnect.CustomerTextFilter](docs/CustomerTextFilter.md)
- [SquareConnect.DateRange](docs/DateRange.md)
- [SquareConnect.DayOfWeek](docs/DayOfWeek.md)
- [SquareConnect.DeleteBreakTypeRequest](docs/DeleteBreakTypeRequest.md)
@@ -429,6 +456,8 @@ Class | Method | HTTP request | Description
- [SquareConnect.DeleteCustomerGroupResponse](docs/DeleteCustomerGroupResponse.md)
- [SquareConnect.DeleteCustomerRequest](docs/DeleteCustomerRequest.md)
- [SquareConnect.DeleteCustomerResponse](docs/DeleteCustomerResponse.md)
+ - [SquareConnect.DeleteLoyaltyRewardRequest](docs/DeleteLoyaltyRewardRequest.md)
+ - [SquareConnect.DeleteLoyaltyRewardResponse](docs/DeleteLoyaltyRewardResponse.md)
- [SquareConnect.DeleteShiftRequest](docs/DeleteShiftRequest.md)
- [SquareConnect.DeleteShiftResponse](docs/DeleteShiftResponse.md)
- [SquareConnect.Device](docs/Device.md)
@@ -511,6 +540,8 @@ Class | Method | HTTP request | Description
- [SquareConnect.ListEmployeesResponse](docs/ListEmployeesResponse.md)
- [SquareConnect.ListLocationsRequest](docs/ListLocationsRequest.md)
- [SquareConnect.ListLocationsResponse](docs/ListLocationsResponse.md)
+ - [SquareConnect.ListLoyaltyProgramsRequest](docs/ListLoyaltyProgramsRequest.md)
+ - [SquareConnect.ListLoyaltyProgramsResponse](docs/ListLoyaltyProgramsResponse.md)
- [SquareConnect.ListMerchantsRequest](docs/ListMerchantsRequest.md)
- [SquareConnect.ListMerchantsResponse](docs/ListMerchantsResponse.md)
- [SquareConnect.ListPaymentRefundsRequest](docs/ListPaymentRefundsRequest.md)
@@ -527,6 +558,38 @@ Class | Method | HTTP request | Description
- [SquareConnect.LocationCapability](docs/LocationCapability.md)
- [SquareConnect.LocationStatus](docs/LocationStatus.md)
- [SquareConnect.LocationType](docs/LocationType.md)
+ - [SquareConnect.LoyaltyAccount](docs/LoyaltyAccount.md)
+ - [SquareConnect.LoyaltyAccountMapping](docs/LoyaltyAccountMapping.md)
+ - [SquareConnect.LoyaltyAccountMappingType](docs/LoyaltyAccountMappingType.md)
+ - [SquareConnect.LoyaltyEvent](docs/LoyaltyEvent.md)
+ - [SquareConnect.LoyaltyEventAccumulatePoints](docs/LoyaltyEventAccumulatePoints.md)
+ - [SquareConnect.LoyaltyEventAdjustPoints](docs/LoyaltyEventAdjustPoints.md)
+ - [SquareConnect.LoyaltyEventCreateReward](docs/LoyaltyEventCreateReward.md)
+ - [SquareConnect.LoyaltyEventDateTimeFilter](docs/LoyaltyEventDateTimeFilter.md)
+ - [SquareConnect.LoyaltyEventDeleteReward](docs/LoyaltyEventDeleteReward.md)
+ - [SquareConnect.LoyaltyEventExpirePoints](docs/LoyaltyEventExpirePoints.md)
+ - [SquareConnect.LoyaltyEventFilter](docs/LoyaltyEventFilter.md)
+ - [SquareConnect.LoyaltyEventLocationFilter](docs/LoyaltyEventLocationFilter.md)
+ - [SquareConnect.LoyaltyEventLoyaltyAccountFilter](docs/LoyaltyEventLoyaltyAccountFilter.md)
+ - [SquareConnect.LoyaltyEventOrderFilter](docs/LoyaltyEventOrderFilter.md)
+ - [SquareConnect.LoyaltyEventOther](docs/LoyaltyEventOther.md)
+ - [SquareConnect.LoyaltyEventQuery](docs/LoyaltyEventQuery.md)
+ - [SquareConnect.LoyaltyEventRedeemReward](docs/LoyaltyEventRedeemReward.md)
+ - [SquareConnect.LoyaltyEventSource](docs/LoyaltyEventSource.md)
+ - [SquareConnect.LoyaltyEventType](docs/LoyaltyEventType.md)
+ - [SquareConnect.LoyaltyEventTypeFilter](docs/LoyaltyEventTypeFilter.md)
+ - [SquareConnect.LoyaltyProgram](docs/LoyaltyProgram.md)
+ - [SquareConnect.LoyaltyProgramAccrualRule](docs/LoyaltyProgramAccrualRule.md)
+ - [SquareConnect.LoyaltyProgramAccrualRuleType](docs/LoyaltyProgramAccrualRuleType.md)
+ - [SquareConnect.LoyaltyProgramExpirationPolicy](docs/LoyaltyProgramExpirationPolicy.md)
+ - [SquareConnect.LoyaltyProgramRewardDefinition](docs/LoyaltyProgramRewardDefinition.md)
+ - [SquareConnect.LoyaltyProgramRewardDefinitionScope](docs/LoyaltyProgramRewardDefinitionScope.md)
+ - [SquareConnect.LoyaltyProgramRewardDefinitionType](docs/LoyaltyProgramRewardDefinitionType.md)
+ - [SquareConnect.LoyaltyProgramRewardTier](docs/LoyaltyProgramRewardTier.md)
+ - [SquareConnect.LoyaltyProgramStatus](docs/LoyaltyProgramStatus.md)
+ - [SquareConnect.LoyaltyProgramTerminology](docs/LoyaltyProgramTerminology.md)
+ - [SquareConnect.LoyaltyReward](docs/LoyaltyReward.md)
+ - [SquareConnect.LoyaltyRewardStatus](docs/LoyaltyRewardStatus.md)
- [SquareConnect.MeasurementUnit](docs/MeasurementUnit.md)
- [SquareConnect.MeasurementUnitArea](docs/MeasurementUnitArea.md)
- [SquareConnect.MeasurementUnitCustom](docs/MeasurementUnitCustom.md)
@@ -576,6 +639,7 @@ Class | Method | HTTP request | Description
- [SquareConnect.OrderReturnLineItemModifier](docs/OrderReturnLineItemModifier.md)
- [SquareConnect.OrderReturnServiceCharge](docs/OrderReturnServiceCharge.md)
- [SquareConnect.OrderReturnTax](docs/OrderReturnTax.md)
+ - [SquareConnect.OrderReward](docs/OrderReward.md)
- [SquareConnect.OrderRoundingAdjustment](docs/OrderRoundingAdjustment.md)
- [SquareConnect.OrderServiceCharge](docs/OrderServiceCharge.md)
- [SquareConnect.OrderServiceChargeCalculationPhase](docs/OrderServiceChargeCalculationPhase.md)
@@ -591,6 +655,8 @@ Class | Method | HTTP request | Description
- [SquareConnect.ProcessingFee](docs/ProcessingFee.md)
- [SquareConnect.Product](docs/Product.md)
- [SquareConnect.ProductType](docs/ProductType.md)
+ - [SquareConnect.RedeemLoyaltyRewardRequest](docs/RedeemLoyaltyRewardRequest.md)
+ - [SquareConnect.RedeemLoyaltyRewardResponse](docs/RedeemLoyaltyRewardResponse.md)
- [SquareConnect.Refund](docs/Refund.md)
- [SquareConnect.RefundPaymentRequest](docs/RefundPaymentRequest.md)
- [SquareConnect.RefundPaymentResponse](docs/RefundPaymentResponse.md)
@@ -630,6 +696,10 @@ Class | Method | HTTP request | Description
- [SquareConnect.RetrieveInventoryPhysicalCountResponse](docs/RetrieveInventoryPhysicalCountResponse.md)
- [SquareConnect.RetrieveLocationRequest](docs/RetrieveLocationRequest.md)
- [SquareConnect.RetrieveLocationResponse](docs/RetrieveLocationResponse.md)
+ - [SquareConnect.RetrieveLoyaltyAccountRequest](docs/RetrieveLoyaltyAccountRequest.md)
+ - [SquareConnect.RetrieveLoyaltyAccountResponse](docs/RetrieveLoyaltyAccountResponse.md)
+ - [SquareConnect.RetrieveLoyaltyRewardRequest](docs/RetrieveLoyaltyRewardRequest.md)
+ - [SquareConnect.RetrieveLoyaltyRewardResponse](docs/RetrieveLoyaltyRewardResponse.md)
- [SquareConnect.RetrieveMerchantRequest](docs/RetrieveMerchantRequest.md)
- [SquareConnect.RetrieveMerchantResponse](docs/RetrieveMerchantResponse.md)
- [SquareConnect.RetrieveTransactionRequest](docs/RetrieveTransactionRequest.md)
@@ -640,6 +710,14 @@ Class | Method | HTTP request | Description
- [SquareConnect.SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md)
- [SquareConnect.SearchCustomersRequest](docs/SearchCustomersRequest.md)
- [SquareConnect.SearchCustomersResponse](docs/SearchCustomersResponse.md)
+ - [SquareConnect.SearchLoyaltyAccountsRequest](docs/SearchLoyaltyAccountsRequest.md)
+ - [SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery](docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md)
+ - [SquareConnect.SearchLoyaltyAccountsResponse](docs/SearchLoyaltyAccountsResponse.md)
+ - [SquareConnect.SearchLoyaltyEventsRequest](docs/SearchLoyaltyEventsRequest.md)
+ - [SquareConnect.SearchLoyaltyEventsResponse](docs/SearchLoyaltyEventsResponse.md)
+ - [SquareConnect.SearchLoyaltyRewardsRequest](docs/SearchLoyaltyRewardsRequest.md)
+ - [SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery](docs/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md)
+ - [SquareConnect.SearchLoyaltyRewardsResponse](docs/SearchLoyaltyRewardsResponse.md)
- [SquareConnect.SearchOrdersCustomerFilter](docs/SearchOrdersCustomerFilter.md)
- [SquareConnect.SearchOrdersDateTimeFilter](docs/SearchOrdersDateTimeFilter.md)
- [SquareConnect.SearchOrdersFilter](docs/SearchOrdersFilter.md)
@@ -885,6 +963,7 @@ Class | Method | HTTP request | Description
- **Authorization URL**: https://connect.squareup.com/oauth2/authorize
- **Scopes**:
- 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.
+ - CASH_DRAWER_READ: __HTTP Method__: `GET` Grants read access to cash drawer shift information. For example, to call the ListCashDrawerShifts 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.
@@ -894,6 +973,8 @@ Class | Method | HTTP request | Description
- INVENTORY_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to inventory information. For example, to call the BatchChangeInventory endpoint.
- ITEMS_READ: __HTTP Method__: `GET` Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
- ITEMS_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to product catalog information. For example, to modify or add to a product catalog.
+ - LOYALTY_READ: __HTTP Method__: `GET` Grants read access to loyalty information. For example, to call the ListLoyaltyPrograms endpoint.
+ - LOYALTY_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to loyalty information. For example, to call the CreateLoyaltyAccount endpoint.
- MERCHANT_PROFILE_READ: __HTTP Method__: `GET` Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
- ORDERS_READ: __HTTP Method__: `GET` Grants read access to order information. For example, to call the BatchRetrieveOrders endpoint.
- ORDERS_WRITE: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to order information. For example, to call the CreateCheckout endpoint.
diff --git a/docs/AccumulateLoyaltyPointsRequest.md b/docs/AccumulateLoyaltyPointsRequest.md
new file mode 100644
index 0000000..918503a
--- /dev/null
+++ b/docs/AccumulateLoyaltyPointsRequest.md
@@ -0,0 +1,15 @@
+# SquareConnect.AccumulateLoyaltyPointsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to accumulate points for a purchase.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**accumulate_points** | [**LoyaltyEventAccumulatePoints**](LoyaltyEventAccumulatePoints.md) | The points to add to the account. If you are using the Orders API to manage orders, you specify the order ID. Otherwise, specify the points to add. |
+**idempotency_key** | **String** | A unique string that identifies the `AccumulateLoyaltyPoints` request. Keys can be any valid string but must be unique for every request. |
+**location_id** | **String** | The `location` where the purchase was made. |
+
+
diff --git a/docs/AccumulateLoyaltyPointsResponse.md b/docs/AccumulateLoyaltyPointsResponse.md
new file mode 100644
index 0000000..a80c722
--- /dev/null
+++ b/docs/AccumulateLoyaltyPointsResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.AccumulateLoyaltyPointsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response containing the resulting loyalty event.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**event** | [**LoyaltyEvent**](LoyaltyEvent.md) | The resulting loyalty event. | [optional]
+
+
diff --git a/docs/AdjustLoyaltyPointsRequest.md b/docs/AdjustLoyaltyPointsRequest.md
new file mode 100644
index 0000000..f0e70be
--- /dev/null
+++ b/docs/AdjustLoyaltyPointsRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.AdjustLoyaltyPointsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to adjust (add or subtract) points manually.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**idempotency_key** | **String** | A unique string that identifies this `AdjustLoyaltyPoints` request. Keys can be any valid string, but must be unique for every request. |
+**adjust_points** | [**LoyaltyEventAdjustPoints**](LoyaltyEventAdjustPoints.md) | The points to adjust (add or subtract) and the reason for the adjustment. |
+
+
diff --git a/docs/AdjustLoyaltyPointsResponse.md b/docs/AdjustLoyaltyPointsResponse.md
new file mode 100644
index 0000000..5a13cea
--- /dev/null
+++ b/docs/AdjustLoyaltyPointsResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.AdjustLoyaltyPointsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the loyalty event that resulted from the successful API call.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**event** | [**LoyaltyEvent**](LoyaltyEvent.md) | The resulting event data for adjusting points. | [optional]
+
+
diff --git a/docs/CalculateLoyaltyPointsRequest.md b/docs/CalculateLoyaltyPointsRequest.md
new file mode 100644
index 0000000..165b126
--- /dev/null
+++ b/docs/CalculateLoyaltyPointsRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.CalculateLoyaltyPointsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to calculate the points that a buyer can earn from a specified purchase.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **String** | The `order` ID for which to calculate the points. Specify this field if your application uses the Orders API to process orders. Otherwise, specify the `transaction_amount`. | [optional]
+**transaction_amount_money** | [**Money**](Money.md) | The purchase amount for which to calculate the points. Specify this field if your application does not use the Orders API to process orders. Otherwise, specify the `order_id`. | [optional]
+
+
diff --git a/docs/CalculateLoyaltyPointsResponse.md b/docs/CalculateLoyaltyPointsResponse.md
new file mode 100644
index 0000000..7b20826
--- /dev/null
+++ b/docs/CalculateLoyaltyPointsResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.CalculateLoyaltyPointsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the points that the buyer can earn from a specified purchase.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**points** | **Number** | The points that the buyer can earn from a specified purchase. | [optional]
+
+
diff --git a/docs/CalculateOrderRequest.md b/docs/CalculateOrderRequest.md
new file mode 100644
index 0000000..228541a
--- /dev/null
+++ b/docs/CalculateOrderRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.CalculateOrderRequest
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order** | [**Order**](Order.md) | The order to be calculated. Expects the entire order, not a sparse update. |
+**proposed_rewards** | [**[OrderReward]**](OrderReward.md) | Identifies one or more loyalty reward tiers to apply during order calculation. The discounts defined by the reward tiers are added to the order only to preview the effect of applying the specified reward(s). The reward(s) do not correspond to actual redemptions, that is, no `reward`s are created. Therefore, the reward `id`s are random strings used only to reference the reward tier. | [optional]
+
+
diff --git a/docs/CalculateOrderResponse.md b/docs/CalculateOrderResponse.md
new file mode 100644
index 0000000..6855768
--- /dev/null
+++ b/docs/CalculateOrderResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.CalculateOrderResponse
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order** | [**Order**](Order.md) | The calculated version of the order provided in the request. | [optional]
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+
+
diff --git a/docs/CatalogCustomAttributeDefinition.md b/docs/CatalogCustomAttributeDefinition.md
index c421f5a..13407ef 100644
--- a/docs/CatalogCustomAttributeDefinition.md
+++ b/docs/CatalogCustomAttributeDefinition.md
@@ -12,10 +12,11 @@ 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. At least one type must be included. 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 |
**seller_visibility** | **String** | The visibility of a custom attribute in seller-facing UIs (including Square Point of Sale applications and Square Dashboard). May be modified. See [CatalogCustomAttributeDefinitionSellerVisibility](#type-catalogcustomattributedefinitionsellervisibility) for possible values | [optional]
**app_visibility** | **String** | The visibility of a custom attribute to applications other than the application that created the attribute. See [CatalogCustomAttributeDefinitionAppVisibility](#type-catalogcustomattributedefinitionappvisibility) for possible values | [optional]
**string_config** | [**CatalogCustomAttributeDefinitionStringConfig**](CatalogCustomAttributeDefinitionStringConfig.md) | Optionally, populated when `type` = `STRING`, unset otherwise. | [optional]
+**number_config** | [**CatalogCustomAttributeDefinitionNumberConfig**](CatalogCustomAttributeDefinitionNumberConfig.md) | | [optional]
**selection_config** | [**CatalogCustomAttributeDefinitionSelectionConfig**](CatalogCustomAttributeDefinitionSelectionConfig.md) | Populated when `type` is set to `SELECTION`, unset otherwise. | [optional]
**custom_attribute_usage_count** | **Number** | __Read-only.__ The number of custom attributes that reference this custom attribute definition. Set by the server in response to a ListCatalog request with `include_counts` set to `true`. If the actual count is greater than 100, `custom_attribute_usage_count` will be set to `100`. | [optional]
**key** | **String** | The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters [a-zA-Z0-9_-]. | [optional]
diff --git a/docs/CatalogCustomAttributeDefinitionNumberConfig.md b/docs/CatalogCustomAttributeDefinitionNumberConfig.md
new file mode 100644
index 0000000..3e2d078
--- /dev/null
+++ b/docs/CatalogCustomAttributeDefinitionNumberConfig.md
@@ -0,0 +1,13 @@
+# SquareConnect.CatalogCustomAttributeDefinitionNumberConfig
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**precision** | **Number** | An integer between 0 and 5 that represents the maximum number of positions allowed after the decimal in number custom attribute values For example: - if the precision is 0, the quantity can be 1, 2, 3, etc. - if the precision is 1, the quantity can be 0.1, 0.2, etc. - if the precision is 2, the quantity can be 0.01, 0.12, etc. Default: 3 | [optional]
+
+
diff --git a/docs/CatalogCustomAttributeDefinitionSelectionConfig.md b/docs/CatalogCustomAttributeDefinitionSelectionConfig.md
index 4ce51c6..0d10da4 100644
--- a/docs/CatalogCustomAttributeDefinitionSelectionConfig.md
+++ b/docs/CatalogCustomAttributeDefinitionSelectionConfig.md
@@ -8,7 +8,7 @@ Configuration associated with `SELECTION`-type custom attribute definitions.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**max_allowed_selections** | **Number** | The maximum number of selections that can be set. The maximum value for this attribute is 100. May be modified, but changing the value will not affect existing custom attribute values on objects. Clients need to handle Custom Attributes with more selected values than allowed by this limit. | [optional]
+**max_allowed_selections** | **Number** | The maximum number of selections that can be set. The maximum value for this attribute is 100. The default value is 1. The value can be modified, but changing the value will not affect existing custom attribute values on objects. Clients need to handle custom attributes with more selected values than allowed by this limit. | [optional]
**allowed_selections** | [**[CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection]**](CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection.md) | The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100 selections can be defined. Can be modified. | [optional]
diff --git a/docs/CatalogObjectType.md b/docs/CatalogObjectType.md
index 4e8c173..bf77124 100644
--- a/docs/CatalogObjectType.md
+++ b/docs/CatalogObjectType.md
@@ -31,6 +31,8 @@
* `ITEM_OPTION_VAL` (value: `"ITEM_OPTION_VAL"`)
+* `CUSTOM_ATTRIBUTE_DEFINITION` (value: `"CUSTOM_ATTRIBUTE_DEFINITION"`)
+
* `QUICK_AMOUNTS_SETTINGS` (value: `"QUICK_AMOUNTS_SETTINGS"`)
diff --git a/docs/CreateLoyaltyAccountRequest.md b/docs/CreateLoyaltyAccountRequest.md
new file mode 100644
index 0000000..dcf5602
--- /dev/null
+++ b/docs/CreateLoyaltyAccountRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.CreateLoyaltyAccountRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to create a new loyalty account.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_account** | [**LoyaltyAccount**](LoyaltyAccount.md) | The loyalty account to create. |
+**idempotency_key** | **String** | A unique string that identifies this `CreateLoyaltyAccount` request. Keys can be any valid string, but must be unique for every request. |
+
+
diff --git a/docs/CreateLoyaltyAccountResponse.md b/docs/CreateLoyaltyAccountResponse.md
new file mode 100644
index 0000000..d0c4a5a
--- /dev/null
+++ b/docs/CreateLoyaltyAccountResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.CreateLoyaltyAccountResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes loyalty account created.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**loyalty_account** | [**LoyaltyAccount**](LoyaltyAccount.md) | The newly created loyalty account. | [optional]
+
+
diff --git a/docs/CreateLoyaltyRewardRequest.md b/docs/CreateLoyaltyRewardRequest.md
new file mode 100644
index 0000000..a6c76ee
--- /dev/null
+++ b/docs/CreateLoyaltyRewardRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.CreateLoyaltyRewardRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to create a loyalty reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reward** | [**LoyaltyReward**](LoyaltyReward.md) | The reward to create. |
+**idempotency_key** | **String** | A unique string that identifies this `CreateLoyaltyReward` request. Keys can be any valid string, but must be unique for every request. |
+
+
diff --git a/docs/CreateLoyaltyRewardResponse.md b/docs/CreateLoyaltyRewardResponse.md
new file mode 100644
index 0000000..689376a
--- /dev/null
+++ b/docs/CreateLoyaltyRewardResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.CreateLoyaltyRewardResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the loyalty reward created.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**reward** | [**LoyaltyReward**](LoyaltyReward.md) | The loyalty reward created. | [optional]
+
+
diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md
index 3a17c11..5da1b5c 100644
--- a/docs/CreatePaymentRequest.md
+++ b/docs/CreatePaymentRequest.md
@@ -2,7 +2,7 @@
### Description
-Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
+Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
## Properties
Name | Type | Description | Notes
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
**delay_duration** | **String** | The duration of time after the payment's creation when Square automatically cancels the payment. This automatic cancellation applies only to payments that don't reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value of 1 minute. Notes: This feature is only supported for card payments. This parameter can only be set for a delayed capture payment (`autocomplete=false`). Default: - Card Present payments: \"PT36H\" (36 hours) from the creation time. - Card Not Present payments: \"P7D\" (7 days) from the creation time. | [optional] [beta]
**autocomplete** | **Boolean** | If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed (captured) or canceled (voided). For more information, see [Delayed Payments](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments). Default: true | [optional]
**order_id** | **String** | Associate a previously created order with this payment | [optional]
-**customer_id** | **String** | The ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API. | [optional]
+**customer_id** | **String** | The `Customer` ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API. | [optional]
**location_id** | **String** | The location ID to associate with the payment. If not specified, the default location is used. | [optional]
**reference_id** | **String** | A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters. | [optional]
**verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](https://developer.squareup.com/docs/sca-overview). | [optional]
@@ -24,6 +24,6 @@ Name | Type | Description | Notes
**billing_address** | [**Address**](Address.md) | The buyer's billing address. | [optional]
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address. | [optional]
**note** | **String** | An optional note to be entered by the developer when creating a payment Limit 500 characters. | [optional]
-**statement_description_identifier** | **String** | Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Limit 20 characters. Note that the statement_description_identifier may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. | [optional] [beta]
+**statement_description_identifier** | **String** | Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. | [optional] [beta]
diff --git a/docs/Customer.md b/docs/Customer.md
index 2092b8e..ec489ed 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 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. |
+**id** | **String** | A unique Square-assigned ID for the customer profile. | [optional]
+**created_at** | **String** | The timestamp when the customer profile was created, in RFC 3339 format. | [optional]
+**updated_at** | **String** | The timestamp when the customer profile was last updated, in RFC 3339 format. | [optional]
**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,7 @@ 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 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]
+**groups** | [**[CustomerGroupInfo]**](CustomerGroupInfo.md) | The customer groups and segments the customer belongs to. This deprecated field has been replaced with the dedicated `group_ids` for customer groups and the dedicated `segment_ids` field for customer segments. You can retrieve information about a given customer group and segment respectively using the Customer Groups API and Customer Segments API. | [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 c9d488b..861c290 100644
--- a/docs/CustomerFilter.md
+++ b/docs/CustomerFilter.md
@@ -10,6 +10,9 @@ 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]
+**email_address** | [**CustomerTextFilter**](CustomerTextFilter.md) | A filter to [select customers by email address](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-email-address) visible to the seller. This filter is case insensitive. For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-email-address), this filter causes the search to return customer profiles whose `email_address` field value are identical to the email address provided in the query. For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-email-address), this filter causes the search to return customer profiles whose `email_address` field value has a token-wise partial match against the filtering expression in the query. For example, with `Steven gmail` provided in a search query, the search returns customers whose email address can be `steven.johnson@gmail.com` or `mygmail@stevensbakery.com`. Email addresses are tokenized by replacing, by spaces, punctuations including periods (`.`), underscores (`_`), and the `@` symbols. A match is found if a tokenized email address contains all the tokens in the search query, irrespective of the token order. | [optional]
+**phone_number** | [**CustomerTextFilter**](CustomerTextFilter.md) | A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-phone-number) visible to the seller. This filter is case insensitive. For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-phone-number), this filter causes the search to return customers whose phone number matches the specified query expression. The number in the query must be of an E.164-compliant form. In particular, it must include the leading `+` sign followed by a contry code and then a subscriber number. The standard E.614 form of a US phone number is `+12061112222` of the domestic version or `+0012061112222` of the international version. The E.164-compliant variations include `+1 (206) 111-2222` or `+001 (206) 111-2222`, respectively. To match the query expression, stored customers' phone numbers are converted to the standard E.164 form of the national and internationalized versions. For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-phone-number), this filter causes the search to return customers whose phone number matches partially the token or tokens provided in the query expression. For example, if the search query contains `415-123-45`, the filter selects those customers with phone numbers of `415-123-4567` or `234-151-2345`. The search does not return customers with the phone number of `415-123-4678`. Similarly, if the search query contains `415` as part of the phone number, the search returns those customers with phone numbers of `(415)-123-4567`, `(123) 415-1567`, and `1 (415) 123-4567`. | [optional]
+**reference_id** | [**CustomerTextFilter**](CustomerTextFilter.md) | A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-reference-id). This filter is case insensitive. [Exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-reference-id) of a customer's reference ID against a query's reference ID is evaluated as exact match between two strings, character by character in the given order. [Fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-reference-id) of stored reference IDs against queried reference IDs works exactly the same as fuzzy matching on email addresses. Non-alphanumeric characters are replaced by spaces to tokenize stored and queried reference IDs. A match is found if a tokenized stored reference ID contains all tokens specified in any order in the query. For example, a query of `NYC M` will match customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON` and `NYC_27_MURRAY`. | [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 are 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/CustomerQuery.md b/docs/CustomerQuery.md
index 0044d66..63b282a 100644
--- a/docs/CustomerQuery.md
+++ b/docs/CustomerQuery.md
@@ -2,12 +2,12 @@
### Description
-Represents a query (filtering and sorting criteria) used to search for customer profiles.
+Represents a query (including filtering criteria, sorting criteria, or both) used to search for customer profiles.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**filter** | [**CustomerFilter**](CustomerFilter.md) | A list of filter criteria. | [optional]
-**sort** | [**CustomerSort**](CustomerSort.md) | Sort criteria for query results. The default sort behavior is to order customers alphabetically by `given_name` and `last_name`. | [optional]
+**filter** | [**CustomerFilter**](CustomerFilter.md) | A list of filtering criteria. | [optional]
+**sort** | [**CustomerSort**](CustomerSort.md) | Sorting criteria for query results. The default behavior is to sort customers alphabetically by `given_name` and `family_name`. | [optional]
diff --git a/docs/CustomerSort.md b/docs/CustomerSort.md
index f8e0aba..20f1f72 100644
--- a/docs/CustomerSort.md
+++ b/docs/CustomerSort.md
@@ -2,12 +2,12 @@
### Description
-Indicates the field to use for sorting customer profiles.
+Specifies how searched customers profiles are sorted, including the sort key and sort order.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**field** | **String** | Indicates the information used to sort the results. For example, by creation date. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values | [optional]
-**order** | **String** | Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values | [optional]
+**field** | **String** | Use one or more customer attributes as the sort key to sort searched customer profiles. For example, use creation date (`created_at`) of customers or default attributes as the sort key. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values | [optional]
+**order** | **String** | Indicates the order in which results should be sorted based on the sort field value. Strings use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values | [optional]
diff --git a/docs/CustomerTextFilter.md b/docs/CustomerTextFilter.md
new file mode 100644
index 0000000..df4e9f3
--- /dev/null
+++ b/docs/CustomerTextFilter.md
@@ -0,0 +1,14 @@
+# SquareConnect.CustomerTextFilter
+
+### Description
+**Note: This model is in beta.**
+
+A filter to select customers based on exact or fuzzy matching of customer attributes against a specified query. Depending on customer attributes, the filter can be case sensitive. This filter can be either exact or fuzzy. It cannot be both.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**exact** | **String** | Use the exact filter to select customers whose attributes match exactly the specified query. | [optional]
+**fuzzy** | **String** | Use the fuzzy filter to select customers whose attributes match the specified query in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then each query token must be matched somewhere in the searched attribute. For single token queries, this is effectively the same behavior as a partial match operation. | [optional]
+
+
diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md
index 5859fde..6636ab4 100644
--- a/docs/CustomersApi.md
+++ b/docs/CustomersApi.md
@@ -272,7 +272,7 @@ Name | Type | Description | Notes
ListCustomers
-Lists a business's customers.
+Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
### Example
```javascript
@@ -425,7 +425,7 @@ Name | Type | Description | Notes
SearchCustomers
-Searches the customer profiles associated with a Square account. Calling SearchCustomers without an explicit query parameter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`.
+Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
### Example
```javascript
diff --git a/docs/DeleteLoyaltyRewardRequest.md b/docs/DeleteLoyaltyRewardRequest.md
new file mode 100644
index 0000000..9cece5f
--- /dev/null
+++ b/docs/DeleteLoyaltyRewardRequest.md
@@ -0,0 +1,12 @@
+# SquareConnect.DeleteLoyaltyRewardRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to delete a loyalty reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/docs/DeleteLoyaltyRewardResponse.md b/docs/DeleteLoyaltyRewardResponse.md
new file mode 100644
index 0000000..2dcca9c
--- /dev/null
+++ b/docs/DeleteLoyaltyRewardResponse.md
@@ -0,0 +1,13 @@
+# SquareConnect.DeleteLoyaltyRewardResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response returned by the API call.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+
+
diff --git a/docs/ListLoyaltyProgramsRequest.md b/docs/ListLoyaltyProgramsRequest.md
new file mode 100644
index 0000000..d249ce8
--- /dev/null
+++ b/docs/ListLoyaltyProgramsRequest.md
@@ -0,0 +1,12 @@
+# SquareConnect.ListLoyaltyProgramsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to list `LoyaltyProgram`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/docs/ListLoyaltyProgramsResponse.md b/docs/ListLoyaltyProgramsResponse.md
new file mode 100644
index 0000000..9a0983a
--- /dev/null
+++ b/docs/ListLoyaltyProgramsResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.ListLoyaltyProgramsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that contains all loyalty programs.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**programs** | [**[LoyaltyProgram]**](LoyaltyProgram.md) | A list of `LoyaltyProgram` for the merchant. | [optional]
+
+
diff --git a/docs/ListPaymentsRequest.md b/docs/ListPaymentsRequest.md
index 2a0420c..6ed0499 100644
--- a/docs/ListPaymentsRequest.md
+++ b/docs/ListPaymentsRequest.md
@@ -2,7 +2,7 @@
### Description
-Retrieves a list of refunds taken by the account making the request. Max results per page: 100
+Retrieves a list of payments taken by the account making the request. Max results per page: 100
## Properties
Name | Type | Description | Notes
diff --git a/docs/LoyaltyAccount.md b/docs/LoyaltyAccount.md
new file mode 100644
index 0000000..41be56b
--- /dev/null
+++ b/docs/LoyaltyAccount.md
@@ -0,0 +1,21 @@
+# SquareConnect.LoyaltyAccount
+
+### Description
+**Note: This model is in beta.**
+
+Describes a loyalty account. For more information, see [Loyalty Overview](/docs/loyalty/overview).
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the loyalty account. | [optional]
+**mappings** | [**[LoyaltyAccountMapping]**](LoyaltyAccountMapping.md) | The list of mappings that the account is associated with. Currently, a buyer can only be mapped to a loyalty account using a phone number. Therefore, the list can only have one mapping. |
+**program_id** | **String** | The Square-assigned ID of the `loyalty program` to which the account belongs. |
+**balance** | **Number** | The available point balance in the loyalty account. | [optional]
+**lifetime_points** | **Number** | The total points accrued during the lifetime of the account. | [optional]
+**customer_id** | **String** | The Square-assigned ID of the `customer` that is associated with the account. | [optional]
+**enrolled_at** | **String** | The timestamp when enrollment occurred, in RFC 3339 format. | [optional]
+**created_at** | **String** | The timestamp when the loyalty account was created, in RFC 3339 format. | [optional]
+**updated_at** | **String** | The timestamp when the loyalty account was last updated, in RFC 3339 format. | [optional]
+
+
diff --git a/docs/LoyaltyAccountMapping.md b/docs/LoyaltyAccountMapping.md
new file mode 100644
index 0000000..f85a236
--- /dev/null
+++ b/docs/LoyaltyAccountMapping.md
@@ -0,0 +1,16 @@
+# SquareConnect.LoyaltyAccountMapping
+
+### Description
+**Note: This model is in beta.**
+
+Associates a loyalty account with the buyer's phone number. or more information, see [Loyalty Overview](/docs/loyalty/overview).
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the mapping. | [optional]
+**type** | **String** | The type of mapping. See [LoyaltyAccountMappingType](#type-loyaltyaccountmappingtype) for possible values |
+**value** | **String** | The phone number, in E.164 format. For example, \"+14155551111\". |
+**created_at** | **String** | The timestamp when the mapping was created, in RFC 3339 format. | [optional]
+
+
diff --git a/docs/LoyaltyAccountMappingType.md b/docs/LoyaltyAccountMappingType.md
new file mode 100644
index 0000000..a17ffd6
--- /dev/null
+++ b/docs/LoyaltyAccountMappingType.md
@@ -0,0 +1,8 @@
+# SquareConnect.LoyaltyAccountMappingType
+
+## Enum
+
+
+* `PHONE` (value: `"PHONE"`)
+
+
diff --git a/docs/LoyaltyApi.md b/docs/LoyaltyApi.md
new file mode 100644
index 0000000..73632ec
--- /dev/null
+++ b/docs/LoyaltyApi.md
@@ -0,0 +1,664 @@
+# SquareConnect.LoyaltyApi
+
+All URIs are relative to *https://connect.squareup.com*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**accumulateLoyaltyPoints**](LoyaltyApi.md#accumulateLoyaltyPoints) | **POST** /v2/loyalty/accounts/{account_id}/accumulate | AccumulateLoyaltyPoints
+[**adjustLoyaltyPoints**](LoyaltyApi.md#adjustLoyaltyPoints) | **POST** /v2/loyalty/accounts/{account_id}/adjust | AdjustLoyaltyPoints
+[**calculateLoyaltyPoints**](LoyaltyApi.md#calculateLoyaltyPoints) | **POST** /v2/loyalty/programs/{program_id}/calculate | CalculateLoyaltyPoints
+[**createLoyaltyAccount**](LoyaltyApi.md#createLoyaltyAccount) | **POST** /v2/loyalty/accounts | CreateLoyaltyAccount
+[**createLoyaltyReward**](LoyaltyApi.md#createLoyaltyReward) | **POST** /v2/loyalty/rewards | CreateLoyaltyReward
+[**deleteLoyaltyReward**](LoyaltyApi.md#deleteLoyaltyReward) | **DELETE** /v2/loyalty/rewards/{reward_id} | DeleteLoyaltyReward
+[**listLoyaltyPrograms**](LoyaltyApi.md#listLoyaltyPrograms) | **GET** /v2/loyalty/programs | ListLoyaltyPrograms
+[**redeemLoyaltyReward**](LoyaltyApi.md#redeemLoyaltyReward) | **POST** /v2/loyalty/rewards/{reward_id}/redeem | RedeemLoyaltyReward
+[**retrieveLoyaltyAccount**](LoyaltyApi.md#retrieveLoyaltyAccount) | **GET** /v2/loyalty/accounts/{account_id} | RetrieveLoyaltyAccount
+[**retrieveLoyaltyReward**](LoyaltyApi.md#retrieveLoyaltyReward) | **GET** /v2/loyalty/rewards/{reward_id} | RetrieveLoyaltyReward
+[**searchLoyaltyAccounts**](LoyaltyApi.md#searchLoyaltyAccounts) | **POST** /v2/loyalty/accounts/search | SearchLoyaltyAccounts
+[**searchLoyaltyEvents**](LoyaltyApi.md#searchLoyaltyEvents) | **POST** /v2/loyalty/events/search | SearchLoyaltyEvents
+[**searchLoyaltyRewards**](LoyaltyApi.md#searchLoyaltyRewards) | **POST** /v2/loyalty/rewards/search | SearchLoyaltyRewards
+
+
+
+# **accumulateLoyaltyPoints**
+**Note: This endpoint is in beta.**
+> AccumulateLoyaltyPointsResponse accumulateLoyaltyPoints(accountId, body)
+
+AccumulateLoyaltyPoints
+
+Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points).
+
+### 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.LoyaltyApi();
+
+var accountId = "accountId_example"; // String | The `loyalty account` ID to which to add the points.
+
+var body = new SquareConnect.AccumulateLoyaltyPointsRequest(); // AccumulateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.accumulateLoyaltyPoints(accountId, body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **accountId** | **String**| The `loyalty account` ID to which to add the points. |
+ **body** | [**AccumulateLoyaltyPointsRequest**](AccumulateLoyaltyPointsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**AccumulateLoyaltyPointsResponse**](AccumulateLoyaltyPointsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **adjustLoyaltyPoints**
+**Note: This endpoint is in beta.**
+> AdjustLoyaltyPointsResponse adjustLoyaltyPoints(accountId, body)
+
+AdjustLoyaltyPoints
+
+Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase.
+
+### 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.LoyaltyApi();
+
+var accountId = "accountId_example"; // String | The ID of the `loyalty account` in which to adjust the points.
+
+var body = new SquareConnect.AdjustLoyaltyPointsRequest(); // AdjustLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.adjustLoyaltyPoints(accountId, body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **accountId** | **String**| The ID of the `loyalty account` in which to adjust the points. |
+ **body** | [**AdjustLoyaltyPointsRequest**](AdjustLoyaltyPointsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**AdjustLoyaltyPointsResponse**](AdjustLoyaltyPointsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **calculateLoyaltyPoints**
+**Note: This endpoint is in beta.**
+> CalculateLoyaltyPointsResponse calculateLoyaltyPoints(programId, body)
+
+CalculateLoyaltyPoints
+
+Calculates the points a purchase earns. - If you are using the Orders API to manage orders, you provide `order_id` in the request. The endpoint calculates the points by reading the order. - If you are not using the Orders API to manage orders, you provide the purchase amount in the request for the endpoint to calculate the points. An application might call this endpoint to show the points that a buyer can earn with the specific purchase.
+
+### 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.LoyaltyApi();
+
+var programId = "programId_example"; // String | The `loyalty program` ID, which defines the rules for accruing points.
+
+var body = new SquareConnect.CalculateLoyaltyPointsRequest(); // CalculateLoyaltyPointsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.calculateLoyaltyPoints(programId, body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **programId** | **String**| The `loyalty program` ID, which defines the rules for accruing points. |
+ **body** | [**CalculateLoyaltyPointsRequest**](CalculateLoyaltyPointsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**CalculateLoyaltyPointsResponse**](CalculateLoyaltyPointsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **createLoyaltyAccount**
+**Note: This endpoint is in beta.**
+> CreateLoyaltyAccountResponse createLoyaltyAccount(body)
+
+CreateLoyaltyAccount
+
+Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account).
+
+### 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.LoyaltyApi();
+
+var body = new SquareConnect.CreateLoyaltyAccountRequest(); // CreateLoyaltyAccountRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.createLoyaltyAccount(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CreateLoyaltyAccountRequest**](CreateLoyaltyAccountRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**CreateLoyaltyAccountResponse**](CreateLoyaltyAccountResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **createLoyaltyReward**
+**Note: This endpoint is in beta.**
+> CreateLoyaltyRewardResponse createLoyaltyReward(body)
+
+CreateLoyaltyReward
+
+Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+
+### 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.LoyaltyApi();
+
+var body = new SquareConnect.CreateLoyaltyRewardRequest(); // CreateLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.createLoyaltyReward(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CreateLoyaltyRewardRequest**](CreateLoyaltyRewardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**CreateLoyaltyRewardResponse**](CreateLoyaltyRewardResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **deleteLoyaltyReward**
+**Note: This endpoint is in beta.**
+> DeleteLoyaltyRewardResponse deleteLoyaltyReward(rewardId)
+
+DeleteLoyaltyReward
+
+Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+
+### 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.LoyaltyApi();
+
+var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to delete.
+
+apiInstance.deleteLoyaltyReward(rewardId).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **rewardId** | **String**| The ID of the `loyalty reward` to delete. |
+
+### Return type
+
+[**DeleteLoyaltyRewardResponse**](DeleteLoyaltyRewardResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **listLoyaltyPrograms**
+**Note: This endpoint is in beta.**
+> ListLoyaltyProgramsResponse listLoyaltyPrograms()
+
+ListLoyaltyPrograms
+
+Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). .
+
+### 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.LoyaltyApi();
+apiInstance.listLoyaltyPrograms().then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**ListLoyaltyProgramsResponse**](ListLoyaltyProgramsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **redeemLoyaltyReward**
+**Note: This endpoint is in beta.**
+> RedeemLoyaltyRewardResponse redeemLoyaltyReward(rewardId, body)
+
+RedeemLoyaltyReward
+
+Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+
+### 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.LoyaltyApi();
+
+var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to redeem.
+
+var body = new SquareConnect.RedeemLoyaltyRewardRequest(); // RedeemLoyaltyRewardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.redeemLoyaltyReward(rewardId, body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **rewardId** | **String**| The ID of the `loyalty reward` to redeem. |
+ **body** | [**RedeemLoyaltyRewardRequest**](RedeemLoyaltyRewardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**RedeemLoyaltyRewardResponse**](RedeemLoyaltyRewardResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **retrieveLoyaltyAccount**
+**Note: This endpoint is in beta.**
+> RetrieveLoyaltyAccountResponse retrieveLoyaltyAccount(accountId)
+
+RetrieveLoyaltyAccount
+
+Retrieves a loyalty account.
+
+### 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.LoyaltyApi();
+
+var accountId = "accountId_example"; // String | The ID of the `loyalty account` to retrieve.
+
+apiInstance.retrieveLoyaltyAccount(accountId).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **accountId** | **String**| The ID of the `loyalty account` to retrieve. |
+
+### Return type
+
+[**RetrieveLoyaltyAccountResponse**](RetrieveLoyaltyAccountResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **retrieveLoyaltyReward**
+**Note: This endpoint is in beta.**
+> RetrieveLoyaltyRewardResponse retrieveLoyaltyReward(rewardId)
+
+RetrieveLoyaltyReward
+
+Retrieves a loyalty reward.
+
+### 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.LoyaltyApi();
+
+var rewardId = "rewardId_example"; // String | The ID of the `loyalty reward` to retrieve.
+
+apiInstance.retrieveLoyaltyReward(rewardId).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **rewardId** | **String**| The ID of the `loyalty reward` to retrieve. |
+
+### Return type
+
+[**RetrieveLoyaltyRewardResponse**](RetrieveLoyaltyRewardResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **searchLoyaltyAccounts**
+**Note: This endpoint is in beta.**
+> SearchLoyaltyAccountsResponse searchLoyaltyAccounts(body)
+
+SearchLoyaltyAccounts
+
+Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned.
+
+### 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.LoyaltyApi();
+
+var body = new SquareConnect.SearchLoyaltyAccountsRequest(); // SearchLoyaltyAccountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.searchLoyaltyAccounts(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**SearchLoyaltyAccountsRequest**](SearchLoyaltyAccountsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**SearchLoyaltyAccountsResponse**](SearchLoyaltyAccountsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **searchLoyaltyEvents**
+**Note: This endpoint is in beta.**
+> SearchLoyaltyEventsResponse searchLoyaltyEvents(body)
+
+SearchLoyaltyEvents
+
+Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).
+
+### 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.LoyaltyApi();
+
+var body = new SquareConnect.SearchLoyaltyEventsRequest(); // SearchLoyaltyEventsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.searchLoyaltyEvents(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**SearchLoyaltyEventsRequest**](SearchLoyaltyEventsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**SearchLoyaltyEventsResponse**](SearchLoyaltyEventsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **searchLoyaltyRewards**
+**Note: This endpoint is in beta.**
+> SearchLoyaltyRewardsResponse searchLoyaltyRewards(body)
+
+SearchLoyaltyRewards
+
+Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards).
+
+### 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.LoyaltyApi();
+
+var body = new SquareConnect.SearchLoyaltyRewardsRequest(); // SearchLoyaltyRewardsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.searchLoyaltyRewards(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**SearchLoyaltyRewardsRequest**](SearchLoyaltyRewardsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**SearchLoyaltyRewardsResponse**](SearchLoyaltyRewardsResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/docs/LoyaltyEvent.md b/docs/LoyaltyEvent.md
new file mode 100644
index 0000000..c40a501
--- /dev/null
+++ b/docs/LoyaltyEvent.md
@@ -0,0 +1,25 @@
+# SquareConnect.LoyaltyEvent
+
+### Description
+**Note: This model is in beta.**
+
+Provides information about a loyalty event. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the loyalty event. |
+**type** | **String** | The type of the loyalty event. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values |
+**created_at** | **String** | The timestamp when the event was created, in RFC 3339 format. |
+**accumulate_points** | [**LoyaltyEventAccumulatePoints**](LoyaltyEventAccumulatePoints.md) | Provides metadata when the event `type` is `ACCUMULATE_POINTS`. | [optional]
+**create_reward** | [**LoyaltyEventCreateReward**](LoyaltyEventCreateReward.md) | Provides metadata when the event `type` is `CREATE_REWARD`. | [optional]
+**redeem_reward** | [**LoyaltyEventRedeemReward**](LoyaltyEventRedeemReward.md) | Provides metadata when the event `type` is `REDEEM_REWARD`. | [optional]
+**delete_reward** | [**LoyaltyEventDeleteReward**](LoyaltyEventDeleteReward.md) | Provides metadata when the event `type` is `DELETE_REWARD`. | [optional]
+**adjust_points** | [**LoyaltyEventAdjustPoints**](LoyaltyEventAdjustPoints.md) | Provides metadata when the event `type` is `ADJUST_POINTS`. | [optional]
+**loyalty_account_id** | **String** | The ID of the `loyalty account` in which the event occurred. |
+**location_id** | **String** | The ID of the `location` where the event occurred. | [optional]
+**source** | **String** | Defines whether the event was generated by the Square Point of Sale. See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values |
+**expire_points** | [**LoyaltyEventExpirePoints**](LoyaltyEventExpirePoints.md) | Provides metadata when the event `type` is `EXPIRE_POINTS`. | [optional]
+**other_event** | [**LoyaltyEventOther**](LoyaltyEventOther.md) | Provides metadata when the event `type` is `OTHER`. | [optional]
+
+
diff --git a/docs/LoyaltyEventAccumulatePoints.md b/docs/LoyaltyEventAccumulatePoints.md
new file mode 100644
index 0000000..6428148
--- /dev/null
+++ b/docs/LoyaltyEventAccumulatePoints.md
@@ -0,0 +1,15 @@
+# SquareConnect.LoyaltyEventAccumulatePoints
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `ACCUMULATE_POINTS`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The ID of the `loyalty program`. | [optional]
+**points** | **Number** | The number of points accumulated by the event. | [optional]
+**order_id** | **String** | The ID of the `order` for which the buyer accumulated the points. This field is returned only if the Orders API is used to process orders. | [optional]
+
+
diff --git a/docs/LoyaltyEventAdjustPoints.md b/docs/LoyaltyEventAdjustPoints.md
new file mode 100644
index 0000000..b271ce0
--- /dev/null
+++ b/docs/LoyaltyEventAdjustPoints.md
@@ -0,0 +1,15 @@
+# SquareConnect.LoyaltyEventAdjustPoints
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `ADJUST_POINTS`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The Square-assigned ID of the `loyalty program`. | [optional]
+**points** | **Number** | The number of points added or removed. |
+**reason** | **String** | The reason for the adjustment of points. | [optional]
+
+
diff --git a/docs/LoyaltyEventCreateReward.md b/docs/LoyaltyEventCreateReward.md
new file mode 100644
index 0000000..82812ae
--- /dev/null
+++ b/docs/LoyaltyEventCreateReward.md
@@ -0,0 +1,15 @@
+# SquareConnect.LoyaltyEventCreateReward
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `CREATE_REWARD`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The ID of the `loyalty program`. |
+**reward_id** | **String** | The Square-assigned ID of the created `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`. | [optional]
+**points** | **Number** | The loyalty points used to create the reward. |
+
+
diff --git a/docs/LoyaltyEventDateTimeFilter.md b/docs/LoyaltyEventDateTimeFilter.md
new file mode 100644
index 0000000..63a0fc4
--- /dev/null
+++ b/docs/LoyaltyEventDateTimeFilter.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventDateTimeFilter
+
+### Description
+**Note: This model is in beta.**
+
+Filter events by date time range.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**created_at** | [**TimeRange**](TimeRange.md) | The `created_at` date time range used to filter the result. |
+
+
diff --git a/docs/LoyaltyEventDeleteReward.md b/docs/LoyaltyEventDeleteReward.md
new file mode 100644
index 0000000..f404cd2
--- /dev/null
+++ b/docs/LoyaltyEventDeleteReward.md
@@ -0,0 +1,15 @@
+# SquareConnect.LoyaltyEventDeleteReward
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `DELETE_REWARD`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The ID of the `loyalty program`. |
+**reward_id** | **String** | The ID of the deleted `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`. | [optional]
+**points** | **Number** | The number of points returned to the loyalty account. |
+
+
diff --git a/docs/LoyaltyEventExpirePoints.md b/docs/LoyaltyEventExpirePoints.md
new file mode 100644
index 0000000..fd49b2f
--- /dev/null
+++ b/docs/LoyaltyEventExpirePoints.md
@@ -0,0 +1,14 @@
+# SquareConnect.LoyaltyEventExpirePoints
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `EXPIRE_POINTS`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The Square-assigned ID of the `loyalty program`. |
+**points** | **Number** | The number of points expired. |
+
+
diff --git a/docs/LoyaltyEventFilter.md b/docs/LoyaltyEventFilter.md
new file mode 100644
index 0000000..d185a50
--- /dev/null
+++ b/docs/LoyaltyEventFilter.md
@@ -0,0 +1,17 @@
+# SquareConnect.LoyaltyEventFilter
+
+### Description
+**Note: This model is in beta.**
+
+The filtering criteria. If the request specifies multiple filters, the endpoint uses a logical AND to evaluate them.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_account_filter** | [**LoyaltyEventLoyaltyAccountFilter**](LoyaltyEventLoyaltyAccountFilter.md) | Filter events by loyalty account. | [optional]
+**type_filter** | [**LoyaltyEventTypeFilter**](LoyaltyEventTypeFilter.md) | Filter events by event type. | [optional]
+**date_time_filter** | [**LoyaltyEventDateTimeFilter**](LoyaltyEventDateTimeFilter.md) | Filter events by date time range. For each range, the start time is inclusive and the end time is exclusive. | [optional]
+**location_filter** | [**LoyaltyEventLocationFilter**](LoyaltyEventLocationFilter.md) | Filter events by location. | [optional]
+**order_filter** | [**LoyaltyEventOrderFilter**](LoyaltyEventOrderFilter.md) | Filter events by the order associated with the event. | [optional]
+
+
diff --git a/docs/LoyaltyEventLocationFilter.md b/docs/LoyaltyEventLocationFilter.md
new file mode 100644
index 0000000..7613d19
--- /dev/null
+++ b/docs/LoyaltyEventLocationFilter.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventLocationFilter
+
+### Description
+**Note: This model is in beta.**
+
+Filter events by location.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**location_ids** | **[String]** | The `location` IDs for loyalty events to query. If multiple values are specified, the endpoint uses a logical OR to combine them. |
+
+
diff --git a/docs/LoyaltyEventLoyaltyAccountFilter.md b/docs/LoyaltyEventLoyaltyAccountFilter.md
new file mode 100644
index 0000000..06aebe1
--- /dev/null
+++ b/docs/LoyaltyEventLoyaltyAccountFilter.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventLoyaltyAccountFilter
+
+### Description
+**Note: This model is in beta.**
+
+Filter events by loyalty account.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_account_id** | **String** | The ID of the `loyalty account` associated with loyalty events. |
+
+
diff --git a/docs/LoyaltyEventOrderFilter.md b/docs/LoyaltyEventOrderFilter.md
new file mode 100644
index 0000000..7f3020e
--- /dev/null
+++ b/docs/LoyaltyEventOrderFilter.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventOrderFilter
+
+### Description
+**Note: This model is in beta.**
+
+Filter events by the order associated with the event.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **String** | The ID of the `order` associated with the event. |
+
+
diff --git a/docs/LoyaltyEventOther.md b/docs/LoyaltyEventOther.md
new file mode 100644
index 0000000..bd4c6fd
--- /dev/null
+++ b/docs/LoyaltyEventOther.md
@@ -0,0 +1,14 @@
+# SquareConnect.LoyaltyEventOther
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `OTHER`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The Square-assigned ID of the `loyalty program`. |
+**points** | **Number** | The number of points added or removed. |
+
+
diff --git a/docs/LoyaltyEventQuery.md b/docs/LoyaltyEventQuery.md
new file mode 100644
index 0000000..fc47e85
--- /dev/null
+++ b/docs/LoyaltyEventQuery.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventQuery
+
+### Description
+**Note: This model is in beta.**
+
+Represents a query used to search for loyalty events.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**filter** | [**LoyaltyEventFilter**](LoyaltyEventFilter.md) | The query filter criteria. | [optional]
+
+
diff --git a/docs/LoyaltyEventRedeemReward.md b/docs/LoyaltyEventRedeemReward.md
new file mode 100644
index 0000000..aefbffc
--- /dev/null
+++ b/docs/LoyaltyEventRedeemReward.md
@@ -0,0 +1,15 @@
+# SquareConnect.LoyaltyEventRedeemReward
+
+### Description
+**Note: This model is in beta.**
+
+Provides metadata when the event `type` is `REDEEM_REWARD`.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_program_id** | **String** | The ID of the `loyalty program`. |
+**reward_id** | **String** | The ID of the redeemed `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`. | [optional]
+**order_id** | **String** | The ID of the `order` that redeemed the reward. This field is returned only if the Orders API is used to process orders. | [optional]
+
+
diff --git a/docs/LoyaltyEventSource.md b/docs/LoyaltyEventSource.md
new file mode 100644
index 0000000..13c4e7b
--- /dev/null
+++ b/docs/LoyaltyEventSource.md
@@ -0,0 +1,10 @@
+# SquareConnect.LoyaltyEventSource
+
+## Enum
+
+
+* `SQUARE` (value: `"SQUARE"`)
+
+* `LOYALTY_API` (value: `"LOYALTY_API"`)
+
+
diff --git a/docs/LoyaltyEventType.md b/docs/LoyaltyEventType.md
new file mode 100644
index 0000000..15728e4
--- /dev/null
+++ b/docs/LoyaltyEventType.md
@@ -0,0 +1,20 @@
+# SquareConnect.LoyaltyEventType
+
+## Enum
+
+
+* `ACCUMULATE_POINTS` (value: `"ACCUMULATE_POINTS"`)
+
+* `CREATE_REWARD` (value: `"CREATE_REWARD"`)
+
+* `REDEEM_REWARD` (value: `"REDEEM_REWARD"`)
+
+* `DELETE_REWARD` (value: `"DELETE_REWARD"`)
+
+* `ADJUST_POINTS` (value: `"ADJUST_POINTS"`)
+
+* `EXPIRE_POINTS` (value: `"EXPIRE_POINTS"`)
+
+* `OTHER` (value: `"OTHER"`)
+
+
diff --git a/docs/LoyaltyEventTypeFilter.md b/docs/LoyaltyEventTypeFilter.md
new file mode 100644
index 0000000..aecd5b5
--- /dev/null
+++ b/docs/LoyaltyEventTypeFilter.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyEventTypeFilter
+
+### Description
+**Note: This model is in beta.**
+
+Filter events by event type.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**types** | **[String]** | The loyalty event types used to filter the result. If multiple values are specified, the endpoint uses a logical OR to combine them. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values |
+
+
diff --git a/docs/LoyaltyProgram.md b/docs/LoyaltyProgram.md
new file mode 100644
index 0000000..a8c287d
--- /dev/null
+++ b/docs/LoyaltyProgram.md
@@ -0,0 +1,21 @@
+# SquareConnect.LoyaltyProgram
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the loyalty program. Updates to the loyalty program do not modify the identifier. |
+**status** | **String** | Whether the program is currently active. See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values |
+**reward_tiers** | [**[LoyaltyProgramRewardTier]**](LoyaltyProgramRewardTier.md) | The list of rewards for buyers, sorted by ascending points. |
+**expiration_policy** | [**LoyaltyProgramExpirationPolicy**](LoyaltyProgramExpirationPolicy.md) | If present, details for how points expire. | [optional]
+**terminology** | [**LoyaltyProgramTerminology**](LoyaltyProgramTerminology.md) | A cosmetic name for the “points” currency. |
+**location_ids** | **[String]** | The `locations` at which the program is active. |
+**created_at** | **String** | The timestamp when the program was created, in RFC 3339 format. |
+**updated_at** | **String** | The timestamp when the reward was last updated, in RFC 3339 format. |
+**accrual_rules** | [**[LoyaltyProgramAccrualRule]**](LoyaltyProgramAccrualRule.md) | Defines how buyers can earn loyalty points. |
+
+
diff --git a/docs/LoyaltyProgramAccrualRule.md b/docs/LoyaltyProgramAccrualRule.md
new file mode 100644
index 0000000..3af139b
--- /dev/null
+++ b/docs/LoyaltyProgramAccrualRule.md
@@ -0,0 +1,17 @@
+# SquareConnect.LoyaltyProgramAccrualRule
+
+### Description
+**Note: This model is in beta.**
+
+Defines an accrual rule, which is how buyers can earn points.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**accrual_type** | **String** | The type of the accrual rule that defines how buyers can earn points. See [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) for possible values |
+**points** | **Number** | The number of points that buyers earn based on the `accrual_type`. | [optional]
+**visit_minimum_amount_money** | [**Money**](Money.md) | When the accrual rule is visit-based (`accrual_type` is `VISIT`), this field indicates the minimum purchase required during the visit to quality for the reward. | [optional]
+**spend_amount_money** | [**Money**](Money.md) | When the accrual rule is spend-based (`accrual_type` is `SPEND`), this field indicates the amount that a buyer must spend to earn the points. For example, suppose the accrual rule is \"earn 1 point for every $10 you spend\". Then, buyer earns a point for every $10 they spend. If buyer spends $105, the buyer earns 10 points. | [optional]
+**catalog_object_id** | **String** | The ID of the `catalog object` to purchase to earn the number of points defined by the rule. This is either an item variation or a category, depending on the type. This is defined on `ITEM_VARIATION` rules and `CATEGORY` rules. | [optional]
+
+
diff --git a/docs/LoyaltyProgramAccrualRuleType.md b/docs/LoyaltyProgramAccrualRuleType.md
new file mode 100644
index 0000000..3c4eca9
--- /dev/null
+++ b/docs/LoyaltyProgramAccrualRuleType.md
@@ -0,0 +1,14 @@
+# SquareConnect.LoyaltyProgramAccrualRuleType
+
+## Enum
+
+
+* `VISIT` (value: `"VISIT"`)
+
+* `SPEND` (value: `"SPEND"`)
+
+* `ITEM_VARIATION` (value: `"ITEM_VARIATION"`)
+
+* `CATEGORY` (value: `"CATEGORY"`)
+
+
diff --git a/docs/LoyaltyProgramExpirationPolicy.md b/docs/LoyaltyProgramExpirationPolicy.md
new file mode 100644
index 0000000..cab81c1
--- /dev/null
+++ b/docs/LoyaltyProgramExpirationPolicy.md
@@ -0,0 +1,13 @@
+# SquareConnect.LoyaltyProgramExpirationPolicy
+
+### Description
+**Note: This model is in beta.**
+
+Describes when the loyalty program expires.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**expiration_duration** | **String** | The duration of time before points expire, in RFC 3339 format. |
+
+
diff --git a/docs/LoyaltyProgramRewardDefinition.md b/docs/LoyaltyProgramRewardDefinition.md
new file mode 100644
index 0000000..951e4bb
--- /dev/null
+++ b/docs/LoyaltyProgramRewardDefinition.md
@@ -0,0 +1,18 @@
+# SquareConnect.LoyaltyProgramRewardDefinition
+
+### Description
+**Note: This model is in beta.**
+
+Provides details about the loyalty program reward tier definition.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**scope** | **String** | Indicates the scope of the reward tier. See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values |
+**discount_type** | **String** | The type of discount the reward tier offers. See [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values |
+**percentage_discount** | **String** | Present if `discount_type` is `FIXED_PERCENTAGE`. For example, a 7.25% off discount will be represented as \"7.25\". | [optional]
+**catalog_object_ids** | **[String]** | A list of `catalog object` ids to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field. | [optional]
+**fixed_discount_money** | [**Money**](Money.md) | Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off. | [optional]
+**max_discount_money** | [**Money**](Money.md) | When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied. | [optional]
+
+
diff --git a/docs/LoyaltyProgramRewardDefinitionScope.md b/docs/LoyaltyProgramRewardDefinitionScope.md
new file mode 100644
index 0000000..4c7043b
--- /dev/null
+++ b/docs/LoyaltyProgramRewardDefinitionScope.md
@@ -0,0 +1,12 @@
+# SquareConnect.LoyaltyProgramRewardDefinitionScope
+
+## Enum
+
+
+* `ORDER` (value: `"ORDER"`)
+
+* `ITEM_VARIATION` (value: `"ITEM_VARIATION"`)
+
+* `CATEGORY` (value: `"CATEGORY"`)
+
+
diff --git a/docs/LoyaltyProgramRewardDefinitionType.md b/docs/LoyaltyProgramRewardDefinitionType.md
new file mode 100644
index 0000000..aed9c99
--- /dev/null
+++ b/docs/LoyaltyProgramRewardDefinitionType.md
@@ -0,0 +1,10 @@
+# SquareConnect.LoyaltyProgramRewardDefinitionType
+
+## Enum
+
+
+* `AMOUNT` (value: `"FIXED_AMOUNT"`)
+
+* `PERCENTAGE` (value: `"FIXED_PERCENTAGE"`)
+
+
diff --git a/docs/LoyaltyProgramRewardTier.md b/docs/LoyaltyProgramRewardTier.md
new file mode 100644
index 0000000..2e39c79
--- /dev/null
+++ b/docs/LoyaltyProgramRewardTier.md
@@ -0,0 +1,17 @@
+# SquareConnect.LoyaltyProgramRewardTier
+
+### Description
+**Note: This model is in beta.**
+
+Describes a loyalty program reward tier.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the reward tier. |
+**points** | **Number** | The points exchanged for the reward tier. |
+**name** | **String** | The name of the reward tier. |
+**definition** | [**LoyaltyProgramRewardDefinition**](LoyaltyProgramRewardDefinition.md) | Provides details about the reward tier definition. |
+**created_at** | **String** | The timestamp when the reward tier was created, in RFC 3339 format. |
+
+
diff --git a/docs/LoyaltyProgramStatus.md b/docs/LoyaltyProgramStatus.md
new file mode 100644
index 0000000..f7e0a4e
--- /dev/null
+++ b/docs/LoyaltyProgramStatus.md
@@ -0,0 +1,10 @@
+# SquareConnect.LoyaltyProgramStatus
+
+## Enum
+
+
+* `INACTIVE` (value: `"INACTIVE"`)
+
+* `ACTIVE` (value: `"ACTIVE"`)
+
+
diff --git a/docs/LoyaltyProgramTerminology.md b/docs/LoyaltyProgramTerminology.md
new file mode 100644
index 0000000..b7d1fcd
--- /dev/null
+++ b/docs/LoyaltyProgramTerminology.md
@@ -0,0 +1,14 @@
+# SquareConnect.LoyaltyProgramTerminology
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**one** | **String** | A singular unit for a point (for example, 1 point is called 1 star). |
+**other** | **String** | A plural unit for point (for example, 10 points is called 10 stars). |
+
+
diff --git a/docs/LoyaltyReward.md b/docs/LoyaltyReward.md
new file mode 100644
index 0000000..8f871fc
--- /dev/null
+++ b/docs/LoyaltyReward.md
@@ -0,0 +1,21 @@
+# SquareConnect.LoyaltyReward
+
+### Description
+**Note: This model is in beta.**
+
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The Square-assigned ID of the loyalty reward. | [optional]
+**status** | **String** | The status of a loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values | [optional]
+**loyalty_account_id** | **String** | The Square-assigned ID of the `loyalty account` to which the reward belongs. |
+**reward_tier_id** | **String** | The Square-assigned ID of the `reward tier` used to create the reward. |
+**points** | **Number** | The number of loyalty points used for the reward. | [optional]
+**order_id** | **String** | The Square-assigned ID of the `order` to which the reward is attached. | [optional]
+**created_at** | **String** | The timestamp when the reward was created, in RFC 3339 format. | [optional]
+**updated_at** | **String** | The timestamp when the reward was last updated, in RFC 3339 format. | [optional]
+**redeemed_at** | **String** | The timestamp when the reward was redeemed, in RFC 3339 format. | [optional]
+
+
diff --git a/docs/LoyaltyRewardStatus.md b/docs/LoyaltyRewardStatus.md
new file mode 100644
index 0000000..d78fc46
--- /dev/null
+++ b/docs/LoyaltyRewardStatus.md
@@ -0,0 +1,12 @@
+# SquareConnect.LoyaltyRewardStatus
+
+## Enum
+
+
+* `ISSUED` (value: `"ISSUED"`)
+
+* `REDEEMED` (value: `"REDEEMED"`)
+
+* `DELETED` (value: `"DELETED"`)
+
+
diff --git a/docs/Order.md b/docs/Order.md
index 332a769..26495af 100644
--- a/docs/Order.md
+++ b/docs/Order.md
@@ -33,5 +33,6 @@ Name | Type | Description | Notes
**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional]
**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional]
**total_service_charge_money** | [**Money**](Money.md) | The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. | [optional]
+**rewards** | [**[OrderReward]**](OrderReward.md) | A set-like list of rewards that have been added to the order. | [optional] [beta]
diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md
index ec4837d..9a1b03a 100644
--- a/docs/OrderLineItemDiscount.md
+++ b/docs/OrderLineItemDiscount.md
@@ -16,5 +16,6 @@ Name | Type | Description | Notes
**applied_money** | [**Money**](Money.md) | The amount of discount actually applied to the line item. Represents the amount of money applied as a line item-scoped discount. When an amount-based discount is scoped to the entire order, the value of `applied_money` is different from `amount_money` because the total amount of the discount is distributed across all line items. | [optional]
**metadata** | **{String: String}** | Application-defined data attached to this discount. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. | [optional] [beta]
**scope** | **String** | Indicates the level at which the discount applies. For `ORDER` scoped discounts, Square generates references in `applied_discounts` on all order line items that do not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items with a discount reference in their `applied_discounts` field. This field is immutable. To change the scope of a discount you must delete the discount and re-add it as a new discount. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional]
+**reward_ids** | **[String]** | The reward identifiers corresponding to this discount. The application and specification of discounts that have `reward_ids` are completely controlled by the backing criteria corresponding to the reward tiers of the rewards that are added to the order through the Loyalty API. To manually unapply discounts that are the result of added rewards, the rewards must be removed from the order through the Loyalty API. | [optional] [beta]
diff --git a/docs/OrderReward.md b/docs/OrderReward.md
new file mode 100644
index 0000000..b0dcf6a
--- /dev/null
+++ b/docs/OrderReward.md
@@ -0,0 +1,14 @@
+# SquareConnect.OrderReward
+
+### Description
+**Note: This model is in beta.**
+
+Represents a reward that may be applied to an order if the necessary reward tier criteria are met. Rewards are created through the Loyalty API.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | The identifier of the reward. |
+**reward_tier_id** | **String** | The identifier of the reward tier corresponding to this reward. |
+
+
diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md
index 0ac2096..6d2575f 100644
--- a/docs/OrdersApi.md
+++ b/docs/OrdersApi.md
@@ -5,6 +5,7 @@ All URIs are relative to *https://connect.squareup.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**batchRetrieveOrders**](OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
+[**calculateOrder**](OrdersApi.md#calculateOrder) | **POST** /v2/orders/calculate | CalculateOrder
[**createOrder**](OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
[**payOrder**](OrdersApi.md#payOrder) | **POST** /v2/orders/{order_id}/pay | PayOrder
[**searchOrders**](OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders
@@ -57,6 +58,55 @@ Name | Type | Description | Notes
[oauth2](../README.md#oauth2)
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **calculateOrder**
+**Note: This endpoint is in beta.**
+> CalculateOrderResponse calculateOrder(body)
+
+CalculateOrder
+
+Calculates an [Order](#type-order).
+
+### Example
+```javascript
+var SquareConnect = require('square-connect');
+var defaultClient = SquareConnect.ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2
+var oauth2 = defaultClient.authentications['oauth2'];
+oauth2.accessToken = 'YOUR ACCESS TOKEN';
+
+var apiInstance = new SquareConnect.OrdersApi();
+
+var body = new SquareConnect.CalculateOrderRequest(); // CalculateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
+
+apiInstance.calculateOrder(body).then(function(data) {
+ console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CalculateOrderRequest**](CalculateOrderRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
+
+### Return type
+
+[**CalculateOrderResponse**](CalculateOrderResponse.md)
+
+### Authorization
+
+[oauth2](../README.md#oauth2)
+
### HTTP request headers
- **Content-Type**: application/json
diff --git a/docs/Payment.md b/docs/Payment.md
index aff350c..0604440 100644
--- a/docs/Payment.md
+++ b/docs/Payment.md
@@ -20,19 +20,19 @@ Name | Type | Description | Notes
**delay_duration** | **String** | The duration of time after the payment's creation when Square automatically applies the `delay_action` to the payment. This automatic `delay_action` applies only to payments that don't reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period. This field is specified as a time duration, in RFC 3339 format. Notes: This feature is only supported for card payments. Default: - Card Present payments: \"PT36H\" (36 hours) from the creation time. - Card Not Present payments: \"P7D\" (7 days) from the creation time. | [optional] [beta]
**delay_action** | **String** | The action to be applied to the payment when the `delay_duration` has elapsed. This field is read only. Current values include: `CANCEL` | [optional] [beta]
**delayed_until** | **String** | Read only timestamp of when the `delay_action` will automatically be applied, in RFC 3339 format. Note that this field is calculated by summing the payment's `delay_duration` and `created_at` fields. The `created_at` field is generated by Square and may not exactly match the time on your local machine. | [optional] [beta]
-**source_type** | **String** | The source type for this payment Current values include: `CARD` | [optional]
+**source_type** | **String** | The source type for this payment Current values include: `CARD`. | [optional]
**card_details** | [**CardPaymentDetails**](CardPaymentDetails.md) | Non-confidential details about the source. Only populated if the `source_type` is `CARD`. | [optional]
**location_id** | **String** | ID of the location associated with the payment. | [optional]
**order_id** | **String** | ID of the order associated with this payment. | [optional]
**reference_id** | **String** | An optional ID that associates this payment with an entity in another system. | [optional]
-**customer_id** | **String** | An optional customer_id to be entered by the developer when creating a payment. | [optional]
+**customer_id** | **String** | The `Customer` ID of the customer associated with the payment. | [optional]
**employee_id** | **String** | An optional ID of the employee associated with taking this payment. | [optional]
**refund_ids** | **[String]** | List of `refund_id`s identifying refunds for this payment. | [optional]
**buyer_email_address** | **String** | The buyer's e-mail address | [optional]
**billing_address** | [**Address**](Address.md) | The buyer's billing address | [optional]
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address | [optional]
**note** | **String** | An optional note to include when creating a payment | [optional]
-**statement_description_identifier** | **String** | Additional payment information that gets added on the customer's card statement as part of the statement description. Note that the statement_description_identifier may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. | [optional] [beta]
+**statement_description_identifier** | **String** | Additional payment information that gets added on the customer's card statement as part of the statement description. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment. | [optional] [beta]
**receipt_number** | **String** | The payment's receipt number. The field will be missing if a payment is CANCELED | [optional]
**receipt_url** | **String** | The URL for the payment's receipt. The field will only be populated for COMPLETED payments. | [optional]
diff --git a/docs/RedeemLoyaltyRewardRequest.md b/docs/RedeemLoyaltyRewardRequest.md
new file mode 100644
index 0000000..3a7686b
--- /dev/null
+++ b/docs/RedeemLoyaltyRewardRequest.md
@@ -0,0 +1,14 @@
+# SquareConnect.RedeemLoyaltyRewardRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to redeem a loyalty reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**idempotency_key** | **String** | A unique string that identifies this `RedeemLoyaltyReward` request. Keys can be any valid string, but must be unique for every request. |
+**location_id** | **String** | The ID of the `location` where the reward is redeemed. |
+
+
diff --git a/docs/RedeemLoyaltyRewardResponse.md b/docs/RedeemLoyaltyRewardResponse.md
new file mode 100644
index 0000000..a2ae3e7
--- /dev/null
+++ b/docs/RedeemLoyaltyRewardResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.RedeemLoyaltyRewardResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the `LoyaltyEvent` published for redeeming the reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**event** | [**LoyaltyEvent**](LoyaltyEvent.md) | The `LoyaltyEvent` for redeeming the reward. | [optional]
+
+
diff --git a/docs/RetrieveLoyaltyAccountRequest.md b/docs/RetrieveLoyaltyAccountRequest.md
new file mode 100644
index 0000000..b730f81
--- /dev/null
+++ b/docs/RetrieveLoyaltyAccountRequest.md
@@ -0,0 +1,12 @@
+# SquareConnect.RetrieveLoyaltyAccountRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to retrieve a loyalty account.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/docs/RetrieveLoyaltyAccountResponse.md b/docs/RetrieveLoyaltyAccountResponse.md
new file mode 100644
index 0000000..e82a360
--- /dev/null
+++ b/docs/RetrieveLoyaltyAccountResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.RetrieveLoyaltyAccountResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the loyalty account.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**loyalty_account** | [**LoyaltyAccount**](LoyaltyAccount.md) | The loyalty account. | [optional]
+
+
diff --git a/docs/RetrieveLoyaltyRewardRequest.md b/docs/RetrieveLoyaltyRewardRequest.md
new file mode 100644
index 0000000..fcef883
--- /dev/null
+++ b/docs/RetrieveLoyaltyRewardRequest.md
@@ -0,0 +1,12 @@
+# SquareConnect.RetrieveLoyaltyRewardRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to retrieve a loyalty reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/docs/RetrieveLoyaltyRewardResponse.md b/docs/RetrieveLoyaltyRewardResponse.md
new file mode 100644
index 0000000..d8f94c4
--- /dev/null
+++ b/docs/RetrieveLoyaltyRewardResponse.md
@@ -0,0 +1,14 @@
+# SquareConnect.RetrieveLoyaltyRewardResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the loyalty reward.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**reward** | [**LoyaltyReward**](LoyaltyReward.md) | The loyalty reward retrieved. | [optional]
+
+
diff --git a/docs/SearchLoyaltyAccountsRequest.md b/docs/SearchLoyaltyAccountsRequest.md
new file mode 100644
index 0000000..58ebbb6
--- /dev/null
+++ b/docs/SearchLoyaltyAccountsRequest.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyAccountsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to search for loyalty accounts.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query** | [**SearchLoyaltyAccountsRequestLoyaltyAccountQuery**](SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md) | The search criteria for the request. | [optional]
+**limit** | **Number** | The maximum number of results to include in the response. | [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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination). | [optional]
+
+
diff --git a/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md b/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md
new file mode 100644
index 0000000..f20065a
--- /dev/null
+++ b/docs/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.md
@@ -0,0 +1,13 @@
+# SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery
+
+### Description
+**Note: This model is in beta.**
+
+The search criteria for the loyalty accounts.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mappings** | [**[LoyaltyAccountMapping]**](LoyaltyAccountMapping.md) | The set of mappings to use in the loyalty account search. | [optional]
+
+
diff --git a/docs/SearchLoyaltyAccountsResponse.md b/docs/SearchLoyaltyAccountsResponse.md
new file mode 100644
index 0000000..4f5f815
--- /dev/null
+++ b/docs/SearchLoyaltyAccountsResponse.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyAccountsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes loyalty accounts that satisfy the search criteria.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**loyalty_accounts** | [**[LoyaltyAccount]**](LoyaltyAccount.md) | The loyalty accounts that met the search criteria, in order of creation date. | [optional]
+**cursor** | **String** | The pagination cursor to use in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination). | [optional]
+
+
diff --git a/docs/SearchLoyaltyEventsRequest.md b/docs/SearchLoyaltyEventsRequest.md
new file mode 100644
index 0000000..b1fb6be
--- /dev/null
+++ b/docs/SearchLoyaltyEventsRequest.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyEventsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to search for loyalty events.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query** | [**LoyaltyEventQuery**](LoyaltyEventQuery.md) | A set of one or more predefined query filters to apply when searching for loyalty events. The endpoint performs a logical AND to evaluate multiple filters and performs a logical OR on arrays that specifies multiple field values. | [optional]
+**limit** | **Number** | The maximum number of results to include in the response. The last page might contain fewer events. The default is 30 events. | [optional]
+**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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination). | [optional]
+
+
diff --git a/docs/SearchLoyaltyEventsResponse.md b/docs/SearchLoyaltyEventsResponse.md
new file mode 100644
index 0000000..7c8ccc7
--- /dev/null
+++ b/docs/SearchLoyaltyEventsResponse.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyEventsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that contains loyalty events that satisfy the search criteria, in order by the `created_at` date.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**events** | [**[LoyaltyEvent]**](LoyaltyEvent.md) | The loyalty events that satisfy the search criteria. | [optional]
+**cursor** | **String** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination). | [optional]
+
+
diff --git a/docs/SearchLoyaltyRewardsRequest.md b/docs/SearchLoyaltyRewardsRequest.md
new file mode 100644
index 0000000..54ce9c5
--- /dev/null
+++ b/docs/SearchLoyaltyRewardsRequest.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyRewardsRequest
+
+### Description
+**Note: This model is in beta.**
+
+A request to search for loyalty rewards.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query** | [**SearchLoyaltyRewardsRequestLoyaltyRewardQuery**](SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md) | The search criteria for the request. If empty, the endpoint retrieves all loyalty rewards in the loyalty program. | [optional]
+**limit** | **Number** | The maximum number of results to return in the response. | [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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination). | [optional]
+
+
diff --git a/docs/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md b/docs/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md
new file mode 100644
index 0000000..f1abe89
--- /dev/null
+++ b/docs/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.md
@@ -0,0 +1,14 @@
+# SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery
+
+### Description
+**Note: This model is in beta.**
+
+The set of search requirements.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loyalty_account_id** | **String** | The ID of the `loyalty account` to which the loyalty reward belongs. |
+**status** | **String** | The status of the loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values | [optional]
+
+
diff --git a/docs/SearchLoyaltyRewardsResponse.md b/docs/SearchLoyaltyRewardsResponse.md
new file mode 100644
index 0000000..b985a7f
--- /dev/null
+++ b/docs/SearchLoyaltyRewardsResponse.md
@@ -0,0 +1,15 @@
+# SquareConnect.SearchLoyaltyRewardsResponse
+
+### Description
+**Note: This model is in beta.**
+
+A response that includes the loyalty rewards satisfying the search criteria.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional]
+**rewards** | [**[LoyaltyReward]**](LoyaltyReward.md) | The loyalty rewards that satisfy the search criteria. These are returned in descending order by `updated_at`. | [optional]
+**cursor** | **String** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. | [optional]
+
+
diff --git a/docs/SearchOrdersFulfillmentFilter.md b/docs/SearchOrdersFulfillmentFilter.md
index 6cc11e1..c07bae7 100644
--- a/docs/SearchOrdersFulfillmentFilter.md
+++ b/docs/SearchOrdersFulfillmentFilter.md
@@ -7,7 +7,7 @@ Filter based on [Order Fulfillment](#type-orderfulfillment) information.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**fulfillment_types** | **[String]** | List of `fulfillment types` to filter for. Will return orders if any of its fulfillments match any of the fulfillment types listed in this field. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values |
+**fulfillment_types** | **[String]** | List of `fulfillment types` to filter for. Will return orders if any of its fulfillments match any of the fulfillment types listed in this field. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values | [optional]
**fulfillment_states** | **[String]** | List of `fulfillment states` to filter for. Will return orders if any of its fulfillments match any of the fulfillment states listed in this field. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional]
diff --git a/package.json b/package.json
index 0ee28ed..521bdd1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "square-connect",
- "version": "3.20200422.2",
+ "version": "3.20200528.0",
"description": "JavaScript client library for the Square Connect v2 API",
"keywords": [
"square",
diff --git a/src/ApiClient.js b/src/ApiClient.js
index c877e6a..861da5e 100644
--- a/src/ApiClient.js
+++ b/src/ApiClient.js
@@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils');
/**
* @module ApiClient
- * @version 3.20200422.2
+ * @version 3.20200528.0
*/
/**
@@ -49,7 +49,7 @@ var exports = function() {
* @default {}
*/
this.defaultHeaders = {
- 'User-Agent': 'Square-Connect-Javascript/3.20200422.2'
+ 'User-Agent': 'Square-Connect-Javascript/3.20200528.0'
};
/**
* The default HTTP timeout for all API calls.
diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js
index 4e8f926..4ddd301 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/BankAccountsApi.js b/src/api/BankAccountsApi.js
index a0b4177..7184f87 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -108,7 +108,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -162,7 +162,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CashDrawersApi.js b/src/api/CashDrawersApi.js
index bd4cd46..572df46 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -137,7 +137,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -203,7 +203,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js
index 382673d..86465ed 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -121,7 +121,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -173,7 +173,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -219,7 +219,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -271,7 +271,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -323,7 +323,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -382,7 +382,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -436,7 +436,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -488,7 +488,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -540,7 +540,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -592,7 +592,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js
index 608ac3b..1e9a150 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CustomerGroupsApi.js b/src/api/CustomerGroupsApi.js
index b45aa06..49ec1e0 100644
--- a/src/api/CustomerGroupsApi.js
+++ b/src/api/CustomerGroupsApi.js
@@ -59,7 +59,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -113,7 +113,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -164,7 +164,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -219,7 +219,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -279,7 +279,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CustomerSegmentsApi.js b/src/api/CustomerSegmentsApi.js
index dfa42c5..3f7b684 100644
--- a/src/api/CustomerSegmentsApi.js
+++ b/src/api/CustomerSegmentsApi.js
@@ -52,7 +52,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -107,7 +107,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js
index 4550612..bd8c6f1 100644
--- a/src/api/CustomersApi.js
+++ b/src/api/CustomersApi.js
@@ -74,7 +74,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -127,7 +127,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -186,7 +186,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -240,7 +240,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -300,7 +300,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -334,7 +334,7 @@ module.exports = function(apiClient) {
/**
* ListCustomers
- * Lists a business's customers.
+ * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
* @param {Object} opts Optional parameters
* @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
* @param {String} opts.sortField Indicates how Customers should be sorted. Default: `DEFAULT`.
@@ -355,7 +355,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -374,7 +374,7 @@ module.exports = function(apiClient) {
/**
* ListCustomers
- * Lists a business's customers.
+ * Lists customer profiles associated with a Square account. Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
* @param {Object} opts Optional parameters
* @param {String} opts.cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
* @param {String} opts.sortField Indicates how Customers should be sorted. Default: `DEFAULT`.
@@ -419,7 +419,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -473,7 +473,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -506,7 +506,7 @@ module.exports = function(apiClient) {
/**
* SearchCustomers
- * Searches the customer profiles associated with a Square account. Calling SearchCustomers without an explicit query parameter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`.
+ * Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
* @param {module:model/SearchCustomersRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchCustomersResponse} and HTTP response
*/
@@ -525,7 +525,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -544,7 +544,7 @@ module.exports = function(apiClient) {
/**
* SearchCustomers
- * Searches the customer profiles associated with a Square account. Calling SearchCustomers without an explicit query parameter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`.
+ * Searches the customer profiles associated with a Square account using one or more supported query filters. Calling `SearchCustomers` without any explicit query filter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, espeically during network incidents and outages.
* @param {module:model/SearchCustomersRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchCustomersResponse}
*/
@@ -584,7 +584,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/DevicesApi.js b/src/api/DevicesApi.js
index 196b0b6..863b18b 100644
--- a/src/api/DevicesApi.js
+++ b/src/api/DevicesApi.js
@@ -56,7 +56,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -110,7 +110,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -165,7 +165,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/DisputesApi.js b/src/api/DisputesApi.js
index 0876811..56c8c4b 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -122,7 +122,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -177,7 +177,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -232,7 +232,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -296,7 +296,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -351,7 +351,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -412,7 +412,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -467,7 +467,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js
index bebc6c6..a91893c 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -114,7 +114,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js
index 5f1dfb9..9c47c1a 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -113,7 +113,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -165,7 +165,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -218,7 +218,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -277,7 +277,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -339,7 +339,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -395,7 +395,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js
index 7e553b5..59e4663 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -123,7 +123,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -176,7 +176,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -229,7 +229,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -282,7 +282,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -335,7 +335,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -388,7 +388,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -442,7 +442,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -499,7 +499,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -554,7 +554,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -608,7 +608,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -667,7 +667,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -727,7 +727,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -787,7 +787,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js
index 7dcc7aa..0dc1875 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -104,7 +104,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -156,7 +156,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -216,7 +216,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/LoyaltyApi.js b/src/api/LoyaltyApi.js
new file mode 100644
index 0000000..de96138
--- /dev/null
+++ b/src/api/LoyaltyApi.js
@@ -0,0 +1,770 @@
+/**
+ * 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 AccumulateLoyaltyPointsRequest = require('../model/AccumulateLoyaltyPointsRequest');
+var AccumulateLoyaltyPointsResponse = require('../model/AccumulateLoyaltyPointsResponse');
+var AdjustLoyaltyPointsRequest = require('../model/AdjustLoyaltyPointsRequest');
+var AdjustLoyaltyPointsResponse = require('../model/AdjustLoyaltyPointsResponse');
+var CalculateLoyaltyPointsRequest = require('../model/CalculateLoyaltyPointsRequest');
+var CalculateLoyaltyPointsResponse = require('../model/CalculateLoyaltyPointsResponse');
+var CreateLoyaltyAccountRequest = require('../model/CreateLoyaltyAccountRequest');
+var CreateLoyaltyAccountResponse = require('../model/CreateLoyaltyAccountResponse');
+var CreateLoyaltyRewardRequest = require('../model/CreateLoyaltyRewardRequest');
+var CreateLoyaltyRewardResponse = require('../model/CreateLoyaltyRewardResponse');
+var DeleteLoyaltyRewardResponse = require('../model/DeleteLoyaltyRewardResponse');
+var ListLoyaltyProgramsResponse = require('../model/ListLoyaltyProgramsResponse');
+var RedeemLoyaltyRewardRequest = require('../model/RedeemLoyaltyRewardRequest');
+var RedeemLoyaltyRewardResponse = require('../model/RedeemLoyaltyRewardResponse');
+var RetrieveLoyaltyAccountResponse = require('../model/RetrieveLoyaltyAccountResponse');
+var RetrieveLoyaltyRewardResponse = require('../model/RetrieveLoyaltyRewardResponse');
+var SearchLoyaltyAccountsRequest = require('../model/SearchLoyaltyAccountsRequest');
+var SearchLoyaltyAccountsResponse = require('../model/SearchLoyaltyAccountsResponse');
+var SearchLoyaltyEventsRequest = require('../model/SearchLoyaltyEventsRequest');
+var SearchLoyaltyEventsResponse = require('../model/SearchLoyaltyEventsResponse');
+var SearchLoyaltyRewardsRequest = require('../model/SearchLoyaltyRewardsRequest');
+var SearchLoyaltyRewardsResponse = require('../model/SearchLoyaltyRewardsResponse');
+
+/**
+ * Loyalty service.
+ * @module api/LoyaltyApi
+ */
+
+/**
+ * Constructs a new LoyaltyApi.
+ * @alias module:api/LoyaltyApi
+ * @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;
+
+
+
+ /**
+ * AccumulateLoyaltyPoints
+ * Note: This endpoint is in beta.
+ * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points).
+ * @param {String} accountId The `loyalty account` ID to which to add the points.
+ * @param {module:model/AccumulateLoyaltyPointsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AccumulateLoyaltyPointsResponse} and HTTP response
+ */
+ this.accumulateLoyaltyPointsWithHttpInfo = function(accountId, body) {
+ var postBody = body;
+
+ // verify the required parameter 'accountId' is set
+ if (accountId === undefined || accountId === null) {
+ throw new Error("Missing the required parameter 'accountId' when calling accumulateLoyaltyPoints");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body === undefined || body === null) {
+ throw new Error("Missing the required parameter 'body' when calling accumulateLoyaltyPoints");
+ }
+
+
+ var pathParams = {
+ 'account_id': accountId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = AccumulateLoyaltyPointsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/accounts/{account_id}/accumulate', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * AccumulateLoyaltyPoints
+ * Adds points to a loyalty account. - If you are using the Orders API to manage orders, you only provide the `order_id`. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders, you first perform a client-side computation to compute the points. For spend-based and visit-based programs, you can call `CalculateLoyaltyPoints` to compute the points. For more information, see [Loyalty Program Overview](/docs/loyalty/overview). You then provide the points in a request to this endpoint. For more information, see [Accumulate points](/docs/loyalty-api/overview/#accumulate-points).
+ * @param {String} accountId The `loyalty account` ID to which to add the points.
+ * @param {module:model/AccumulateLoyaltyPointsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccumulateLoyaltyPointsResponse}
+ */
+ this.accumulateLoyaltyPoints = function(accountId, body) {
+ return this.accumulateLoyaltyPointsWithHttpInfo(accountId, body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * AdjustLoyaltyPoints
+ * Note: This endpoint is in beta.
+ * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase.
+ * @param {String} accountId The ID of the `loyalty account` in which to adjust the points.
+ * @param {module:model/AdjustLoyaltyPointsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdjustLoyaltyPointsResponse} and HTTP response
+ */
+ this.adjustLoyaltyPointsWithHttpInfo = function(accountId, body) {
+ var postBody = body;
+
+ // verify the required parameter 'accountId' is set
+ if (accountId === undefined || accountId === null) {
+ throw new Error("Missing the required parameter 'accountId' when calling adjustLoyaltyPoints");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body === undefined || body === null) {
+ throw new Error("Missing the required parameter 'body' when calling adjustLoyaltyPoints");
+ }
+
+
+ var pathParams = {
+ 'account_id': accountId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = AdjustLoyaltyPointsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/accounts/{account_id}/adjust', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * AdjustLoyaltyPoints
+ * Adds points to or subtracts points from a buyer's account. Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call [AccumulateLoyaltyPoints](/reference/square/loyalty-api/accumulate-loyalty-points) to add points when a buyer pays for the purchase.
+ * @param {String} accountId The ID of the `loyalty account` in which to adjust the points.
+ * @param {module:model/AdjustLoyaltyPointsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdjustLoyaltyPointsResponse}
+ */
+ this.adjustLoyaltyPoints = function(accountId, body) {
+ return this.adjustLoyaltyPointsWithHttpInfo(accountId, body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * CalculateLoyaltyPoints
+ * Note: This endpoint is in beta.
+ * Calculates the points a purchase earns. - If you are using the Orders API to manage orders, you provide `order_id` in the request. The endpoint calculates the points by reading the order. - If you are not using the Orders API to manage orders, you provide the purchase amount in the request for the endpoint to calculate the points. An application might call this endpoint to show the points that a buyer can earn with the specific purchase.
+ * @param {String} programId The `loyalty program` ID, which defines the rules for accruing points.
+ * @param {module:model/CalculateLoyaltyPointsRequest} 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/CalculateLoyaltyPointsResponse} and HTTP response
+ */
+ this.calculateLoyaltyPointsWithHttpInfo = function(programId, body) {
+ var postBody = body;
+
+ // verify the required parameter 'programId' is set
+ if (programId === undefined || programId === null) {
+ throw new Error("Missing the required parameter 'programId' when calling calculateLoyaltyPoints");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body === undefined || body === null) {
+ throw new Error("Missing the required parameter 'body' when calling calculateLoyaltyPoints");
+ }
+
+
+ var pathParams = {
+ 'program_id': programId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = CalculateLoyaltyPointsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/programs/{program_id}/calculate', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * CalculateLoyaltyPoints
+ * Calculates the points a purchase earns. - If you are using the Orders API to manage orders, you provide `order_id` in the request. The endpoint calculates the points by reading the order. - If you are not using the Orders API to manage orders, you provide the purchase amount in the request for the endpoint to calculate the points. An application might call this endpoint to show the points that a buyer can earn with the specific purchase.
+ * @param {String} programId The `loyalty program` ID, which defines the rules for accruing points.
+ * @param {module:model/CalculateLoyaltyPointsRequest} 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/CalculateLoyaltyPointsResponse}
+ */
+ this.calculateLoyaltyPoints = function(programId, body) {
+ return this.calculateLoyaltyPointsWithHttpInfo(programId, body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * CreateLoyaltyAccount
+ * Note: This endpoint is in beta.
+ * Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account).
+ * @param {module:model/CreateLoyaltyAccountRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateLoyaltyAccountResponse} and HTTP response
+ */
+ this.createLoyaltyAccountWithHttpInfo = 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 createLoyaltyAccount");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = CreateLoyaltyAccountResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/accounts', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * CreateLoyaltyAccount
+ * Creates a loyalty account. For more information, see [Create a loyalty account](/docs/loyalty-api/overview/#loyalty-overview-create-account).
+ * @param {module:model/CreateLoyaltyAccountRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateLoyaltyAccountResponse}
+ */
+ this.createLoyaltyAccount = function(body) {
+ return this.createLoyaltyAccountWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * CreateLoyaltyReward
+ * Note: This endpoint is in beta.
+ * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {module:model/CreateLoyaltyRewardRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateLoyaltyRewardResponse} and HTTP response
+ */
+ this.createLoyaltyRewardWithHttpInfo = 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 createLoyaltyReward");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = CreateLoyaltyRewardResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/rewards', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * CreateLoyaltyReward
+ * Creates a loyalty reward. In the process, the endpoint does following: - Uses the `reward_tier_id` in the request to determine the number of points to lock for this reward. - If the request includes `order_id`, it adds the reward and related discount to the order. After a reward is created, the points are locked and not available for the buyer to redeem another reward. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {module:model/CreateLoyaltyRewardRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateLoyaltyRewardResponse}
+ */
+ this.createLoyaltyReward = function(body) {
+ return this.createLoyaltyRewardWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * DeleteLoyaltyReward
+ * Note: This endpoint is in beta.
+ * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {String} rewardId The ID of the `loyalty reward` to delete.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteLoyaltyRewardResponse} and HTTP response
+ */
+ this.deleteLoyaltyRewardWithHttpInfo = function(rewardId) {
+ var postBody = null;
+
+ // verify the required parameter 'rewardId' is set
+ if (rewardId === undefined || rewardId === null) {
+ throw new Error("Missing the required parameter 'rewardId' when calling deleteLoyaltyReward");
+ }
+
+
+ var pathParams = {
+ 'reward_id': rewardId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = DeleteLoyaltyRewardResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/rewards/{reward_id}', 'DELETE',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * DeleteLoyaltyReward
+ * Deletes a loyalty reward by doing the following: - Returns the loyalty points back to the loyalty account. - If an order ID was specified when the reward was created (see [CreateLoyaltyReward](/reference/square/loyalty-api/create-loyalty-reward)), it updates the order by removing the reward and related discounts. You cannot delete a reward that has reached the terminal state (REDEEMED). For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {String} rewardId The ID of the `loyalty reward` to delete.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteLoyaltyRewardResponse}
+ */
+ this.deleteLoyaltyReward = function(rewardId) {
+ return this.deleteLoyaltyRewardWithHttpInfo(rewardId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * ListLoyaltyPrograms
+ * Note: This endpoint is in beta.
+ * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). .
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLoyaltyProgramsResponse} and HTTP response
+ */
+ this.listLoyaltyProgramsWithHttpInfo = function() {
+ var postBody = null;
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = ListLoyaltyProgramsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/programs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * ListLoyaltyPrograms
+ * Returns a list of loyalty programs in the seller's account. Currently, a seller can only have one loyalty program. For more information, see [Loyalty Overview](/docs/loyalty/overview). .
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLoyaltyProgramsResponse}
+ */
+ this.listLoyaltyPrograms = function() {
+ return this.listLoyaltyProgramsWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * RedeemLoyaltyReward
+ * Note: This endpoint is in beta.
+ * Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {String} rewardId The ID of the `loyalty reward` to redeem.
+ * @param {module:model/RedeemLoyaltyRewardRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RedeemLoyaltyRewardResponse} and HTTP response
+ */
+ this.redeemLoyaltyRewardWithHttpInfo = function(rewardId, body) {
+ var postBody = body;
+
+ // verify the required parameter 'rewardId' is set
+ if (rewardId === undefined || rewardId === null) {
+ throw new Error("Missing the required parameter 'rewardId' when calling redeemLoyaltyReward");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body === undefined || body === null) {
+ throw new Error("Missing the required parameter 'body' when calling redeemLoyaltyReward");
+ }
+
+
+ var pathParams = {
+ 'reward_id': rewardId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = RedeemLoyaltyRewardResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/rewards/{reward_id}/redeem', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * RedeemLoyaltyReward
+ * Redeems a loyalty reward. The endpoint sets the reward to the terminal state (`REDEEMED`). If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase. After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account. For more information, see [Loyalty rewards](/docs/loyalty-api/overview/#loyalty-overview-loyalty-rewards).
+ * @param {String} rewardId The ID of the `loyalty reward` to redeem.
+ * @param {module:model/RedeemLoyaltyRewardRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RedeemLoyaltyRewardResponse}
+ */
+ this.redeemLoyaltyReward = function(rewardId, body) {
+ return this.redeemLoyaltyRewardWithHttpInfo(rewardId, body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * RetrieveLoyaltyAccount
+ * Note: This endpoint is in beta.
+ * Retrieves a loyalty account.
+ * @param {String} accountId The ID of the `loyalty account` to retrieve.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveLoyaltyAccountResponse} and HTTP response
+ */
+ this.retrieveLoyaltyAccountWithHttpInfo = function(accountId) {
+ var postBody = null;
+
+ // verify the required parameter 'accountId' is set
+ if (accountId === undefined || accountId === null) {
+ throw new Error("Missing the required parameter 'accountId' when calling retrieveLoyaltyAccount");
+ }
+
+
+ var pathParams = {
+ 'account_id': accountId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = RetrieveLoyaltyAccountResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/accounts/{account_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * RetrieveLoyaltyAccount
+ * Retrieves a loyalty account.
+ * @param {String} accountId The ID of the `loyalty account` to retrieve.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveLoyaltyAccountResponse}
+ */
+ this.retrieveLoyaltyAccount = function(accountId) {
+ return this.retrieveLoyaltyAccountWithHttpInfo(accountId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * RetrieveLoyaltyReward
+ * Note: This endpoint is in beta.
+ * Retrieves a loyalty reward.
+ * @param {String} rewardId The ID of the `loyalty reward` to retrieve.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveLoyaltyRewardResponse} and HTTP response
+ */
+ this.retrieveLoyaltyRewardWithHttpInfo = function(rewardId) {
+ var postBody = null;
+
+ // verify the required parameter 'rewardId' is set
+ if (rewardId === undefined || rewardId === null) {
+ throw new Error("Missing the required parameter 'rewardId' when calling retrieveLoyaltyReward");
+ }
+
+
+ var pathParams = {
+ 'reward_id': rewardId
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = RetrieveLoyaltyRewardResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/rewards/{reward_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * RetrieveLoyaltyReward
+ * Retrieves a loyalty reward.
+ * @param {String} rewardId The ID of the `loyalty reward` to retrieve.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveLoyaltyRewardResponse}
+ */
+ this.retrieveLoyaltyReward = function(rewardId) {
+ return this.retrieveLoyaltyRewardWithHttpInfo(rewardId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * SearchLoyaltyAccounts
+ * Note: This endpoint is in beta.
+ * Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned.
+ * @param {module:model/SearchLoyaltyAccountsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchLoyaltyAccountsResponse} and HTTP response
+ */
+ this.searchLoyaltyAccountsWithHttpInfo = 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 searchLoyaltyAccounts");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = SearchLoyaltyAccountsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/accounts/search', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * SearchLoyaltyAccounts
+ * Searches for loyalty accounts. In the current implementation, you can search for a loyalty account using the phone number associated with the account. If no phone number is provided, all loyalty accounts are returned.
+ * @param {module:model/SearchLoyaltyAccountsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchLoyaltyAccountsResponse}
+ */
+ this.searchLoyaltyAccounts = function(body) {
+ return this.searchLoyaltyAccountsWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * SearchLoyaltyEvents
+ * Note: This endpoint is in beta.
+ * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).
+ * @param {module:model/SearchLoyaltyEventsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchLoyaltyEventsResponse} and HTTP response
+ */
+ this.searchLoyaltyEventsWithHttpInfo = 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 searchLoyaltyEvents");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = SearchLoyaltyEventsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/events/search', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * SearchLoyaltyEvents
+ * Searches for loyalty events. A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).
+ * @param {module:model/SearchLoyaltyEventsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchLoyaltyEventsResponse}
+ */
+ this.searchLoyaltyEvents = function(body) {
+ return this.searchLoyaltyEventsWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * SearchLoyaltyRewards
+ * Note: This endpoint is in beta.
+ * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards).
+ * @param {module:model/SearchLoyaltyRewardsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchLoyaltyRewardsResponse} and HTTP response
+ */
+ this.searchLoyaltyRewardsWithHttpInfo = 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 searchLoyaltyRewards");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = SearchLoyaltyRewardsResponse;
+
+ return this.apiClient.callApi(
+ '/v2/loyalty/rewards/search', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * SearchLoyaltyRewards
+ * Searches for loyalty rewards in a loyalty account. In the current implementation, the endpoint supports search by the reward `status`. If you know a reward ID, use the [RetrieveLoyaltyReward](/reference/square/loyalty-api/retrieve-loyalty-reward) endpoint. For more information about loyalty rewards, see [Loyalty Rewards](/docs/loyalty-api/overview/#loyalty-rewards).
+ * @param {module:model/SearchLoyaltyRewardsRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details.
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchLoyaltyRewardsResponse}
+ */
+ this.searchLoyaltyRewards = function(body) {
+ return this.searchLoyaltyRewardsWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+};
diff --git a/src/api/MerchantsApi.js b/src/api/MerchantsApi.js
index 0395fb8..d05ec7c 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -105,7 +105,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/MobileAuthorizationApi.js b/src/api/MobileAuthorizationApi.js
index b0c0429..8b0b679 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js
index 790fc3a..f4cb780 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -118,7 +118,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -171,7 +171,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js
index 6d52232..e5f781c 100644
--- a/src/api/OrdersApi.js
+++ b/src/api/OrdersApi.js
@@ -14,6 +14,8 @@
var ApiClient = require('../ApiClient');
var BatchRetrieveOrdersRequest = require('../model/BatchRetrieveOrdersRequest');
var BatchRetrieveOrdersResponse = require('../model/BatchRetrieveOrdersResponse');
+var CalculateOrderRequest = require('../model/CalculateOrderRequest');
+var CalculateOrderResponse = require('../model/CalculateOrderResponse');
var CreateOrderRequest = require('../model/CreateOrderRequest');
var CreateOrderResponse = require('../model/CreateOrderResponse');
var PayOrderRequest = require('../model/PayOrderRequest');
@@ -68,7 +70,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -100,6 +102,59 @@ module.exports = function(apiClient) {
}
+ /**
+ * CalculateOrder
+ * Note: This endpoint is in beta.
+ * Calculates an [Order](#type-order).
+ * @param {module:model/CalculateOrderRequest} 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/CalculateOrderResponse} and HTTP response
+ */
+ this.calculateOrderWithHttpInfo = 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 calculateOrder");
+ }
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var headerParams = {
+ };
+ headerParams['Square-Version'] = '2020-05-28';
+
+ var formParams = {
+ };
+
+ var authNames = ['oauth2'];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/json'];
+ var returnType = CalculateOrderResponse;
+
+ return this.apiClient.callApi(
+ '/v2/orders/calculate', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType
+ );
+ }
+
+ /**
+ * CalculateOrder
+ * Calculates an [Order](#type-order).
+ * @param {module:model/CalculateOrderRequest} 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/CalculateOrderResponse}
+ */
+ this.calculateOrder = function(body) {
+ return this.calculateOrderWithHttpInfo(body)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
/**
* CreateOrder
* Creates a new [Order](#type-order) which can include information on products for purchase and settings to apply to the purchase. To pay for a created order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. You can modify open orders using the [UpdateOrder](#endpoint-orders-updateorder) endpoint. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
@@ -128,7 +183,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -189,7 +244,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -242,7 +297,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -309,7 +364,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/PaymentsApi.js b/src/api/PaymentsApi.js
index 19bbc6f..dcbf399 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -113,7 +113,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -172,7 +172,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -225,7 +225,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -278,7 +278,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -342,7 +342,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/RefundsApi.js b/src/api/RefundsApi.js
index d0bf368..8a9ad7b 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -118,7 +118,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -177,7 +177,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/ReportingApi.js b/src/api/ReportingApi.js
index 95874ce..d9fd59d 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -136,7 +136,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/TerminalApi.js b/src/api/TerminalApi.js
index 7e5c226..c841ace 100644
--- a/src/api/TerminalApi.js
+++ b/src/api/TerminalApi.js
@@ -59,7 +59,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -112,7 +112,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -166,7 +166,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -219,7 +219,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js
index 976820e..3a729f5 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -132,7 +132,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -201,7 +201,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -268,7 +268,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -338,7 +338,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -405,7 +405,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -468,7 +468,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js
index e1c013c..e9ee9a5 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -108,7 +108,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -162,7 +162,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -217,7 +217,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -280,7 +280,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -338,7 +338,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -407,7 +407,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -471,7 +471,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -543,7 +543,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -616,7 +616,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -670,7 +670,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -723,7 +723,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -778,7 +778,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -837,7 +837,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -897,7 +897,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -959,7 +959,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js
index cc12998..10f6f44 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -150,7 +150,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -221,7 +221,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -284,7 +284,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -346,7 +346,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -408,7 +408,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -470,7 +470,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -532,7 +532,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -601,7 +601,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -664,7 +664,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -733,7 +733,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -797,7 +797,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -860,7 +860,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -923,7 +923,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -986,7 +986,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1049,7 +1049,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1119,7 +1119,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1183,7 +1183,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1252,7 +1252,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1325,7 +1325,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1382,7 +1382,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1437,7 +1437,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1492,7 +1492,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1553,7 +1553,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1615,7 +1615,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1672,7 +1672,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1727,7 +1727,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1796,7 +1796,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1867,7 +1867,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1931,7 +1931,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -1994,7 +1994,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2063,7 +2063,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2133,7 +2133,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2203,7 +2203,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2273,7 +2273,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2343,7 +2343,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2420,7 +2420,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2491,7 +2491,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2561,7 +2561,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -2638,7 +2638,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js
index 1991f14..a59aebd 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -95,7 +95,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js
index dc95cd1..c1187b4 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-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -121,7 +121,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -182,7 +182,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -253,7 +253,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -325,7 +325,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -398,7 +398,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -467,7 +467,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -528,7 +528,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -589,7 +589,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -650,7 +650,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
@@ -717,7 +717,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
- headerParams['Square-Version'] = '2020-04-22';
+ headerParams['Square-Version'] = '2020-05-28';
var formParams = {
};
diff --git a/src/index.js b/src/index.js
index d76abdb..827ca0c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -15,12 +15,16 @@
var ApiClient = require('./ApiClient');
var AcceptDisputeRequest = require('./model/AcceptDisputeRequest');
var AcceptDisputeResponse = require('./model/AcceptDisputeResponse');
+var AccumulateLoyaltyPointsRequest = require('./model/AccumulateLoyaltyPointsRequest');
+var AccumulateLoyaltyPointsResponse = require('./model/AccumulateLoyaltyPointsResponse');
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');
var Address = require('./model/Address');
+var AdjustLoyaltyPointsRequest = require('./model/AdjustLoyaltyPointsRequest');
+var AdjustLoyaltyPointsResponse = require('./model/AdjustLoyaltyPointsResponse');
var BalancePaymentDetails = require('./model/BalancePaymentDetails');
var BankAccount = require('./model/BankAccount');
var BankAccountStatus = require('./model/BankAccountStatus');
@@ -42,6 +46,10 @@ var BatchUpsertCatalogObjectsResponse = require('./model/BatchUpsertCatalogObjec
var BreakType = require('./model/BreakType');
var BusinessHours = require('./model/BusinessHours');
var BusinessHoursPeriod = require('./model/BusinessHoursPeriod');
+var CalculateLoyaltyPointsRequest = require('./model/CalculateLoyaltyPointsRequest');
+var CalculateLoyaltyPointsResponse = require('./model/CalculateLoyaltyPointsResponse');
+var CalculateOrderRequest = require('./model/CalculateOrderRequest');
+var CalculateOrderResponse = require('./model/CalculateOrderResponse');
var CancelPaymentByIdempotencyKeyRequest = require('./model/CancelPaymentByIdempotencyKeyRequest');
var CancelPaymentByIdempotencyKeyResponse = require('./model/CancelPaymentByIdempotencyKeyResponse');
var CancelPaymentRequest = require('./model/CancelPaymentRequest');
@@ -64,6 +72,7 @@ var CashDrawerShiftSummary = require('./model/CashDrawerShiftSummary');
var CatalogCategory = require('./model/CatalogCategory');
var CatalogCustomAttributeDefinition = require('./model/CatalogCustomAttributeDefinition');
var CatalogCustomAttributeDefinitionAppVisibility = require('./model/CatalogCustomAttributeDefinitionAppVisibility');
+var CatalogCustomAttributeDefinitionNumberConfig = require('./model/CatalogCustomAttributeDefinitionNumberConfig');
var CatalogCustomAttributeDefinitionSelectionConfig = require('./model/CatalogCustomAttributeDefinitionSelectionConfig');
var CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection = require('./model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection');
var CatalogCustomAttributeDefinitionSellerVisibility = require('./model/CatalogCustomAttributeDefinitionSellerVisibility');
@@ -148,6 +157,10 @@ var CreateDisputeEvidenceTextRequest = require('./model/CreateDisputeEvidenceTex
var CreateDisputeEvidenceTextResponse = require('./model/CreateDisputeEvidenceTextResponse');
var CreateLocationRequest = require('./model/CreateLocationRequest');
var CreateLocationResponse = require('./model/CreateLocationResponse');
+var CreateLoyaltyAccountRequest = require('./model/CreateLoyaltyAccountRequest');
+var CreateLoyaltyAccountResponse = require('./model/CreateLoyaltyAccountResponse');
+var CreateLoyaltyRewardRequest = require('./model/CreateLoyaltyRewardRequest');
+var CreateLoyaltyRewardResponse = require('./model/CreateLoyaltyRewardResponse');
var CreateMobileAuthorizationCodeRequest = require('./model/CreateMobileAuthorizationCodeRequest');
var CreateMobileAuthorizationCodeResponse = require('./model/CreateMobileAuthorizationCodeResponse');
var CreateOrderRequest = require('./model/CreateOrderRequest');
@@ -173,6 +186,7 @@ var CustomerQuery = require('./model/CustomerQuery');
var CustomerSegment = require('./model/CustomerSegment');
var CustomerSort = require('./model/CustomerSort');
var CustomerSortField = require('./model/CustomerSortField');
+var CustomerTextFilter = require('./model/CustomerTextFilter');
var DateRange = require('./model/DateRange');
var DayOfWeek = require('./model/DayOfWeek');
var DeleteBreakTypeRequest = require('./model/DeleteBreakTypeRequest');
@@ -185,6 +199,8 @@ var DeleteCustomerGroupRequest = require('./model/DeleteCustomerGroupRequest');
var DeleteCustomerGroupResponse = require('./model/DeleteCustomerGroupResponse');
var DeleteCustomerRequest = require('./model/DeleteCustomerRequest');
var DeleteCustomerResponse = require('./model/DeleteCustomerResponse');
+var DeleteLoyaltyRewardRequest = require('./model/DeleteLoyaltyRewardRequest');
+var DeleteLoyaltyRewardResponse = require('./model/DeleteLoyaltyRewardResponse');
var DeleteShiftRequest = require('./model/DeleteShiftRequest');
var DeleteShiftResponse = require('./model/DeleteShiftResponse');
var Device = require('./model/Device');
@@ -267,6 +283,8 @@ var ListEmployeesRequest = require('./model/ListEmployeesRequest');
var ListEmployeesResponse = require('./model/ListEmployeesResponse');
var ListLocationsRequest = require('./model/ListLocationsRequest');
var ListLocationsResponse = require('./model/ListLocationsResponse');
+var ListLoyaltyProgramsRequest = require('./model/ListLoyaltyProgramsRequest');
+var ListLoyaltyProgramsResponse = require('./model/ListLoyaltyProgramsResponse');
var ListMerchantsRequest = require('./model/ListMerchantsRequest');
var ListMerchantsResponse = require('./model/ListMerchantsResponse');
var ListPaymentRefundsRequest = require('./model/ListPaymentRefundsRequest');
@@ -283,6 +301,38 @@ var Location = require('./model/Location');
var LocationCapability = require('./model/LocationCapability');
var LocationStatus = require('./model/LocationStatus');
var LocationType = require('./model/LocationType');
+var LoyaltyAccount = require('./model/LoyaltyAccount');
+var LoyaltyAccountMapping = require('./model/LoyaltyAccountMapping');
+var LoyaltyAccountMappingType = require('./model/LoyaltyAccountMappingType');
+var LoyaltyEvent = require('./model/LoyaltyEvent');
+var LoyaltyEventAccumulatePoints = require('./model/LoyaltyEventAccumulatePoints');
+var LoyaltyEventAdjustPoints = require('./model/LoyaltyEventAdjustPoints');
+var LoyaltyEventCreateReward = require('./model/LoyaltyEventCreateReward');
+var LoyaltyEventDateTimeFilter = require('./model/LoyaltyEventDateTimeFilter');
+var LoyaltyEventDeleteReward = require('./model/LoyaltyEventDeleteReward');
+var LoyaltyEventExpirePoints = require('./model/LoyaltyEventExpirePoints');
+var LoyaltyEventFilter = require('./model/LoyaltyEventFilter');
+var LoyaltyEventLocationFilter = require('./model/LoyaltyEventLocationFilter');
+var LoyaltyEventLoyaltyAccountFilter = require('./model/LoyaltyEventLoyaltyAccountFilter');
+var LoyaltyEventOrderFilter = require('./model/LoyaltyEventOrderFilter');
+var LoyaltyEventOther = require('./model/LoyaltyEventOther');
+var LoyaltyEventQuery = require('./model/LoyaltyEventQuery');
+var LoyaltyEventRedeemReward = require('./model/LoyaltyEventRedeemReward');
+var LoyaltyEventSource = require('./model/LoyaltyEventSource');
+var LoyaltyEventType = require('./model/LoyaltyEventType');
+var LoyaltyEventTypeFilter = require('./model/LoyaltyEventTypeFilter');
+var LoyaltyProgram = require('./model/LoyaltyProgram');
+var LoyaltyProgramAccrualRule = require('./model/LoyaltyProgramAccrualRule');
+var LoyaltyProgramAccrualRuleType = require('./model/LoyaltyProgramAccrualRuleType');
+var LoyaltyProgramExpirationPolicy = require('./model/LoyaltyProgramExpirationPolicy');
+var LoyaltyProgramRewardDefinition = require('./model/LoyaltyProgramRewardDefinition');
+var LoyaltyProgramRewardDefinitionScope = require('./model/LoyaltyProgramRewardDefinitionScope');
+var LoyaltyProgramRewardDefinitionType = require('./model/LoyaltyProgramRewardDefinitionType');
+var LoyaltyProgramRewardTier = require('./model/LoyaltyProgramRewardTier');
+var LoyaltyProgramStatus = require('./model/LoyaltyProgramStatus');
+var LoyaltyProgramTerminology = require('./model/LoyaltyProgramTerminology');
+var LoyaltyReward = require('./model/LoyaltyReward');
+var LoyaltyRewardStatus = require('./model/LoyaltyRewardStatus');
var MeasurementUnit = require('./model/MeasurementUnit');
var MeasurementUnitArea = require('./model/MeasurementUnitArea');
var MeasurementUnitCustom = require('./model/MeasurementUnitCustom');
@@ -332,6 +382,7 @@ var OrderReturnLineItem = require('./model/OrderReturnLineItem');
var OrderReturnLineItemModifier = require('./model/OrderReturnLineItemModifier');
var OrderReturnServiceCharge = require('./model/OrderReturnServiceCharge');
var OrderReturnTax = require('./model/OrderReturnTax');
+var OrderReward = require('./model/OrderReward');
var OrderRoundingAdjustment = require('./model/OrderRoundingAdjustment');
var OrderServiceCharge = require('./model/OrderServiceCharge');
var OrderServiceChargeCalculationPhase = require('./model/OrderServiceChargeCalculationPhase');
@@ -347,6 +398,8 @@ var PaymentRefund = require('./model/PaymentRefund');
var ProcessingFee = require('./model/ProcessingFee');
var Product = require('./model/Product');
var ProductType = require('./model/ProductType');
+var RedeemLoyaltyRewardRequest = require('./model/RedeemLoyaltyRewardRequest');
+var RedeemLoyaltyRewardResponse = require('./model/RedeemLoyaltyRewardResponse');
var Refund = require('./model/Refund');
var RefundPaymentRequest = require('./model/RefundPaymentRequest');
var RefundPaymentResponse = require('./model/RefundPaymentResponse');
@@ -386,6 +439,10 @@ var RetrieveInventoryPhysicalCountRequest = require('./model/RetrieveInventoryPh
var RetrieveInventoryPhysicalCountResponse = require('./model/RetrieveInventoryPhysicalCountResponse');
var RetrieveLocationRequest = require('./model/RetrieveLocationRequest');
var RetrieveLocationResponse = require('./model/RetrieveLocationResponse');
+var RetrieveLoyaltyAccountRequest = require('./model/RetrieveLoyaltyAccountRequest');
+var RetrieveLoyaltyAccountResponse = require('./model/RetrieveLoyaltyAccountResponse');
+var RetrieveLoyaltyRewardRequest = require('./model/RetrieveLoyaltyRewardRequest');
+var RetrieveLoyaltyRewardResponse = require('./model/RetrieveLoyaltyRewardResponse');
var RetrieveMerchantRequest = require('./model/RetrieveMerchantRequest');
var RetrieveMerchantResponse = require('./model/RetrieveMerchantResponse');
var RetrieveTransactionRequest = require('./model/RetrieveTransactionRequest');
@@ -396,6 +453,14 @@ var SearchCatalogObjectsRequest = require('./model/SearchCatalogObjectsRequest')
var SearchCatalogObjectsResponse = require('./model/SearchCatalogObjectsResponse');
var SearchCustomersRequest = require('./model/SearchCustomersRequest');
var SearchCustomersResponse = require('./model/SearchCustomersResponse');
+var SearchLoyaltyAccountsRequest = require('./model/SearchLoyaltyAccountsRequest');
+var SearchLoyaltyAccountsRequestLoyaltyAccountQuery = require('./model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery');
+var SearchLoyaltyAccountsResponse = require('./model/SearchLoyaltyAccountsResponse');
+var SearchLoyaltyEventsRequest = require('./model/SearchLoyaltyEventsRequest');
+var SearchLoyaltyEventsResponse = require('./model/SearchLoyaltyEventsResponse');
+var SearchLoyaltyRewardsRequest = require('./model/SearchLoyaltyRewardsRequest');
+var SearchLoyaltyRewardsRequestLoyaltyRewardQuery = require('./model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery');
+var SearchLoyaltyRewardsResponse = require('./model/SearchLoyaltyRewardsResponse');
var SearchOrdersCustomerFilter = require('./model/SearchOrdersCustomerFilter');
var SearchOrdersDateTimeFilter = require('./model/SearchOrdersDateTimeFilter');
var SearchOrdersFilter = require('./model/SearchOrdersFilter');
@@ -644,6 +709,7 @@ var EmployeesApi = require('./api/EmployeesApi');
var InventoryApi = require('./api/InventoryApi');
var LaborApi = require('./api/LaborApi');
var LocationsApi = require('./api/LocationsApi');
+var LoyaltyApi = require('./api/LoyaltyApi');
var MerchantsApi = require('./api/MerchantsApi');
var MobileAuthorizationApi = require('./api/MobileAuthorizationApi');
var OAuthApi = require('./api/OAuthApi');
@@ -688,7 +754,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
*
*
* @module index
- * @version 3.20200422.2
+ * @version 3.20200528.0
*/
module.exports = {
/**
@@ -706,6 +772,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/AcceptDisputeResponse}
*/
AcceptDisputeResponse: AcceptDisputeResponse,
+ /**
+ * The AccumulateLoyaltyPointsRequest model constructor.
+ * @property {module:model/AccumulateLoyaltyPointsRequest}
+ */
+ AccumulateLoyaltyPointsRequest: AccumulateLoyaltyPointsRequest,
+ /**
+ * The AccumulateLoyaltyPointsResponse model constructor.
+ * @property {module:model/AccumulateLoyaltyPointsResponse}
+ */
+ AccumulateLoyaltyPointsResponse: AccumulateLoyaltyPointsResponse,
/**
* The AddGroupToCustomerRequest model constructor.
* @property {module:model/AddGroupToCustomerRequest}
@@ -736,6 +812,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/Address}
*/
Address: Address,
+ /**
+ * The AdjustLoyaltyPointsRequest model constructor.
+ * @property {module:model/AdjustLoyaltyPointsRequest}
+ */
+ AdjustLoyaltyPointsRequest: AdjustLoyaltyPointsRequest,
+ /**
+ * The AdjustLoyaltyPointsResponse model constructor.
+ * @property {module:model/AdjustLoyaltyPointsResponse}
+ */
+ AdjustLoyaltyPointsResponse: AdjustLoyaltyPointsResponse,
/**
* The BalancePaymentDetails model constructor.
* @property {module:model/BalancePaymentDetails}
@@ -841,6 +927,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/BusinessHoursPeriod}
*/
BusinessHoursPeriod: BusinessHoursPeriod,
+ /**
+ * The CalculateLoyaltyPointsRequest model constructor.
+ * @property {module:model/CalculateLoyaltyPointsRequest}
+ */
+ CalculateLoyaltyPointsRequest: CalculateLoyaltyPointsRequest,
+ /**
+ * The CalculateLoyaltyPointsResponse model constructor.
+ * @property {module:model/CalculateLoyaltyPointsResponse}
+ */
+ CalculateLoyaltyPointsResponse: CalculateLoyaltyPointsResponse,
+ /**
+ * The CalculateOrderRequest model constructor.
+ * @property {module:model/CalculateOrderRequest}
+ */
+ CalculateOrderRequest: CalculateOrderRequest,
+ /**
+ * The CalculateOrderResponse model constructor.
+ * @property {module:model/CalculateOrderResponse}
+ */
+ CalculateOrderResponse: CalculateOrderResponse,
/**
* The CancelPaymentByIdempotencyKeyRequest model constructor.
* @property {module:model/CancelPaymentByIdempotencyKeyRequest}
@@ -951,6 +1057,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/CatalogCustomAttributeDefinitionAppVisibility}
*/
CatalogCustomAttributeDefinitionAppVisibility: CatalogCustomAttributeDefinitionAppVisibility,
+ /**
+ * The CatalogCustomAttributeDefinitionNumberConfig model constructor.
+ * @property {module:model/CatalogCustomAttributeDefinitionNumberConfig}
+ */
+ CatalogCustomAttributeDefinitionNumberConfig: CatalogCustomAttributeDefinitionNumberConfig,
/**
* The CatalogCustomAttributeDefinitionSelectionConfig model constructor.
* @property {module:model/CatalogCustomAttributeDefinitionSelectionConfig}
@@ -1371,6 +1482,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/CreateLocationResponse}
*/
CreateLocationResponse: CreateLocationResponse,
+ /**
+ * The CreateLoyaltyAccountRequest model constructor.
+ * @property {module:model/CreateLoyaltyAccountRequest}
+ */
+ CreateLoyaltyAccountRequest: CreateLoyaltyAccountRequest,
+ /**
+ * The CreateLoyaltyAccountResponse model constructor.
+ * @property {module:model/CreateLoyaltyAccountResponse}
+ */
+ CreateLoyaltyAccountResponse: CreateLoyaltyAccountResponse,
+ /**
+ * The CreateLoyaltyRewardRequest model constructor.
+ * @property {module:model/CreateLoyaltyRewardRequest}
+ */
+ CreateLoyaltyRewardRequest: CreateLoyaltyRewardRequest,
+ /**
+ * The CreateLoyaltyRewardResponse model constructor.
+ * @property {module:model/CreateLoyaltyRewardResponse}
+ */
+ CreateLoyaltyRewardResponse: CreateLoyaltyRewardResponse,
/**
* The CreateMobileAuthorizationCodeRequest model constructor.
* @property {module:model/CreateMobileAuthorizationCodeRequest}
@@ -1496,6 +1627,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/CustomerSortField}
*/
CustomerSortField: CustomerSortField,
+ /**
+ * The CustomerTextFilter model constructor.
+ * @property {module:model/CustomerTextFilter}
+ */
+ CustomerTextFilter: CustomerTextFilter,
/**
* The DateRange model constructor.
* @property {module:model/DateRange}
@@ -1556,6 +1692,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/DeleteCustomerResponse}
*/
DeleteCustomerResponse: DeleteCustomerResponse,
+ /**
+ * The DeleteLoyaltyRewardRequest model constructor.
+ * @property {module:model/DeleteLoyaltyRewardRequest}
+ */
+ DeleteLoyaltyRewardRequest: DeleteLoyaltyRewardRequest,
+ /**
+ * The DeleteLoyaltyRewardResponse model constructor.
+ * @property {module:model/DeleteLoyaltyRewardResponse}
+ */
+ DeleteLoyaltyRewardResponse: DeleteLoyaltyRewardResponse,
/**
* The DeleteShiftRequest model constructor.
* @property {module:model/DeleteShiftRequest}
@@ -1966,6 +2112,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/ListLocationsResponse}
*/
ListLocationsResponse: ListLocationsResponse,
+ /**
+ * The ListLoyaltyProgramsRequest model constructor.
+ * @property {module:model/ListLoyaltyProgramsRequest}
+ */
+ ListLoyaltyProgramsRequest: ListLoyaltyProgramsRequest,
+ /**
+ * The ListLoyaltyProgramsResponse model constructor.
+ * @property {module:model/ListLoyaltyProgramsResponse}
+ */
+ ListLoyaltyProgramsResponse: ListLoyaltyProgramsResponse,
/**
* The ListMerchantsRequest model constructor.
* @property {module:model/ListMerchantsRequest}
@@ -2046,6 +2202,166 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/LocationType}
*/
LocationType: LocationType,
+ /**
+ * The LoyaltyAccount model constructor.
+ * @property {module:model/LoyaltyAccount}
+ */
+ LoyaltyAccount: LoyaltyAccount,
+ /**
+ * The LoyaltyAccountMapping model constructor.
+ * @property {module:model/LoyaltyAccountMapping}
+ */
+ LoyaltyAccountMapping: LoyaltyAccountMapping,
+ /**
+ * The LoyaltyAccountMappingType model constructor.
+ * @property {module:model/LoyaltyAccountMappingType}
+ */
+ LoyaltyAccountMappingType: LoyaltyAccountMappingType,
+ /**
+ * The LoyaltyEvent model constructor.
+ * @property {module:model/LoyaltyEvent}
+ */
+ LoyaltyEvent: LoyaltyEvent,
+ /**
+ * The LoyaltyEventAccumulatePoints model constructor.
+ * @property {module:model/LoyaltyEventAccumulatePoints}
+ */
+ LoyaltyEventAccumulatePoints: LoyaltyEventAccumulatePoints,
+ /**
+ * The LoyaltyEventAdjustPoints model constructor.
+ * @property {module:model/LoyaltyEventAdjustPoints}
+ */
+ LoyaltyEventAdjustPoints: LoyaltyEventAdjustPoints,
+ /**
+ * The LoyaltyEventCreateReward model constructor.
+ * @property {module:model/LoyaltyEventCreateReward}
+ */
+ LoyaltyEventCreateReward: LoyaltyEventCreateReward,
+ /**
+ * The LoyaltyEventDateTimeFilter model constructor.
+ * @property {module:model/LoyaltyEventDateTimeFilter}
+ */
+ LoyaltyEventDateTimeFilter: LoyaltyEventDateTimeFilter,
+ /**
+ * The LoyaltyEventDeleteReward model constructor.
+ * @property {module:model/LoyaltyEventDeleteReward}
+ */
+ LoyaltyEventDeleteReward: LoyaltyEventDeleteReward,
+ /**
+ * The LoyaltyEventExpirePoints model constructor.
+ * @property {module:model/LoyaltyEventExpirePoints}
+ */
+ LoyaltyEventExpirePoints: LoyaltyEventExpirePoints,
+ /**
+ * The LoyaltyEventFilter model constructor.
+ * @property {module:model/LoyaltyEventFilter}
+ */
+ LoyaltyEventFilter: LoyaltyEventFilter,
+ /**
+ * The LoyaltyEventLocationFilter model constructor.
+ * @property {module:model/LoyaltyEventLocationFilter}
+ */
+ LoyaltyEventLocationFilter: LoyaltyEventLocationFilter,
+ /**
+ * The LoyaltyEventLoyaltyAccountFilter model constructor.
+ * @property {module:model/LoyaltyEventLoyaltyAccountFilter}
+ */
+ LoyaltyEventLoyaltyAccountFilter: LoyaltyEventLoyaltyAccountFilter,
+ /**
+ * The LoyaltyEventOrderFilter model constructor.
+ * @property {module:model/LoyaltyEventOrderFilter}
+ */
+ LoyaltyEventOrderFilter: LoyaltyEventOrderFilter,
+ /**
+ * The LoyaltyEventOther model constructor.
+ * @property {module:model/LoyaltyEventOther}
+ */
+ LoyaltyEventOther: LoyaltyEventOther,
+ /**
+ * The LoyaltyEventQuery model constructor.
+ * @property {module:model/LoyaltyEventQuery}
+ */
+ LoyaltyEventQuery: LoyaltyEventQuery,
+ /**
+ * The LoyaltyEventRedeemReward model constructor.
+ * @property {module:model/LoyaltyEventRedeemReward}
+ */
+ LoyaltyEventRedeemReward: LoyaltyEventRedeemReward,
+ /**
+ * The LoyaltyEventSource model constructor.
+ * @property {module:model/LoyaltyEventSource}
+ */
+ LoyaltyEventSource: LoyaltyEventSource,
+ /**
+ * The LoyaltyEventType model constructor.
+ * @property {module:model/LoyaltyEventType}
+ */
+ LoyaltyEventType: LoyaltyEventType,
+ /**
+ * The LoyaltyEventTypeFilter model constructor.
+ * @property {module:model/LoyaltyEventTypeFilter}
+ */
+ LoyaltyEventTypeFilter: LoyaltyEventTypeFilter,
+ /**
+ * The LoyaltyProgram model constructor.
+ * @property {module:model/LoyaltyProgram}
+ */
+ LoyaltyProgram: LoyaltyProgram,
+ /**
+ * The LoyaltyProgramAccrualRule model constructor.
+ * @property {module:model/LoyaltyProgramAccrualRule}
+ */
+ LoyaltyProgramAccrualRule: LoyaltyProgramAccrualRule,
+ /**
+ * The LoyaltyProgramAccrualRuleType model constructor.
+ * @property {module:model/LoyaltyProgramAccrualRuleType}
+ */
+ LoyaltyProgramAccrualRuleType: LoyaltyProgramAccrualRuleType,
+ /**
+ * The LoyaltyProgramExpirationPolicy model constructor.
+ * @property {module:model/LoyaltyProgramExpirationPolicy}
+ */
+ LoyaltyProgramExpirationPolicy: LoyaltyProgramExpirationPolicy,
+ /**
+ * The LoyaltyProgramRewardDefinition model constructor.
+ * @property {module:model/LoyaltyProgramRewardDefinition}
+ */
+ LoyaltyProgramRewardDefinition: LoyaltyProgramRewardDefinition,
+ /**
+ * The LoyaltyProgramRewardDefinitionScope model constructor.
+ * @property {module:model/LoyaltyProgramRewardDefinitionScope}
+ */
+ LoyaltyProgramRewardDefinitionScope: LoyaltyProgramRewardDefinitionScope,
+ /**
+ * The LoyaltyProgramRewardDefinitionType model constructor.
+ * @property {module:model/LoyaltyProgramRewardDefinitionType}
+ */
+ LoyaltyProgramRewardDefinitionType: LoyaltyProgramRewardDefinitionType,
+ /**
+ * The LoyaltyProgramRewardTier model constructor.
+ * @property {module:model/LoyaltyProgramRewardTier}
+ */
+ LoyaltyProgramRewardTier: LoyaltyProgramRewardTier,
+ /**
+ * The LoyaltyProgramStatus model constructor.
+ * @property {module:model/LoyaltyProgramStatus}
+ */
+ LoyaltyProgramStatus: LoyaltyProgramStatus,
+ /**
+ * The LoyaltyProgramTerminology model constructor.
+ * @property {module:model/LoyaltyProgramTerminology}
+ */
+ LoyaltyProgramTerminology: LoyaltyProgramTerminology,
+ /**
+ * The LoyaltyReward model constructor.
+ * @property {module:model/LoyaltyReward}
+ */
+ LoyaltyReward: LoyaltyReward,
+ /**
+ * The LoyaltyRewardStatus model constructor.
+ * @property {module:model/LoyaltyRewardStatus}
+ */
+ LoyaltyRewardStatus: LoyaltyRewardStatus,
/**
* The MeasurementUnit model constructor.
* @property {module:model/MeasurementUnit}
@@ -2291,6 +2607,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/OrderReturnTax}
*/
OrderReturnTax: OrderReturnTax,
+ /**
+ * The OrderReward model constructor.
+ * @property {module:model/OrderReward}
+ */
+ OrderReward: OrderReward,
/**
* The OrderRoundingAdjustment model constructor.
* @property {module:model/OrderRoundingAdjustment}
@@ -2366,6 +2687,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/ProductType}
*/
ProductType: ProductType,
+ /**
+ * The RedeemLoyaltyRewardRequest model constructor.
+ * @property {module:model/RedeemLoyaltyRewardRequest}
+ */
+ RedeemLoyaltyRewardRequest: RedeemLoyaltyRewardRequest,
+ /**
+ * The RedeemLoyaltyRewardResponse model constructor.
+ * @property {module:model/RedeemLoyaltyRewardResponse}
+ */
+ RedeemLoyaltyRewardResponse: RedeemLoyaltyRewardResponse,
/**
* The Refund model constructor.
* @property {module:model/Refund}
@@ -2561,6 +2892,26 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/RetrieveLocationResponse}
*/
RetrieveLocationResponse: RetrieveLocationResponse,
+ /**
+ * The RetrieveLoyaltyAccountRequest model constructor.
+ * @property {module:model/RetrieveLoyaltyAccountRequest}
+ */
+ RetrieveLoyaltyAccountRequest: RetrieveLoyaltyAccountRequest,
+ /**
+ * The RetrieveLoyaltyAccountResponse model constructor.
+ * @property {module:model/RetrieveLoyaltyAccountResponse}
+ */
+ RetrieveLoyaltyAccountResponse: RetrieveLoyaltyAccountResponse,
+ /**
+ * The RetrieveLoyaltyRewardRequest model constructor.
+ * @property {module:model/RetrieveLoyaltyRewardRequest}
+ */
+ RetrieveLoyaltyRewardRequest: RetrieveLoyaltyRewardRequest,
+ /**
+ * The RetrieveLoyaltyRewardResponse model constructor.
+ * @property {module:model/RetrieveLoyaltyRewardResponse}
+ */
+ RetrieveLoyaltyRewardResponse: RetrieveLoyaltyRewardResponse,
/**
* The RetrieveMerchantRequest model constructor.
* @property {module:model/RetrieveMerchantRequest}
@@ -2611,6 +2962,46 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/SearchCustomersResponse}
*/
SearchCustomersResponse: SearchCustomersResponse,
+ /**
+ * The SearchLoyaltyAccountsRequest model constructor.
+ * @property {module:model/SearchLoyaltyAccountsRequest}
+ */
+ SearchLoyaltyAccountsRequest: SearchLoyaltyAccountsRequest,
+ /**
+ * The SearchLoyaltyAccountsRequestLoyaltyAccountQuery model constructor.
+ * @property {module:model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery}
+ */
+ SearchLoyaltyAccountsRequestLoyaltyAccountQuery: SearchLoyaltyAccountsRequestLoyaltyAccountQuery,
+ /**
+ * The SearchLoyaltyAccountsResponse model constructor.
+ * @property {module:model/SearchLoyaltyAccountsResponse}
+ */
+ SearchLoyaltyAccountsResponse: SearchLoyaltyAccountsResponse,
+ /**
+ * The SearchLoyaltyEventsRequest model constructor.
+ * @property {module:model/SearchLoyaltyEventsRequest}
+ */
+ SearchLoyaltyEventsRequest: SearchLoyaltyEventsRequest,
+ /**
+ * The SearchLoyaltyEventsResponse model constructor.
+ * @property {module:model/SearchLoyaltyEventsResponse}
+ */
+ SearchLoyaltyEventsResponse: SearchLoyaltyEventsResponse,
+ /**
+ * The SearchLoyaltyRewardsRequest model constructor.
+ * @property {module:model/SearchLoyaltyRewardsRequest}
+ */
+ SearchLoyaltyRewardsRequest: SearchLoyaltyRewardsRequest,
+ /**
+ * The SearchLoyaltyRewardsRequestLoyaltyRewardQuery model constructor.
+ * @property {module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery}
+ */
+ SearchLoyaltyRewardsRequestLoyaltyRewardQuery: SearchLoyaltyRewardsRequestLoyaltyRewardQuery,
+ /**
+ * The SearchLoyaltyRewardsResponse model constructor.
+ * @property {module:model/SearchLoyaltyRewardsResponse}
+ */
+ SearchLoyaltyRewardsResponse: SearchLoyaltyRewardsResponse,
/**
* The SearchOrdersCustomerFilter model constructor.
* @property {module:model/SearchOrdersCustomerFilter}
@@ -3846,6 +4237,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:api/LocationsApi}
*/
LocationsApi: LocationsApi,
+ /**
+ * The LoyaltyApi service constructor.
+ * @property {module:api/LoyaltyApi}
+ */
+ LoyaltyApi: LoyaltyApi,
/**
* The MerchantsApi service constructor.
* @property {module:api/MerchantsApi}
diff --git a/src/model/AccumulateLoyaltyPointsRequest.js b/src/model/AccumulateLoyaltyPointsRequest.js
new file mode 100644
index 0000000..0e56e66
--- /dev/null
+++ b/src/model/AccumulateLoyaltyPointsRequest.js
@@ -0,0 +1,88 @@
+/**
+ * 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 LoyaltyEventAccumulatePoints = require('./LoyaltyEventAccumulatePoints');
+
+
+
+
+/**
+ * The AccumulateLoyaltyPointsRequest model module.
+ * Note: This model is in beta.
+ * @module model/AccumulateLoyaltyPointsRequest
+ */
+
+/**
+ * Constructs a new AccumulateLoyaltyPointsRequest
.
+ * A request to accumulate points for a purchase.
+ * @alias module:model/AccumulateLoyaltyPointsRequest
+ * @class
+ * @param accumulatePoints {module:model/LoyaltyEventAccumulatePoints} The points to add to the account. If you are using the Orders API to manage orders, you specify the order ID. Otherwise, specify the points to add.
+ * @param idempotencyKey {String} A unique string that identifies the `AccumulateLoyaltyPoints` request. Keys can be any valid string but must be unique for every request.
+ * @param locationId {String} The `location` where the purchase was made.
+ */
+var exports = function(accumulatePoints, idempotencyKey, locationId) {
+ var _this = this;
+
+ _this['accumulate_points'] = accumulatePoints;
+ _this['idempotency_key'] = idempotencyKey;
+ _this['location_id'] = locationId;
+};
+
+/**
+ * Constructs a AccumulateLoyaltyPointsRequest
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/AccumulateLoyaltyPointsRequest} obj Optional instance to populate.
+ * @return {module:model/AccumulateLoyaltyPointsRequest} The populated AccumulateLoyaltyPointsRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('accumulate_points')) {
+ obj['accumulate_points'] = LoyaltyEventAccumulatePoints.constructFromObject(data['accumulate_points']);
+ }
+ if (data.hasOwnProperty('idempotency_key')) {
+ obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String');
+ }
+ if (data.hasOwnProperty('location_id')) {
+ obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The points to add to the account. If you are using the Orders API to manage orders, you specify the order ID. Otherwise, specify the points to add.
+ * @member {module:model/LoyaltyEventAccumulatePoints} accumulate_points
+ */
+exports.prototype['accumulate_points'] = undefined;
+/**
+ * A unique string that identifies the `AccumulateLoyaltyPoints` request. Keys can be any valid string but must be unique for every request.
+ * @member {String} idempotency_key
+ */
+exports.prototype['idempotency_key'] = undefined;
+/**
+ * The `location` where the purchase was made.
+ * @member {String} location_id
+ */
+exports.prototype['location_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/AccumulateLoyaltyPointsResponse.js b/src/model/AccumulateLoyaltyPointsResponse.js
new file mode 100644
index 0000000..15996a8
--- /dev/null
+++ b/src/model/AccumulateLoyaltyPointsResponse.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 LoyaltyEvent = require('./LoyaltyEvent');
+
+
+
+
+/**
+ * The AccumulateLoyaltyPointsResponse model module.
+ * Note: This model is in beta.
+ * @module model/AccumulateLoyaltyPointsResponse
+ */
+
+/**
+ * Constructs a new AccumulateLoyaltyPointsResponse
.
+ * A response containing the resulting loyalty event.
+ * @alias module:model/AccumulateLoyaltyPointsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a AccumulateLoyaltyPointsResponse
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/AccumulateLoyaltyPointsResponse} obj Optional instance to populate.
+ * @return {module:model/AccumulateLoyaltyPointsResponse} The populated AccumulateLoyaltyPointsResponse
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('event')) {
+ obj['event'] = LoyaltyEvent.constructFromObject(data['event']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The resulting loyalty event.
+ * @member {module:model/LoyaltyEvent} event
+ */
+exports.prototype['event'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/AdjustLoyaltyPointsRequest.js b/src/model/AdjustLoyaltyPointsRequest.js
new file mode 100644
index 0000000..744f8be
--- /dev/null
+++ b/src/model/AdjustLoyaltyPointsRequest.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 LoyaltyEventAdjustPoints = require('./LoyaltyEventAdjustPoints');
+
+
+
+
+/**
+ * The AdjustLoyaltyPointsRequest model module.
+ * Note: This model is in beta.
+ * @module model/AdjustLoyaltyPointsRequest
+ */
+
+/**
+ * Constructs a new AdjustLoyaltyPointsRequest
.
+ * A request to adjust (add or subtract) points manually.
+ * @alias module:model/AdjustLoyaltyPointsRequest
+ * @class
+ * @param idempotencyKey {String} A unique string that identifies this `AdjustLoyaltyPoints` request. Keys can be any valid string, but must be unique for every request.
+ * @param adjustPoints {module:model/LoyaltyEventAdjustPoints} The points to adjust (add or subtract) and the reason for the adjustment.
+ */
+var exports = function(idempotencyKey, adjustPoints) {
+ var _this = this;
+
+ _this['idempotency_key'] = idempotencyKey;
+ _this['adjust_points'] = adjustPoints;
+};
+
+/**
+ * Constructs a AdjustLoyaltyPointsRequest
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/AdjustLoyaltyPointsRequest} obj Optional instance to populate.
+ * @return {module:model/AdjustLoyaltyPointsRequest} The populated AdjustLoyaltyPointsRequest
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('adjust_points')) {
+ obj['adjust_points'] = LoyaltyEventAdjustPoints.constructFromObject(data['adjust_points']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * A unique string that identifies this `AdjustLoyaltyPoints` request. Keys can be any valid string, but must be unique for every request.
+ * @member {String} idempotency_key
+ */
+exports.prototype['idempotency_key'] = undefined;
+/**
+ * The points to adjust (add or subtract) and the reason for the adjustment.
+ * @member {module:model/LoyaltyEventAdjustPoints} adjust_points
+ */
+exports.prototype['adjust_points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/AdjustLoyaltyPointsResponse.js b/src/model/AdjustLoyaltyPointsResponse.js
new file mode 100644
index 0000000..4448dc5
--- /dev/null
+++ b/src/model/AdjustLoyaltyPointsResponse.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 LoyaltyEvent = require('./LoyaltyEvent');
+
+
+
+
+/**
+ * The AdjustLoyaltyPointsResponse model module.
+ * Note: This model is in beta.
+ * @module model/AdjustLoyaltyPointsResponse
+ */
+
+/**
+ * Constructs a new AdjustLoyaltyPointsResponse
.
+ * A response that includes the loyalty event that resulted from the successful API call.
+ * @alias module:model/AdjustLoyaltyPointsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a AdjustLoyaltyPointsResponse
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/AdjustLoyaltyPointsResponse} obj Optional instance to populate.
+ * @return {module:model/AdjustLoyaltyPointsResponse} The populated AdjustLoyaltyPointsResponse
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('event')) {
+ obj['event'] = LoyaltyEvent.constructFromObject(data['event']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The resulting event data for adjusting points.
+ * @member {module:model/LoyaltyEvent} event
+ */
+exports.prototype['event'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CalculateLoyaltyPointsRequest.js b/src/model/CalculateLoyaltyPointsRequest.js
new file mode 100644
index 0000000..d103dac
--- /dev/null
+++ b/src/model/CalculateLoyaltyPointsRequest.js
@@ -0,0 +1,76 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Money = require('./Money');
+
+
+
+
+/**
+ * The CalculateLoyaltyPointsRequest model module.
+ * Note: This model is in beta.
+ * @module model/CalculateLoyaltyPointsRequest
+ */
+
+/**
+ * Constructs a new CalculateLoyaltyPointsRequest
.
+ * A request to calculate the points that a buyer can earn from a specified purchase.
+ * @alias module:model/CalculateLoyaltyPointsRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CalculateLoyaltyPointsRequest
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/CalculateLoyaltyPointsRequest} obj Optional instance to populate.
+ * @return {module:model/CalculateLoyaltyPointsRequest} The populated CalculateLoyaltyPointsRequest
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('transaction_amount_money')) {
+ obj['transaction_amount_money'] = Money.constructFromObject(data['transaction_amount_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The `order` ID for which to calculate the points. Specify this field if your application uses the Orders API to process orders. Otherwise, specify the `transaction_amount`.
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+/**
+ * The purchase amount for which to calculate the points. Specify this field if your application does not use the Orders API to process orders. Otherwise, specify the `order_id`.
+ * @member {module:model/Money} transaction_amount_money
+ */
+exports.prototype['transaction_amount_money'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CalculateLoyaltyPointsResponse.js b/src/model/CalculateLoyaltyPointsResponse.js
new file mode 100644
index 0000000..f0e6bea
--- /dev/null
+++ b/src/model/CalculateLoyaltyPointsResponse.js
@@ -0,0 +1,76 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Error = require('./Error');
+
+
+
+
+/**
+ * The CalculateLoyaltyPointsResponse model module.
+ * Note: This model is in beta.
+ * @module model/CalculateLoyaltyPointsResponse
+ */
+
+/**
+ * Constructs a new CalculateLoyaltyPointsResponse
.
+ * A response that includes the points that the buyer can earn from a specified purchase.
+ * @alias module:model/CalculateLoyaltyPointsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CalculateLoyaltyPointsResponse
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/CalculateLoyaltyPointsResponse} obj Optional instance to populate.
+ * @return {module:model/CalculateLoyaltyPointsResponse} The populated CalculateLoyaltyPointsResponse
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('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The points that the buyer can earn from a specified purchase.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CalculateOrderRequest.js b/src/model/CalculateOrderRequest.js
new file mode 100644
index 0000000..bfab2f8
--- /dev/null
+++ b/src/model/CalculateOrderRequest.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 Order = require('./Order');
+var OrderReward = require('./OrderReward');
+
+
+
+
+/**
+ * The CalculateOrderRequest model module.
+ * Note: This model is in beta.
+ * @module model/CalculateOrderRequest
+ */
+
+/**
+ * Constructs a new CalculateOrderRequest
.
+ *
+ * @alias module:model/CalculateOrderRequest
+ * @class
+ * @param order {module:model/Order} The order to be calculated. Expects the entire order, not a sparse update.
+ */
+var exports = function(order) {
+ var _this = this;
+
+ _this['order'] = order;
+
+};
+
+/**
+ * Constructs a CalculateOrderRequest
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/CalculateOrderRequest} obj Optional instance to populate.
+ * @return {module:model/CalculateOrderRequest} The populated CalculateOrderRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('order')) {
+ obj['order'] = Order.constructFromObject(data['order']);
+ }
+ if (data.hasOwnProperty('proposed_rewards')) {
+ obj['proposed_rewards'] = ApiClient.convertToType(data['proposed_rewards'], [OrderReward]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The order to be calculated. Expects the entire order, not a sparse update.
+ * @member {module:model/Order} order
+ */
+exports.prototype['order'] = undefined;
+/**
+ * Identifies one or more loyalty reward tiers to apply during order calculation. The discounts defined by the reward tiers are added to the order only to preview the effect of applying the specified reward(s). The reward(s) do not correspond to actual redemptions, that is, no `reward`s are created. Therefore, the reward `id`s are random strings used only to reference the reward tier.
+ * @member {Array.} proposed_rewards
+ */
+exports.prototype['proposed_rewards'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CalculateOrderResponse.js b/src/model/CalculateOrderResponse.js
new file mode 100644
index 0000000..3fd2cfe
--- /dev/null
+++ b/src/model/CalculateOrderResponse.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 Order = require('./Order');
+
+
+
+
+/**
+ * The CalculateOrderResponse model module.
+ * Note: This model is in beta.
+ * @module model/CalculateOrderResponse
+ */
+
+/**
+ * Constructs a new CalculateOrderResponse
.
+ *
+ * @alias module:model/CalculateOrderResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CalculateOrderResponse
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/CalculateOrderResponse} obj Optional instance to populate.
+ * @return {module:model/CalculateOrderResponse} The populated CalculateOrderResponse
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('order')) {
+ obj['order'] = Order.constructFromObject(data['order']);
+ }
+ if (data.hasOwnProperty('errors')) {
+ obj['errors'] = ApiClient.convertToType(data['errors'], [Error]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The calculated version of the order provided in the request.
+ * @member {module:model/Order} order
+ */
+exports.prototype['order'] = undefined;
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CatalogCustomAttributeDefinition.js b/src/model/CatalogCustomAttributeDefinition.js
index 8fe4b1d..92c9333 100644
--- a/src/model/CatalogCustomAttributeDefinition.js
+++ b/src/model/CatalogCustomAttributeDefinition.js
@@ -12,6 +12,7 @@
*
*/
var ApiClient = require('../ApiClient');
+var CatalogCustomAttributeDefinitionNumberConfig = require('./CatalogCustomAttributeDefinitionNumberConfig');
var CatalogCustomAttributeDefinitionSelectionConfig = require('./CatalogCustomAttributeDefinitionSelectionConfig');
var CatalogCustomAttributeDefinitionStringConfig = require('./CatalogCustomAttributeDefinitionStringConfig');
var SourceApplication = require('./SourceApplication');
@@ -32,14 +33,16 @@ var SourceApplication = require('./SourceApplication');
* @class
* @param type {String} The type of this custom attribute. Cannot be modified after creation. Required. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
* @param name {String} The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application_id) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation.
+ * @param allowedObjectTypes {Array.} The set of Catalog Object Types that this Custom Attribute may be applied to. Currently, only `ITEM` and `ITEM_VARIATION` are allowed. At least one type must be included. See [CatalogObjectType](#type-catalogobjecttype) for possible values
*/
-var exports = function(type, name) {
+var exports = function(type, name, allowedObjectTypes) {
var _this = this;
_this['type'] = type;
_this['name'] = name;
+ _this['allowed_object_types'] = allowedObjectTypes;
@@ -83,6 +86,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('string_config')) {
obj['string_config'] = CatalogCustomAttributeDefinitionStringConfig.constructFromObject(data['string_config']);
+ }
+ if (data.hasOwnProperty('number_config')) {
+ obj['number_config'] = CatalogCustomAttributeDefinitionNumberConfig.constructFromObject(data['number_config']);
}
if (data.hasOwnProperty('selection_config')) {
obj['selection_config'] = CatalogCustomAttributeDefinitionSelectionConfig.constructFromObject(data['selection_config']);
@@ -137,6 +143,11 @@ exports.prototype['app_visibility'] = undefined;
* @member {module:model/CatalogCustomAttributeDefinitionStringConfig} string_config
*/
exports.prototype['string_config'] = undefined;
+/**
+ *
+ * @member {module:model/CatalogCustomAttributeDefinitionNumberConfig} number_config
+ */
+exports.prototype['number_config'] = undefined;
/**
* Populated when `type` is set to `SELECTION`, unset otherwise.
* @member {module:model/CatalogCustomAttributeDefinitionSelectionConfig} selection_config
diff --git a/src/model/CatalogCustomAttributeDefinitionNumberConfig.js b/src/model/CatalogCustomAttributeDefinitionNumberConfig.js
new file mode 100644
index 0000000..e935090
--- /dev/null
+++ b/src/model/CatalogCustomAttributeDefinitionNumberConfig.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 CatalogCustomAttributeDefinitionNumberConfig model module.
+ * Note: This model is in beta.
+ * @module model/CatalogCustomAttributeDefinitionNumberConfig
+ */
+
+/**
+ * Constructs a new CatalogCustomAttributeDefinitionNumberConfig
.
+ *
+ * @alias module:model/CatalogCustomAttributeDefinitionNumberConfig
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a CatalogCustomAttributeDefinitionNumberConfig
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/CatalogCustomAttributeDefinitionNumberConfig} obj Optional instance to populate.
+ * @return {module:model/CatalogCustomAttributeDefinitionNumberConfig} The populated CatalogCustomAttributeDefinitionNumberConfig
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('precision')) {
+ obj['precision'] = ApiClient.convertToType(data['precision'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * An integer between 0 and 5 that represents the maximum number of positions allowed after the decimal in number custom attribute values For example: - if the precision is 0, the quantity can be 1, 2, 3, etc. - if the precision is 1, the quantity can be 0.1, 0.2, etc. - if the precision is 2, the quantity can be 0.01, 0.12, etc. Default: 3
+ * @member {Number} precision
+ */
+exports.prototype['precision'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CatalogCustomAttributeDefinitionSelectionConfig.js b/src/model/CatalogCustomAttributeDefinitionSelectionConfig.js
index e2c1bb0..6f798ce 100644
--- a/src/model/CatalogCustomAttributeDefinitionSelectionConfig.js
+++ b/src/model/CatalogCustomAttributeDefinitionSelectionConfig.js
@@ -58,7 +58,7 @@ exports.constructFromObject = function(data, obj) {
}
/**
- * The maximum number of selections that can be set. The maximum value for this attribute is 100. May be modified, but changing the value will not affect existing custom attribute values on objects. Clients need to handle Custom Attributes with more selected values than allowed by this limit.
+ * The maximum number of selections that can be set. The maximum value for this attribute is 100. The default value is 1. The value can be modified, but changing the value will not affect existing custom attribute values on objects. Clients need to handle custom attributes with more selected values than allowed by this limit.
* @member {Number} max_allowed_selections
*/
exports.prototype['max_allowed_selections'] = undefined;
diff --git a/src/model/CatalogObjectType.js b/src/model/CatalogObjectType.js
index 7e6dc30..d3ced09 100644
--- a/src/model/CatalogObjectType.js
+++ b/src/model/CatalogObjectType.js
@@ -90,6 +90,11 @@ var exports = {
* @const
*/
"ITEM_OPTION_VAL": "ITEM_OPTION_VAL",
+ /**
+ * value: "CUSTOM_ATTRIBUTE_DEFINITION"
+ * @const
+ */
+ "CUSTOM_ATTRIBUTE_DEFINITION": "CUSTOM_ATTRIBUTE_DEFINITION",
/**
* value: "QUICK_AMOUNTS_SETTINGS"
* @const
diff --git a/src/model/CreateLoyaltyAccountRequest.js b/src/model/CreateLoyaltyAccountRequest.js
new file mode 100644
index 0000000..e6e730c
--- /dev/null
+++ b/src/model/CreateLoyaltyAccountRequest.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 LoyaltyAccount = require('./LoyaltyAccount');
+
+
+
+
+/**
+ * The CreateLoyaltyAccountRequest model module.
+ * Note: This model is in beta.
+ * @module model/CreateLoyaltyAccountRequest
+ */
+
+/**
+ * Constructs a new CreateLoyaltyAccountRequest
.
+ * A request to create a new loyalty account.
+ * @alias module:model/CreateLoyaltyAccountRequest
+ * @class
+ * @param loyaltyAccount {module:model/LoyaltyAccount} The loyalty account to create.
+ * @param idempotencyKey {String} A unique string that identifies this `CreateLoyaltyAccount` request. Keys can be any valid string, but must be unique for every request.
+ */
+var exports = function(loyaltyAccount, idempotencyKey) {
+ var _this = this;
+
+ _this['loyalty_account'] = loyaltyAccount;
+ _this['idempotency_key'] = idempotencyKey;
+};
+
+/**
+ * Constructs a CreateLoyaltyAccountRequest
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/CreateLoyaltyAccountRequest} obj Optional instance to populate.
+ * @return {module:model/CreateLoyaltyAccountRequest} The populated CreateLoyaltyAccountRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_account')) {
+ obj['loyalty_account'] = LoyaltyAccount.constructFromObject(data['loyalty_account']);
+ }
+ if (data.hasOwnProperty('idempotency_key')) {
+ obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The loyalty account to create.
+ * @member {module:model/LoyaltyAccount} loyalty_account
+ */
+exports.prototype['loyalty_account'] = undefined;
+/**
+ * A unique string that identifies this `CreateLoyaltyAccount` request. Keys can be any valid string, but must be unique for every request.
+ * @member {String} idempotency_key
+ */
+exports.prototype['idempotency_key'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CreateLoyaltyAccountResponse.js b/src/model/CreateLoyaltyAccountResponse.js
new file mode 100644
index 0000000..17312ff
--- /dev/null
+++ b/src/model/CreateLoyaltyAccountResponse.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 LoyaltyAccount = require('./LoyaltyAccount');
+
+
+
+
+/**
+ * The CreateLoyaltyAccountResponse model module.
+ * Note: This model is in beta.
+ * @module model/CreateLoyaltyAccountResponse
+ */
+
+/**
+ * Constructs a new CreateLoyaltyAccountResponse
.
+ * A response that includes loyalty account created.
+ * @alias module:model/CreateLoyaltyAccountResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CreateLoyaltyAccountResponse
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/CreateLoyaltyAccountResponse} obj Optional instance to populate.
+ * @return {module:model/CreateLoyaltyAccountResponse} The populated CreateLoyaltyAccountResponse
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('loyalty_account')) {
+ obj['loyalty_account'] = LoyaltyAccount.constructFromObject(data['loyalty_account']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The newly created loyalty account.
+ * @member {module:model/LoyaltyAccount} loyalty_account
+ */
+exports.prototype['loyalty_account'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CreateLoyaltyRewardRequest.js b/src/model/CreateLoyaltyRewardRequest.js
new file mode 100644
index 0000000..b0a1ff9
--- /dev/null
+++ b/src/model/CreateLoyaltyRewardRequest.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 LoyaltyReward = require('./LoyaltyReward');
+
+
+
+
+/**
+ * The CreateLoyaltyRewardRequest model module.
+ * Note: This model is in beta.
+ * @module model/CreateLoyaltyRewardRequest
+ */
+
+/**
+ * Constructs a new CreateLoyaltyRewardRequest
.
+ * A request to create a loyalty reward.
+ * @alias module:model/CreateLoyaltyRewardRequest
+ * @class
+ * @param reward {module:model/LoyaltyReward} The reward to create.
+ * @param idempotencyKey {String} A unique string that identifies this `CreateLoyaltyReward` request. Keys can be any valid string, but must be unique for every request.
+ */
+var exports = function(reward, idempotencyKey) {
+ var _this = this;
+
+ _this['reward'] = reward;
+ _this['idempotency_key'] = idempotencyKey;
+};
+
+/**
+ * Constructs a CreateLoyaltyRewardRequest
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/CreateLoyaltyRewardRequest} obj Optional instance to populate.
+ * @return {module:model/CreateLoyaltyRewardRequest} The populated CreateLoyaltyRewardRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('reward')) {
+ obj['reward'] = LoyaltyReward.constructFromObject(data['reward']);
+ }
+ if (data.hasOwnProperty('idempotency_key')) {
+ obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The reward to create.
+ * @member {module:model/LoyaltyReward} reward
+ */
+exports.prototype['reward'] = undefined;
+/**
+ * A unique string that identifies this `CreateLoyaltyReward` request. Keys can be any valid string, but must be unique for every request.
+ * @member {String} idempotency_key
+ */
+exports.prototype['idempotency_key'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CreateLoyaltyRewardResponse.js b/src/model/CreateLoyaltyRewardResponse.js
new file mode 100644
index 0000000..85169e7
--- /dev/null
+++ b/src/model/CreateLoyaltyRewardResponse.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 LoyaltyReward = require('./LoyaltyReward');
+
+
+
+
+/**
+ * The CreateLoyaltyRewardResponse model module.
+ * Note: This model is in beta.
+ * @module model/CreateLoyaltyRewardResponse
+ */
+
+/**
+ * Constructs a new CreateLoyaltyRewardResponse
.
+ * A response that includes the loyalty reward created.
+ * @alias module:model/CreateLoyaltyRewardResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CreateLoyaltyRewardResponse
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/CreateLoyaltyRewardResponse} obj Optional instance to populate.
+ * @return {module:model/CreateLoyaltyRewardResponse} The populated CreateLoyaltyRewardResponse
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('reward')) {
+ obj['reward'] = LoyaltyReward.constructFromObject(data['reward']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The loyalty reward created.
+ * @member {module:model/LoyaltyReward} reward
+ */
+exports.prototype['reward'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/CreatePaymentRequest.js b/src/model/CreatePaymentRequest.js
index de5bcf1..5db2d47 100644
--- a/src/model/CreatePaymentRequest.js
+++ b/src/model/CreatePaymentRequest.js
@@ -25,7 +25,7 @@ var Money = require('./Money');
/**
* Constructs a new CreatePaymentRequest
.
- * Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
+ * Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
* @alias module:model/CreatePaymentRequest
* @class
* @param sourceId {String} The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API.
@@ -165,7 +165,7 @@ exports.prototype['autocomplete'] = undefined;
*/
exports.prototype['order_id'] = undefined;
/**
- * The ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API.
+ * The `Customer` ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API.
* @member {String} customer_id
*/
exports.prototype['customer_id'] = undefined;
@@ -210,7 +210,7 @@ exports.prototype['shipping_address'] = undefined;
*/
exports.prototype['note'] = undefined;
/**
- * Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Limit 20 characters. Note that the statement_description_identifier may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment.
+ * Optional additional payment information to include on the customer's card statement as part of statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment.
* @member {String} statement_description_identifier
*/
exports.prototype['statement_description_identifier'] = undefined;
diff --git a/src/model/Customer.js b/src/model/Customer.js
index f596a59..9984f4a 100644
--- a/src/model/Customer.js
+++ b/src/model/Customer.js
@@ -30,16 +30,13 @@ 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 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 exports = function() {
var _this = this;
- _this['id'] = id;
- _this['created_at'] = createdAt;
- _this['updated_at'] = updatedAt;
+
+
+
@@ -206,7 +203,7 @@ exports.prototype['note'] = undefined;
*/
exports.prototype['preferences'] = undefined;
/**
- * 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.
+ * The customer groups and segments the customer belongs to. This deprecated field has been replaced with the dedicated `group_ids` for customer groups and the dedicated `segment_ids` field for customer segments. You can retrieve information about a given customer group and segment respectively using the Customer Groups API and Customer Segments API.
* @member {Array.} groups
*/
exports.prototype['groups'] = undefined;
diff --git a/src/model/CustomerFilter.js b/src/model/CustomerFilter.js
index 98f636e..653814d 100644
--- a/src/model/CustomerFilter.js
+++ b/src/model/CustomerFilter.js
@@ -13,6 +13,7 @@
*/
var ApiClient = require('../ApiClient');
var CustomerCreationSourceFilter = require('./CustomerCreationSourceFilter');
+var CustomerTextFilter = require('./CustomerTextFilter');
var FilterValue = require('./FilterValue');
var TimeRange = require('./TimeRange');
@@ -37,6 +38,9 @@ var exports = function() {
+
+
+
};
/**
@@ -58,6 +62,15 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('updated_at')) {
obj['updated_at'] = TimeRange.constructFromObject(data['updated_at']);
+ }
+ if (data.hasOwnProperty('email_address')) {
+ obj['email_address'] = CustomerTextFilter.constructFromObject(data['email_address']);
+ }
+ if (data.hasOwnProperty('phone_number')) {
+ obj['phone_number'] = CustomerTextFilter.constructFromObject(data['phone_number']);
+ }
+ if (data.hasOwnProperty('reference_id')) {
+ obj['reference_id'] = CustomerTextFilter.constructFromObject(data['reference_id']);
}
if (data.hasOwnProperty('group_ids')) {
obj['group_ids'] = FilterValue.constructFromObject(data['group_ids']);
@@ -82,7 +95,22 @@ exports.prototype['created_at'] = undefined;
*/
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.
+ * A filter to [select customers by email address](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-email-address) visible to the seller. This filter is case insensitive. For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-email-address), this filter causes the search to return customer profiles whose `email_address` field value are identical to the email address provided in the query. For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-email-address), this filter causes the search to return customer profiles whose `email_address` field value has a token-wise partial match against the filtering expression in the query. For example, with `Steven gmail` provided in a search query, the search returns customers whose email address can be `steven.johnson@gmail.com` or `mygmail@stevensbakery.com`. Email addresses are tokenized by replacing, by spaces, punctuations including periods (`.`), underscores (`_`), and the `@` symbols. A match is found if a tokenized email address contains all the tokens in the search query, irrespective of the token order.
+ * @member {module:model/CustomerTextFilter} email_address
+ */
+exports.prototype['email_address'] = undefined;
+/**
+ * A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-phone-number) visible to the seller. This filter is case insensitive. For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-phone-number), this filter causes the search to return customers whose phone number matches the specified query expression. The number in the query must be of an E.164-compliant form. In particular, it must include the leading `+` sign followed by a contry code and then a subscriber number. The standard E.614 form of a US phone number is `+12061112222` of the domestic version or `+0012061112222` of the international version. The E.164-compliant variations include `+1 (206) 111-2222` or `+001 (206) 111-2222`, respectively. To match the query expression, stored customers' phone numbers are converted to the standard E.164 form of the national and internationalized versions. For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-phone-number), this filter causes the search to return customers whose phone number matches partially the token or tokens provided in the query expression. For example, if the search query contains `415-123-45`, the filter selects those customers with phone numbers of `415-123-4567` or `234-151-2345`. The search does not return customers with the phone number of `415-123-4678`. Similarly, if the search query contains `415` as part of the phone number, the search returns those customers with phone numbers of `(415)-123-4567`, `(123) 415-1567`, and `1 (415) 123-4567`.
+ * @member {module:model/CustomerTextFilter} phone_number
+ */
+exports.prototype['phone_number'] = undefined;
+/**
+ * A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-reference-id). This filter is case insensitive. [Exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-reference-id) of a customer's reference ID against a query's reference ID is evaluated as exact match between two strings, character by character in the given order. [Fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-reference-id) of stored reference IDs against queried reference IDs works exactly the same as fuzzy matching on email addresses. Non-alphanumeric characters are replaced by spaces to tokenize stored and queried reference IDs. A match is found if a tokenized stored reference ID contains all tokens specified in any order in the query. For example, a query of `NYC M` will match customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON` and `NYC_27_MURRAY`.
+ * @member {module:model/CustomerTextFilter} reference_id
+ */
+exports.prototype['reference_id'] = 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 are 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/CustomerQuery.js b/src/model/CustomerQuery.js
index 95f79df..06c2ecf 100644
--- a/src/model/CustomerQuery.js
+++ b/src/model/CustomerQuery.js
@@ -25,7 +25,7 @@ var CustomerSort = require('./CustomerSort');
/**
* Constructs a new CustomerQuery
.
- * Represents a query (filtering and sorting criteria) used to search for customer profiles.
+ * Represents a query (including filtering criteria, sorting criteria, or both) used to search for customer profiles.
* @alias module:model/CustomerQuery
* @class
*/
@@ -58,12 +58,12 @@ exports.constructFromObject = function(data, obj) {
}
/**
- * A list of filter criteria.
+ * A list of filtering criteria.
* @member {module:model/CustomerFilter} filter
*/
exports.prototype['filter'] = undefined;
/**
- * Sort criteria for query results. The default sort behavior is to order customers alphabetically by `given_name` and `last_name`.
+ * Sorting criteria for query results. The default behavior is to sort customers alphabetically by `given_name` and `family_name`.
* @member {module:model/CustomerSort} sort
*/
exports.prototype['sort'] = undefined;
diff --git a/src/model/CustomerSort.js b/src/model/CustomerSort.js
index 95a1eb4..802d51d 100644
--- a/src/model/CustomerSort.js
+++ b/src/model/CustomerSort.js
@@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient');
/**
* Constructs a new CustomerSort
.
- * Indicates the field to use for sorting customer profiles.
+ * Specifies how searched customers profiles are sorted, including the sort key and sort order.
* @alias module:model/CustomerSort
* @class
*/
@@ -56,12 +56,12 @@ exports.constructFromObject = function(data, obj) {
}
/**
- * Indicates the information used to sort the results. For example, by creation date. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values
+ * Use one or more customer attributes as the sort key to sort searched customer profiles. For example, use creation date (`created_at`) of customers or default attributes as the sort key. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values
* @member {String} field
*/
exports.prototype['field'] = undefined;
/**
- * Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values
+ * Indicates the order in which results should be sorted based on the sort field value. Strings use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values
* @member {String} order
*/
exports.prototype['order'] = undefined;
diff --git a/src/model/CustomerTextFilter.js b/src/model/CustomerTextFilter.js
new file mode 100644
index 0000000..6aef0b7
--- /dev/null
+++ b/src/model/CustomerTextFilter.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 CustomerTextFilter model module.
+ * Note: This model is in beta.
+ * @module model/CustomerTextFilter
+ */
+
+/**
+ * Constructs a new CustomerTextFilter
.
+ * A filter to select customers based on exact or fuzzy matching of customer attributes against a specified query. Depending on customer attributes, the filter can be case sensitive. This filter can be either exact or fuzzy. It cannot be both.
+ * @alias module:model/CustomerTextFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a CustomerTextFilter
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/CustomerTextFilter} obj Optional instance to populate.
+ * @return {module:model/CustomerTextFilter} The populated CustomerTextFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('exact')) {
+ obj['exact'] = ApiClient.convertToType(data['exact'], 'String');
+ }
+ if (data.hasOwnProperty('fuzzy')) {
+ obj['fuzzy'] = ApiClient.convertToType(data['fuzzy'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * Use the exact filter to select customers whose attributes match exactly the specified query.
+ * @member {String} exact
+ */
+exports.prototype['exact'] = undefined;
+/**
+ * Use the fuzzy filter to select customers whose attributes match the specified query in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then each query token must be matched somewhere in the searched attribute. For single token queries, this is effectively the same behavior as a partial match operation.
+ * @member {String} fuzzy
+ */
+exports.prototype['fuzzy'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/DeleteLoyaltyRewardRequest.js b/src/model/DeleteLoyaltyRewardRequest.js
new file mode 100644
index 0000000..f406c18
--- /dev/null
+++ b/src/model/DeleteLoyaltyRewardRequest.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 DeleteLoyaltyRewardRequest model module.
+ * Note: This model is in beta.
+ * @module model/DeleteLoyaltyRewardRequest
+ */
+
+/**
+ * Constructs a new DeleteLoyaltyRewardRequest
.
+ * A request to delete a loyalty reward.
+ * @alias module:model/DeleteLoyaltyRewardRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+};
+
+/**
+ * Constructs a DeleteLoyaltyRewardRequest
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/DeleteLoyaltyRewardRequest} obj Optional instance to populate.
+ * @return {module:model/DeleteLoyaltyRewardRequest} The populated DeleteLoyaltyRewardRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ }
+ return obj;
+}
+
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/DeleteLoyaltyRewardResponse.js b/src/model/DeleteLoyaltyRewardResponse.js
new file mode 100644
index 0000000..f4a3a06
--- /dev/null
+++ b/src/model/DeleteLoyaltyRewardResponse.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 DeleteLoyaltyRewardResponse model module.
+ * Note: This model is in beta.
+ * @module model/DeleteLoyaltyRewardResponse
+ */
+
+/**
+ * Constructs a new DeleteLoyaltyRewardResponse
.
+ * A response returned by the API call.
+ * @alias module:model/DeleteLoyaltyRewardResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a DeleteLoyaltyRewardResponse
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/DeleteLoyaltyRewardResponse} obj Optional instance to populate.
+ * @return {module:model/DeleteLoyaltyRewardResponse} The populated DeleteLoyaltyRewardResponse
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/ListLoyaltyProgramsRequest.js b/src/model/ListLoyaltyProgramsRequest.js
new file mode 100644
index 0000000..9530584
--- /dev/null
+++ b/src/model/ListLoyaltyProgramsRequest.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 ListLoyaltyProgramsRequest model module.
+ * Note: This model is in beta.
+ * @module model/ListLoyaltyProgramsRequest
+ */
+
+/**
+ * Constructs a new ListLoyaltyProgramsRequest
.
+ * A request to list `LoyaltyProgram`.
+ * @alias module:model/ListLoyaltyProgramsRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+};
+
+/**
+ * Constructs a ListLoyaltyProgramsRequest
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/ListLoyaltyProgramsRequest} obj Optional instance to populate.
+ * @return {module:model/ListLoyaltyProgramsRequest} The populated ListLoyaltyProgramsRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ }
+ return obj;
+}
+
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/ListLoyaltyProgramsResponse.js b/src/model/ListLoyaltyProgramsResponse.js
new file mode 100644
index 0000000..e784874
--- /dev/null
+++ b/src/model/ListLoyaltyProgramsResponse.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 LoyaltyProgram = require('./LoyaltyProgram');
+
+
+
+
+/**
+ * The ListLoyaltyProgramsResponse model module.
+ * Note: This model is in beta.
+ * @module model/ListLoyaltyProgramsResponse
+ */
+
+/**
+ * Constructs a new ListLoyaltyProgramsResponse
.
+ * A response that contains all loyalty programs.
+ * @alias module:model/ListLoyaltyProgramsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a ListLoyaltyProgramsResponse
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/ListLoyaltyProgramsResponse} obj Optional instance to populate.
+ * @return {module:model/ListLoyaltyProgramsResponse} The populated ListLoyaltyProgramsResponse
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('programs')) {
+ obj['programs'] = ApiClient.convertToType(data['programs'], [LoyaltyProgram]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * A list of `LoyaltyProgram` for the merchant.
+ * @member {Array.} programs
+ */
+exports.prototype['programs'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/ListPaymentsRequest.js b/src/model/ListPaymentsRequest.js
index 11cf299..d68ef7c 100644
--- a/src/model/ListPaymentsRequest.js
+++ b/src/model/ListPaymentsRequest.js
@@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient');
/**
* Constructs a new ListPaymentsRequest
.
- * Retrieves a list of refunds taken by the account making the request. Max results per page: 100
+ * Retrieves a list of payments taken by the account making the request. Max results per page: 100
* @alias module:model/ListPaymentsRequest
* @class
*/
diff --git a/src/model/LoyaltyAccount.js b/src/model/LoyaltyAccount.js
new file mode 100644
index 0000000..2475b22
--- /dev/null
+++ b/src/model/LoyaltyAccount.js
@@ -0,0 +1,141 @@
+/**
+ * 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 LoyaltyAccountMapping = require('./LoyaltyAccountMapping');
+
+
+
+
+/**
+ * The LoyaltyAccount model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyAccount
+ */
+
+/**
+ * Constructs a new LoyaltyAccount
.
+ * Describes a loyalty account. For more information, see [Loyalty Overview](/docs/loyalty/overview).
+ * @alias module:model/LoyaltyAccount
+ * @class
+ * @param mappings {Array.} The list of mappings that the account is associated with. Currently, a buyer can only be mapped to a loyalty account using a phone number. Therefore, the list can only have one mapping.
+ * @param programId {String} The Square-assigned ID of the `loyalty program` to which the account belongs.
+ */
+var exports = function(mappings, programId) {
+ var _this = this;
+
+
+ _this['mappings'] = mappings;
+ _this['program_id'] = programId;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyAccount
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/LoyaltyAccount} obj Optional instance to populate.
+ * @return {module:model/LoyaltyAccount} The populated LoyaltyAccount
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('mappings')) {
+ obj['mappings'] = ApiClient.convertToType(data['mappings'], [LoyaltyAccountMapping]);
+ }
+ if (data.hasOwnProperty('program_id')) {
+ obj['program_id'] = ApiClient.convertToType(data['program_id'], 'String');
+ }
+ if (data.hasOwnProperty('balance')) {
+ obj['balance'] = ApiClient.convertToType(data['balance'], 'Number');
+ }
+ if (data.hasOwnProperty('lifetime_points')) {
+ obj['lifetime_points'] = ApiClient.convertToType(data['lifetime_points'], 'Number');
+ }
+ if (data.hasOwnProperty('customer_id')) {
+ obj['customer_id'] = ApiClient.convertToType(data['customer_id'], 'String');
+ }
+ if (data.hasOwnProperty('enrolled_at')) {
+ obj['enrolled_at'] = ApiClient.convertToType(data['enrolled_at'], 'String');
+ }
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
+ }
+ if (data.hasOwnProperty('updated_at')) {
+ obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the loyalty account.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The list of mappings that the account is associated with. Currently, a buyer can only be mapped to a loyalty account using a phone number. Therefore, the list can only have one mapping.
+ * @member {Array.} mappings
+ */
+exports.prototype['mappings'] = undefined;
+/**
+ * The Square-assigned ID of the `loyalty program` to which the account belongs.
+ * @member {String} program_id
+ */
+exports.prototype['program_id'] = undefined;
+/**
+ * The available point balance in the loyalty account.
+ * @member {Number} balance
+ */
+exports.prototype['balance'] = undefined;
+/**
+ * The total points accrued during the lifetime of the account.
+ * @member {Number} lifetime_points
+ */
+exports.prototype['lifetime_points'] = undefined;
+/**
+ * The Square-assigned ID of the `customer` that is associated with the account.
+ * @member {String} customer_id
+ */
+exports.prototype['customer_id'] = undefined;
+/**
+ * The timestamp when enrollment occurred, in RFC 3339 format.
+ * @member {String} enrolled_at
+ */
+exports.prototype['enrolled_at'] = undefined;
+/**
+ * The timestamp when the loyalty account was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+/**
+ * The timestamp when the loyalty account was last updated, in RFC 3339 format.
+ * @member {String} updated_at
+ */
+exports.prototype['updated_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyAccountMapping.js b/src/model/LoyaltyAccountMapping.js
new file mode 100644
index 0000000..569280f
--- /dev/null
+++ b/src/model/LoyaltyAccountMapping.js
@@ -0,0 +1,95 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyAccountMapping model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyAccountMapping
+ */
+
+/**
+ * Constructs a new LoyaltyAccountMapping
.
+ * Associates a loyalty account with the buyer's phone number. or more information, see [Loyalty Overview](/docs/loyalty/overview).
+ * @alias module:model/LoyaltyAccountMapping
+ * @class
+ * @param type {String} The type of mapping. See [LoyaltyAccountMappingType](#type-loyaltyaccountmappingtype) for possible values
+ * @param value {String} The phone number, in E.164 format. For example, \"+14155551111\".
+ */
+var exports = function(type, value) {
+ var _this = this;
+
+
+ _this['type'] = type;
+ _this['value'] = value;
+
+};
+
+/**
+ * Constructs a LoyaltyAccountMapping
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/LoyaltyAccountMapping} obj Optional instance to populate.
+ * @return {module:model/LoyaltyAccountMapping} The populated LoyaltyAccountMapping
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('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('value')) {
+ obj['value'] = ApiClient.convertToType(data['value'], 'String');
+ }
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the mapping.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The type of mapping. See [LoyaltyAccountMappingType](#type-loyaltyaccountmappingtype) for possible values
+ * @member {String} type
+ */
+exports.prototype['type'] = undefined;
+/**
+ * The phone number, in E.164 format. For example, \"+14155551111\".
+ * @member {String} value
+ */
+exports.prototype['value'] = undefined;
+/**
+ * The timestamp when the mapping was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyAccountMappingType.js b/src/model/LoyaltyAccountMappingType.js
new file mode 100644
index 0000000..9277fe3
--- /dev/null
+++ b/src/model/LoyaltyAccountMappingType.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 LoyaltyAccountMappingType.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "PHONE"
+ * @const
+ */
+ "PHONE": "PHONE"};
+
+/**
+ * Returns a LoyaltyAccountMappingType
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyAccountMappingType} The enum LoyaltyAccountMappingType
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyEvent.js b/src/model/LoyaltyEvent.js
new file mode 100644
index 0000000..77ba4e7
--- /dev/null
+++ b/src/model/LoyaltyEvent.js
@@ -0,0 +1,186 @@
+/**
+ * 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 LoyaltyEventAccumulatePoints = require('./LoyaltyEventAccumulatePoints');
+var LoyaltyEventAdjustPoints = require('./LoyaltyEventAdjustPoints');
+var LoyaltyEventCreateReward = require('./LoyaltyEventCreateReward');
+var LoyaltyEventDeleteReward = require('./LoyaltyEventDeleteReward');
+var LoyaltyEventExpirePoints = require('./LoyaltyEventExpirePoints');
+var LoyaltyEventOther = require('./LoyaltyEventOther');
+var LoyaltyEventRedeemReward = require('./LoyaltyEventRedeemReward');
+
+
+
+
+/**
+ * The LoyaltyEvent model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEvent
+ */
+
+/**
+ * Constructs a new LoyaltyEvent
.
+ * Provides information about a loyalty event. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).
+ * @alias module:model/LoyaltyEvent
+ * @class
+ * @param id {String} The Square-assigned ID of the loyalty event.
+ * @param type {String} The type of the loyalty event. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
+ * @param createdAt {String} The timestamp when the event was created, in RFC 3339 format.
+ * @param loyaltyAccountId {String} The ID of the `loyalty account` in which the event occurred.
+ * @param source {String} Defines whether the event was generated by the Square Point of Sale. See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values
+ */
+var exports = function(id, type, createdAt, loyaltyAccountId, source) {
+ var _this = this;
+
+ _this['id'] = id;
+ _this['type'] = type;
+ _this['created_at'] = createdAt;
+
+
+
+
+
+ _this['loyalty_account_id'] = loyaltyAccountId;
+
+ _this['source'] = source;
+
+
+};
+
+/**
+ * Constructs a LoyaltyEvent
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/LoyaltyEvent} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEvent} The populated LoyaltyEvent
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('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
+ }
+ if (data.hasOwnProperty('accumulate_points')) {
+ obj['accumulate_points'] = LoyaltyEventAccumulatePoints.constructFromObject(data['accumulate_points']);
+ }
+ if (data.hasOwnProperty('create_reward')) {
+ obj['create_reward'] = LoyaltyEventCreateReward.constructFromObject(data['create_reward']);
+ }
+ if (data.hasOwnProperty('redeem_reward')) {
+ obj['redeem_reward'] = LoyaltyEventRedeemReward.constructFromObject(data['redeem_reward']);
+ }
+ if (data.hasOwnProperty('delete_reward')) {
+ obj['delete_reward'] = LoyaltyEventDeleteReward.constructFromObject(data['delete_reward']);
+ }
+ if (data.hasOwnProperty('adjust_points')) {
+ obj['adjust_points'] = LoyaltyEventAdjustPoints.constructFromObject(data['adjust_points']);
+ }
+ if (data.hasOwnProperty('loyalty_account_id')) {
+ obj['loyalty_account_id'] = ApiClient.convertToType(data['loyalty_account_id'], 'String');
+ }
+ if (data.hasOwnProperty('location_id')) {
+ obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String');
+ }
+ if (data.hasOwnProperty('source')) {
+ obj['source'] = ApiClient.convertToType(data['source'], 'String');
+ }
+ if (data.hasOwnProperty('expire_points')) {
+ obj['expire_points'] = LoyaltyEventExpirePoints.constructFromObject(data['expire_points']);
+ }
+ if (data.hasOwnProperty('other_event')) {
+ obj['other_event'] = LoyaltyEventOther.constructFromObject(data['other_event']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the loyalty event.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The type of the loyalty event. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
+ * @member {String} type
+ */
+exports.prototype['type'] = undefined;
+/**
+ * The timestamp when the event was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+/**
+ * Provides metadata when the event `type` is `ACCUMULATE_POINTS`.
+ * @member {module:model/LoyaltyEventAccumulatePoints} accumulate_points
+ */
+exports.prototype['accumulate_points'] = undefined;
+/**
+ * Provides metadata when the event `type` is `CREATE_REWARD`.
+ * @member {module:model/LoyaltyEventCreateReward} create_reward
+ */
+exports.prototype['create_reward'] = undefined;
+/**
+ * Provides metadata when the event `type` is `REDEEM_REWARD`.
+ * @member {module:model/LoyaltyEventRedeemReward} redeem_reward
+ */
+exports.prototype['redeem_reward'] = undefined;
+/**
+ * Provides metadata when the event `type` is `DELETE_REWARD`.
+ * @member {module:model/LoyaltyEventDeleteReward} delete_reward
+ */
+exports.prototype['delete_reward'] = undefined;
+/**
+ * Provides metadata when the event `type` is `ADJUST_POINTS`.
+ * @member {module:model/LoyaltyEventAdjustPoints} adjust_points
+ */
+exports.prototype['adjust_points'] = undefined;
+/**
+ * The ID of the `loyalty account` in which the event occurred.
+ * @member {String} loyalty_account_id
+ */
+exports.prototype['loyalty_account_id'] = undefined;
+/**
+ * The ID of the `location` where the event occurred.
+ * @member {String} location_id
+ */
+exports.prototype['location_id'] = undefined;
+/**
+ * Defines whether the event was generated by the Square Point of Sale. See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values
+ * @member {String} source
+ */
+exports.prototype['source'] = undefined;
+/**
+ * Provides metadata when the event `type` is `EXPIRE_POINTS`.
+ * @member {module:model/LoyaltyEventExpirePoints} expire_points
+ */
+exports.prototype['expire_points'] = undefined;
+/**
+ * Provides metadata when the event `type` is `OTHER`.
+ * @member {module:model/LoyaltyEventOther} other_event
+ */
+exports.prototype['other_event'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventAccumulatePoints.js b/src/model/LoyaltyEventAccumulatePoints.js
new file mode 100644
index 0000000..d556717
--- /dev/null
+++ b/src/model/LoyaltyEventAccumulatePoints.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 LoyaltyEventAccumulatePoints model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventAccumulatePoints
+ */
+
+/**
+ * Constructs a new LoyaltyEventAccumulatePoints
.
+ * Provides metadata when the event `type` is `ACCUMULATE_POINTS`.
+ * @alias module:model/LoyaltyEventAccumulatePoints
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyEventAccumulatePoints
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/LoyaltyEventAccumulatePoints} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventAccumulatePoints} The populated LoyaltyEventAccumulatePoints
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ if (data.hasOwnProperty('order_id')) {
+ obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The number of points accumulated by the event.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+/**
+ * The ID of the `order` for which the buyer accumulated the points. This field is returned only if the Orders API is used to process orders.
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventAdjustPoints.js b/src/model/LoyaltyEventAdjustPoints.js
new file mode 100644
index 0000000..376549b
--- /dev/null
+++ b/src/model/LoyaltyEventAdjustPoints.js
@@ -0,0 +1,85 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventAdjustPoints model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventAdjustPoints
+ */
+
+/**
+ * Constructs a new LoyaltyEventAdjustPoints
.
+ * Provides metadata when the event `type` is `ADJUST_POINTS`.
+ * @alias module:model/LoyaltyEventAdjustPoints
+ * @class
+ * @param points {Number} The number of points added or removed.
+ */
+var exports = function(points) {
+ var _this = this;
+
+
+ _this['points'] = points;
+
+};
+
+/**
+ * Constructs a LoyaltyEventAdjustPoints
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/LoyaltyEventAdjustPoints} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventAdjustPoints} The populated LoyaltyEventAdjustPoints
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ if (data.hasOwnProperty('reason')) {
+ obj['reason'] = ApiClient.convertToType(data['reason'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The number of points added or removed.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+/**
+ * The reason for the adjustment of points.
+ * @member {String} reason
+ */
+exports.prototype['reason'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventCreateReward.js b/src/model/LoyaltyEventCreateReward.js
new file mode 100644
index 0000000..d7eb24b
--- /dev/null
+++ b/src/model/LoyaltyEventCreateReward.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');
+
+
+
+
+/**
+ * The LoyaltyEventCreateReward model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventCreateReward
+ */
+
+/**
+ * Constructs a new LoyaltyEventCreateReward
.
+ * Provides metadata when the event `type` is `CREATE_REWARD`.
+ * @alias module:model/LoyaltyEventCreateReward
+ * @class
+ * @param loyaltyProgramId {String} The ID of the `loyalty program`.
+ * @param points {Number} The loyalty points used to create the reward.
+ */
+var exports = function(loyaltyProgramId, points) {
+ var _this = this;
+
+ _this['loyalty_program_id'] = loyaltyProgramId;
+
+ _this['points'] = points;
+};
+
+/**
+ * Constructs a LoyaltyEventCreateReward
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/LoyaltyEventCreateReward} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventCreateReward} The populated LoyaltyEventCreateReward
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('reward_id')) {
+ obj['reward_id'] = ApiClient.convertToType(data['reward_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The Square-assigned ID of the created `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`.
+ * @member {String} reward_id
+ */
+exports.prototype['reward_id'] = undefined;
+/**
+ * The loyalty points used to create the reward.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventDateTimeFilter.js b/src/model/LoyaltyEventDateTimeFilter.js
new file mode 100644
index 0000000..cd47b75
--- /dev/null
+++ b/src/model/LoyaltyEventDateTimeFilter.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 TimeRange = require('./TimeRange');
+
+
+
+
+/**
+ * The LoyaltyEventDateTimeFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventDateTimeFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventDateTimeFilter
.
+ * Filter events by date time range.
+ * @alias module:model/LoyaltyEventDateTimeFilter
+ * @class
+ * @param createdAt {module:model/TimeRange} The `created_at` date time range used to filter the result.
+ */
+var exports = function(createdAt) {
+ var _this = this;
+
+ _this['created_at'] = createdAt;
+};
+
+/**
+ * Constructs a LoyaltyEventDateTimeFilter
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/LoyaltyEventDateTimeFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventDateTimeFilter} The populated LoyaltyEventDateTimeFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = TimeRange.constructFromObject(data['created_at']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The `created_at` date time range used to filter the result.
+ * @member {module:model/TimeRange} created_at
+ */
+exports.prototype['created_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventDeleteReward.js b/src/model/LoyaltyEventDeleteReward.js
new file mode 100644
index 0000000..e276c4a
--- /dev/null
+++ b/src/model/LoyaltyEventDeleteReward.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');
+
+
+
+
+/**
+ * The LoyaltyEventDeleteReward model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventDeleteReward
+ */
+
+/**
+ * Constructs a new LoyaltyEventDeleteReward
.
+ * Provides metadata when the event `type` is `DELETE_REWARD`.
+ * @alias module:model/LoyaltyEventDeleteReward
+ * @class
+ * @param loyaltyProgramId {String} The ID of the `loyalty program`.
+ * @param points {Number} The number of points returned to the loyalty account.
+ */
+var exports = function(loyaltyProgramId, points) {
+ var _this = this;
+
+ _this['loyalty_program_id'] = loyaltyProgramId;
+
+ _this['points'] = points;
+};
+
+/**
+ * Constructs a LoyaltyEventDeleteReward
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/LoyaltyEventDeleteReward} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventDeleteReward} The populated LoyaltyEventDeleteReward
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('reward_id')) {
+ obj['reward_id'] = ApiClient.convertToType(data['reward_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The ID of the deleted `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`.
+ * @member {String} reward_id
+ */
+exports.prototype['reward_id'] = undefined;
+/**
+ * The number of points returned to the loyalty account.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventExpirePoints.js b/src/model/LoyaltyEventExpirePoints.js
new file mode 100644
index 0000000..84ea2a5
--- /dev/null
+++ b/src/model/LoyaltyEventExpirePoints.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');
+
+
+
+
+/**
+ * The LoyaltyEventExpirePoints model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventExpirePoints
+ */
+
+/**
+ * Constructs a new LoyaltyEventExpirePoints
.
+ * Provides metadata when the event `type` is `EXPIRE_POINTS`.
+ * @alias module:model/LoyaltyEventExpirePoints
+ * @class
+ * @param loyaltyProgramId {String} The Square-assigned ID of the `loyalty program`.
+ * @param points {Number} The number of points expired.
+ */
+var exports = function(loyaltyProgramId, points) {
+ var _this = this;
+
+ _this['loyalty_program_id'] = loyaltyProgramId;
+ _this['points'] = points;
+};
+
+/**
+ * Constructs a LoyaltyEventExpirePoints
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/LoyaltyEventExpirePoints} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventExpirePoints} The populated LoyaltyEventExpirePoints
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The number of points expired.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventFilter.js b/src/model/LoyaltyEventFilter.js
new file mode 100644
index 0000000..e95ce2f
--- /dev/null
+++ b/src/model/LoyaltyEventFilter.js
@@ -0,0 +1,107 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var LoyaltyEventDateTimeFilter = require('./LoyaltyEventDateTimeFilter');
+var LoyaltyEventLocationFilter = require('./LoyaltyEventLocationFilter');
+var LoyaltyEventLoyaltyAccountFilter = require('./LoyaltyEventLoyaltyAccountFilter');
+var LoyaltyEventOrderFilter = require('./LoyaltyEventOrderFilter');
+var LoyaltyEventTypeFilter = require('./LoyaltyEventTypeFilter');
+
+
+
+
+/**
+ * The LoyaltyEventFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventFilter
.
+ * The filtering criteria. If the request specifies multiple filters, the endpoint uses a logical AND to evaluate them.
+ * @alias module:model/LoyaltyEventFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyEventFilter
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/LoyaltyEventFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventFilter} The populated LoyaltyEventFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_account_filter')) {
+ obj['loyalty_account_filter'] = LoyaltyEventLoyaltyAccountFilter.constructFromObject(data['loyalty_account_filter']);
+ }
+ if (data.hasOwnProperty('type_filter')) {
+ obj['type_filter'] = LoyaltyEventTypeFilter.constructFromObject(data['type_filter']);
+ }
+ if (data.hasOwnProperty('date_time_filter')) {
+ obj['date_time_filter'] = LoyaltyEventDateTimeFilter.constructFromObject(data['date_time_filter']);
+ }
+ if (data.hasOwnProperty('location_filter')) {
+ obj['location_filter'] = LoyaltyEventLocationFilter.constructFromObject(data['location_filter']);
+ }
+ if (data.hasOwnProperty('order_filter')) {
+ obj['order_filter'] = LoyaltyEventOrderFilter.constructFromObject(data['order_filter']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Filter events by loyalty account.
+ * @member {module:model/LoyaltyEventLoyaltyAccountFilter} loyalty_account_filter
+ */
+exports.prototype['loyalty_account_filter'] = undefined;
+/**
+ * Filter events by event type.
+ * @member {module:model/LoyaltyEventTypeFilter} type_filter
+ */
+exports.prototype['type_filter'] = undefined;
+/**
+ * Filter events by date time range. For each range, the start time is inclusive and the end time is exclusive.
+ * @member {module:model/LoyaltyEventDateTimeFilter} date_time_filter
+ */
+exports.prototype['date_time_filter'] = undefined;
+/**
+ * Filter events by location.
+ * @member {module:model/LoyaltyEventLocationFilter} location_filter
+ */
+exports.prototype['location_filter'] = undefined;
+/**
+ * Filter events by the order associated with the event.
+ * @member {module:model/LoyaltyEventOrderFilter} order_filter
+ */
+exports.prototype['order_filter'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventLocationFilter.js b/src/model/LoyaltyEventLocationFilter.js
new file mode 100644
index 0000000..356c86f
--- /dev/null
+++ b/src/model/LoyaltyEventLocationFilter.js
@@ -0,0 +1,67 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventLocationFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventLocationFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventLocationFilter
.
+ * Filter events by location.
+ * @alias module:model/LoyaltyEventLocationFilter
+ * @class
+ * @param locationIds {Array.} The `location` IDs for loyalty events to query. If multiple values are specified, the endpoint uses a logical OR to combine them.
+ */
+var exports = function(locationIds) {
+ var _this = this;
+
+ _this['location_ids'] = locationIds;
+};
+
+/**
+ * Constructs a LoyaltyEventLocationFilter
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/LoyaltyEventLocationFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventLocationFilter} The populated LoyaltyEventLocationFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('location_ids')) {
+ obj['location_ids'] = ApiClient.convertToType(data['location_ids'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The `location` IDs for loyalty events to query. If multiple values are specified, the endpoint uses a logical OR to combine them.
+ * @member {Array.} location_ids
+ */
+exports.prototype['location_ids'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventLoyaltyAccountFilter.js b/src/model/LoyaltyEventLoyaltyAccountFilter.js
new file mode 100644
index 0000000..bb35ca3
--- /dev/null
+++ b/src/model/LoyaltyEventLoyaltyAccountFilter.js
@@ -0,0 +1,67 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventLoyaltyAccountFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventLoyaltyAccountFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventLoyaltyAccountFilter
.
+ * Filter events by loyalty account.
+ * @alias module:model/LoyaltyEventLoyaltyAccountFilter
+ * @class
+ * @param loyaltyAccountId {String} The ID of the `loyalty account` associated with loyalty events.
+ */
+var exports = function(loyaltyAccountId) {
+ var _this = this;
+
+ _this['loyalty_account_id'] = loyaltyAccountId;
+};
+
+/**
+ * Constructs a LoyaltyEventLoyaltyAccountFilter
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/LoyaltyEventLoyaltyAccountFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventLoyaltyAccountFilter} The populated LoyaltyEventLoyaltyAccountFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_account_id')) {
+ obj['loyalty_account_id'] = ApiClient.convertToType(data['loyalty_account_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty account` associated with loyalty events.
+ * @member {String} loyalty_account_id
+ */
+exports.prototype['loyalty_account_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventOrderFilter.js b/src/model/LoyaltyEventOrderFilter.js
new file mode 100644
index 0000000..b54957c
--- /dev/null
+++ b/src/model/LoyaltyEventOrderFilter.js
@@ -0,0 +1,67 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventOrderFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventOrderFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventOrderFilter
.
+ * Filter events by the order associated with the event.
+ * @alias module:model/LoyaltyEventOrderFilter
+ * @class
+ * @param orderId {String} The ID of the `order` associated with the event.
+ */
+var exports = function(orderId) {
+ var _this = this;
+
+ _this['order_id'] = orderId;
+};
+
+/**
+ * Constructs a LoyaltyEventOrderFilter
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/LoyaltyEventOrderFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventOrderFilter} The populated LoyaltyEventOrderFilter
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');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `order` associated with the event.
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventOther.js b/src/model/LoyaltyEventOther.js
new file mode 100644
index 0000000..20e34ea
--- /dev/null
+++ b/src/model/LoyaltyEventOther.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');
+
+
+
+
+/**
+ * The LoyaltyEventOther model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventOther
+ */
+
+/**
+ * Constructs a new LoyaltyEventOther
.
+ * Provides metadata when the event `type` is `OTHER`.
+ * @alias module:model/LoyaltyEventOther
+ * @class
+ * @param loyaltyProgramId {String} The Square-assigned ID of the `loyalty program`.
+ * @param points {Number} The number of points added or removed.
+ */
+var exports = function(loyaltyProgramId, points) {
+ var _this = this;
+
+ _this['loyalty_program_id'] = loyaltyProgramId;
+ _this['points'] = points;
+};
+
+/**
+ * Constructs a LoyaltyEventOther
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/LoyaltyEventOther} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventOther} The populated LoyaltyEventOther
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The number of points added or removed.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventQuery.js b/src/model/LoyaltyEventQuery.js
new file mode 100644
index 0000000..27e584f
--- /dev/null
+++ b/src/model/LoyaltyEventQuery.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 LoyaltyEventFilter = require('./LoyaltyEventFilter');
+
+
+
+
+/**
+ * The LoyaltyEventQuery model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventQuery
+ */
+
+/**
+ * Constructs a new LoyaltyEventQuery
.
+ * Represents a query used to search for loyalty events.
+ * @alias module:model/LoyaltyEventQuery
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a LoyaltyEventQuery
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/LoyaltyEventQuery} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventQuery} The populated LoyaltyEventQuery
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('filter')) {
+ obj['filter'] = LoyaltyEventFilter.constructFromObject(data['filter']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The query filter criteria.
+ * @member {module:model/LoyaltyEventFilter} filter
+ */
+exports.prototype['filter'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventRedeemReward.js b/src/model/LoyaltyEventRedeemReward.js
new file mode 100644
index 0000000..0485ef8
--- /dev/null
+++ b/src/model/LoyaltyEventRedeemReward.js
@@ -0,0 +1,85 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventRedeemReward model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventRedeemReward
+ */
+
+/**
+ * Constructs a new LoyaltyEventRedeemReward
.
+ * Provides metadata when the event `type` is `REDEEM_REWARD`.
+ * @alias module:model/LoyaltyEventRedeemReward
+ * @class
+ * @param loyaltyProgramId {String} The ID of the `loyalty program`.
+ */
+var exports = function(loyaltyProgramId) {
+ var _this = this;
+
+ _this['loyalty_program_id'] = loyaltyProgramId;
+
+
+};
+
+/**
+ * Constructs a LoyaltyEventRedeemReward
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/LoyaltyEventRedeemReward} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventRedeemReward} The populated LoyaltyEventRedeemReward
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_program_id')) {
+ obj['loyalty_program_id'] = ApiClient.convertToType(data['loyalty_program_id'], 'String');
+ }
+ if (data.hasOwnProperty('reward_id')) {
+ obj['reward_id'] = ApiClient.convertToType(data['reward_id'], 'String');
+ }
+ if (data.hasOwnProperty('order_id')) {
+ obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty program`.
+ * @member {String} loyalty_program_id
+ */
+exports.prototype['loyalty_program_id'] = undefined;
+/**
+ * The ID of the redeemed `loyalty reward`. This field is returned only if the event source is `LOYALTY_API`.
+ * @member {String} reward_id
+ */
+exports.prototype['reward_id'] = undefined;
+/**
+ * The ID of the `order` that redeemed the reward. This field is returned only if the Orders API is used to process orders.
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyEventSource.js b/src/model/LoyaltyEventSource.js
new file mode 100644
index 0000000..aaa6da0
--- /dev/null
+++ b/src/model/LoyaltyEventSource.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 LoyaltyEventSource.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "SQUARE"
+ * @const
+ */
+ "SQUARE": "SQUARE",
+ /**
+ * value: "LOYALTY_API"
+ * @const
+ */
+ "LOYALTY_API": "LOYALTY_API"};
+
+/**
+ * Returns a LoyaltyEventSource
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyEventSource} The enum LoyaltyEventSource
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyEventType.js b/src/model/LoyaltyEventType.js
new file mode 100644
index 0000000..f68da13
--- /dev/null
+++ b/src/model/LoyaltyEventType.js
@@ -0,0 +1,70 @@
+/**
+ * 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 LoyaltyEventType.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "ACCUMULATE_POINTS"
+ * @const
+ */
+ "ACCUMULATE_POINTS": "ACCUMULATE_POINTS",
+ /**
+ * value: "CREATE_REWARD"
+ * @const
+ */
+ "CREATE_REWARD": "CREATE_REWARD",
+ /**
+ * value: "REDEEM_REWARD"
+ * @const
+ */
+ "REDEEM_REWARD": "REDEEM_REWARD",
+ /**
+ * value: "DELETE_REWARD"
+ * @const
+ */
+ "DELETE_REWARD": "DELETE_REWARD",
+ /**
+ * value: "ADJUST_POINTS"
+ * @const
+ */
+ "ADJUST_POINTS": "ADJUST_POINTS",
+ /**
+ * value: "EXPIRE_POINTS"
+ * @const
+ */
+ "EXPIRE_POINTS": "EXPIRE_POINTS",
+ /**
+ * value: "OTHER"
+ * @const
+ */
+ "OTHER": "OTHER"};
+
+/**
+ * Returns a LoyaltyEventType
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyEventType} The enum LoyaltyEventType
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyEventTypeFilter.js b/src/model/LoyaltyEventTypeFilter.js
new file mode 100644
index 0000000..650667d
--- /dev/null
+++ b/src/model/LoyaltyEventTypeFilter.js
@@ -0,0 +1,67 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyEventTypeFilter model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyEventTypeFilter
+ */
+
+/**
+ * Constructs a new LoyaltyEventTypeFilter
.
+ * Filter events by event type.
+ * @alias module:model/LoyaltyEventTypeFilter
+ * @class
+ * @param types {Array.} The loyalty event types used to filter the result. If multiple values are specified, the endpoint uses a logical OR to combine them. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
+ */
+var exports = function(types) {
+ var _this = this;
+
+ _this['types'] = types;
+};
+
+/**
+ * Constructs a LoyaltyEventTypeFilter
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/LoyaltyEventTypeFilter} obj Optional instance to populate.
+ * @return {module:model/LoyaltyEventTypeFilter} The populated LoyaltyEventTypeFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('types')) {
+ obj['types'] = ApiClient.convertToType(data['types'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The loyalty event types used to filter the result. If multiple values are specified, the endpoint uses a logical OR to combine them. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
+ * @member {Array.} types
+ */
+exports.prototype['types'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgram.js b/src/model/LoyaltyProgram.js
new file mode 100644
index 0000000..5bca345
--- /dev/null
+++ b/src/model/LoyaltyProgram.js
@@ -0,0 +1,150 @@
+/**
+ * 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 LoyaltyProgramAccrualRule = require('./LoyaltyProgramAccrualRule');
+var LoyaltyProgramExpirationPolicy = require('./LoyaltyProgramExpirationPolicy');
+var LoyaltyProgramRewardTier = require('./LoyaltyProgramRewardTier');
+var LoyaltyProgramTerminology = require('./LoyaltyProgramTerminology');
+
+
+
+
+/**
+ * The LoyaltyProgram model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgram
+ */
+
+/**
+ * Constructs a new LoyaltyProgram
.
+ *
+ * @alias module:model/LoyaltyProgram
+ * @class
+ * @param id {String} The Square-assigned ID of the loyalty program. Updates to the loyalty program do not modify the identifier.
+ * @param status {String} Whether the program is currently active. See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values
+ * @param rewardTiers {Array.} The list of rewards for buyers, sorted by ascending points.
+ * @param terminology {module:model/LoyaltyProgramTerminology} A cosmetic name for the “points” currency.
+ * @param locationIds {Array.} The `locations` at which the program is active.
+ * @param createdAt {String} The timestamp when the program was created, in RFC 3339 format.
+ * @param updatedAt {String} The timestamp when the reward was last updated, in RFC 3339 format.
+ * @param accrualRules {Array.} Defines how buyers can earn loyalty points.
+ */
+var exports = function(id, status, rewardTiers, terminology, locationIds, createdAt, updatedAt, accrualRules) {
+ var _this = this;
+
+ _this['id'] = id;
+ _this['status'] = status;
+ _this['reward_tiers'] = rewardTiers;
+
+ _this['terminology'] = terminology;
+ _this['location_ids'] = locationIds;
+ _this['created_at'] = createdAt;
+ _this['updated_at'] = updatedAt;
+ _this['accrual_rules'] = accrualRules;
+};
+
+/**
+ * Constructs a LoyaltyProgram
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/LoyaltyProgram} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgram} The populated LoyaltyProgram
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('status')) {
+ obj['status'] = ApiClient.convertToType(data['status'], 'String');
+ }
+ if (data.hasOwnProperty('reward_tiers')) {
+ obj['reward_tiers'] = ApiClient.convertToType(data['reward_tiers'], [LoyaltyProgramRewardTier]);
+ }
+ if (data.hasOwnProperty('expiration_policy')) {
+ obj['expiration_policy'] = LoyaltyProgramExpirationPolicy.constructFromObject(data['expiration_policy']);
+ }
+ if (data.hasOwnProperty('terminology')) {
+ obj['terminology'] = LoyaltyProgramTerminology.constructFromObject(data['terminology']);
+ }
+ if (data.hasOwnProperty('location_ids')) {
+ obj['location_ids'] = ApiClient.convertToType(data['location_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');
+ }
+ if (data.hasOwnProperty('accrual_rules')) {
+ obj['accrual_rules'] = ApiClient.convertToType(data['accrual_rules'], [LoyaltyProgramAccrualRule]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the loyalty program. Updates to the loyalty program do not modify the identifier.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * Whether the program is currently active. See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values
+ * @member {String} status
+ */
+exports.prototype['status'] = undefined;
+/**
+ * The list of rewards for buyers, sorted by ascending points.
+ * @member {Array.} reward_tiers
+ */
+exports.prototype['reward_tiers'] = undefined;
+/**
+ * If present, details for how points expire.
+ * @member {module:model/LoyaltyProgramExpirationPolicy} expiration_policy
+ */
+exports.prototype['expiration_policy'] = undefined;
+/**
+ * A cosmetic name for the “points” currency.
+ * @member {module:model/LoyaltyProgramTerminology} terminology
+ */
+exports.prototype['terminology'] = undefined;
+/**
+ * The `locations` at which the program is active.
+ * @member {Array.} location_ids
+ */
+exports.prototype['location_ids'] = undefined;
+/**
+ * The timestamp when the program was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+/**
+ * The timestamp when the reward was last updated, in RFC 3339 format.
+ * @member {String} updated_at
+ */
+exports.prototype['updated_at'] = undefined;
+/**
+ * Defines how buyers can earn loyalty points.
+ * @member {Array.} accrual_rules
+ */
+exports.prototype['accrual_rules'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgramAccrualRule.js b/src/model/LoyaltyProgramAccrualRule.js
new file mode 100644
index 0000000..0e4d51c
--- /dev/null
+++ b/src/model/LoyaltyProgramAccrualRule.js
@@ -0,0 +1,104 @@
+/**
+ * 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 LoyaltyProgramAccrualRule model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgramAccrualRule
+ */
+
+/**
+ * Constructs a new LoyaltyProgramAccrualRule
.
+ * Defines an accrual rule, which is how buyers can earn points.
+ * @alias module:model/LoyaltyProgramAccrualRule
+ * @class
+ * @param accrualType {String} The type of the accrual rule that defines how buyers can earn points. See [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) for possible values
+ */
+var exports = function(accrualType) {
+ var _this = this;
+
+ _this['accrual_type'] = accrualType;
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyProgramAccrualRule
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/LoyaltyProgramAccrualRule} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgramAccrualRule} The populated LoyaltyProgramAccrualRule
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('accrual_type')) {
+ obj['accrual_type'] = ApiClient.convertToType(data['accrual_type'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ if (data.hasOwnProperty('visit_minimum_amount_money')) {
+ obj['visit_minimum_amount_money'] = Money.constructFromObject(data['visit_minimum_amount_money']);
+ }
+ if (data.hasOwnProperty('spend_amount_money')) {
+ obj['spend_amount_money'] = Money.constructFromObject(data['spend_amount_money']);
+ }
+ if (data.hasOwnProperty('catalog_object_id')) {
+ obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The type of the accrual rule that defines how buyers can earn points. See [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) for possible values
+ * @member {String} accrual_type
+ */
+exports.prototype['accrual_type'] = undefined;
+/**
+ * The number of points that buyers earn based on the `accrual_type`.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+/**
+ * When the accrual rule is visit-based (`accrual_type` is `VISIT`), this field indicates the minimum purchase required during the visit to quality for the reward.
+ * @member {module:model/Money} visit_minimum_amount_money
+ */
+exports.prototype['visit_minimum_amount_money'] = undefined;
+/**
+ * When the accrual rule is spend-based (`accrual_type` is `SPEND`), this field indicates the amount that a buyer must spend to earn the points. For example, suppose the accrual rule is \"earn 1 point for every $10 you spend\". Then, buyer earns a point for every $10 they spend. If buyer spends $105, the buyer earns 10 points.
+ * @member {module:model/Money} spend_amount_money
+ */
+exports.prototype['spend_amount_money'] = undefined;
+/**
+ * The ID of the `catalog object` to purchase to earn the number of points defined by the rule. This is either an item variation or a category, depending on the type. This is defined on `ITEM_VARIATION` rules and `CATEGORY` rules.
+ * @member {String} catalog_object_id
+ */
+exports.prototype['catalog_object_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgramAccrualRuleType.js b/src/model/LoyaltyProgramAccrualRuleType.js
new file mode 100644
index 0000000..6502845
--- /dev/null
+++ b/src/model/LoyaltyProgramAccrualRuleType.js
@@ -0,0 +1,55 @@
+/**
+ * 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 LoyaltyProgramAccrualRuleType.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "VISIT"
+ * @const
+ */
+ "VISIT": "VISIT",
+ /**
+ * value: "SPEND"
+ * @const
+ */
+ "SPEND": "SPEND",
+ /**
+ * value: "ITEM_VARIATION"
+ * @const
+ */
+ "ITEM_VARIATION": "ITEM_VARIATION",
+ /**
+ * value: "CATEGORY"
+ * @const
+ */
+ "CATEGORY": "CATEGORY"};
+
+/**
+ * Returns a LoyaltyProgramAccrualRuleType
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyProgramAccrualRuleType} The enum LoyaltyProgramAccrualRuleType
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyProgramExpirationPolicy.js b/src/model/LoyaltyProgramExpirationPolicy.js
new file mode 100644
index 0000000..1b5c3c6
--- /dev/null
+++ b/src/model/LoyaltyProgramExpirationPolicy.js
@@ -0,0 +1,67 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The LoyaltyProgramExpirationPolicy model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgramExpirationPolicy
+ */
+
+/**
+ * Constructs a new LoyaltyProgramExpirationPolicy
.
+ * Describes when the loyalty program expires.
+ * @alias module:model/LoyaltyProgramExpirationPolicy
+ * @class
+ * @param expirationDuration {String} The duration of time before points expire, in RFC 3339 format.
+ */
+var exports = function(expirationDuration) {
+ var _this = this;
+
+ _this['expiration_duration'] = expirationDuration;
+};
+
+/**
+ * Constructs a LoyaltyProgramExpirationPolicy
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/LoyaltyProgramExpirationPolicy} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgramExpirationPolicy} The populated LoyaltyProgramExpirationPolicy
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('expiration_duration')) {
+ obj['expiration_duration'] = ApiClient.convertToType(data['expiration_duration'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The duration of time before points expire, in RFC 3339 format.
+ * @member {String} expiration_duration
+ */
+exports.prototype['expiration_duration'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgramRewardDefinition.js b/src/model/LoyaltyProgramRewardDefinition.js
new file mode 100644
index 0000000..8111766
--- /dev/null
+++ b/src/model/LoyaltyProgramRewardDefinition.js
@@ -0,0 +1,114 @@
+/**
+ * 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 LoyaltyProgramRewardDefinition model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgramRewardDefinition
+ */
+
+/**
+ * Constructs a new LoyaltyProgramRewardDefinition
.
+ * Provides details about the loyalty program reward tier definition.
+ * @alias module:model/LoyaltyProgramRewardDefinition
+ * @class
+ * @param scope {String} Indicates the scope of the reward tier. See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values
+ * @param discountType {String} The type of discount the reward tier offers. See [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values
+ */
+var exports = function(scope, discountType) {
+ var _this = this;
+
+ _this['scope'] = scope;
+ _this['discount_type'] = discountType;
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyProgramRewardDefinition
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/LoyaltyProgramRewardDefinition} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgramRewardDefinition} The populated LoyaltyProgramRewardDefinition
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('scope')) {
+ obj['scope'] = ApiClient.convertToType(data['scope'], 'String');
+ }
+ if (data.hasOwnProperty('discount_type')) {
+ obj['discount_type'] = ApiClient.convertToType(data['discount_type'], 'String');
+ }
+ if (data.hasOwnProperty('percentage_discount')) {
+ obj['percentage_discount'] = ApiClient.convertToType(data['percentage_discount'], 'String');
+ }
+ if (data.hasOwnProperty('catalog_object_ids')) {
+ obj['catalog_object_ids'] = ApiClient.convertToType(data['catalog_object_ids'], ['String']);
+ }
+ if (data.hasOwnProperty('fixed_discount_money')) {
+ obj['fixed_discount_money'] = Money.constructFromObject(data['fixed_discount_money']);
+ }
+ if (data.hasOwnProperty('max_discount_money')) {
+ obj['max_discount_money'] = Money.constructFromObject(data['max_discount_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Indicates the scope of the reward tier. See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values
+ * @member {String} scope
+ */
+exports.prototype['scope'] = undefined;
+/**
+ * The type of discount the reward tier offers. See [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values
+ * @member {String} discount_type
+ */
+exports.prototype['discount_type'] = undefined;
+/**
+ * Present if `discount_type` is `FIXED_PERCENTAGE`. For example, a 7.25% off discount will be represented as \"7.25\".
+ * @member {String} percentage_discount
+ */
+exports.prototype['percentage_discount'] = undefined;
+/**
+ * A list of `catalog object` ids to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field.
+ * @member {Array.} catalog_object_ids
+ */
+exports.prototype['catalog_object_ids'] = undefined;
+/**
+ * Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off.
+ * @member {module:model/Money} fixed_discount_money
+ */
+exports.prototype['fixed_discount_money'] = undefined;
+/**
+ * When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied.
+ * @member {module:model/Money} max_discount_money
+ */
+exports.prototype['max_discount_money'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgramRewardDefinitionScope.js b/src/model/LoyaltyProgramRewardDefinitionScope.js
new file mode 100644
index 0000000..bbdad13
--- /dev/null
+++ b/src/model/LoyaltyProgramRewardDefinitionScope.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 LoyaltyProgramRewardDefinitionScope.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "ORDER"
+ * @const
+ */
+ "ORDER": "ORDER",
+ /**
+ * value: "ITEM_VARIATION"
+ * @const
+ */
+ "ITEM_VARIATION": "ITEM_VARIATION",
+ /**
+ * value: "CATEGORY"
+ * @const
+ */
+ "CATEGORY": "CATEGORY"};
+
+/**
+ * Returns a LoyaltyProgramRewardDefinitionScope
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyProgramRewardDefinitionScope} The enum LoyaltyProgramRewardDefinitionScope
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyProgramRewardDefinitionType.js b/src/model/LoyaltyProgramRewardDefinitionType.js
new file mode 100644
index 0000000..9d7de05
--- /dev/null
+++ b/src/model/LoyaltyProgramRewardDefinitionType.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 LoyaltyProgramRewardDefinitionType.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "FIXED_AMOUNT"
+ * @const
+ */
+ "AMOUNT": "FIXED_AMOUNT",
+ /**
+ * value: "FIXED_PERCENTAGE"
+ * @const
+ */
+ "PERCENTAGE": "FIXED_PERCENTAGE"};
+
+/**
+ * Returns a LoyaltyProgramRewardDefinitionType
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyProgramRewardDefinitionType} The enum LoyaltyProgramRewardDefinitionType
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyProgramRewardTier.js b/src/model/LoyaltyProgramRewardTier.js
new file mode 100644
index 0000000..507355a
--- /dev/null
+++ b/src/model/LoyaltyProgramRewardTier.js
@@ -0,0 +1,108 @@
+/**
+ * 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 LoyaltyProgramRewardDefinition = require('./LoyaltyProgramRewardDefinition');
+
+
+
+
+/**
+ * The LoyaltyProgramRewardTier model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgramRewardTier
+ */
+
+/**
+ * Constructs a new LoyaltyProgramRewardTier
.
+ * Describes a loyalty program reward tier.
+ * @alias module:model/LoyaltyProgramRewardTier
+ * @class
+ * @param id {String} The Square-assigned ID of the reward tier.
+ * @param points {Number} The points exchanged for the reward tier.
+ * @param name {String} The name of the reward tier.
+ * @param definition {module:model/LoyaltyProgramRewardDefinition} Provides details about the reward tier definition.
+ * @param createdAt {String} The timestamp when the reward tier was created, in RFC 3339 format.
+ */
+var exports = function(id, points, name, definition, createdAt) {
+ var _this = this;
+
+ _this['id'] = id;
+ _this['points'] = points;
+ _this['name'] = name;
+ _this['definition'] = definition;
+ _this['created_at'] = createdAt;
+};
+
+/**
+ * Constructs a LoyaltyProgramRewardTier
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/LoyaltyProgramRewardTier} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgramRewardTier} The populated LoyaltyProgramRewardTier
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('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('definition')) {
+ obj['definition'] = LoyaltyProgramRewardDefinition.constructFromObject(data['definition']);
+ }
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the reward tier.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The points exchanged for the reward tier.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+/**
+ * The name of the reward tier.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * Provides details about the reward tier definition.
+ * @member {module:model/LoyaltyProgramRewardDefinition} definition
+ */
+exports.prototype['definition'] = undefined;
+/**
+ * The timestamp when the reward tier was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyProgramStatus.js b/src/model/LoyaltyProgramStatus.js
new file mode 100644
index 0000000..cb9b625
--- /dev/null
+++ b/src/model/LoyaltyProgramStatus.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 LoyaltyProgramStatus.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "INACTIVE"
+ * @const
+ */
+ "INACTIVE": "INACTIVE",
+ /**
+ * value: "ACTIVE"
+ * @const
+ */
+ "ACTIVE": "ACTIVE"};
+
+/**
+ * Returns a LoyaltyProgramStatus
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyProgramStatus} The enum LoyaltyProgramStatus
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/LoyaltyProgramTerminology.js b/src/model/LoyaltyProgramTerminology.js
new file mode 100644
index 0000000..202daa5
--- /dev/null
+++ b/src/model/LoyaltyProgramTerminology.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');
+
+
+
+
+/**
+ * The LoyaltyProgramTerminology model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyProgramTerminology
+ */
+
+/**
+ * Constructs a new LoyaltyProgramTerminology
.
+ *
+ * @alias module:model/LoyaltyProgramTerminology
+ * @class
+ * @param one {String} A singular unit for a point (for example, 1 point is called 1 star).
+ * @param other {String} A plural unit for point (for example, 10 points is called 10 stars).
+ */
+var exports = function(one, other) {
+ var _this = this;
+
+ _this['one'] = one;
+ _this['other'] = other;
+};
+
+/**
+ * Constructs a LoyaltyProgramTerminology
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/LoyaltyProgramTerminology} obj Optional instance to populate.
+ * @return {module:model/LoyaltyProgramTerminology} The populated LoyaltyProgramTerminology
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('one')) {
+ obj['one'] = ApiClient.convertToType(data['one'], 'String');
+ }
+ if (data.hasOwnProperty('other')) {
+ obj['other'] = ApiClient.convertToType(data['other'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * A singular unit for a point (for example, 1 point is called 1 star).
+ * @member {String} one
+ */
+exports.prototype['one'] = undefined;
+/**
+ * A plural unit for point (for example, 10 points is called 10 stars).
+ * @member {String} other
+ */
+exports.prototype['other'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyReward.js b/src/model/LoyaltyReward.js
new file mode 100644
index 0000000..8d68797
--- /dev/null
+++ b/src/model/LoyaltyReward.js
@@ -0,0 +1,140 @@
+/**
+ * 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 LoyaltyReward model module.
+ * Note: This model is in beta.
+ * @module model/LoyaltyReward
+ */
+
+/**
+ * Constructs a new LoyaltyReward
.
+ *
+ * @alias module:model/LoyaltyReward
+ * @class
+ * @param loyaltyAccountId {String} The Square-assigned ID of the `loyalty account` to which the reward belongs.
+ * @param rewardTierId {String} The Square-assigned ID of the `reward tier` used to create the reward.
+ */
+var exports = function(loyaltyAccountId, rewardTierId) {
+ var _this = this;
+
+
+
+ _this['loyalty_account_id'] = loyaltyAccountId;
+ _this['reward_tier_id'] = rewardTierId;
+
+
+
+
+
+};
+
+/**
+ * Constructs a LoyaltyReward
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/LoyaltyReward} obj Optional instance to populate.
+ * @return {module:model/LoyaltyReward} The populated LoyaltyReward
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('status')) {
+ obj['status'] = ApiClient.convertToType(data['status'], 'String');
+ }
+ if (data.hasOwnProperty('loyalty_account_id')) {
+ obj['loyalty_account_id'] = ApiClient.convertToType(data['loyalty_account_id'], 'String');
+ }
+ if (data.hasOwnProperty('reward_tier_id')) {
+ obj['reward_tier_id'] = ApiClient.convertToType(data['reward_tier_id'], 'String');
+ }
+ if (data.hasOwnProperty('points')) {
+ obj['points'] = ApiClient.convertToType(data['points'], 'Number');
+ }
+ if (data.hasOwnProperty('order_id')) {
+ obj['order_id'] = ApiClient.convertToType(data['order_id'], '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('redeemed_at')) {
+ obj['redeemed_at'] = ApiClient.convertToType(data['redeemed_at'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The Square-assigned ID of the loyalty reward.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The status of a loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
+ * @member {String} status
+ */
+exports.prototype['status'] = undefined;
+/**
+ * The Square-assigned ID of the `loyalty account` to which the reward belongs.
+ * @member {String} loyalty_account_id
+ */
+exports.prototype['loyalty_account_id'] = undefined;
+/**
+ * The Square-assigned ID of the `reward tier` used to create the reward.
+ * @member {String} reward_tier_id
+ */
+exports.prototype['reward_tier_id'] = undefined;
+/**
+ * The number of loyalty points used for the reward.
+ * @member {Number} points
+ */
+exports.prototype['points'] = undefined;
+/**
+ * The Square-assigned ID of the `order` to which the reward is attached.
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+/**
+ * The timestamp when the reward was created, in RFC 3339 format.
+ * @member {String} created_at
+ */
+exports.prototype['created_at'] = undefined;
+/**
+ * The timestamp when the reward was last updated, in RFC 3339 format.
+ * @member {String} updated_at
+ */
+exports.prototype['updated_at'] = undefined;
+/**
+ * The timestamp when the reward was redeemed, in RFC 3339 format.
+ * @member {String} redeemed_at
+ */
+exports.prototype['redeemed_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/LoyaltyRewardStatus.js b/src/model/LoyaltyRewardStatus.js
new file mode 100644
index 0000000..fac70bd
--- /dev/null
+++ b/src/model/LoyaltyRewardStatus.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 LoyaltyRewardStatus.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "ISSUED"
+ * @const
+ */
+ "ISSUED": "ISSUED",
+ /**
+ * value: "REDEEMED"
+ * @const
+ */
+ "REDEEMED": "REDEEMED",
+ /**
+ * value: "DELETED"
+ * @const
+ */
+ "DELETED": "DELETED"};
+
+/**
+ * Returns a LoyaltyRewardStatus
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/LoyaltyRewardStatus} The enum LoyaltyRewardStatus
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/Order.js b/src/model/Order.js
index 17eefa3..d04dbba 100644
--- a/src/model/Order.js
+++ b/src/model/Order.js
@@ -19,6 +19,7 @@ var OrderLineItemDiscount = require('./OrderLineItemDiscount');
var OrderLineItemTax = require('./OrderLineItemTax');
var OrderMoneyAmounts = require('./OrderMoneyAmounts');
var OrderReturn = require('./OrderReturn');
+var OrderReward = require('./OrderReward');
var OrderRoundingAdjustment = require('./OrderRoundingAdjustment');
var OrderServiceCharge = require('./OrderServiceCharge');
var OrderSource = require('./OrderSource');
@@ -67,6 +68,7 @@ var exports = function(locationId) {
+
};
@@ -159,6 +161,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('total_service_charge_money')) {
obj['total_service_charge_money'] = Money.constructFromObject(data['total_service_charge_money']);
+ }
+ if (data.hasOwnProperty('rewards')) {
+ obj['rewards'] = ApiClient.convertToType(data['rewards'], [OrderReward]);
}
}
return obj;
@@ -294,6 +299,11 @@ exports.prototype['total_discount_money'] = undefined;
* @member {module:model/Money} total_service_charge_money
*/
exports.prototype['total_service_charge_money'] = undefined;
+/**
+ * A set-like list of rewards that have been added to the order.
+ * @member {Array.} rewards
+ */
+exports.prototype['rewards'] = undefined;
diff --git a/src/model/OrderLineItemDiscount.js b/src/model/OrderLineItemDiscount.js
index 5142dee..6654f72 100644
--- a/src/model/OrderLineItemDiscount.js
+++ b/src/model/OrderLineItemDiscount.js
@@ -40,6 +40,7 @@ var exports = function() {
+
};
/**
@@ -79,6 +80,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('scope')) {
obj['scope'] = ApiClient.convertToType(data['scope'], 'String');
+ }
+ if (data.hasOwnProperty('reward_ids')) {
+ obj['reward_ids'] = ApiClient.convertToType(data['reward_ids'], ['String']);
}
}
return obj;
@@ -129,6 +133,11 @@ exports.prototype['metadata'] = undefined;
* @member {String} scope
*/
exports.prototype['scope'] = undefined;
+/**
+ * The reward identifiers corresponding to this discount. The application and specification of discounts that have `reward_ids` are completely controlled by the backing criteria corresponding to the reward tiers of the rewards that are added to the order through the Loyalty API. To manually unapply discounts that are the result of added rewards, the rewards must be removed from the order through the Loyalty API.
+ * @member {Array.} reward_ids
+ */
+exports.prototype['reward_ids'] = undefined;
diff --git a/src/model/OrderReward.js b/src/model/OrderReward.js
new file mode 100644
index 0000000..b9989d9
--- /dev/null
+++ b/src/model/OrderReward.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');
+
+
+
+
+/**
+ * The OrderReward model module.
+ * Note: This model is in beta.
+ * @module model/OrderReward
+ */
+
+/**
+ * Constructs a new OrderReward
.
+ * Represents a reward that may be applied to an order if the necessary reward tier criteria are met. Rewards are created through the Loyalty API.
+ * @alias module:model/OrderReward
+ * @class
+ * @param id {String} The identifier of the reward.
+ * @param rewardTierId {String} The identifier of the reward tier corresponding to this reward.
+ */
+var exports = function(id, rewardTierId) {
+ var _this = this;
+
+ _this['id'] = id;
+ _this['reward_tier_id'] = rewardTierId;
+};
+
+/**
+ * Constructs a OrderReward
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/OrderReward} obj Optional instance to populate.
+ * @return {module:model/OrderReward} The populated OrderReward
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('reward_tier_id')) {
+ obj['reward_tier_id'] = ApiClient.convertToType(data['reward_tier_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The identifier of the reward.
+ * @member {String} id
+ */
+exports.prototype['id'] = undefined;
+/**
+ * The identifier of the reward tier corresponding to this reward.
+ * @member {String} reward_tier_id
+ */
+exports.prototype['reward_tier_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/Payment.js b/src/model/Payment.js
index 9d91caa..925b03c 100644
--- a/src/model/Payment.js
+++ b/src/model/Payment.js
@@ -229,7 +229,7 @@ exports.prototype['delay_action'] = undefined;
*/
exports.prototype['delayed_until'] = undefined;
/**
- * The source type for this payment Current values include: `CARD`
+ * The source type for this payment Current values include: `CARD`.
* @member {String} source_type
*/
exports.prototype['source_type'] = undefined;
@@ -254,7 +254,7 @@ exports.prototype['order_id'] = undefined;
*/
exports.prototype['reference_id'] = undefined;
/**
- * An optional customer_id to be entered by the developer when creating a payment.
+ * The `Customer` ID of the customer associated with the payment.
* @member {String} customer_id
*/
exports.prototype['customer_id'] = undefined;
@@ -289,7 +289,7 @@ exports.prototype['shipping_address'] = undefined;
*/
exports.prototype['note'] = undefined;
/**
- * Additional payment information that gets added on the customer's card statement as part of the statement description. Note that the statement_description_identifier may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment.
+ * Additional payment information that gets added on the customer's card statement as part of the statement description. Note that the `statement_description_identifier` may get truncated on the statement description to fit the required information including the Square identifier (SQ *) and name of the merchant taking the payment.
* @member {String} statement_description_identifier
*/
exports.prototype['statement_description_identifier'] = undefined;
diff --git a/src/model/RedeemLoyaltyRewardRequest.js b/src/model/RedeemLoyaltyRewardRequest.js
new file mode 100644
index 0000000..a2bbace
--- /dev/null
+++ b/src/model/RedeemLoyaltyRewardRequest.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');
+
+
+
+
+/**
+ * The RedeemLoyaltyRewardRequest model module.
+ * Note: This model is in beta.
+ * @module model/RedeemLoyaltyRewardRequest
+ */
+
+/**
+ * Constructs a new RedeemLoyaltyRewardRequest
.
+ * A request to redeem a loyalty reward.
+ * @alias module:model/RedeemLoyaltyRewardRequest
+ * @class
+ * @param idempotencyKey {String} A unique string that identifies this `RedeemLoyaltyReward` request. Keys can be any valid string, but must be unique for every request.
+ * @param locationId {String} The ID of the `location` where the reward is redeemed.
+ */
+var exports = function(idempotencyKey, locationId) {
+ var _this = this;
+
+ _this['idempotency_key'] = idempotencyKey;
+ _this['location_id'] = locationId;
+};
+
+/**
+ * Constructs a RedeemLoyaltyRewardRequest
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/RedeemLoyaltyRewardRequest} obj Optional instance to populate.
+ * @return {module:model/RedeemLoyaltyRewardRequest} The populated RedeemLoyaltyRewardRequest
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('location_id')) {
+ obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * A unique string that identifies this `RedeemLoyaltyReward` request. Keys can be any valid string, but must be unique for every request.
+ * @member {String} idempotency_key
+ */
+exports.prototype['idempotency_key'] = undefined;
+/**
+ * The ID of the `location` where the reward is redeemed.
+ * @member {String} location_id
+ */
+exports.prototype['location_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/RedeemLoyaltyRewardResponse.js b/src/model/RedeemLoyaltyRewardResponse.js
new file mode 100644
index 0000000..9d03348
--- /dev/null
+++ b/src/model/RedeemLoyaltyRewardResponse.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 LoyaltyEvent = require('./LoyaltyEvent');
+
+
+
+
+/**
+ * The RedeemLoyaltyRewardResponse model module.
+ * Note: This model is in beta.
+ * @module model/RedeemLoyaltyRewardResponse
+ */
+
+/**
+ * Constructs a new RedeemLoyaltyRewardResponse
.
+ * A response that includes the `LoyaltyEvent` published for redeeming the reward.
+ * @alias module:model/RedeemLoyaltyRewardResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a RedeemLoyaltyRewardResponse
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/RedeemLoyaltyRewardResponse} obj Optional instance to populate.
+ * @return {module:model/RedeemLoyaltyRewardResponse} The populated RedeemLoyaltyRewardResponse
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('event')) {
+ obj['event'] = LoyaltyEvent.constructFromObject(data['event']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The `LoyaltyEvent` for redeeming the reward.
+ * @member {module:model/LoyaltyEvent} event
+ */
+exports.prototype['event'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/RetrieveLoyaltyAccountRequest.js b/src/model/RetrieveLoyaltyAccountRequest.js
new file mode 100644
index 0000000..1bd9675
--- /dev/null
+++ b/src/model/RetrieveLoyaltyAccountRequest.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 RetrieveLoyaltyAccountRequest model module.
+ * Note: This model is in beta.
+ * @module model/RetrieveLoyaltyAccountRequest
+ */
+
+/**
+ * Constructs a new RetrieveLoyaltyAccountRequest
.
+ * A request to retrieve a loyalty account.
+ * @alias module:model/RetrieveLoyaltyAccountRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+};
+
+/**
+ * Constructs a RetrieveLoyaltyAccountRequest
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/RetrieveLoyaltyAccountRequest} obj Optional instance to populate.
+ * @return {module:model/RetrieveLoyaltyAccountRequest} The populated RetrieveLoyaltyAccountRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ }
+ return obj;
+}
+
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/RetrieveLoyaltyAccountResponse.js b/src/model/RetrieveLoyaltyAccountResponse.js
new file mode 100644
index 0000000..dc2174d
--- /dev/null
+++ b/src/model/RetrieveLoyaltyAccountResponse.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 LoyaltyAccount = require('./LoyaltyAccount');
+
+
+
+
+/**
+ * The RetrieveLoyaltyAccountResponse model module.
+ * Note: This model is in beta.
+ * @module model/RetrieveLoyaltyAccountResponse
+ */
+
+/**
+ * Constructs a new RetrieveLoyaltyAccountResponse
.
+ * A response that includes the loyalty account.
+ * @alias module:model/RetrieveLoyaltyAccountResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a RetrieveLoyaltyAccountResponse
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/RetrieveLoyaltyAccountResponse} obj Optional instance to populate.
+ * @return {module:model/RetrieveLoyaltyAccountResponse} The populated RetrieveLoyaltyAccountResponse
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('loyalty_account')) {
+ obj['loyalty_account'] = LoyaltyAccount.constructFromObject(data['loyalty_account']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The loyalty account.
+ * @member {module:model/LoyaltyAccount} loyalty_account
+ */
+exports.prototype['loyalty_account'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/RetrieveLoyaltyRewardRequest.js b/src/model/RetrieveLoyaltyRewardRequest.js
new file mode 100644
index 0000000..58ef9f5
--- /dev/null
+++ b/src/model/RetrieveLoyaltyRewardRequest.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 RetrieveLoyaltyRewardRequest model module.
+ * Note: This model is in beta.
+ * @module model/RetrieveLoyaltyRewardRequest
+ */
+
+/**
+ * Constructs a new RetrieveLoyaltyRewardRequest
.
+ * A request to retrieve a loyalty reward.
+ * @alias module:model/RetrieveLoyaltyRewardRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+};
+
+/**
+ * Constructs a RetrieveLoyaltyRewardRequest
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/RetrieveLoyaltyRewardRequest} obj Optional instance to populate.
+ * @return {module:model/RetrieveLoyaltyRewardRequest} The populated RetrieveLoyaltyRewardRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ }
+ return obj;
+}
+
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/RetrieveLoyaltyRewardResponse.js b/src/model/RetrieveLoyaltyRewardResponse.js
new file mode 100644
index 0000000..59f341f
--- /dev/null
+++ b/src/model/RetrieveLoyaltyRewardResponse.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 LoyaltyReward = require('./LoyaltyReward');
+
+
+
+
+/**
+ * The RetrieveLoyaltyRewardResponse model module.
+ * Note: This model is in beta.
+ * @module model/RetrieveLoyaltyRewardResponse
+ */
+
+/**
+ * Constructs a new RetrieveLoyaltyRewardResponse
.
+ * A response that includes the loyalty reward.
+ * @alias module:model/RetrieveLoyaltyRewardResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a RetrieveLoyaltyRewardResponse
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/RetrieveLoyaltyRewardResponse} obj Optional instance to populate.
+ * @return {module:model/RetrieveLoyaltyRewardResponse} The populated RetrieveLoyaltyRewardResponse
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('reward')) {
+ obj['reward'] = LoyaltyReward.constructFromObject(data['reward']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Any errors that occurred during the request.
+ * @member {Array.} errors
+ */
+exports.prototype['errors'] = undefined;
+/**
+ * The loyalty reward retrieved.
+ * @member {module:model/LoyaltyReward} reward
+ */
+exports.prototype['reward'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyAccountsRequest.js b/src/model/SearchLoyaltyAccountsRequest.js
new file mode 100644
index 0000000..207c29c
--- /dev/null
+++ b/src/model/SearchLoyaltyAccountsRequest.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 SearchLoyaltyAccountsRequestLoyaltyAccountQuery = require('./SearchLoyaltyAccountsRequestLoyaltyAccountQuery');
+
+
+
+
+/**
+ * The SearchLoyaltyAccountsRequest model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyAccountsRequest
+ */
+
+/**
+ * Constructs a new SearchLoyaltyAccountsRequest
.
+ * A request to search for loyalty accounts.
+ * @alias module:model/SearchLoyaltyAccountsRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyAccountsRequest
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/SearchLoyaltyAccountsRequest} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyAccountsRequest} The populated SearchLoyaltyAccountsRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('query')) {
+ obj['query'] = SearchLoyaltyAccountsRequestLoyaltyAccountQuery.constructFromObject(data['query']);
+ }
+ if (data.hasOwnProperty('limit')) {
+ obj['limit'] = ApiClient.convertToType(data['limit'], 'Number');
+ }
+ if (data.hasOwnProperty('cursor')) {
+ obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The search criteria for the request.
+ * @member {module:model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery} query
+ */
+exports.prototype['query'] = undefined;
+/**
+ * The maximum number of results to include in the response.
+ * @member {Number} limit
+ */
+exports.prototype['limit'] = 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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js b/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.js
new file mode 100644
index 0000000..0eedd50
--- /dev/null
+++ b/src/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.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 LoyaltyAccountMapping = require('./LoyaltyAccountMapping');
+
+
+
+
+/**
+ * The SearchLoyaltyAccountsRequestLoyaltyAccountQuery model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery
+ */
+
+/**
+ * Constructs a new SearchLoyaltyAccountsRequestLoyaltyAccountQuery
.
+ * The search criteria for the loyalty accounts.
+ * @alias module:model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyAccountsRequestLoyaltyAccountQuery
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/SearchLoyaltyAccountsRequestLoyaltyAccountQuery} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery} The populated SearchLoyaltyAccountsRequestLoyaltyAccountQuery
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('mappings')) {
+ obj['mappings'] = ApiClient.convertToType(data['mappings'], [LoyaltyAccountMapping]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The set of mappings to use in the loyalty account search.
+ * @member {Array.} mappings
+ */
+exports.prototype['mappings'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyAccountsResponse.js b/src/model/SearchLoyaltyAccountsResponse.js
new file mode 100644
index 0000000..2087cf0
--- /dev/null
+++ b/src/model/SearchLoyaltyAccountsResponse.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 LoyaltyAccount = require('./LoyaltyAccount');
+
+
+
+
+/**
+ * The SearchLoyaltyAccountsResponse model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyAccountsResponse
+ */
+
+/**
+ * Constructs a new SearchLoyaltyAccountsResponse
.
+ * A response that includes loyalty accounts that satisfy the search criteria.
+ * @alias module:model/SearchLoyaltyAccountsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyAccountsResponse
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/SearchLoyaltyAccountsResponse} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyAccountsResponse} The populated SearchLoyaltyAccountsResponse
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('loyalty_accounts')) {
+ obj['loyalty_accounts'] = ApiClient.convertToType(data['loyalty_accounts'], [LoyaltyAccount]);
+ }
+ 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 loyalty accounts that met the search criteria, in order of creation date.
+ * @member {Array.} loyalty_accounts
+ */
+exports.prototype['loyalty_accounts'] = undefined;
+/**
+ * The pagination cursor to use in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyEventsRequest.js b/src/model/SearchLoyaltyEventsRequest.js
new file mode 100644
index 0000000..0c819ca
--- /dev/null
+++ b/src/model/SearchLoyaltyEventsRequest.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 LoyaltyEventQuery = require('./LoyaltyEventQuery');
+
+
+
+
+/**
+ * The SearchLoyaltyEventsRequest model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyEventsRequest
+ */
+
+/**
+ * Constructs a new SearchLoyaltyEventsRequest
.
+ * A request to search for loyalty events.
+ * @alias module:model/SearchLoyaltyEventsRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyEventsRequest
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/SearchLoyaltyEventsRequest} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyEventsRequest} The populated SearchLoyaltyEventsRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('query')) {
+ obj['query'] = LoyaltyEventQuery.constructFromObject(data['query']);
+ }
+ if (data.hasOwnProperty('limit')) {
+ obj['limit'] = ApiClient.convertToType(data['limit'], 'Number');
+ }
+ if (data.hasOwnProperty('cursor')) {
+ obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * A set of one or more predefined query filters to apply when searching for loyalty events. The endpoint performs a logical AND to evaluate multiple filters and performs a logical OR on arrays that specifies multiple field values.
+ * @member {module:model/LoyaltyEventQuery} query
+ */
+exports.prototype['query'] = undefined;
+/**
+ * The maximum number of results to include in the response. The last page might contain fewer events. The default is 30 events.
+ * @member {Number} limit
+ */
+exports.prototype['limit'] = undefined;
+/**
+ * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyEventsResponse.js b/src/model/SearchLoyaltyEventsResponse.js
new file mode 100644
index 0000000..9087af4
--- /dev/null
+++ b/src/model/SearchLoyaltyEventsResponse.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 LoyaltyEvent = require('./LoyaltyEvent');
+
+
+
+
+/**
+ * The SearchLoyaltyEventsResponse model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyEventsResponse
+ */
+
+/**
+ * Constructs a new SearchLoyaltyEventsResponse
.
+ * A response that contains loyalty events that satisfy the search criteria, in order by the `created_at` date.
+ * @alias module:model/SearchLoyaltyEventsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyEventsResponse
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/SearchLoyaltyEventsResponse} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyEventsResponse} The populated SearchLoyaltyEventsResponse
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('events')) {
+ obj['events'] = ApiClient.convertToType(data['events'], [LoyaltyEvent]);
+ }
+ 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 loyalty events that satisfy the search criteria.
+ * @member {Array.} events
+ */
+exports.prototype['events'] = undefined;
+/**
+ * The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyRewardsRequest.js b/src/model/SearchLoyaltyRewardsRequest.js
new file mode 100644
index 0000000..952917e
--- /dev/null
+++ b/src/model/SearchLoyaltyRewardsRequest.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 SearchLoyaltyRewardsRequestLoyaltyRewardQuery = require('./SearchLoyaltyRewardsRequestLoyaltyRewardQuery');
+
+
+
+
+/**
+ * The SearchLoyaltyRewardsRequest model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyRewardsRequest
+ */
+
+/**
+ * Constructs a new SearchLoyaltyRewardsRequest
.
+ * A request to search for loyalty rewards.
+ * @alias module:model/SearchLoyaltyRewardsRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyRewardsRequest
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/SearchLoyaltyRewardsRequest} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyRewardsRequest} The populated SearchLoyaltyRewardsRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('query')) {
+ obj['query'] = SearchLoyaltyRewardsRequestLoyaltyRewardQuery.constructFromObject(data['query']);
+ }
+ if (data.hasOwnProperty('limit')) {
+ obj['limit'] = ApiClient.convertToType(data['limit'], 'Number');
+ }
+ if (data.hasOwnProperty('cursor')) {
+ obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The search criteria for the request. If empty, the endpoint retrieves all loyalty rewards in the loyalty program.
+ * @member {module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery} query
+ */
+exports.prototype['query'] = undefined;
+/**
+ * The maximum number of results to return in the response.
+ * @member {Number} limit
+ */
+exports.prototype['limit'] = 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. For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.js b/src/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.js
new file mode 100644
index 0000000..86a44ed
--- /dev/null
+++ b/src/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.js
@@ -0,0 +1,76 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The SearchLoyaltyRewardsRequestLoyaltyRewardQuery model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery
+ */
+
+/**
+ * Constructs a new SearchLoyaltyRewardsRequestLoyaltyRewardQuery
.
+ * The set of search requirements.
+ * @alias module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery
+ * @class
+ * @param loyaltyAccountId {String} The ID of the `loyalty account` to which the loyalty reward belongs.
+ */
+var exports = function(loyaltyAccountId) {
+ var _this = this;
+
+ _this['loyalty_account_id'] = loyaltyAccountId;
+
+};
+
+/**
+ * Constructs a SearchLoyaltyRewardsRequestLoyaltyRewardQuery
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/SearchLoyaltyRewardsRequestLoyaltyRewardQuery} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery} The populated SearchLoyaltyRewardsRequestLoyaltyRewardQuery
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('loyalty_account_id')) {
+ obj['loyalty_account_id'] = ApiClient.convertToType(data['loyalty_account_id'], 'String');
+ }
+ if (data.hasOwnProperty('status')) {
+ obj['status'] = ApiClient.convertToType(data['status'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The ID of the `loyalty account` to which the loyalty reward belongs.
+ * @member {String} loyalty_account_id
+ */
+exports.prototype['loyalty_account_id'] = undefined;
+/**
+ * The status of the loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
+ * @member {String} status
+ */
+exports.prototype['status'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchLoyaltyRewardsResponse.js b/src/model/SearchLoyaltyRewardsResponse.js
new file mode 100644
index 0000000..8b6bf32
--- /dev/null
+++ b/src/model/SearchLoyaltyRewardsResponse.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 LoyaltyReward = require('./LoyaltyReward');
+
+
+
+
+/**
+ * The SearchLoyaltyRewardsResponse model module.
+ * Note: This model is in beta.
+ * @module model/SearchLoyaltyRewardsResponse
+ */
+
+/**
+ * Constructs a new SearchLoyaltyRewardsResponse
.
+ * A response that includes the loyalty rewards satisfying the search criteria.
+ * @alias module:model/SearchLoyaltyRewardsResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchLoyaltyRewardsResponse
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/SearchLoyaltyRewardsResponse} obj Optional instance to populate.
+ * @return {module:model/SearchLoyaltyRewardsResponse} The populated SearchLoyaltyRewardsResponse
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('rewards')) {
+ obj['rewards'] = ApiClient.convertToType(data['rewards'], [LoyaltyReward]);
+ }
+ 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 loyalty rewards that satisfy the search criteria. These are returned in descending order by `updated_at`.
+ * @member {Array.} rewards
+ */
+exports.prototype['rewards'] = undefined;
+/**
+ * The pagination cursor to be used in a subsequent request. If empty, this is the final response.
+ * @member {String} cursor
+ */
+exports.prototype['cursor'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersFulfillmentFilter.js b/src/model/SearchOrdersFulfillmentFilter.js
index 726aea1..9e80507 100644
--- a/src/model/SearchOrdersFulfillmentFilter.js
+++ b/src/model/SearchOrdersFulfillmentFilter.js
@@ -26,12 +26,11 @@ var ApiClient = require('../ApiClient');
* Filter based on [Order Fulfillment](#type-orderfulfillment) information.
* @alias module:model/SearchOrdersFulfillmentFilter
* @class
- * @param fulfillmentTypes {Array.} List of `fulfillment types` to filter for. Will return orders if any of its fulfillments match any of the fulfillment types listed in this field. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
*/
-var exports = function(fulfillmentTypes) {
+var exports = function() {
var _this = this;
- _this['fulfillment_types'] = fulfillmentTypes;
+
};
diff --git a/test/api/LoyaltyApi.spec.js b/test/api/LoyaltyApi.spec.js
new file mode 100644
index 0000000..2df425a
--- /dev/null
+++ b/test/api/LoyaltyApi.spec.js
@@ -0,0 +1,166 @@
+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('LoyaltyApi', 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.LoyaltyApi();
+ });
+
+ afterEach(function(){
+ });
+
+ describe('LoyaltyApi', function() {
+ describe('accumulateLoyaltyPoints', function() {
+ it('should call accumulateLoyaltyPoints successfully', function(done) {
+ //uncomment below and update the code to test accumulateLoyaltyPoints
+ //instance.accumulateLoyaltyPoints(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('adjustLoyaltyPoints', function() {
+ it('should call adjustLoyaltyPoints successfully', function(done) {
+ //uncomment below and update the code to test adjustLoyaltyPoints
+ //instance.adjustLoyaltyPoints(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('calculateLoyaltyPoints', function() {
+ it('should call calculateLoyaltyPoints successfully', function(done) {
+ //uncomment below and update the code to test calculateLoyaltyPoints
+ //instance.calculateLoyaltyPoints(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('createLoyaltyAccount', function() {
+ it('should call createLoyaltyAccount successfully', function(done) {
+ //uncomment below and update the code to test createLoyaltyAccount
+ //instance.createLoyaltyAccount(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('createLoyaltyReward', function() {
+ it('should call createLoyaltyReward successfully', function(done) {
+ //uncomment below and update the code to test createLoyaltyReward
+ //instance.createLoyaltyReward(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('deleteLoyaltyReward', function() {
+ it('should call deleteLoyaltyReward successfully', function(done) {
+ //uncomment below and update the code to test deleteLoyaltyReward
+ //instance.deleteLoyaltyReward(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('listLoyaltyPrograms', function() {
+ it('should call listLoyaltyPrograms successfully', function(done) {
+ //uncomment below and update the code to test listLoyaltyPrograms
+ //instance.listLoyaltyPrograms(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('redeemLoyaltyReward', function() {
+ it('should call redeemLoyaltyReward successfully', function(done) {
+ //uncomment below and update the code to test redeemLoyaltyReward
+ //instance.redeemLoyaltyReward(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('retrieveLoyaltyAccount', function() {
+ it('should call retrieveLoyaltyAccount successfully', function(done) {
+ //uncomment below and update the code to test retrieveLoyaltyAccount
+ //instance.retrieveLoyaltyAccount(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('retrieveLoyaltyReward', function() {
+ it('should call retrieveLoyaltyReward successfully', function(done) {
+ //uncomment below and update the code to test retrieveLoyaltyReward
+ //instance.retrieveLoyaltyReward(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('searchLoyaltyAccounts', function() {
+ it('should call searchLoyaltyAccounts successfully', function(done) {
+ //uncomment below and update the code to test searchLoyaltyAccounts
+ //instance.searchLoyaltyAccounts(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('searchLoyaltyEvents', function() {
+ it('should call searchLoyaltyEvents successfully', function(done) {
+ //uncomment below and update the code to test searchLoyaltyEvents
+ //instance.searchLoyaltyEvents(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ describe('searchLoyaltyRewards', function() {
+ it('should call searchLoyaltyRewards successfully', function(done) {
+ //uncomment below and update the code to test searchLoyaltyRewards
+ //instance.searchLoyaltyRewards(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ });
+});
diff --git a/test/model/AccumulateLoyaltyPointsRequest.spec.js b/test/model/AccumulateLoyaltyPointsRequest.spec.js
new file mode 100644
index 0000000..05c6ed2
--- /dev/null
+++ b/test/model/AccumulateLoyaltyPointsRequest.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('AccumulateLoyaltyPointsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.AccumulateLoyaltyPointsRequest();
+ });
+
+ it('should create an instance of AccumulateLoyaltyPointsRequest', function() {
+ // uncomment below and update the code to test AccumulateLoyaltyPointsRequest
+ //var instane = new SquareConnect.AccumulateLoyaltyPointsRequest();
+ //expect(instance).to.be.a(SquareConnect.AccumulateLoyaltyPointsRequest);
+ });
+
+ it('should have the property accumulatePoints (base name: "accumulate_points")', function() {
+ // uncomment below and update the code to test the property accumulatePoints
+ //var instane = new SquareConnect.AccumulateLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property idempotencyKey (base name: "idempotency_key")', function() {
+ // uncomment below and update the code to test the property idempotencyKey
+ //var instane = new SquareConnect.AccumulateLoyaltyPointsRequest();
+ //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.AccumulateLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/AccumulateLoyaltyPointsResponse.spec.js b/test/model/AccumulateLoyaltyPointsResponse.spec.js
new file mode 100644
index 0000000..ebfaf04
--- /dev/null
+++ b/test/model/AccumulateLoyaltyPointsResponse.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('AccumulateLoyaltyPointsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.AccumulateLoyaltyPointsResponse();
+ });
+
+ it('should create an instance of AccumulateLoyaltyPointsResponse', function() {
+ // uncomment below and update the code to test AccumulateLoyaltyPointsResponse
+ //var instane = new SquareConnect.AccumulateLoyaltyPointsResponse();
+ //expect(instance).to.be.a(SquareConnect.AccumulateLoyaltyPointsResponse);
+ });
+
+ 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.AccumulateLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property event (base name: "event")', function() {
+ // uncomment below and update the code to test the property event
+ //var instane = new SquareConnect.AccumulateLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/AdjustLoyaltyPointsRequest.spec.js b/test/model/AdjustLoyaltyPointsRequest.spec.js
new file mode 100644
index 0000000..fb6b6e1
--- /dev/null
+++ b/test/model/AdjustLoyaltyPointsRequest.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('AdjustLoyaltyPointsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.AdjustLoyaltyPointsRequest();
+ });
+
+ it('should create an instance of AdjustLoyaltyPointsRequest', function() {
+ // uncomment below and update the code to test AdjustLoyaltyPointsRequest
+ //var instane = new SquareConnect.AdjustLoyaltyPointsRequest();
+ //expect(instance).to.be.a(SquareConnect.AdjustLoyaltyPointsRequest);
+ });
+
+ 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.AdjustLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property adjustPoints (base name: "adjust_points")', function() {
+ // uncomment below and update the code to test the property adjustPoints
+ //var instane = new SquareConnect.AdjustLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/AdjustLoyaltyPointsResponse.spec.js b/test/model/AdjustLoyaltyPointsResponse.spec.js
new file mode 100644
index 0000000..fa82566
--- /dev/null
+++ b/test/model/AdjustLoyaltyPointsResponse.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('AdjustLoyaltyPointsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.AdjustLoyaltyPointsResponse();
+ });
+
+ it('should create an instance of AdjustLoyaltyPointsResponse', function() {
+ // uncomment below and update the code to test AdjustLoyaltyPointsResponse
+ //var instane = new SquareConnect.AdjustLoyaltyPointsResponse();
+ //expect(instance).to.be.a(SquareConnect.AdjustLoyaltyPointsResponse);
+ });
+
+ 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.AdjustLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property event (base name: "event")', function() {
+ // uncomment below and update the code to test the property event
+ //var instane = new SquareConnect.AdjustLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CalculateLoyaltyPointsRequest.spec.js b/test/model/CalculateLoyaltyPointsRequest.spec.js
new file mode 100644
index 0000000..a8743cf
--- /dev/null
+++ b/test/model/CalculateLoyaltyPointsRequest.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('CalculateLoyaltyPointsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CalculateLoyaltyPointsRequest();
+ });
+
+ it('should create an instance of CalculateLoyaltyPointsRequest', function() {
+ // uncomment below and update the code to test CalculateLoyaltyPointsRequest
+ //var instane = new SquareConnect.CalculateLoyaltyPointsRequest();
+ //expect(instance).to.be.a(SquareConnect.CalculateLoyaltyPointsRequest);
+ });
+
+ 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.CalculateLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property transactionAmountMoney (base name: "transaction_amount_money")', function() {
+ // uncomment below and update the code to test the property transactionAmountMoney
+ //var instane = new SquareConnect.CalculateLoyaltyPointsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CalculateLoyaltyPointsResponse.spec.js b/test/model/CalculateLoyaltyPointsResponse.spec.js
new file mode 100644
index 0000000..b33b71c
--- /dev/null
+++ b/test/model/CalculateLoyaltyPointsResponse.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('CalculateLoyaltyPointsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CalculateLoyaltyPointsResponse();
+ });
+
+ it('should create an instance of CalculateLoyaltyPointsResponse', function() {
+ // uncomment below and update the code to test CalculateLoyaltyPointsResponse
+ //var instane = new SquareConnect.CalculateLoyaltyPointsResponse();
+ //expect(instance).to.be.a(SquareConnect.CalculateLoyaltyPointsResponse);
+ });
+
+ 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.CalculateLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.CalculateLoyaltyPointsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CalculateOrderRequest.spec.js b/test/model/CalculateOrderRequest.spec.js
new file mode 100644
index 0000000..bba8578
--- /dev/null
+++ b/test/model/CalculateOrderRequest.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('CalculateOrderRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CalculateOrderRequest();
+ });
+
+ it('should create an instance of CalculateOrderRequest', function() {
+ // uncomment below and update the code to test CalculateOrderRequest
+ //var instane = new SquareConnect.CalculateOrderRequest();
+ //expect(instance).to.be.a(SquareConnect.CalculateOrderRequest);
+ });
+
+ it('should have the property order (base name: "order")', function() {
+ // uncomment below and update the code to test the property order
+ //var instane = new SquareConnect.CalculateOrderRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property proposedRewards (base name: "proposed_rewards")', function() {
+ // uncomment below and update the code to test the property proposedRewards
+ //var instane = new SquareConnect.CalculateOrderRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CalculateOrderResponse.spec.js b/test/model/CalculateOrderResponse.spec.js
new file mode 100644
index 0000000..eef8d55
--- /dev/null
+++ b/test/model/CalculateOrderResponse.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('CalculateOrderResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CalculateOrderResponse();
+ });
+
+ it('should create an instance of CalculateOrderResponse', function() {
+ // uncomment below and update the code to test CalculateOrderResponse
+ //var instane = new SquareConnect.CalculateOrderResponse();
+ //expect(instance).to.be.a(SquareConnect.CalculateOrderResponse);
+ });
+
+ it('should have the property order (base name: "order")', function() {
+ // uncomment below and update the code to test the property order
+ //var instane = new SquareConnect.CalculateOrderResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property errors (base name: "errors")', function() {
+ // uncomment below and update the code to test the property errors
+ //var instane = new SquareConnect.CalculateOrderResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CatalogCustomAttributeDefinitionNumberConfig.spec.js b/test/model/CatalogCustomAttributeDefinitionNumberConfig.spec.js
new file mode 100644
index 0000000..21e3f5c
--- /dev/null
+++ b/test/model/CatalogCustomAttributeDefinitionNumberConfig.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('CatalogCustomAttributeDefinitionNumberConfig', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CatalogCustomAttributeDefinitionNumberConfig();
+ });
+
+ it('should create an instance of CatalogCustomAttributeDefinitionNumberConfig', function() {
+ // uncomment below and update the code to test CatalogCustomAttributeDefinitionNumberConfig
+ //var instane = new SquareConnect.CatalogCustomAttributeDefinitionNumberConfig();
+ //expect(instance).to.be.a(SquareConnect.CatalogCustomAttributeDefinitionNumberConfig);
+ });
+
+ it('should have the property precision (base name: "precision")', function() {
+ // uncomment below and update the code to test the property precision
+ //var instane = new SquareConnect.CatalogCustomAttributeDefinitionNumberConfig();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CreateLoyaltyAccountRequest.spec.js b/test/model/CreateLoyaltyAccountRequest.spec.js
new file mode 100644
index 0000000..002beeb
--- /dev/null
+++ b/test/model/CreateLoyaltyAccountRequest.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('CreateLoyaltyAccountRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CreateLoyaltyAccountRequest();
+ });
+
+ it('should create an instance of CreateLoyaltyAccountRequest', function() {
+ // uncomment below and update the code to test CreateLoyaltyAccountRequest
+ //var instane = new SquareConnect.CreateLoyaltyAccountRequest();
+ //expect(instance).to.be.a(SquareConnect.CreateLoyaltyAccountRequest);
+ });
+
+ it('should have the property loyaltyAccount (base name: "loyalty_account")', function() {
+ // uncomment below and update the code to test the property loyaltyAccount
+ //var instane = new SquareConnect.CreateLoyaltyAccountRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property idempotencyKey (base name: "idempotency_key")', function() {
+ // uncomment below and update the code to test the property idempotencyKey
+ //var instane = new SquareConnect.CreateLoyaltyAccountRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CreateLoyaltyAccountResponse.spec.js b/test/model/CreateLoyaltyAccountResponse.spec.js
new file mode 100644
index 0000000..7ce2bce
--- /dev/null
+++ b/test/model/CreateLoyaltyAccountResponse.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('CreateLoyaltyAccountResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CreateLoyaltyAccountResponse();
+ });
+
+ it('should create an instance of CreateLoyaltyAccountResponse', function() {
+ // uncomment below and update the code to test CreateLoyaltyAccountResponse
+ //var instane = new SquareConnect.CreateLoyaltyAccountResponse();
+ //expect(instance).to.be.a(SquareConnect.CreateLoyaltyAccountResponse);
+ });
+
+ 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.CreateLoyaltyAccountResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property loyaltyAccount (base name: "loyalty_account")', function() {
+ // uncomment below and update the code to test the property loyaltyAccount
+ //var instane = new SquareConnect.CreateLoyaltyAccountResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CreateLoyaltyRewardRequest.spec.js b/test/model/CreateLoyaltyRewardRequest.spec.js
new file mode 100644
index 0000000..b72f0a0
--- /dev/null
+++ b/test/model/CreateLoyaltyRewardRequest.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('CreateLoyaltyRewardRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CreateLoyaltyRewardRequest();
+ });
+
+ it('should create an instance of CreateLoyaltyRewardRequest', function() {
+ // uncomment below and update the code to test CreateLoyaltyRewardRequest
+ //var instane = new SquareConnect.CreateLoyaltyRewardRequest();
+ //expect(instance).to.be.a(SquareConnect.CreateLoyaltyRewardRequest);
+ });
+
+ it('should have the property reward (base name: "reward")', function() {
+ // uncomment below and update the code to test the property reward
+ //var instane = new SquareConnect.CreateLoyaltyRewardRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property idempotencyKey (base name: "idempotency_key")', function() {
+ // uncomment below and update the code to test the property idempotencyKey
+ //var instane = new SquareConnect.CreateLoyaltyRewardRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CreateLoyaltyRewardResponse.spec.js b/test/model/CreateLoyaltyRewardResponse.spec.js
new file mode 100644
index 0000000..549ccec
--- /dev/null
+++ b/test/model/CreateLoyaltyRewardResponse.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('CreateLoyaltyRewardResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CreateLoyaltyRewardResponse();
+ });
+
+ it('should create an instance of CreateLoyaltyRewardResponse', function() {
+ // uncomment below and update the code to test CreateLoyaltyRewardResponse
+ //var instane = new SquareConnect.CreateLoyaltyRewardResponse();
+ //expect(instance).to.be.a(SquareConnect.CreateLoyaltyRewardResponse);
+ });
+
+ 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.CreateLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property reward (base name: "reward")', function() {
+ // uncomment below and update the code to test the property reward
+ //var instane = new SquareConnect.CreateLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/CustomerTextFilter.spec.js b/test/model/CustomerTextFilter.spec.js
new file mode 100644
index 0000000..61ec4d8
--- /dev/null
+++ b/test/model/CustomerTextFilter.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('CustomerTextFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.CustomerTextFilter();
+ });
+
+ it('should create an instance of CustomerTextFilter', function() {
+ // uncomment below and update the code to test CustomerTextFilter
+ //var instane = new SquareConnect.CustomerTextFilter();
+ //expect(instance).to.be.a(SquareConnect.CustomerTextFilter);
+ });
+
+ it('should have the property exact (base name: "exact")', function() {
+ // uncomment below and update the code to test the property exact
+ //var instane = new SquareConnect.CustomerTextFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property fuzzy (base name: "fuzzy")', function() {
+ // uncomment below and update the code to test the property fuzzy
+ //var instane = new SquareConnect.CustomerTextFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/DeleteLoyaltyRewardRequest.spec.js b/test/model/DeleteLoyaltyRewardRequest.spec.js
new file mode 100644
index 0000000..c5c7378
--- /dev/null
+++ b/test/model/DeleteLoyaltyRewardRequest.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('DeleteLoyaltyRewardRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.DeleteLoyaltyRewardRequest();
+ });
+
+ it('should create an instance of DeleteLoyaltyRewardRequest', function() {
+ // uncomment below and update the code to test DeleteLoyaltyRewardRequest
+ //var instane = new SquareConnect.DeleteLoyaltyRewardRequest();
+ //expect(instance).to.be.a(SquareConnect.DeleteLoyaltyRewardRequest);
+ });
+
+});
diff --git a/test/model/DeleteLoyaltyRewardResponse.spec.js b/test/model/DeleteLoyaltyRewardResponse.spec.js
new file mode 100644
index 0000000..989c3bd
--- /dev/null
+++ b/test/model/DeleteLoyaltyRewardResponse.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('DeleteLoyaltyRewardResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.DeleteLoyaltyRewardResponse();
+ });
+
+ it('should create an instance of DeleteLoyaltyRewardResponse', function() {
+ // uncomment below and update the code to test DeleteLoyaltyRewardResponse
+ //var instane = new SquareConnect.DeleteLoyaltyRewardResponse();
+ //expect(instance).to.be.a(SquareConnect.DeleteLoyaltyRewardResponse);
+ });
+
+ 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.DeleteLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/ListLoyaltyProgramsRequest.spec.js b/test/model/ListLoyaltyProgramsRequest.spec.js
new file mode 100644
index 0000000..cc5434f
--- /dev/null
+++ b/test/model/ListLoyaltyProgramsRequest.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('ListLoyaltyProgramsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.ListLoyaltyProgramsRequest();
+ });
+
+ it('should create an instance of ListLoyaltyProgramsRequest', function() {
+ // uncomment below and update the code to test ListLoyaltyProgramsRequest
+ //var instane = new SquareConnect.ListLoyaltyProgramsRequest();
+ //expect(instance).to.be.a(SquareConnect.ListLoyaltyProgramsRequest);
+ });
+
+});
diff --git a/test/model/ListLoyaltyProgramsResponse.spec.js b/test/model/ListLoyaltyProgramsResponse.spec.js
new file mode 100644
index 0000000..a1ea580
--- /dev/null
+++ b/test/model/ListLoyaltyProgramsResponse.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('ListLoyaltyProgramsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.ListLoyaltyProgramsResponse();
+ });
+
+ it('should create an instance of ListLoyaltyProgramsResponse', function() {
+ // uncomment below and update the code to test ListLoyaltyProgramsResponse
+ //var instane = new SquareConnect.ListLoyaltyProgramsResponse();
+ //expect(instance).to.be.a(SquareConnect.ListLoyaltyProgramsResponse);
+ });
+
+ 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.ListLoyaltyProgramsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property programs (base name: "programs")', function() {
+ // uncomment below and update the code to test the property programs
+ //var instane = new SquareConnect.ListLoyaltyProgramsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyAccount.spec.js b/test/model/LoyaltyAccount.spec.js
new file mode 100644
index 0000000..23deff8
--- /dev/null
+++ b/test/model/LoyaltyAccount.spec.js
@@ -0,0 +1,72 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('LoyaltyAccount', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyAccount();
+ });
+
+ it('should create an instance of LoyaltyAccount', function() {
+ // uncomment below and update the code to test LoyaltyAccount
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyAccount);
+ });
+
+ 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.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property mappings (base name: "mappings")', function() {
+ // uncomment below and update the code to test the property mappings
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property programId (base name: "program_id")', function() {
+ // uncomment below and update the code to test the property programId
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property balance (base name: "balance")', function() {
+ // uncomment below and update the code to test the property balance
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property lifetimePoints (base name: "lifetime_points")', function() {
+ // uncomment below and update the code to test the property lifetimePoints
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property customerId (base name: "customer_id")', function() {
+ // uncomment below and update the code to test the property customerId
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+ it('should have the property enrolledAt (base name: "enrolled_at")', function() {
+ // uncomment below and update the code to test the property enrolledAt
+ //var instane = new SquareConnect.LoyaltyAccount();
+ //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.LoyaltyAccount();
+ //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.LoyaltyAccount();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyAccountMapping.spec.js b/test/model/LoyaltyAccountMapping.spec.js
new file mode 100644
index 0000000..dd36729
--- /dev/null
+++ b/test/model/LoyaltyAccountMapping.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('LoyaltyAccountMapping', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyAccountMapping();
+ });
+
+ it('should create an instance of LoyaltyAccountMapping', function() {
+ // uncomment below and update the code to test LoyaltyAccountMapping
+ //var instane = new SquareConnect.LoyaltyAccountMapping();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyAccountMapping);
+ });
+
+ 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.LoyaltyAccountMapping();
+ //expect(instance).to.be();
+ });
+ 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.LoyaltyAccountMapping();
+ //expect(instance).to.be();
+ });
+ it('should have the property value (base name: "value")', function() {
+ // uncomment below and update the code to test the property value
+ //var instane = new SquareConnect.LoyaltyAccountMapping();
+ //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.LoyaltyAccountMapping();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyAccountMappingType.spec.js b/test/model/LoyaltyAccountMappingType.spec.js
new file mode 100644
index 0000000..e1bdf63
--- /dev/null
+++ b/test/model/LoyaltyAccountMappingType.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('LoyaltyAccountMappingType', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyAccountMappingType', function() {
+ // uncomment below and update the code to test LoyaltyAccountMappingType
+ //var instane = new SquareConnect.LoyaltyAccountMappingType();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyAccountMappingType);
+ });
+
+});
diff --git a/test/model/LoyaltyEvent.spec.js b/test/model/LoyaltyEvent.spec.js
new file mode 100644
index 0000000..a267ffa
--- /dev/null
+++ b/test/model/LoyaltyEvent.spec.js
@@ -0,0 +1,92 @@
+/**
+ * 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('LoyaltyEvent', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEvent();
+ });
+
+ it('should create an instance of LoyaltyEvent', function() {
+ // uncomment below and update the code to test LoyaltyEvent
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEvent);
+ });
+
+ 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.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ 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.LoyaltyEvent();
+ //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.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property accumulatePoints (base name: "accumulate_points")', function() {
+ // uncomment below and update the code to test the property accumulatePoints
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property createReward (base name: "create_reward")', function() {
+ // uncomment below and update the code to test the property createReward
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property redeemReward (base name: "redeem_reward")', function() {
+ // uncomment below and update the code to test the property redeemReward
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property deleteReward (base name: "delete_reward")', function() {
+ // uncomment below and update the code to test the property deleteReward
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property adjustPoints (base name: "adjust_points")', function() {
+ // uncomment below and update the code to test the property adjustPoints
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property loyaltyAccountId (base name: "loyalty_account_id")', function() {
+ // uncomment below and update the code to test the property loyaltyAccountId
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //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.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property source (base name: "source")', function() {
+ // uncomment below and update the code to test the property source
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property expirePoints (base name: "expire_points")', function() {
+ // uncomment below and update the code to test the property expirePoints
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+ it('should have the property otherEvent (base name: "other_event")', function() {
+ // uncomment below and update the code to test the property otherEvent
+ //var instane = new SquareConnect.LoyaltyEvent();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventAccumulatePoints.spec.js b/test/model/LoyaltyEventAccumulatePoints.spec.js
new file mode 100644
index 0000000..65883eb
--- /dev/null
+++ b/test/model/LoyaltyEventAccumulatePoints.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('LoyaltyEventAccumulatePoints', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventAccumulatePoints();
+ });
+
+ it('should create an instance of LoyaltyEventAccumulatePoints', function() {
+ // uncomment below and update the code to test LoyaltyEventAccumulatePoints
+ //var instane = new SquareConnect.LoyaltyEventAccumulatePoints();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventAccumulatePoints);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventAccumulatePoints();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventAccumulatePoints();
+ //expect(instance).to.be();
+ });
+ it('should have the property orderId (base name: "order_id")', function() {
+ // uncomment below and update the code to test the property orderId
+ //var instane = new SquareConnect.LoyaltyEventAccumulatePoints();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventAdjustPoints.spec.js b/test/model/LoyaltyEventAdjustPoints.spec.js
new file mode 100644
index 0000000..5a0c672
--- /dev/null
+++ b/test/model/LoyaltyEventAdjustPoints.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('LoyaltyEventAdjustPoints', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventAdjustPoints();
+ });
+
+ it('should create an instance of LoyaltyEventAdjustPoints', function() {
+ // uncomment below and update the code to test LoyaltyEventAdjustPoints
+ //var instane = new SquareConnect.LoyaltyEventAdjustPoints();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventAdjustPoints);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventAdjustPoints();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventAdjustPoints();
+ //expect(instance).to.be();
+ });
+ it('should have the property reason (base name: "reason")', function() {
+ // uncomment below and update the code to test the property reason
+ //var instane = new SquareConnect.LoyaltyEventAdjustPoints();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventCreateReward.spec.js b/test/model/LoyaltyEventCreateReward.spec.js
new file mode 100644
index 0000000..382a9c0
--- /dev/null
+++ b/test/model/LoyaltyEventCreateReward.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('LoyaltyEventCreateReward', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventCreateReward();
+ });
+
+ it('should create an instance of LoyaltyEventCreateReward', function() {
+ // uncomment below and update the code to test LoyaltyEventCreateReward
+ //var instane = new SquareConnect.LoyaltyEventCreateReward();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventCreateReward);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventCreateReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardId (base name: "reward_id")', function() {
+ // uncomment below and update the code to test the property rewardId
+ //var instane = new SquareConnect.LoyaltyEventCreateReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventCreateReward();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventDateTimeFilter.spec.js b/test/model/LoyaltyEventDateTimeFilter.spec.js
new file mode 100644
index 0000000..cf2c25e
--- /dev/null
+++ b/test/model/LoyaltyEventDateTimeFilter.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('LoyaltyEventDateTimeFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventDateTimeFilter();
+ });
+
+ it('should create an instance of LoyaltyEventDateTimeFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventDateTimeFilter
+ //var instane = new SquareConnect.LoyaltyEventDateTimeFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventDateTimeFilter);
+ });
+
+ 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.LoyaltyEventDateTimeFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventDeleteReward.spec.js b/test/model/LoyaltyEventDeleteReward.spec.js
new file mode 100644
index 0000000..673e7ac
--- /dev/null
+++ b/test/model/LoyaltyEventDeleteReward.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('LoyaltyEventDeleteReward', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventDeleteReward();
+ });
+
+ it('should create an instance of LoyaltyEventDeleteReward', function() {
+ // uncomment below and update the code to test LoyaltyEventDeleteReward
+ //var instane = new SquareConnect.LoyaltyEventDeleteReward();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventDeleteReward);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventDeleteReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardId (base name: "reward_id")', function() {
+ // uncomment below and update the code to test the property rewardId
+ //var instane = new SquareConnect.LoyaltyEventDeleteReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventDeleteReward();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventExpirePoints.spec.js b/test/model/LoyaltyEventExpirePoints.spec.js
new file mode 100644
index 0000000..3ad6a5c
--- /dev/null
+++ b/test/model/LoyaltyEventExpirePoints.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('LoyaltyEventExpirePoints', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventExpirePoints();
+ });
+
+ it('should create an instance of LoyaltyEventExpirePoints', function() {
+ // uncomment below and update the code to test LoyaltyEventExpirePoints
+ //var instane = new SquareConnect.LoyaltyEventExpirePoints();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventExpirePoints);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventExpirePoints();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventExpirePoints();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventFilter.spec.js b/test/model/LoyaltyEventFilter.spec.js
new file mode 100644
index 0000000..9517ef5
--- /dev/null
+++ b/test/model/LoyaltyEventFilter.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('LoyaltyEventFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventFilter();
+ });
+
+ it('should create an instance of LoyaltyEventFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventFilter);
+ });
+
+ it('should have the property loyaltyAccountFilter (base name: "loyalty_account_filter")', function() {
+ // uncomment below and update the code to test the property loyaltyAccountFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property typeFilter (base name: "type_filter")', function() {
+ // uncomment below and update the code to test the property typeFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property dateTimeFilter (base name: "date_time_filter")', function() {
+ // uncomment below and update the code to test the property dateTimeFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property locationFilter (base name: "location_filter")', function() {
+ // uncomment below and update the code to test the property locationFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property orderFilter (base name: "order_filter")', function() {
+ // uncomment below and update the code to test the property orderFilter
+ //var instane = new SquareConnect.LoyaltyEventFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventLocationFilter.spec.js b/test/model/LoyaltyEventLocationFilter.spec.js
new file mode 100644
index 0000000..cfdd7af
--- /dev/null
+++ b/test/model/LoyaltyEventLocationFilter.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('LoyaltyEventLocationFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventLocationFilter();
+ });
+
+ it('should create an instance of LoyaltyEventLocationFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventLocationFilter
+ //var instane = new SquareConnect.LoyaltyEventLocationFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventLocationFilter);
+ });
+
+ it('should have the property locationIds (base name: "location_ids")', function() {
+ // uncomment below and update the code to test the property locationIds
+ //var instane = new SquareConnect.LoyaltyEventLocationFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventLoyaltyAccountFilter.spec.js b/test/model/LoyaltyEventLoyaltyAccountFilter.spec.js
new file mode 100644
index 0000000..ab08503
--- /dev/null
+++ b/test/model/LoyaltyEventLoyaltyAccountFilter.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('LoyaltyEventLoyaltyAccountFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventLoyaltyAccountFilter();
+ });
+
+ it('should create an instance of LoyaltyEventLoyaltyAccountFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventLoyaltyAccountFilter
+ //var instane = new SquareConnect.LoyaltyEventLoyaltyAccountFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventLoyaltyAccountFilter);
+ });
+
+ it('should have the property loyaltyAccountId (base name: "loyalty_account_id")', function() {
+ // uncomment below and update the code to test the property loyaltyAccountId
+ //var instane = new SquareConnect.LoyaltyEventLoyaltyAccountFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventOrderFilter.spec.js b/test/model/LoyaltyEventOrderFilter.spec.js
new file mode 100644
index 0000000..6d072bf
--- /dev/null
+++ b/test/model/LoyaltyEventOrderFilter.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('LoyaltyEventOrderFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventOrderFilter();
+ });
+
+ it('should create an instance of LoyaltyEventOrderFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventOrderFilter
+ //var instane = new SquareConnect.LoyaltyEventOrderFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventOrderFilter);
+ });
+
+ 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.LoyaltyEventOrderFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventOther.spec.js b/test/model/LoyaltyEventOther.spec.js
new file mode 100644
index 0000000..fdb5255
--- /dev/null
+++ b/test/model/LoyaltyEventOther.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('LoyaltyEventOther', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventOther();
+ });
+
+ it('should create an instance of LoyaltyEventOther', function() {
+ // uncomment below and update the code to test LoyaltyEventOther
+ //var instane = new SquareConnect.LoyaltyEventOther();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventOther);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventOther();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyEventOther();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventQuery.spec.js b/test/model/LoyaltyEventQuery.spec.js
new file mode 100644
index 0000000..1d036f2
--- /dev/null
+++ b/test/model/LoyaltyEventQuery.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('LoyaltyEventQuery', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventQuery();
+ });
+
+ it('should create an instance of LoyaltyEventQuery', function() {
+ // uncomment below and update the code to test LoyaltyEventQuery
+ //var instane = new SquareConnect.LoyaltyEventQuery();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventQuery);
+ });
+
+ 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.LoyaltyEventQuery();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventRedeemReward.spec.js b/test/model/LoyaltyEventRedeemReward.spec.js
new file mode 100644
index 0000000..0e669bc
--- /dev/null
+++ b/test/model/LoyaltyEventRedeemReward.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('LoyaltyEventRedeemReward', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventRedeemReward();
+ });
+
+ it('should create an instance of LoyaltyEventRedeemReward', function() {
+ // uncomment below and update the code to test LoyaltyEventRedeemReward
+ //var instane = new SquareConnect.LoyaltyEventRedeemReward();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventRedeemReward);
+ });
+
+ it('should have the property loyaltyProgramId (base name: "loyalty_program_id")', function() {
+ // uncomment below and update the code to test the property loyaltyProgramId
+ //var instane = new SquareConnect.LoyaltyEventRedeemReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardId (base name: "reward_id")', function() {
+ // uncomment below and update the code to test the property rewardId
+ //var instane = new SquareConnect.LoyaltyEventRedeemReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property orderId (base name: "order_id")', function() {
+ // uncomment below and update the code to test the property orderId
+ //var instane = new SquareConnect.LoyaltyEventRedeemReward();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyEventSource.spec.js b/test/model/LoyaltyEventSource.spec.js
new file mode 100644
index 0000000..13d6616
--- /dev/null
+++ b/test/model/LoyaltyEventSource.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('LoyaltyEventSource', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyEventSource', function() {
+ // uncomment below and update the code to test LoyaltyEventSource
+ //var instane = new SquareConnect.LoyaltyEventSource();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventSource);
+ });
+
+});
diff --git a/test/model/LoyaltyEventType.spec.js b/test/model/LoyaltyEventType.spec.js
new file mode 100644
index 0000000..2737792
--- /dev/null
+++ b/test/model/LoyaltyEventType.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('LoyaltyEventType', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyEventType', function() {
+ // uncomment below and update the code to test LoyaltyEventType
+ //var instane = new SquareConnect.LoyaltyEventType();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventType);
+ });
+
+});
diff --git a/test/model/LoyaltyEventTypeFilter.spec.js b/test/model/LoyaltyEventTypeFilter.spec.js
new file mode 100644
index 0000000..d0c73a9
--- /dev/null
+++ b/test/model/LoyaltyEventTypeFilter.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('LoyaltyEventTypeFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyEventTypeFilter();
+ });
+
+ it('should create an instance of LoyaltyEventTypeFilter', function() {
+ // uncomment below and update the code to test LoyaltyEventTypeFilter
+ //var instane = new SquareConnect.LoyaltyEventTypeFilter();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyEventTypeFilter);
+ });
+
+ it('should have the property types (base name: "types")', function() {
+ // uncomment below and update the code to test the property types
+ //var instane = new SquareConnect.LoyaltyEventTypeFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgram.spec.js b/test/model/LoyaltyProgram.spec.js
new file mode 100644
index 0000000..50cfdae
--- /dev/null
+++ b/test/model/LoyaltyProgram.spec.js
@@ -0,0 +1,72 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('LoyaltyProgram', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgram();
+ });
+
+ it('should create an instance of LoyaltyProgram', function() {
+ // uncomment below and update the code to test LoyaltyProgram
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgram);
+ });
+
+ 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.LoyaltyProgram();
+ //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.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardTiers (base name: "reward_tiers")', function() {
+ // uncomment below and update the code to test the property rewardTiers
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+ it('should have the property expirationPolicy (base name: "expiration_policy")', function() {
+ // uncomment below and update the code to test the property expirationPolicy
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+ it('should have the property terminology (base name: "terminology")', function() {
+ // uncomment below and update the code to test the property terminology
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+ it('should have the property locationIds (base name: "location_ids")', function() {
+ // uncomment below and update the code to test the property locationIds
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //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.LoyaltyProgram();
+ //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.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+ it('should have the property accrualRules (base name: "accrual_rules")', function() {
+ // uncomment below and update the code to test the property accrualRules
+ //var instane = new SquareConnect.LoyaltyProgram();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgramAccrualRule.spec.js b/test/model/LoyaltyProgramAccrualRule.spec.js
new file mode 100644
index 0000000..982d213
--- /dev/null
+++ b/test/model/LoyaltyProgramAccrualRule.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('LoyaltyProgramAccrualRule', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgramAccrualRule();
+ });
+
+ it('should create an instance of LoyaltyProgramAccrualRule', function() {
+ // uncomment below and update the code to test LoyaltyProgramAccrualRule
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramAccrualRule);
+ });
+
+ it('should have the property accrualType (base name: "accrual_type")', function() {
+ // uncomment below and update the code to test the property accrualType
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be();
+ });
+ it('should have the property visitMinimumAmountMoney (base name: "visit_minimum_amount_money")', function() {
+ // uncomment below and update the code to test the property visitMinimumAmountMoney
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be();
+ });
+ it('should have the property spendAmountMoney (base name: "spend_amount_money")', function() {
+ // uncomment below and update the code to test the property spendAmountMoney
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectId (base name: "catalog_object_id")', function() {
+ // uncomment below and update the code to test the property catalogObjectId
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRule();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgramAccrualRuleType.spec.js b/test/model/LoyaltyProgramAccrualRuleType.spec.js
new file mode 100644
index 0000000..4fdb7f7
--- /dev/null
+++ b/test/model/LoyaltyProgramAccrualRuleType.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('LoyaltyProgramAccrualRuleType', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyProgramAccrualRuleType', function() {
+ // uncomment below and update the code to test LoyaltyProgramAccrualRuleType
+ //var instane = new SquareConnect.LoyaltyProgramAccrualRuleType();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramAccrualRuleType);
+ });
+
+});
diff --git a/test/model/LoyaltyProgramExpirationPolicy.spec.js b/test/model/LoyaltyProgramExpirationPolicy.spec.js
new file mode 100644
index 0000000..eb09e73
--- /dev/null
+++ b/test/model/LoyaltyProgramExpirationPolicy.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('LoyaltyProgramExpirationPolicy', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgramExpirationPolicy();
+ });
+
+ it('should create an instance of LoyaltyProgramExpirationPolicy', function() {
+ // uncomment below and update the code to test LoyaltyProgramExpirationPolicy
+ //var instane = new SquareConnect.LoyaltyProgramExpirationPolicy();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramExpirationPolicy);
+ });
+
+ it('should have the property expirationDuration (base name: "expiration_duration")', function() {
+ // uncomment below and update the code to test the property expirationDuration
+ //var instane = new SquareConnect.LoyaltyProgramExpirationPolicy();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgramRewardDefinition.spec.js b/test/model/LoyaltyProgramRewardDefinition.spec.js
new file mode 100644
index 0000000..1496a8e
--- /dev/null
+++ b/test/model/LoyaltyProgramRewardDefinition.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('LoyaltyProgramRewardDefinition', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgramRewardDefinition();
+ });
+
+ it('should create an instance of LoyaltyProgramRewardDefinition', function() {
+ // uncomment below and update the code to test LoyaltyProgramRewardDefinition
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramRewardDefinition);
+ });
+
+ it('should have the property scope (base name: "scope")', function() {
+ // uncomment below and update the code to test the property scope
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+ it('should have the property discountType (base name: "discount_type")', function() {
+ // uncomment below and update the code to test the property discountType
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+ it('should have the property percentageDiscount (base name: "percentage_discount")', function() {
+ // uncomment below and update the code to test the property percentageDiscount
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectIds (base name: "catalog_object_ids")', function() {
+ // uncomment below and update the code to test the property catalogObjectIds
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+ it('should have the property fixedDiscountMoney (base name: "fixed_discount_money")', function() {
+ // uncomment below and update the code to test the property fixedDiscountMoney
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+ it('should have the property maxDiscountMoney (base name: "max_discount_money")', function() {
+ // uncomment below and update the code to test the property maxDiscountMoney
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinition();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgramRewardDefinitionScope.spec.js b/test/model/LoyaltyProgramRewardDefinitionScope.spec.js
new file mode 100644
index 0000000..14a9494
--- /dev/null
+++ b/test/model/LoyaltyProgramRewardDefinitionScope.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('LoyaltyProgramRewardDefinitionScope', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyProgramRewardDefinitionScope', function() {
+ // uncomment below and update the code to test LoyaltyProgramRewardDefinitionScope
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinitionScope();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramRewardDefinitionScope);
+ });
+
+});
diff --git a/test/model/LoyaltyProgramRewardDefinitionType.spec.js b/test/model/LoyaltyProgramRewardDefinitionType.spec.js
new file mode 100644
index 0000000..bda6357
--- /dev/null
+++ b/test/model/LoyaltyProgramRewardDefinitionType.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('LoyaltyProgramRewardDefinitionType', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyProgramRewardDefinitionType', function() {
+ // uncomment below and update the code to test LoyaltyProgramRewardDefinitionType
+ //var instane = new SquareConnect.LoyaltyProgramRewardDefinitionType();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramRewardDefinitionType);
+ });
+
+});
diff --git a/test/model/LoyaltyProgramRewardTier.spec.js b/test/model/LoyaltyProgramRewardTier.spec.js
new file mode 100644
index 0000000..809ace8
--- /dev/null
+++ b/test/model/LoyaltyProgramRewardTier.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('LoyaltyProgramRewardTier', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgramRewardTier();
+ });
+
+ it('should create an instance of LoyaltyProgramRewardTier', function() {
+ // uncomment below and update the code to test LoyaltyProgramRewardTier
+ //var instane = new SquareConnect.LoyaltyProgramRewardTier();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramRewardTier);
+ });
+
+ 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.LoyaltyProgramRewardTier();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyProgramRewardTier();
+ //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.LoyaltyProgramRewardTier();
+ //expect(instance).to.be();
+ });
+ it('should have the property definition (base name: "definition")', function() {
+ // uncomment below and update the code to test the property definition
+ //var instane = new SquareConnect.LoyaltyProgramRewardTier();
+ //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.LoyaltyProgramRewardTier();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyProgramStatus.spec.js b/test/model/LoyaltyProgramStatus.spec.js
new file mode 100644
index 0000000..4bc5e8f
--- /dev/null
+++ b/test/model/LoyaltyProgramStatus.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('LoyaltyProgramStatus', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyProgramStatus', function() {
+ // uncomment below and update the code to test LoyaltyProgramStatus
+ //var instane = new SquareConnect.LoyaltyProgramStatus();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramStatus);
+ });
+
+});
diff --git a/test/model/LoyaltyProgramTerminology.spec.js b/test/model/LoyaltyProgramTerminology.spec.js
new file mode 100644
index 0000000..67148cc
--- /dev/null
+++ b/test/model/LoyaltyProgramTerminology.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('LoyaltyProgramTerminology', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyProgramTerminology();
+ });
+
+ it('should create an instance of LoyaltyProgramTerminology', function() {
+ // uncomment below and update the code to test LoyaltyProgramTerminology
+ //var instane = new SquareConnect.LoyaltyProgramTerminology();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyProgramTerminology);
+ });
+
+ it('should have the property one (base name: "one")', function() {
+ // uncomment below and update the code to test the property one
+ //var instane = new SquareConnect.LoyaltyProgramTerminology();
+ //expect(instance).to.be();
+ });
+ it('should have the property other (base name: "other")', function() {
+ // uncomment below and update the code to test the property other
+ //var instane = new SquareConnect.LoyaltyProgramTerminology();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyReward.spec.js b/test/model/LoyaltyReward.spec.js
new file mode 100644
index 0000000..49d03f9
--- /dev/null
+++ b/test/model/LoyaltyReward.spec.js
@@ -0,0 +1,72 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('LoyaltyReward', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.LoyaltyReward();
+ });
+
+ it('should create an instance of LoyaltyReward', function() {
+ // uncomment below and update the code to test LoyaltyReward
+ //var instane = new SquareConnect.LoyaltyReward();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyReward);
+ });
+
+ 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.LoyaltyReward();
+ //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.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property loyaltyAccountId (base name: "loyalty_account_id")', function() {
+ // uncomment below and update the code to test the property loyaltyAccountId
+ //var instane = new SquareConnect.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardTierId (base name: "reward_tier_id")', function() {
+ // uncomment below and update the code to test the property rewardTierId
+ //var instane = new SquareConnect.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property points (base name: "points")', function() {
+ // uncomment below and update the code to test the property points
+ //var instane = new SquareConnect.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property orderId (base name: "order_id")', function() {
+ // uncomment below and update the code to test the property orderId
+ //var instane = new SquareConnect.LoyaltyReward();
+ //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.LoyaltyReward();
+ //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.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property redeemedAt (base name: "redeemed_at")', function() {
+ // uncomment below and update the code to test the property redeemedAt
+ //var instane = new SquareConnect.LoyaltyReward();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/LoyaltyRewardStatus.spec.js b/test/model/LoyaltyRewardStatus.spec.js
new file mode 100644
index 0000000..529d2ad
--- /dev/null
+++ b/test/model/LoyaltyRewardStatus.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('LoyaltyRewardStatus', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of LoyaltyRewardStatus', function() {
+ // uncomment below and update the code to test LoyaltyRewardStatus
+ //var instane = new SquareConnect.LoyaltyRewardStatus();
+ //expect(instance).to.be.a(SquareConnect.LoyaltyRewardStatus);
+ });
+
+});
diff --git a/test/model/OrderReward.spec.js b/test/model/OrderReward.spec.js
new file mode 100644
index 0000000..164bc92
--- /dev/null
+++ b/test/model/OrderReward.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('OrderReward', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReward();
+ });
+
+ it('should create an instance of OrderReward', function() {
+ // uncomment below and update the code to test OrderReward
+ //var instane = new SquareConnect.OrderReward();
+ //expect(instance).to.be.a(SquareConnect.OrderReward);
+ });
+
+ 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.OrderReward();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewardTierId (base name: "reward_tier_id")', function() {
+ // uncomment below and update the code to test the property rewardTierId
+ //var instane = new SquareConnect.OrderReward();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/RedeemLoyaltyRewardRequest.spec.js b/test/model/RedeemLoyaltyRewardRequest.spec.js
new file mode 100644
index 0000000..e87c21f
--- /dev/null
+++ b/test/model/RedeemLoyaltyRewardRequest.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('RedeemLoyaltyRewardRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RedeemLoyaltyRewardRequest();
+ });
+
+ it('should create an instance of RedeemLoyaltyRewardRequest', function() {
+ // uncomment below and update the code to test RedeemLoyaltyRewardRequest
+ //var instane = new SquareConnect.RedeemLoyaltyRewardRequest();
+ //expect(instance).to.be.a(SquareConnect.RedeemLoyaltyRewardRequest);
+ });
+
+ 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.RedeemLoyaltyRewardRequest();
+ //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.RedeemLoyaltyRewardRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/RedeemLoyaltyRewardResponse.spec.js b/test/model/RedeemLoyaltyRewardResponse.spec.js
new file mode 100644
index 0000000..ab2a7b5
--- /dev/null
+++ b/test/model/RedeemLoyaltyRewardResponse.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('RedeemLoyaltyRewardResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RedeemLoyaltyRewardResponse();
+ });
+
+ it('should create an instance of RedeemLoyaltyRewardResponse', function() {
+ // uncomment below and update the code to test RedeemLoyaltyRewardResponse
+ //var instane = new SquareConnect.RedeemLoyaltyRewardResponse();
+ //expect(instance).to.be.a(SquareConnect.RedeemLoyaltyRewardResponse);
+ });
+
+ 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.RedeemLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property event (base name: "event")', function() {
+ // uncomment below and update the code to test the property event
+ //var instane = new SquareConnect.RedeemLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/RetrieveLoyaltyAccountRequest.spec.js b/test/model/RetrieveLoyaltyAccountRequest.spec.js
new file mode 100644
index 0000000..2c654f3
--- /dev/null
+++ b/test/model/RetrieveLoyaltyAccountRequest.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('RetrieveLoyaltyAccountRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RetrieveLoyaltyAccountRequest();
+ });
+
+ it('should create an instance of RetrieveLoyaltyAccountRequest', function() {
+ // uncomment below and update the code to test RetrieveLoyaltyAccountRequest
+ //var instane = new SquareConnect.RetrieveLoyaltyAccountRequest();
+ //expect(instance).to.be.a(SquareConnect.RetrieveLoyaltyAccountRequest);
+ });
+
+});
diff --git a/test/model/RetrieveLoyaltyAccountResponse.spec.js b/test/model/RetrieveLoyaltyAccountResponse.spec.js
new file mode 100644
index 0000000..17009cc
--- /dev/null
+++ b/test/model/RetrieveLoyaltyAccountResponse.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('RetrieveLoyaltyAccountResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RetrieveLoyaltyAccountResponse();
+ });
+
+ it('should create an instance of RetrieveLoyaltyAccountResponse', function() {
+ // uncomment below and update the code to test RetrieveLoyaltyAccountResponse
+ //var instane = new SquareConnect.RetrieveLoyaltyAccountResponse();
+ //expect(instance).to.be.a(SquareConnect.RetrieveLoyaltyAccountResponse);
+ });
+
+ 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.RetrieveLoyaltyAccountResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property loyaltyAccount (base name: "loyalty_account")', function() {
+ // uncomment below and update the code to test the property loyaltyAccount
+ //var instane = new SquareConnect.RetrieveLoyaltyAccountResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/RetrieveLoyaltyRewardRequest.spec.js b/test/model/RetrieveLoyaltyRewardRequest.spec.js
new file mode 100644
index 0000000..b96a30b
--- /dev/null
+++ b/test/model/RetrieveLoyaltyRewardRequest.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('RetrieveLoyaltyRewardRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RetrieveLoyaltyRewardRequest();
+ });
+
+ it('should create an instance of RetrieveLoyaltyRewardRequest', function() {
+ // uncomment below and update the code to test RetrieveLoyaltyRewardRequest
+ //var instane = new SquareConnect.RetrieveLoyaltyRewardRequest();
+ //expect(instance).to.be.a(SquareConnect.RetrieveLoyaltyRewardRequest);
+ });
+
+});
diff --git a/test/model/RetrieveLoyaltyRewardResponse.spec.js b/test/model/RetrieveLoyaltyRewardResponse.spec.js
new file mode 100644
index 0000000..7f3e0c3
--- /dev/null
+++ b/test/model/RetrieveLoyaltyRewardResponse.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('RetrieveLoyaltyRewardResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.RetrieveLoyaltyRewardResponse();
+ });
+
+ it('should create an instance of RetrieveLoyaltyRewardResponse', function() {
+ // uncomment below and update the code to test RetrieveLoyaltyRewardResponse
+ //var instane = new SquareConnect.RetrieveLoyaltyRewardResponse();
+ //expect(instance).to.be.a(SquareConnect.RetrieveLoyaltyRewardResponse);
+ });
+
+ 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.RetrieveLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property reward (base name: "reward")', function() {
+ // uncomment below and update the code to test the property reward
+ //var instane = new SquareConnect.RetrieveLoyaltyRewardResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyAccountsRequest.spec.js b/test/model/SearchLoyaltyAccountsRequest.spec.js
new file mode 100644
index 0000000..39e095d
--- /dev/null
+++ b/test/model/SearchLoyaltyAccountsRequest.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('SearchLoyaltyAccountsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyAccountsRequest();
+ });
+
+ it('should create an instance of SearchLoyaltyAccountsRequest', function() {
+ // uncomment below and update the code to test SearchLoyaltyAccountsRequest
+ //var instane = new SquareConnect.SearchLoyaltyAccountsRequest();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyAccountsRequest);
+ });
+
+ 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.SearchLoyaltyAccountsRequest();
+ //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.SearchLoyaltyAccountsRequest();
+ //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.SearchLoyaltyAccountsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.spec.js b/test/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.spec.js
new file mode 100644
index 0000000..9c9c49e
--- /dev/null
+++ b/test/model/SearchLoyaltyAccountsRequestLoyaltyAccountQuery.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('SearchLoyaltyAccountsRequestLoyaltyAccountQuery', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery();
+ });
+
+ it('should create an instance of SearchLoyaltyAccountsRequestLoyaltyAccountQuery', function() {
+ // uncomment below and update the code to test SearchLoyaltyAccountsRequestLoyaltyAccountQuery
+ //var instane = new SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery);
+ });
+
+ it('should have the property mappings (base name: "mappings")', function() {
+ // uncomment below and update the code to test the property mappings
+ //var instane = new SquareConnect.SearchLoyaltyAccountsRequestLoyaltyAccountQuery();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyAccountsResponse.spec.js b/test/model/SearchLoyaltyAccountsResponse.spec.js
new file mode 100644
index 0000000..20bd5d8
--- /dev/null
+++ b/test/model/SearchLoyaltyAccountsResponse.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('SearchLoyaltyAccountsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyAccountsResponse();
+ });
+
+ it('should create an instance of SearchLoyaltyAccountsResponse', function() {
+ // uncomment below and update the code to test SearchLoyaltyAccountsResponse
+ //var instane = new SquareConnect.SearchLoyaltyAccountsResponse();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyAccountsResponse);
+ });
+
+ 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.SearchLoyaltyAccountsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property loyaltyAccounts (base name: "loyalty_accounts")', function() {
+ // uncomment below and update the code to test the property loyaltyAccounts
+ //var instane = new SquareConnect.SearchLoyaltyAccountsResponse();
+ //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.SearchLoyaltyAccountsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyEventsRequest.spec.js b/test/model/SearchLoyaltyEventsRequest.spec.js
new file mode 100644
index 0000000..17e6ede
--- /dev/null
+++ b/test/model/SearchLoyaltyEventsRequest.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('SearchLoyaltyEventsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyEventsRequest();
+ });
+
+ it('should create an instance of SearchLoyaltyEventsRequest', function() {
+ // uncomment below and update the code to test SearchLoyaltyEventsRequest
+ //var instane = new SquareConnect.SearchLoyaltyEventsRequest();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyEventsRequest);
+ });
+
+ 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.SearchLoyaltyEventsRequest();
+ //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.SearchLoyaltyEventsRequest();
+ //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.SearchLoyaltyEventsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyEventsResponse.spec.js b/test/model/SearchLoyaltyEventsResponse.spec.js
new file mode 100644
index 0000000..53d5859
--- /dev/null
+++ b/test/model/SearchLoyaltyEventsResponse.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('SearchLoyaltyEventsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyEventsResponse();
+ });
+
+ it('should create an instance of SearchLoyaltyEventsResponse', function() {
+ // uncomment below and update the code to test SearchLoyaltyEventsResponse
+ //var instane = new SquareConnect.SearchLoyaltyEventsResponse();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyEventsResponse);
+ });
+
+ 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.SearchLoyaltyEventsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property events (base name: "events")', function() {
+ // uncomment below and update the code to test the property events
+ //var instane = new SquareConnect.SearchLoyaltyEventsResponse();
+ //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.SearchLoyaltyEventsResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyRewardsRequest.spec.js b/test/model/SearchLoyaltyRewardsRequest.spec.js
new file mode 100644
index 0000000..a319e83
--- /dev/null
+++ b/test/model/SearchLoyaltyRewardsRequest.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('SearchLoyaltyRewardsRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyRewardsRequest();
+ });
+
+ it('should create an instance of SearchLoyaltyRewardsRequest', function() {
+ // uncomment below and update the code to test SearchLoyaltyRewardsRequest
+ //var instane = new SquareConnect.SearchLoyaltyRewardsRequest();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyRewardsRequest);
+ });
+
+ 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.SearchLoyaltyRewardsRequest();
+ //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.SearchLoyaltyRewardsRequest();
+ //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.SearchLoyaltyRewardsRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.spec.js b/test/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.spec.js
new file mode 100644
index 0000000..18deaa0
--- /dev/null
+++ b/test/model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery.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('SearchLoyaltyRewardsRequestLoyaltyRewardQuery', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery();
+ });
+
+ it('should create an instance of SearchLoyaltyRewardsRequestLoyaltyRewardQuery', function() {
+ // uncomment below and update the code to test SearchLoyaltyRewardsRequestLoyaltyRewardQuery
+ //var instane = new SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery);
+ });
+
+ it('should have the property loyaltyAccountId (base name: "loyalty_account_id")', function() {
+ // uncomment below and update the code to test the property loyaltyAccountId
+ //var instane = new SquareConnect.SearchLoyaltyRewardsRequestLoyaltyRewardQuery();
+ //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.SearchLoyaltyRewardsRequestLoyaltyRewardQuery();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchLoyaltyRewardsResponse.spec.js b/test/model/SearchLoyaltyRewardsResponse.spec.js
new file mode 100644
index 0000000..e93aa92
--- /dev/null
+++ b/test/model/SearchLoyaltyRewardsResponse.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('SearchLoyaltyRewardsResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchLoyaltyRewardsResponse();
+ });
+
+ it('should create an instance of SearchLoyaltyRewardsResponse', function() {
+ // uncomment below and update the code to test SearchLoyaltyRewardsResponse
+ //var instane = new SquareConnect.SearchLoyaltyRewardsResponse();
+ //expect(instance).to.be.a(SquareConnect.SearchLoyaltyRewardsResponse);
+ });
+
+ 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.SearchLoyaltyRewardsResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property rewards (base name: "rewards")', function() {
+ // uncomment below and update the code to test the property rewards
+ //var instane = new SquareConnect.SearchLoyaltyRewardsResponse();
+ //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.SearchLoyaltyRewardsResponse();
+ //expect(instance).to.be();
+ });
+});
From b0f8aa06853ba8cfc50cf592a79f8de035ef77f3 Mon Sep 17 00:00:00 2001
From: jessdelacruzsantos
<32309499+jessdelacruzsantos@users.noreply.github.com>
Date: Thu, 28 May 2020 09:41:56 -0700
Subject: [PATCH 2/3] Update .travis.yml
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index bd68b21..bf3f1ff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: node_js
node_js:
- '6'
-- '6.1'
+- '6.2'
before_install:
- openssl aes-256-cbc -K $encrypted_17d5860a9a31_key -iv $encrypted_17d5860a9a31_iv
-in ./travis-ci/accounts.enc -out ./travis-ci/accounts.json -d
From e099f0b54838ad4e6b41e24681f2d8af80edbc18 Mon Sep 17 00:00:00 2001
From: jessdelacruzsantos
<32309499+jessdelacruzsantos@users.noreply.github.com>
Date: Thu, 28 May 2020 09:54:23 -0700
Subject: [PATCH 3/3] Update .travis.yml
---
.travis.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index bf3f1ff..df69fa8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: node_js
node_js:
- '6'
-- '6.2'
before_install:
- openssl aes-256-cbc -K $encrypted_17d5860a9a31_key -iv $encrypted_17d5860a9a31_iv
-in ./travis-ci/accounts.enc -out ./travis-ci/accounts.json -d