From 4a990ad49835b4589290a23a359ef360388d1289 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:59:11 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 18 + .mock/definition/__package__.yml | 35513 ---------------- .mock/definition/api.yml | 19 - .mock/definition/applePay.yml | 81 - .mock/definition/bankAccounts.yml | 222 - .mock/definition/bookings.yml | 909 - .../bookings/customAttributeDefinitions.yml | 413 - .../definition/bookings/customAttributes.yml | 565 - .../definition/bookings/locationProfiles.yml | 59 - .../bookings/teamMemberProfiles.yml | 114 - .mock/definition/cards.yml | 365 - .mock/definition/cashDrawers/shifts.yml | 277 - .mock/definition/catalog.yml | 1226 - .mock/definition/catalog/images.yml | 152 - .mock/definition/catalog/object.yml | 400 - .mock/definition/channels.yml | 189 - .mock/definition/checkout.yml | 341 - .mock/definition/checkout/paymentLinks.yml | 466 - .mock/definition/customers.yml | 1180 - .mock/definition/customers/cards.yml | 181 - .../customers/customAttributeDefinitions.yml | 605 - .../definition/customers/customAttributes.yml | 399 - .mock/definition/customers/groups.yml | 324 - .mock/definition/customers/segments.yml | 124 - .mock/definition/devices.yml | 212 - .mock/definition/devices/codes.yml | 211 - .mock/definition/disputes.yml | 422 - .mock/definition/disputes/evidence.yml | 168 - .mock/definition/employees.yml | 115 - .mock/definition/events.yml | 198 - .mock/definition/giftCards.yml | 502 - .mock/definition/giftCards/activities.yml | 337 - .mock/definition/inventory.yml | 847 - .mock/definition/invoices.yml | 1236 - .mock/definition/labor.yml | 1046 - .mock/definition/labor/breakTypes.yml | 290 - .mock/definition/labor/employeeWages.yml | 125 - .mock/definition/labor/shifts.yml | 472 - .mock/definition/labor/teamMemberWages.yml | 135 - .mock/definition/labor/workweekConfigs.yml | 109 - .mock/definition/locations.yml | 807 - .../locations/customAttributeDefinitions.yml | 419 - .../definition/locations/customAttributes.yml | 577 - .mock/definition/locations/transactions.yml | 344 - .mock/definition/loyalty.yml | 139 - .mock/definition/loyalty/accounts.yml | 482 - .mock/definition/loyalty/programs.yml | 280 - .../loyalty/programs/promotions.yml | 476 - .mock/definition/loyalty/rewards.yml | 390 - .mock/definition/merchants.yml | 122 - .../merchants/customAttributeDefinitions.yml | 421 - .../definition/merchants/customAttributes.yml | 552 - .mock/definition/mobile.yml | 80 - .mock/definition/oAuth.yml | 376 - .mock/definition/orders.yml | 1734 - .../orders/customAttributeDefinitions.yml | 404 - .mock/definition/orders/customAttributes.yml | 581 - .mock/definition/payments.yml | 1646 - .mock/definition/payouts.yml | 297 - .mock/definition/refunds.yml | 507 - .mock/definition/sites.yml | 54 - .mock/definition/snippets.yml | 168 - .mock/definition/subscriptions.yml | 1309 - .mock/definition/team.yml | 228 - .mock/definition/teamMembers.yml | 789 - .mock/definition/teamMembers/wageSetting.yml | 178 - .mock/definition/terminal.yml | 241 - .mock/definition/terminal/actions.yml | 464 - .mock/definition/terminal/checkouts.yml | 370 - .mock/definition/terminal/refunds.yml | 269 - .mock/definition/transferOrders.yml | 807 - .mock/definition/v1Transactions.yml | 382 - .mock/definition/vendors.yml | 558 - .mock/definition/webhooks/eventTypes.yml | 47 - .mock/definition/webhooks/subscriptions.yml | 395 - .mock/fern.config.json | 4 - Square.slnx | 4 + reference.md | 1464 +- .../Core/RawClientTests/MultipartFormTests.cs | 4 +- .../RawClientTests/QueryParameterTests.cs | 5 +- .../Core/RawClientTests/RetriesTests.cs | 117 +- src/Square.Test/Square.Test.csproj | 3 + .../MockServer/ApplePay/RegisterDomainTest.cs | 1 - .../MockServer/BankAccounts/GetByV1IdTest.cs | 1 - .../Unit/MockServer/BankAccounts/GetTest.cs | 1 - .../Unit/MockServer/BankAccounts/ListTest.cs | 1 - .../Bookings/BulkRetrieveBookingsTest.cs | 1 - ...lkRetrieveTeamMemberBookingProfilesTest.cs | 1 - .../Unit/MockServer/Bookings/CancelTest.cs | 1 - .../Unit/MockServer/Bookings/CreateTest.cs | 1 - .../CustomAttributeDefinitions/CreateTest.cs | 3 +- .../CustomAttributeDefinitions/DeleteTest.cs | 1 - .../CustomAttributeDefinitions/GetTest.cs | 3 +- .../CustomAttributeDefinitions/ListTest.cs | 5 +- .../CustomAttributeDefinitions/UpdateTest.cs | 3 +- .../CustomAttributes/BatchDeleteTest.cs | 1 - .../CustomAttributes/BatchUpsertTest.cs | 1 - .../Bookings/CustomAttributes/DeleteTest.cs | 1 - .../Bookings/CustomAttributes/GetTest.cs | 1 - .../Bookings/CustomAttributes/ListTest.cs | 1 - .../Bookings/CustomAttributes/UpsertTest.cs | 1 - .../Bookings/GetBusinessProfileTest.cs | 1 - .../Unit/MockServer/Bookings/GetTest.cs | 1 - .../Unit/MockServer/Bookings/ListTest.cs | 2 +- .../Bookings/LocationProfiles/ListTest.cs | 1 - .../RetrieveLocationBookingProfileTest.cs | 1 - .../Bookings/SearchAvailabilityTest.cs | 1 - .../Bookings/TeamMemberProfiles/GetTest.cs | 1 - .../Bookings/TeamMemberProfiles/ListTest.cs | 1 - .../Unit/MockServer/Bookings/UpdateTest.cs | 1 - .../Unit/MockServer/Cards/CreateTest.cs | 1 - .../Unit/MockServer/Cards/DisableTest.cs | 1 - .../Unit/MockServer/Cards/GetTest.cs | 1 - .../Unit/MockServer/Cards/ListTest.cs | 1 - .../MockServer/CashDrawers/Shifts/GetTest.cs | 1 - .../CashDrawers/Shifts/ListEventsTest.cs | 1 - .../MockServer/CashDrawers/Shifts/ListTest.cs | 1 - .../MockServer/Catalog/BatchDeleteTest.cs | 1 - .../Unit/MockServer/Catalog/BatchGetTest.cs | 1 - .../MockServer/Catalog/BatchUpsertTest.cs | 1 - .../Unit/MockServer/Catalog/InfoTest.cs | 1 - .../Unit/MockServer/Catalog/ListTest.cs | 1 - .../MockServer/Catalog/Object/DeleteTest.cs | 1 - .../Unit/MockServer/Catalog/Object/GetTest.cs | 1 - .../MockServer/Catalog/Object/UpsertTest.cs | 1 - .../MockServer/Catalog/SearchItemsTest.cs | 1 - .../Unit/MockServer/Catalog/SearchTest.cs | 1 - .../Catalog/UpdateItemModifierListsTest.cs | 1 - .../MockServer/Catalog/UpdateItemTaxesTest.cs | 1 - .../MockServer/Channels/BulkRetrieveTest.cs | 1 - .../Unit/MockServer/Channels/GetTest.cs | 1 - .../Unit/MockServer/Channels/ListTest.cs | 1 - .../Checkout/PaymentLinks/CreateTest.cs | 1 - .../Checkout/PaymentLinks/DeleteTest.cs | 1 - .../Checkout/PaymentLinks/GetTest.cs | 1 - .../Checkout/PaymentLinks/ListTest.cs | 1 - .../Checkout/PaymentLinks/UpdateTest.cs | 1 - .../Checkout/RetrieveLocationSettingsTest.cs | 1 - .../Checkout/RetrieveMerchantSettingsTest.cs | 1 - .../Checkout/UpdateLocationSettingsTest.cs | 1 - .../Checkout/UpdateMerchantSettingsTest.cs | 1 - .../MockServer/Customers/BatchCreateTest.cs | 1 - .../Customers/BulkDeleteCustomersTest.cs | 1 - .../Customers/BulkRetrieveCustomersTest.cs | 1 - .../Customers/BulkUpdateCustomersTest.cs | 1 - .../MockServer/Customers/Cards/CreateTest.cs | 1 - .../MockServer/Customers/Cards/DeleteTest.cs | 1 - .../Unit/MockServer/Customers/CreateTest.cs | 1 - .../BatchUpsertTest.cs | 1 - .../CustomAttributeDefinitions/CreateTest.cs | 5 +- .../CustomAttributeDefinitions/DeleteTest.cs | 1 - .../CustomAttributeDefinitions/GetTest.cs | 3 +- .../CustomAttributeDefinitions/ListTest.cs | 5 +- .../CustomAttributeDefinitions/UpdateTest.cs | 3 +- .../Customers/CustomAttributes/DeleteTest.cs | 1 - .../Customers/CustomAttributes/GetTest.cs | 1 - .../Customers/CustomAttributes/ListTest.cs | 1 - .../Customers/CustomAttributes/UpsertTest.cs | 1 - .../Unit/MockServer/Customers/DeleteTest.cs | 1 - .../Unit/MockServer/Customers/GetTest.cs | 1 - .../MockServer/Customers/Groups/AddTest.cs | 1 - .../MockServer/Customers/Groups/CreateTest.cs | 1 - .../MockServer/Customers/Groups/DeleteTest.cs | 1 - .../MockServer/Customers/Groups/GetTest.cs | 1 - .../MockServer/Customers/Groups/ListTest.cs | 1 - .../MockServer/Customers/Groups/RemoveTest.cs | 1 - .../MockServer/Customers/Groups/UpdateTest.cs | 1 - .../Unit/MockServer/Customers/ListTest.cs | 1 - .../Unit/MockServer/Customers/SearchTest.cs | 1 - .../MockServer/Customers/Segments/GetTest.cs | 1 - .../MockServer/Customers/Segments/ListTest.cs | 1 - .../Unit/MockServer/Customers/UpdateTest.cs | 1 - .../MockServer/Devices/Codes/CreateTest.cs | 1 - .../Unit/MockServer/Devices/Codes/GetTest.cs | 1 - .../Unit/MockServer/Devices/Codes/ListTest.cs | 1 - .../Unit/MockServer/Devices/GetTest.cs | 3 +- .../Unit/MockServer/Devices/ListTest.cs | 5 +- .../Unit/MockServer/Disputes/AcceptTest.cs | 1 - .../Disputes/CreateEvidenceTextTest.cs | 1 - .../Disputes/Evidence/DeleteTest.cs | 1 - .../MockServer/Disputes/Evidence/GetTest.cs | 1 - .../MockServer/Disputes/Evidence/ListTest.cs | 1 - .../Unit/MockServer/Disputes/GetTest.cs | 1 - .../Unit/MockServer/Disputes/ListTest.cs | 1 - .../MockServer/Disputes/SubmitEvidenceTest.cs | 1 - .../Unit/MockServer/Employees/GetTest.cs | 1 - .../Unit/MockServer/Employees/ListTest.cs | 1 - .../MockServer/Events/DisableEventsTest.cs | 1 - .../MockServer/Events/EnableEventsTest.cs | 1 - .../MockServer/Events/ListEventTypesTest.cs | 1 - .../MockServer/Events/SearchEventsTest.cs | 1 - .../GiftCards/Activities/CreateTest.cs | 1 - .../GiftCards/Activities/ListTest.cs | 1 - .../Unit/MockServer/GiftCards/CreateTest.cs | 1 - .../MockServer/GiftCards/GetFromGanTest.cs | 1 - .../MockServer/GiftCards/GetFromNonceTest.cs | 1 - .../Unit/MockServer/GiftCards/GetTest.cs | 1 - .../MockServer/GiftCards/LinkCustomerTest.cs | 1 - .../Unit/MockServer/GiftCards/ListTest.cs | 1 - .../GiftCards/UnlinkCustomerTest.cs | 1 - .../Inventory/BatchCreateChangesTest.cs | 1 - .../Inventory/BatchGetChangesTest.cs | 1 - .../Inventory/BatchGetCountsTest.cs | 1 - .../Unit/MockServer/Inventory/ChangesTest.cs | 1 - .../Inventory/DeprecatedBatchChangeTest.cs | 1 - .../DeprecatedBatchGetChangesTest.cs | 1 - .../Inventory/DeprecatedBatchGetCountsTest.cs | 1 - .../Inventory/DeprecatedGetAdjustmentTest.cs | 1 - .../DeprecatedGetPhysicalCountTest.cs | 1 - .../MockServer/Inventory/GetAdjustmentTest.cs | 1 - .../Inventory/GetPhysicalCountTest.cs | 1 - .../Unit/MockServer/Inventory/GetTest.cs | 1 - .../MockServer/Inventory/GetTransferTest.cs | 1 - .../Unit/MockServer/Invoices/CancelTest.cs | 1 - .../Unit/MockServer/Invoices/CreateTest.cs | 1 - .../Invoices/DeleteInvoiceAttachmentTest.cs | 1 - .../Unit/MockServer/Invoices/DeleteTest.cs | 1 - .../Unit/MockServer/Invoices/GetTest.cs | 1 - .../Unit/MockServer/Invoices/ListTest.cs | 1 - .../Unit/MockServer/Invoices/PublishTest.cs | 1 - .../Unit/MockServer/Invoices/SearchTest.cs | 1 - .../Unit/MockServer/Invoices/UpdateTest.cs | 1 - .../MockServer/Labor/BreakTypes/CreateTest.cs | 1 - .../MockServer/Labor/BreakTypes/DeleteTest.cs | 1 - .../MockServer/Labor/BreakTypes/GetTest.cs | 1 - .../MockServer/Labor/BreakTypes/ListTest.cs | 1 - .../MockServer/Labor/BreakTypes/UpdateTest.cs | 1 - .../Labor/BulkPublishScheduledShiftsTest.cs | 1 - .../Labor/CreateScheduledShiftTest.cs | 1 - .../MockServer/Labor/CreateTimecardTest.cs | 1 - .../MockServer/Labor/DeleteTimecardTest.cs | 1 - .../MockServer/Labor/EmployeeWages/GetTest.cs | 1 - .../Labor/EmployeeWages/ListTest.cs | 1 - .../Labor/PublishScheduledShiftTest.cs | 1 - .../Labor/RetrieveScheduledShiftTest.cs | 1 - .../MockServer/Labor/RetrieveTimecardTest.cs | 1 - .../Labor/SearchScheduledShiftsTest.cs | 1 - .../MockServer/Labor/SearchTimecardsTest.cs | 1 - .../MockServer/Labor/Shifts/CreateTest.cs | 1 - .../MockServer/Labor/Shifts/DeleteTest.cs | 1 - .../Unit/MockServer/Labor/Shifts/GetTest.cs | 1 - .../MockServer/Labor/Shifts/SearchTest.cs | 1 - .../MockServer/Labor/Shifts/UpdateTest.cs | 1 - .../Labor/TeamMemberWages/GetTest.cs | 1 - .../Labor/TeamMemberWages/ListTest.cs | 1 - .../Labor/UpdateScheduledShiftTest.cs | 1 - .../MockServer/Labor/UpdateTimecardTest.cs | 1 - .../Labor/WorkweekConfigs/GetTest.cs | 1 - .../Labor/WorkweekConfigs/ListTest.cs | 1 - .../MockServer/Locations/CheckoutsTest.cs | 1 - .../Unit/MockServer/Locations/CreateTest.cs | 1 - .../CustomAttributeDefinitions/CreateTest.cs | 5 +- .../CustomAttributeDefinitions/DeleteTest.cs | 1 - .../CustomAttributeDefinitions/GetTest.cs | 3 +- .../CustomAttributeDefinitions/ListTest.cs | 5 +- .../CustomAttributeDefinitions/UpdateTest.cs | 3 +- .../CustomAttributes/BatchDeleteTest.cs | 1 - .../CustomAttributes/BatchUpsertTest.cs | 1 - .../Locations/CustomAttributes/DeleteTest.cs | 1 - .../Locations/CustomAttributes/GetTest.cs | 1 - .../Locations/CustomAttributes/ListTest.cs | 1 - .../Locations/CustomAttributes/UpsertTest.cs | 1 - .../Unit/MockServer/Locations/GetTest.cs | 1 - .../Unit/MockServer/Locations/ListTest.cs | 1 - .../Locations/Transactions/CaptureTest.cs | 1 - .../Locations/Transactions/GetTest.cs | 1 - .../Locations/Transactions/ListTest.cs | 1 - .../Locations/Transactions/VoidTest.cs | 1 - .../Unit/MockServer/Locations/UpdateTest.cs | 1 - .../Loyalty/Accounts/AccumulatePointsTest.cs | 1 - .../MockServer/Loyalty/Accounts/AdjustTest.cs | 1 - .../MockServer/Loyalty/Accounts/CreateTest.cs | 1 - .../MockServer/Loyalty/Accounts/GetTest.cs | 1 - .../MockServer/Loyalty/Accounts/SearchTest.cs | 1 - .../Loyalty/Programs/CalculateTest.cs | 1 - .../MockServer/Loyalty/Programs/GetTest.cs | 1 - .../MockServer/Loyalty/Programs/ListTest.cs | 1 - .../Loyalty/Programs/Promotions/CancelTest.cs | 1 - .../Loyalty/Programs/Promotions/CreateTest.cs | 1 - .../Loyalty/Programs/Promotions/GetTest.cs | 1 - .../Loyalty/Programs/Promotions/ListTest.cs | 1 - .../MockServer/Loyalty/Rewards/CreateTest.cs | 1 - .../MockServer/Loyalty/Rewards/DeleteTest.cs | 1 - .../MockServer/Loyalty/Rewards/GetTest.cs | 1 - .../MockServer/Loyalty/Rewards/RedeemTest.cs | 1 - .../MockServer/Loyalty/Rewards/SearchTest.cs | 1 - .../MockServer/Loyalty/SearchEventsTest.cs | 1 - .../CustomAttributeDefinitions/CreateTest.cs | 5 +- .../CustomAttributeDefinitions/DeleteTest.cs | 1 - .../CustomAttributeDefinitions/GetTest.cs | 3 +- .../CustomAttributeDefinitions/ListTest.cs | 5 +- .../CustomAttributeDefinitions/UpdateTest.cs | 3 +- .../CustomAttributes/BatchDeleteTest.cs | 1 - .../CustomAttributes/BatchUpsertTest.cs | 1 - .../Merchants/CustomAttributes/DeleteTest.cs | 1 - .../Merchants/CustomAttributes/GetTest.cs | 1 - .../Merchants/CustomAttributes/ListTest.cs | 1 - .../Merchants/CustomAttributes/UpsertTest.cs | 1 - .../Unit/MockServer/Merchants/GetTest.cs | 1 - .../Unit/MockServer/Merchants/ListTest.cs | 1 - .../Mobile/AuthorizationCodeTest.cs | 1 - .../Unit/MockServer/OAuth/ObtainTokenTest.cs | 1 - .../OAuth/RetrieveTokenStatusTest.cs | 1 - .../Unit/MockServer/OAuth/RevokeTokenTest.cs | 1 - .../Unit/MockServer/Orders/BatchGetTest.cs | 1 - .../Unit/MockServer/Orders/CalculateTest.cs | 1 - .../Unit/MockServer/Orders/CloneTest.cs | 1 - .../Unit/MockServer/Orders/CreateTest.cs | 1 - .../CustomAttributeDefinitions/CreateTest.cs | 5 +- .../CustomAttributeDefinitions/DeleteTest.cs | 1 - .../CustomAttributeDefinitions/GetTest.cs | 3 +- .../CustomAttributeDefinitions/ListTest.cs | 7 +- .../CustomAttributeDefinitions/UpdateTest.cs | 3 +- .../CustomAttributes/BatchDeleteTest.cs | 1 - .../CustomAttributes/BatchUpsertTest.cs | 1 - .../Orders/CustomAttributes/DeleteTest.cs | 1 - .../Orders/CustomAttributes/GetTest.cs | 1 - .../Orders/CustomAttributes/ListTest.cs | 1 - .../Orders/CustomAttributes/UpsertTest.cs | 1 - .../Unit/MockServer/Orders/GetTest.cs | 1 - .../Unit/MockServer/Orders/PayTest.cs | 1 - .../Unit/MockServer/Orders/SearchTest.cs | 1 - .../Unit/MockServer/Orders/UpdateTest.cs | 1 - .../Payments/CancelByIdempotencyKeyTest.cs | 1 - .../Unit/MockServer/Payments/CancelTest.cs | 1 - .../Unit/MockServer/Payments/CompleteTest.cs | 1 - .../Unit/MockServer/Payments/CreateTest.cs | 1 - .../Unit/MockServer/Payments/GetTest.cs | 1 - .../Unit/MockServer/Payments/ListTest.cs | 1 - .../Unit/MockServer/Payments/UpdateTest.cs | 1 - .../Unit/MockServer/Payouts/GetTest.cs | 1 - .../MockServer/Payouts/ListEntriesTest.cs | 1 - .../Unit/MockServer/Payouts/ListTest.cs | 1 - .../Unit/MockServer/Refunds/GetTest.cs | 1 - .../Unit/MockServer/Refunds/ListTest.cs | 1 - .../MockServer/Refunds/RefundPaymentTest.cs | 1 - .../Unit/MockServer/Sites/ListTest.cs | 1 - .../Unit/MockServer/Snippets/DeleteTest.cs | 1 - .../Unit/MockServer/Snippets/GetTest.cs | 1 - .../Unit/MockServer/Snippets/UpsertTest.cs | 1 - .../Subscriptions/BulkSwapPlanTest.cs | 1 - .../MockServer/Subscriptions/CancelTest.cs | 1 - .../ChangeBillingAnchorDateTest.cs | 1 - .../MockServer/Subscriptions/CreateTest.cs | 1 - .../Subscriptions/DeleteActionTest.cs | 1 - .../Unit/MockServer/Subscriptions/GetTest.cs | 1 - .../Subscriptions/ListEventsTest.cs | 1 - .../MockServer/Subscriptions/PauseTest.cs | 1 - .../MockServer/Subscriptions/ResumeTest.cs | 1 - .../MockServer/Subscriptions/SearchTest.cs | 1 - .../MockServer/Subscriptions/SwapPlanTest.cs | 1 - .../MockServer/Subscriptions/UpdateTest.cs | 1 - .../Unit/MockServer/Team/CreateJobTest.cs | 1 - .../Unit/MockServer/Team/ListJobsTest.cs | 1 - .../Unit/MockServer/Team/RetrieveJobTest.cs | 1 - .../Unit/MockServer/Team/UpdateJobTest.cs | 1 - .../MockServer/TeamMembers/BatchCreateTest.cs | 1 - .../MockServer/TeamMembers/BatchUpdateTest.cs | 1 - .../Unit/MockServer/TeamMembers/CreateTest.cs | 1 - .../Unit/MockServer/TeamMembers/GetTest.cs | 1 - .../Unit/MockServer/TeamMembers/SearchTest.cs | 1 - .../Unit/MockServer/TeamMembers/UpdateTest.cs | 1 - .../TeamMembers/WageSetting/GetTest.cs | 1 - .../TeamMembers/WageSetting/UpdateTest.cs | 1 - .../MockServer/Terminal/Actions/CancelTest.cs | 1 - .../MockServer/Terminal/Actions/CreateTest.cs | 1 - .../MockServer/Terminal/Actions/GetTest.cs | 1 - .../MockServer/Terminal/Actions/SearchTest.cs | 1 - .../Terminal/Checkouts/CancelTest.cs | 1 - .../Terminal/Checkouts/CreateTest.cs | 1 - .../MockServer/Terminal/Checkouts/GetTest.cs | 1 - .../Terminal/Checkouts/SearchTest.cs | 1 - .../Terminal/DismissTerminalActionTest.cs | 1 - .../Terminal/DismissTerminalCheckoutTest.cs | 1 - .../Terminal/DismissTerminalRefundTest.cs | 1 - .../MockServer/Terminal/Refunds/CancelTest.cs | 1 - .../MockServer/Terminal/Refunds/CreateTest.cs | 1 - .../MockServer/Terminal/Refunds/GetTest.cs | 1 - .../MockServer/Terminal/Refunds/SearchTest.cs | 1 - .../MockServer/TransferOrders/CancelTest.cs | 1 - .../MockServer/TransferOrders/CreateTest.cs | 1 - .../MockServer/TransferOrders/DeleteTest.cs | 1 - .../Unit/MockServer/TransferOrders/GetTest.cs | 1 - .../MockServer/TransferOrders/ReceiveTest.cs | 1 - .../MockServer/TransferOrders/SearchTest.cs | 1 - .../MockServer/TransferOrders/StartTest.cs | 1 - .../MockServer/TransferOrders/UpdateTest.cs | 1 - .../V1Transactions/V1ListOrdersTest.cs | 1 - .../V1Transactions/V1RetrieveOrderTest.cs | 1 - .../V1Transactions/V1UpdateOrderTest.cs | 1 - .../MockServer/Vendors/BatchCreateTest.cs | 1 - .../Unit/MockServer/Vendors/BatchGetTest.cs | 1 - .../MockServer/Vendors/BatchUpdateTest.cs | 1 - .../Unit/MockServer/Vendors/CreateTest.cs | 1 - .../Unit/MockServer/Vendors/GetTest.cs | 1 - .../Unit/MockServer/Vendors/SearchTest.cs | 1 - .../Unit/MockServer/Vendors/UpdateTest.cs | 1 - .../Webhooks/EventTypes/ListTest.cs | 1 - .../Webhooks/Subscriptions/CreateTest.cs | 5 +- .../Webhooks/Subscriptions/DeleteTest.cs | 1 - .../Webhooks/Subscriptions/GetTest.cs | 5 +- .../Webhooks/Subscriptions/ListTest.cs | 5 +- .../Webhooks/Subscriptions/TestTest.cs | 1 - .../Subscriptions/UpdateSignatureKeyTest.cs | 1 - .../Webhooks/Subscriptions/UpdateTest.cs | 5 +- src/Square/ApplePay/ApplePayClient.cs | 3 - src/Square/BankAccounts/BankAccountsClient.cs | 7 +- src/Square/Bookings/BookingsClient.cs | 7 +- .../CustomAttributeDefinitionsClient.cs | 7 +- .../CustomAttributesClient.cs | 7 +- .../LocationProfilesClient.cs | 7 +- .../TeamMemberProfilesClient.cs | 7 +- src/Square/Cards/CardsClient.cs | 7 +- src/Square/CashDrawers/Shifts/ShiftsClient.cs | 11 +- src/Square/Catalog/CatalogClient.cs | 7 +- src/Square/Catalog/Images/ImagesClient.cs | 9 +- src/Square/Catalog/Object/ObjectClient.cs | 3 - src/Square/Channels/ChannelsClient.cs | 7 +- src/Square/Checkout/CheckoutClient.cs | 3 - .../PaymentLinks/PaymentLinksClient.cs | 7 +- src/Square/Core/Extensions.cs | 2 +- src/Square/Core/HeaderValue.cs | 40 +- src/Square/Core/IRequestOptions.cs | 3 - src/Square/Core/JsonAccessAttribute.cs | 6 +- src/Square/Core/MultipartFormRequest.cs | 19 + src/Square/Core/Public/ClientOptions.cs | 2 - src/Square/Core/Public/RequestOptions.cs | 3 - src/Square/Core/Public/Version.cs | 2 +- src/Square/Core/RawClient.cs | 127 +- src/Square/Customers/Cards/CardsClient.cs | 3 - .../CustomAttributeDefinitionsClient.cs | 7 +- .../CustomAttributesClient.cs | 7 +- src/Square/Customers/CustomersClient.cs | 7 +- src/Square/Customers/Groups/GroupsClient.cs | 7 +- .../Customers/Segments/SegmentsClient.cs | 7 +- src/Square/Devices/Codes/CodesClient.cs | 7 +- src/Square/Devices/DevicesClient.cs | 7 +- src/Square/Disputes/DisputesClient.cs | 12 +- .../Disputes/Evidence/EvidenceClient.cs | 7 +- src/Square/Employees/EmployeesClient.cs | 7 +- src/Square/Events/EventsClient.cs | 3 - .../GiftCards/Activities/ActivitiesClient.cs | 7 +- src/Square/GiftCards/GiftCardsClient.cs | 7 +- src/Square/Inventory/InventoryClient.cs | 19 +- src/Square/Invoices/InvoicesClient.cs | 12 +- .../Labor/BreakTypes/BreakTypesClient.cs | 7 +- .../EmployeeWages/EmployeeWagesClient.cs | 7 +- src/Square/Labor/LaborClient.cs | 3 - src/Square/Labor/Shifts/ShiftsClient.cs | 3 - .../TeamMemberWages/TeamMemberWagesClient.cs | 7 +- .../WorkweekConfigs/WorkweekConfigsClient.cs | 7 +- .../CustomAttributeDefinitionsClient.cs | 7 +- .../CustomAttributesClient.cs | 7 +- src/Square/Locations/LocationsClient.cs | 3 - .../Transactions/TransactionsClient.cs | 3 - src/Square/Loyalty/Accounts/AccountsClient.cs | 3 - src/Square/Loyalty/LoyaltyClient.cs | 3 - src/Square/Loyalty/Programs/ProgramsClient.cs | 3 - .../Programs/Promotions/PromotionsClient.cs | 7 +- src/Square/Loyalty/Rewards/RewardsClient.cs | 3 - .../CustomAttributeDefinitionsClient.cs | 7 +- .../CustomAttributesClient.cs | 7 +- src/Square/Merchants/MerchantsClient.cs | 7 +- src/Square/Mobile/MobileClient.cs | 3 - src/Square/OAuth/OAuthClient.cs | 3 - .../CustomAttributeDefinitionsClient.cs | 7 +- .../CustomAttributesClient.cs | 7 +- src/Square/Orders/OrdersClient.cs | 3 - src/Square/Payments/PaymentsClient.cs | 7 +- src/Square/Payouts/PayoutsClient.cs | 11 +- src/Square/Refunds/RefundsClient.cs | 7 +- src/Square/Sites/SitesClient.cs | 3 - src/Square/Snippets/SnippetsClient.cs | 3 - src/Square/Square.csproj | 13 +- src/Square/SquareClient.cs | 2 +- .../Subscriptions/SubscriptionsClient.cs | 7 +- src/Square/Team/TeamClient.cs | 3 - src/Square/TeamMembers/TeamMembersClient.cs | 3 - .../WageSetting/WageSettingClient.cs | 3 - src/Square/Terminal/Actions/ActionsClient.cs | 3 - .../Terminal/Checkouts/CheckoutsClient.cs | 3 - src/Square/Terminal/Refunds/RefundsClient.cs | 3 - src/Square/Terminal/TerminalClient.cs | 3 - .../TransferOrders/TransferOrdersClient.cs | 7 +- src/Square/Types/CatalogObject.cs | 4 +- src/Square/Types/CatalogObjectCategory.cs | 3 + src/Square/Types/ScheduledShiftDetails.cs | 4 +- .../V1Transactions/V1TransactionsClient.cs | 3 - src/Square/Vendors/VendorsClient.cs | 3 - .../Webhooks/EventTypes/EventTypesClient.cs | 3 - .../Subscriptions/SubscriptionsClient.cs | 7 +- 491 files changed, 1335 insertions(+), 68786 deletions(-) create mode 100644 .fern/metadata.json delete mode 100644 .mock/definition/__package__.yml delete mode 100644 .mock/definition/api.yml delete mode 100644 .mock/definition/applePay.yml delete mode 100644 .mock/definition/bankAccounts.yml delete mode 100644 .mock/definition/bookings.yml delete mode 100644 .mock/definition/bookings/customAttributeDefinitions.yml delete mode 100644 .mock/definition/bookings/customAttributes.yml delete mode 100644 .mock/definition/bookings/locationProfiles.yml delete mode 100644 .mock/definition/bookings/teamMemberProfiles.yml delete mode 100644 .mock/definition/cards.yml delete mode 100644 .mock/definition/cashDrawers/shifts.yml delete mode 100644 .mock/definition/catalog.yml delete mode 100644 .mock/definition/catalog/images.yml delete mode 100644 .mock/definition/catalog/object.yml delete mode 100644 .mock/definition/channels.yml delete mode 100644 .mock/definition/checkout.yml delete mode 100644 .mock/definition/checkout/paymentLinks.yml delete mode 100644 .mock/definition/customers.yml delete mode 100644 .mock/definition/customers/cards.yml delete mode 100644 .mock/definition/customers/customAttributeDefinitions.yml delete mode 100644 .mock/definition/customers/customAttributes.yml delete mode 100644 .mock/definition/customers/groups.yml delete mode 100644 .mock/definition/customers/segments.yml delete mode 100644 .mock/definition/devices.yml delete mode 100644 .mock/definition/devices/codes.yml delete mode 100644 .mock/definition/disputes.yml delete mode 100644 .mock/definition/disputes/evidence.yml delete mode 100644 .mock/definition/employees.yml delete mode 100644 .mock/definition/events.yml delete mode 100644 .mock/definition/giftCards.yml delete mode 100644 .mock/definition/giftCards/activities.yml delete mode 100644 .mock/definition/inventory.yml delete mode 100644 .mock/definition/invoices.yml delete mode 100644 .mock/definition/labor.yml delete mode 100644 .mock/definition/labor/breakTypes.yml delete mode 100644 .mock/definition/labor/employeeWages.yml delete mode 100644 .mock/definition/labor/shifts.yml delete mode 100644 .mock/definition/labor/teamMemberWages.yml delete mode 100644 .mock/definition/labor/workweekConfigs.yml delete mode 100644 .mock/definition/locations.yml delete mode 100644 .mock/definition/locations/customAttributeDefinitions.yml delete mode 100644 .mock/definition/locations/customAttributes.yml delete mode 100644 .mock/definition/locations/transactions.yml delete mode 100644 .mock/definition/loyalty.yml delete mode 100644 .mock/definition/loyalty/accounts.yml delete mode 100644 .mock/definition/loyalty/programs.yml delete mode 100644 .mock/definition/loyalty/programs/promotions.yml delete mode 100644 .mock/definition/loyalty/rewards.yml delete mode 100644 .mock/definition/merchants.yml delete mode 100644 .mock/definition/merchants/customAttributeDefinitions.yml delete mode 100644 .mock/definition/merchants/customAttributes.yml delete mode 100644 .mock/definition/mobile.yml delete mode 100644 .mock/definition/oAuth.yml delete mode 100644 .mock/definition/orders.yml delete mode 100644 .mock/definition/orders/customAttributeDefinitions.yml delete mode 100644 .mock/definition/orders/customAttributes.yml delete mode 100644 .mock/definition/payments.yml delete mode 100644 .mock/definition/payouts.yml delete mode 100644 .mock/definition/refunds.yml delete mode 100644 .mock/definition/sites.yml delete mode 100644 .mock/definition/snippets.yml delete mode 100644 .mock/definition/subscriptions.yml delete mode 100644 .mock/definition/team.yml delete mode 100644 .mock/definition/teamMembers.yml delete mode 100644 .mock/definition/teamMembers/wageSetting.yml delete mode 100644 .mock/definition/terminal.yml delete mode 100644 .mock/definition/terminal/actions.yml delete mode 100644 .mock/definition/terminal/checkouts.yml delete mode 100644 .mock/definition/terminal/refunds.yml delete mode 100644 .mock/definition/transferOrders.yml delete mode 100644 .mock/definition/v1Transactions.yml delete mode 100644 .mock/definition/vendors.yml delete mode 100644 .mock/definition/webhooks/eventTypes.yml delete mode 100644 .mock/definition/webhooks/subscriptions.yml delete mode 100644 .mock/fern.config.json create mode 100644 Square.slnx diff --git a/.fern/metadata.json b/.fern/metadata.json new file mode 100644 index 00000000..7f6833cb --- /dev/null +++ b/.fern/metadata.json @@ -0,0 +1,18 @@ +{ + "cliVersion": "3.20.0", + "generatorName": "fernapi/fern-csharp-sdk", + "generatorVersion": "2.11.4", + "generatorConfig": { + "namespace": "Square", + "package-id": "Square", + "base-api-exception-class-name": "SquareApiException", + "base-exception-class-name": "SquareException", + "client-class-name": "SquareClient", + "environment-class-name": "SquareEnvironment", + "experimental-enable-forward-compatible-enums": true, + "explicit-namespaces": true, + "generate-mock-server-tests": true, + "inline-path-parameters": true, + "use-discriminated-unions": true + } +} \ No newline at end of file diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml deleted file mode 100644 index 355db187..00000000 --- a/.mock/definition/__package__.yml +++ /dev/null @@ -1,35513 +0,0 @@ -types: - AchDetails: - docs: >- - ACH-specific details about `BANK_ACCOUNT` type payments with the - `transfer_type` of `ACH`. - properties: - routing_number: - type: optional> - docs: The routing number for the bank account. - validation: - maxLength: 50 - account_number_suffix: - type: optional> - docs: The last few digits of the bank account number. - validation: - minLength: 1 - maxLength: 4 - account_type: - type: optional> - docs: >- - The type of the bank account performing the transfer. The account type - can be `CHECKING`, - - `SAVINGS`, or `UNKNOWN`. - validation: - maxLength: 50 - source: - openapi: ../default/openapi/openapi.json - AcceptDisputeResponse: - docs: Defines the fields in an `AcceptDispute` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - dispute: - type: optional - docs: Details about the accepted dispute. - source: - openapi: ../default/openapi/openapi.json - AcceptedPaymentMethods: - properties: - apple_pay: - type: optional> - docs: Whether Apple Pay is accepted at checkout. - google_pay: - type: optional> - docs: Whether Google Pay is accepted at checkout. - cash_app_pay: - type: optional> - docs: Whether Cash App Pay is accepted at checkout. - afterpay_clearpay: - type: optional> - docs: Whether Afterpay/Clearpay is accepted at checkout. - source: - openapi: ../default/openapi/openapi.json - AccumulateLoyaltyPointsResponse: - docs: >- - Represents an - [AccumulateLoyaltyPoints](api-endpoint:Loyalty-AccumulateLoyaltyPoints) - response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - event: - type: optional - docs: >- - The resulting loyalty event. Starting in Square version 2022-08-17, - this field is no longer returned. - events: - type: optional> - docs: >- - The resulting loyalty events. If the purchase qualifies for points, - the `ACCUMULATE_POINTS` event - - is always included. When using the Orders API, the - `ACCUMULATE_PROMOTION_POINTS` event is included - - if the purchase also qualifies for a loyalty promotion. - source: - openapi: ../default/openapi/openapi.json - ActionCancelReason: - enum: - - BUYER_CANCELED - - SELLER_CANCELED - - TIMED_OUT - source: - openapi: ../default/openapi/openapi.json - ActivityType: - enum: - - ADJUSTMENT - - APP_FEE_REFUND - - APP_FEE_REVENUE - - AUTOMATIC_SAVINGS - - AUTOMATIC_SAVINGS_REVERSED - - CHARGE - - DEPOSIT_FEE - - DEPOSIT_FEE_REVERSED - - DISPUTE - - ESCHEATMENT - - FEE - - FREE_PROCESSING - - HOLD_ADJUSTMENT - - INITIAL_BALANCE_CHANGE - - MONEY_TRANSFER - - MONEY_TRANSFER_REVERSAL - - OPEN_DISPUTE - - OTHER - - OTHER_ADJUSTMENT - - PAID_SERVICE_FEE - - PAID_SERVICE_FEE_REFUND - - REDEMPTION_CODE - - REFUND - - RELEASE_ADJUSTMENT - - RESERVE_HOLD - - RESERVE_RELEASE - - RETURNED_PAYOUT - - SQUARE_CAPITAL_PAYMENT - - SQUARE_CAPITAL_REVERSED_PAYMENT - - SUBSCRIPTION_FEE - - SUBSCRIPTION_FEE_PAID_REFUND - - SUBSCRIPTION_FEE_REFUND - - TAX_ON_FEE - - THIRD_PARTY_FEE - - THIRD_PARTY_FEE_REFUND - - PAYOUT - - AUTOMATIC_BITCOIN_CONVERSIONS - - AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED - - CREDIT_CARD_REPAYMENT - - CREDIT_CARD_REPAYMENT_REVERSED - - LOCAL_OFFERS_CASHBACK - - LOCAL_OFFERS_FEE - - PERCENTAGE_PROCESSING_ENROLLMENT - - PERCENTAGE_PROCESSING_DEACTIVATION - - PERCENTAGE_PROCESSING_REPAYMENT - - PERCENTAGE_PROCESSING_REPAYMENT_REVERSED - - PROCESSING_FEE - - PROCESSING_FEE_REFUND - - UNDO_PROCESSING_FEE_REFUND - - GIFT_CARD_LOAD_FEE - - GIFT_CARD_LOAD_FEE_REFUND - - UNDO_GIFT_CARD_LOAD_FEE_REFUND - - BALANCE_FOLDERS_TRANSFER - - BALANCE_FOLDERS_TRANSFER_REVERSED - - GIFT_CARD_POOL_TRANSFER - - GIFT_CARD_POOL_TRANSFER_REVERSED - - SQUARE_PAYROLL_TRANSFER - - SQUARE_PAYROLL_TRANSFER_REVERSED - source: - openapi: ../default/openapi/openapi.json - AddGroupToCustomerResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [AddGroupToCustomer](api-endpoint:Customers-AddGroupToCustomer) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - AdditionalRecipient: - docs: >- - Represents an additional recipient (other than the merchant) receiving a - portion of this tender. - properties: - location_id: - type: string - docs: >- - The location ID for a recipient (other than the merchant) receiving a - portion of this tender. - validation: - minLength: 1 - maxLength: 50 - description: - type: optional> - docs: The description of the additional recipient. - validation: - maxLength: 100 - amount_money: - type: Money - docs: The amount of money distributed to the recipient. - receivable_id: - type: optional> - docs: >- - The unique ID for the RETIRED `AdditionalRecipientReceivable` object. - This field should be empty for any `AdditionalRecipient` objects - created after the retirement. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - Address: - docs: >- - Represents a postal address in a country. - - For more information, see [Working with - Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). - properties: - address_line_1: - type: optional> - docs: >- - The first line of the address. - - - Fields that start with `address_line` provide the address's most - specific - - details, like street number, street name, and building name. They do - *not* - - provide less specific details like city, state/province, or country - (these - - details are provided in other fields). - address_line_2: - type: optional> - docs: The second line of the address, if any. - address_line_3: - type: optional> - docs: The third line of the address, if any. - locality: - type: optional> - docs: >- - The city or town of the address. For a full list of field meanings by - country, see [Working with - Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). - sublocality: - type: optional> - docs: A civil region within the address's `locality`, if any. - sublocality_2: - type: optional> - docs: A civil region within the address's `sublocality`, if any. - sublocality_3: - type: optional> - docs: A civil region within the address's `sublocality_2`, if any. - administrative_district_level_1: - type: optional> - docs: >- - A civil entity within the address's country. In the US, this - - is the state. For a full list of field meanings by country, see - [Working with - Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). - administrative_district_level_2: - type: optional> - docs: |- - A civil entity within the address's `administrative_district_level_1`. - In the US, this is the county. - administrative_district_level_3: - type: optional> - docs: |- - A civil entity within the address's `administrative_district_level_2`, - if any. - postal_code: - type: optional> - docs: >- - The address's postal code. For a full list of field meanings by - country, see [Working with - Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). - country: - type: optional - docs: >- - The address's country, in the two-letter format of ISO 3166. For - example, `US` or `FR`. - - See [Country](#type-country) for possible values - first_name: - type: optional> - docs: Optional first name when it's representing recipient. - last_name: - type: optional> - docs: Optional last name when it's representing recipient. - source: - openapi: ../default/openapi/openapi.json - AdjustLoyaltyPointsResponse: - docs: >- - Represents an - [AdjustLoyaltyPoints](api-endpoint:Loyalty-AdjustLoyaltyPoints) request. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - event: - type: optional - docs: The resulting event data for the adjustment. - source: - openapi: ../default/openapi/openapi.json - AfterpayDetails: - docs: Additional details about Afterpay payments. - properties: - email_address: - type: optional> - docs: Email address on the buyer's Afterpay account. - validation: - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - ApplicationDetails: - docs: Details about the application that took the payment. - properties: - square_product: - type: optional - docs: >- - The Square product, such as Square Point of Sale (POS), - - Square Invoices, or Square Virtual Terminal. - - See [ExternalSquareProduct](#type-externalsquareproduct) for possible - values - application_id: - type: optional> - docs: >- - The Square ID assigned to the application used to take the payment. - - Application developers can use this information to identify payments - that - - their application processed. - - For example, if a developer uses a custom application to process - payments, - - this field contains the application ID from the Developer Dashboard. - - If a seller uses a [Square App - Marketplace](https://developer.squareup.com/docs/app-marketplace) - - application to process payments, the field contains the corresponding - application ID. - source: - openapi: ../default/openapi/openapi.json - ApplicationDetailsExternalSquareProduct: - enum: - - APPOINTMENTS - - ECOMMERCE_API - - INVOICES - - ONLINE_STORE - - OTHER - - RESTAURANTS - - RETAIL - - SQUARE_POS - - TERMINAL_API - - VIRTUAL_TERMINAL - docs: A list of products to return to external callers. - source: - openapi: ../default/openapi/openapi.json - ApplicationType: literal<"TERMINAL_API"> - AppointmentSegment: - docs: Defines an appointment segment of a booking. - properties: - duration_minutes: - type: optional> - docs: The time span in minutes of an appointment segment. - validation: - max: 1500 - service_variation_id: - type: optional> - docs: >- - The ID of the [CatalogItemVariation](entity:CatalogItemVariation) - object representing the service booked in this segment. - validation: - maxLength: 36 - team_member_id: - type: string - docs: >- - The ID of the [TeamMember](entity:TeamMember) object representing the - team member booked in this segment. - validation: - minLength: 1 - maxLength: 32 - service_variation_version: - type: optional> - docs: >- - The current version of the item variation representing the service - booked in this segment. - intermission_minutes: - type: optional - docs: >- - Time between the end of this segment and the beginning of the - subsequent segment. - access: read-only - any_team_member: - type: optional - docs: >- - Whether the customer accepts any team member, instead of a specific - one, to serve this segment. - access: read-only - resource_ids: - type: optional> - docs: >- - The IDs of the seller-accessible resources used for this appointment - segment. - access: read-only - source: - openapi: ../default/openapi/openapi.json - ArchivedState: - enum: - - ARCHIVED_STATE_NOT_ARCHIVED - - ARCHIVED_STATE_ARCHIVED - - ARCHIVED_STATE_ALL - docs: |- - Defines the values for the `archived_state` query expression - used in [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) - to return the archived, not archived or either type of catalog items. - source: - openapi: ../default/openapi/openapi.json - Availability: - docs: >- - Defines an appointment slot that encapsulates the appointment segments, - location and starting time available for booking. - properties: - start_at: - type: optional> - docs: >- - The RFC 3339 timestamp specifying the beginning time of the slot - available for booking. - location_id: - type: optional - docs: The ID of the location available for booking. - validation: - maxLength: 32 - access: read-only - appointment_segments: - type: optional>> - docs: The list of appointment segments available for booking - source: - openapi: ../default/openapi/openapi.json - BankAccount: - docs: >- - Represents a bank account. For more information about - - linking a bank account to a Square account, see - - [Bank Accounts - API](https://developer.squareup.com/docs/bank-accounts-api). - properties: - id: - type: string - docs: The unique, Square-issued identifier for the bank account. - validation: - minLength: 1 - maxLength: 30 - account_number_suffix: - type: string - docs: The last few digits of the account number. - validation: - minLength: 1 - country: - type: Country - docs: |- - The ISO 3166 Alpha-2 country code where the bank account is based. - See [Country](#type-country) for possible values - currency: - type: Currency - docs: >- - The 3-character ISO 4217 currency code indicating the operating - - currency of the bank account. For example, the currency code for US - dollars - - is `USD`. - - See [Currency](#type-currency) for possible values - account_type: - type: BankAccountType - docs: |- - The financial purpose of the associated bank account. - See [BankAccountType](#type-bankaccounttype) for possible values - holder_name: - type: string - docs: |- - Name of the account holder. This name must match the name - on the targeted bank account record. - validation: - minLength: 1 - primary_bank_identification_number: - type: string - docs: >- - Primary identifier for the bank. For more information, see - - [Bank Accounts - API](https://developer.squareup.com/docs/bank-accounts-api). - validation: - maxLength: 40 - secondary_bank_identification_number: - type: optional> - docs: >- - Secondary identifier for the bank. For more information, see - - [Bank Accounts - API](https://developer.squareup.com/docs/bank-accounts-api). - validation: - maxLength: 40 - debit_mandate_reference_id: - type: optional> - docs: >- - Reference identifier that will be displayed to UK bank account owners - - when collecting direct debit authorization. Only required for UK bank - accounts. - reference_id: - type: optional> - docs: >- - Client-provided identifier for linking the banking account to an - entity - - in a third-party system (for example, a bank account number or a user - identifier). - location_id: - type: optional> - docs: The location to which the bank account belongs. - status: - type: BankAccountStatus - docs: |- - Read-only. The current verification status of this BankAccount object. - See [BankAccountStatus](#type-bankaccountstatus) for possible values - creditable: - type: boolean - docs: >- - Indicates whether it is possible for Square to send money to this bank - account. - debitable: - type: boolean - docs: |- - Indicates whether it is possible for Square to take money from this - bank account. - fingerprint: - type: optional> - docs: >- - A Square-assigned, unique identifier for the bank account based on the - - account information. The account fingerprint can be used to compare - account - - entries and determine if the they represent the same real-world bank - account. - version: - type: optional - docs: The current version of the `BankAccount`. - bank_name: - type: optional> - docs: |- - Read only. Name of actual financial institution. - For example "Bank of America". - validation: - maxLength: 100 - source: - openapi: ../default/openapi/openapi.json - BankAccountCreatedEvent: - docs: |- - Published when you link an external bank account to a Square - account in the Seller Dashboard. Square sets the initial status to - `VERIFICATION_IN_PROGRESS` and publishes the event. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"bank_account.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - BankAccountCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"bank_account"`. - id: - type: optional - docs: ID of the affected bank account. - object: - type: optional - docs: An object containing the created bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountCreatedEventObject: - properties: - bank_account: - type: optional - docs: The created bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountDisabledEvent: - docs: |- - Published when Square sets the status of a - [BankAccount](entity:BankAccount) to `DISABLED`. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"bank_account.disabled"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was disabled, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - BankAccountDisabledEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"bank_account"`. - id: - type: optional - docs: ID of the affected bank account. - object: - type: optional - docs: An object containing the disabled bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountDisabledEventObject: - properties: - bank_account: - type: optional - docs: The disabled bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountPaymentDetails: - docs: Additional details about BANK_ACCOUNT type payments. - properties: - bank_name: - type: optional> - docs: The name of the bank associated with the bank account. - validation: - maxLength: 100 - transfer_type: - type: optional> - docs: The type of the bank transfer. The type can be `ACH` or `UNKNOWN`. - validation: - maxLength: 50 - account_ownership_type: - type: optional> - docs: |- - The ownership type of the bank account performing the transfer. - The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`. - validation: - maxLength: 50 - fingerprint: - type: optional> - docs: |- - Uniquely identifies the bank account for this seller and can be used - to determine if payments are from the same bank account. - validation: - maxLength: 255 - country: - type: optional> - docs: >- - The two-letter ISO code representing the country the bank account is - located in. - validation: - minLength: 2 - maxLength: 2 - statement_description: - type: optional> - docs: The statement description as sent to the bank. - validation: - maxLength: 1000 - ach_details: - type: optional - docs: >- - ACH-specific information about the transfer. The information is only - populated - - if the `transfer_type` is `ACH`. - errors: - type: optional>> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - BankAccountStatus: - enum: - - VERIFICATION_IN_PROGRESS - - VERIFIED - - DISABLED - docs: Indicates the current verification status of a `BankAccount` object. - source: - openapi: ../default/openapi/openapi.json - BankAccountType: - enum: - - CHECKING - - SAVINGS - - INVESTMENT - - OTHER - - BUSINESS_CHECKING - docs: Indicates the financial purpose of the bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountVerifiedEvent: - docs: |- - Published when Square sets the status of a - [BankAccount](entity:BankAccount) to `VERIFIED`. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"bank_account.verified"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was verified, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - BankAccountVerifiedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"bank_account"`. - id: - type: optional - docs: ID of the affected bank account. - object: - type: optional - docs: An object containing the verified bank account. - source: - openapi: ../default/openapi/openapi.json - BankAccountVerifiedEventObject: - properties: - bank_account: - type: optional - docs: The verified bank account. - source: - openapi: ../default/openapi/openapi.json - BatchChangeInventoryRequest: - properties: - idempotency_key: - type: string - docs: >- - A client-supplied, universally unique identifier (UUID) for the - - request. - - - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - in the - - [API Development 101](https://developer.squareup.com/docs/buildbasics) - section for more - - information. - validation: - minLength: 1 - maxLength: 128 - changes: - type: optional>> - docs: >- - The set of physical counts and inventory adjustments to be made. - - Changes are applied based on the client-supplied timestamp and may be - sent - - out of order. - ignore_unchanged_counts: - type: optional> - docs: >- - Indicates whether the current physical count should be ignored if - - the quantity is unchanged since the last physical count. Default: - `true`. - source: - openapi: ../default/openapi/openapi.json - BatchChangeInventoryResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - counts: - type: optional> - docs: The current counts for all objects referenced in the request. - changes: - type: optional> - docs: Changes created for the request. - source: - openapi: ../default/openapi/openapi.json - BatchDeleteCatalogObjectsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - deleted_object_ids: - type: optional> - docs: The IDs of all CatalogObjects deleted by this request. - deleted_at: - type: optional - docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - of this deletion in RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z". - source: - openapi: ../default/openapi/openapi.json - BatchGetCatalogObjectsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - objects: - type: optional> - docs: A list of [CatalogObject](entity:CatalogObject)s returned. - related_objects: - type: optional> - docs: >- - A list of [CatalogObject](entity:CatalogObject)s referenced by the - object in the `objects` field. - source: - openapi: ../default/openapi/openapi.json - BatchRetrieveInventoryChangesRequest: - properties: - catalog_object_ids: - type: optional>> - docs: |- - The filter to return results by `CatalogObject` ID. - The filter is only applicable when set. The default value is null. - location_ids: - type: optional>> - docs: |- - The filter to return results by `Location` ID. - The filter is only applicable when set. The default value is null. - types: - type: optional>> - docs: >- - The filter to return results by `InventoryChangeType` values other - than `TRANSFER`. - - The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. - states: - type: optional>> - docs: |- - The filter to return `ADJUSTMENT` query results by - `InventoryState`. This filter is only applied when set. - The default value is null. - updated_after: - type: optional> - docs: |- - The filter to return results with their `calculated_at` value - after the given time as specified in an RFC 3339 timestamp. - The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). - updated_before: - type: optional> - docs: >- - The filter to return results with their `created_at` or - `calculated_at` value - - strictly before the given time as specified in an RFC 3339 timestamp. - - The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for the original - query. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - limit: - type: optional> - docs: The number of [records](entity:InventoryChange) to return. - validation: - min: 1 - max: 1000 - source: - openapi: ../default/openapi/openapi.json - BatchGetInventoryChangesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - changes: - type: optional> - docs: |- - The current calculated inventory changes for the requested objects - and locations. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - source: - openapi: ../default/openapi/openapi.json - BatchGetInventoryCountsRequest: - properties: - catalog_object_ids: - type: optional>> - docs: |- - The filter to return results by `CatalogObject` ID. - The filter is applicable only when set. The default is null. - location_ids: - type: optional>> - docs: |- - The filter to return results by `Location` ID. - This filter is applicable only when set. The default is null. - updated_after: - type: optional> - docs: |- - The filter to return results with their `calculated_at` value - after the given time as specified in an RFC 3339 timestamp. - The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for the original - query. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - states: - type: optional>> - docs: >- - The filter to return results by `InventoryState`. The filter is only - applicable when set. - - Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`. - - The default is null. - limit: - type: optional> - docs: The number of [records](entity:InventoryCount) to return. - validation: - min: 1 - max: 1000 - source: - openapi: ../default/openapi/openapi.json - BatchGetInventoryCountsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - counts: - type: optional> - docs: |- - The current calculated inventory counts for the requested objects - and locations. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - source: - openapi: ../default/openapi/openapi.json - BatchGetOrdersResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `BatchRetrieveOrders` endpoint. - properties: - orders: - type: optional> - docs: >- - The requested orders. This will omit any requested orders that do not - exist. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchUpsertCatalogObjectsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - objects: - type: optional> - docs: The created successfully created CatalogObjects. - updated_at: - type: optional - docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - of this update in RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z". - id_mappings: - type: optional> - docs: The mapping between client and server IDs for this upsert. - source: - openapi: ../default/openapi/openapi.json - Booking: - docs: >- - Represents a booking as a time-bound service contract for a seller's staff - member to provide a specified service - - at a given location to a requesting customer in one or more appointment - segments. - properties: - id: - type: optional - docs: A unique ID of this object representing a booking. - validation: - maxLength: 36 - access: read-only - version: - type: optional - docs: The revision number for the booking used for optimistic concurrency. - status: - type: optional - docs: >- - The status of the booking, describing where the booking stands with - respect to the booking state machine. - - See [BookingStatus](#type-bookingstatus) for possible values - created_at: - type: optional - docs: The RFC 3339 timestamp specifying the creation time of this booking. - access: read-only - updated_at: - type: optional - docs: >- - The RFC 3339 timestamp specifying the most recent update time of this - booking. - access: read-only - start_at: - type: optional> - docs: The RFC 3339 timestamp specifying the starting time of this booking. - location_id: - type: optional> - docs: >- - The ID of the [Location](entity:Location) object representing the - location where the booked service is provided. Once set when the - booking is created, its value cannot be changed. - validation: - maxLength: 32 - customer_id: - type: optional> - docs: >- - The ID of the [Customer](entity:Customer) object representing the - customer receiving the booked service. - validation: - maxLength: 192 - customer_note: - type: optional> - docs: >- - The free-text field for the customer to supply notes about the - booking. For example, the note can be preferences that cannot be - expressed by supported attributes of a relevant - [CatalogObject](entity:CatalogObject) instance. - validation: - maxLength: 4096 - seller_note: - type: optional> - docs: >- - The free-text field for the seller to supply notes about the booking. - For example, the note can be preferences that cannot be expressed by - supported attributes of a specific - [CatalogObject](entity:CatalogObject) instance. - - This field should not be visible to customers. - validation: - maxLength: 4096 - appointment_segments: - type: optional>> - docs: A list of appointment segments for this booking. - transition_time_minutes: - type: optional - docs: >- - Additional time at the end of a booking. - - Applications should not make this field visible to customers of a - seller. - access: read-only - all_day: - type: optional - docs: Whether the booking is of a full business day. - access: read-only - location_type: - type: optional - docs: >- - The type of location where the booking is held. - - See - [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) - for possible values - creator_details: - type: optional - docs: Information about the booking creator. - source: - type: optional - docs: >- - The source of the booking. - - Access to this field requires seller-level permissions. - - See [BookingBookingSource](#type-bookingbookingsource) for possible - values - address: - type: optional
- docs: Stores a customer address if the location type is `CUSTOMER_LOCATION`. - source: - openapi: ../default/openapi/openapi.json - BookingBookingSource: - enum: - - FIRST_PARTY_MERCHANT - - FIRST_PARTY_BUYER - - THIRD_PARTY_BUYER - - API - docs: Supported sources a booking was created from. - source: - openapi: ../default/openapi/openapi.json - BookingCreatedEvent: - docs: >- - Published when a booking is created. - - - To receive this event with buyer-level permissions, you must have - `APPOINTMENTS_READ` set for the OAuth scope. - - To receive this event with seller-level permissions, you must have - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"booking.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - BookingCreatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"booking"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the created booking. - source: - openapi: ../default/openapi/openapi.json - BookingCreatedEventObject: - properties: - booking: - type: optional - docs: The created booking. - source: - openapi: ../default/openapi/openapi.json - BookingCreatorDetails: - docs: Information about a booking creator. - properties: - creator_type: - type: optional - docs: >- - The seller-accessible type of the creator of the booking. - - See - [BookingCreatorDetailsCreatorType](#type-bookingcreatordetailscreatortype) - for possible values - team_member_id: - type: optional - docs: >- - The ID of the team member who created the booking, when the booking - creator is of the `TEAM_MEMBER` type. - - Access to this field requires seller-level permissions. - validation: - maxLength: 32 - access: read-only - customer_id: - type: optional - docs: >- - The ID of the customer who created the booking, when the booking - creator is of the `CUSTOMER` type. - - Access to this field requires seller-level permissions. - validation: - maxLength: 192 - access: read-only - source: - openapi: ../default/openapi/openapi.json - BookingCreatorDetailsCreatorType: - enum: - - TEAM_MEMBER - - CUSTOMER - docs: Supported types of a booking creator. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionOwnedCreatedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - is created by the subscribing application. Subscribe to this event to be - notified - - when your application creates a booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.owned.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionOwnedDeletedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - is deleted by the subscribing application. Subscribe to this event to be - notified - - when your application deletes a booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionOwnedUpdatedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - is updated by the subscribing application. Subscribe to this event to be - notified - - when your application updates a booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionVisibleCreatedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - with the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is created. - - An application that subscribes to this event is notified when a booking - custom attribute definition is created - - by any application for which the subscribing application has read access - to the booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.visible.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionVisibleDeletedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - with the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is deleted. - - An application that subscribes to this event is notified when a booking - custom attribute definition is deleted - - by any application for which the subscribing application has read access - to the booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDefinitionVisibleUpdatedEvent: - docs: >- - Published when a booking [custom attribute - definition](entity:CustomAttributeDefinition) - - with the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is updated. - - An application that subscribes to this event is notified when a booking - custom attribute definition is updated - - by any application for which the subscribing application has read access - to the booking custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute_definition.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDeleteRequest: - docs: >- - Represents an individual delete request in a - [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) - - request. An individual request contains a booking ID, the custom attribute - to delete, and an optional idempotency key. - properties: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - validation: - minLength: 1 - maxLength: 36 - key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeDeleteResponse: - docs: >- - Represents a response for an individual upsert request in a - [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) - operation. - properties: - booking_id: - type: optional - docs: >- - The ID of the [booking](entity:Booking) associated with the custom - attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeOwnedDeletedEvent: - docs: >- - Published when a booking [custom attribute](entity:CustomAttribute) - - associated with a [custom attribute - definition](entity:CustomAttributeDefinition) that is - - owned by the subscribing application is deleted. - - Subscribe to this event to be notified - - when your application deletes a booking custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeOwnedUpdatedEvent: - docs: >- - Published when a booking [custom attribute](entity:CustomAttribute) - - is updated by the subscribing application. Subscribe to this event to be - notified - - when your application updates a booking custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeUpsertRequest: - docs: >- - Represents an individual upsert request in a - [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) - - request. An individual request contains a booking ID, the custom attribute - to create or update, - - and an optional idempotency key. - properties: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - validation: - minLength: 1 - maxLength: 36 - custom_attribute: - type: CustomAttribute - docs: >- - The custom attribute to create or update, with following fields: - - - - `key`. This key must match the `key` of a custom attribute - definition in the Square seller - - account. If the requesting application is not the definition owner, - you must provide the qualified key. - - - - `value`. This value must conform to the `schema` specified by the - definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for update operations, include this optional field in the - request and set the - - value to the current version of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this individual upsert request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeUpsertResponse: - docs: >- - Represents a response for an individual upsert request in a - [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) - operation. - properties: - booking_id: - type: optional - docs: >- - The ID of the [booking](entity:Booking) associated with the custom - attribute. - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeVisibleDeletedEvent: - docs: >- - Published when a booking [custom attribute](entity:CustomAttribute) with - - the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is deleted. - - An application that subscribes to this event is notified when a booking - custom attribute is deleted - - by any application for which the subscribing application has read access - to the booking custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingCustomAttributeVisibleUpdatedEvent: - docs: >- - Published when a booking [custom attribute](entity:CustomAttribute) - - with the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is updated. - - An application that subscribes to this event is notified when a booking - custom attribute is updated - - by any application for which the subscribing application has read access - to the booking custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"booking.custom_attribute.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - BookingStatus: - enum: - - PENDING - - CANCELLED_BY_CUSTOMER - - CANCELLED_BY_SELLER - - DECLINED - - ACCEPTED - - NO_SHOW - docs: Supported booking statuses. - source: - openapi: ../default/openapi/openapi.json - BookingUpdatedEvent: - docs: >- - Published when a booking is updated or cancelled. - - - To receive this event with buyer-level permissions, you must have - `APPOINTMENTS_READ` set for the OAuth scope. - - To receive this event with seller-level permissions, you must have - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"booking.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - BookingUpdatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"booking"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the updated booking. - source: - openapi: ../default/openapi/openapi.json - BookingUpdatedEventObject: - properties: - booking: - type: optional - docs: The updated booking. - source: - openapi: ../default/openapi/openapi.json - Break: - docs: A record of a team member's break on a [timecard](entity:Timecard). - properties: - id: - type: optional - docs: The UUID for this object. - start_at: - type: string - docs: >- - RFC 3339; follows the same timezone information as the - [timecard](entity:Timecard). Precision up to - - the minute is respected; seconds are truncated. - validation: - minLength: 1 - end_at: - type: optional> - docs: >- - RFC 3339; follows the same timezone information as the - [timecard](entity:Timecard). Precision up to - - the minute is respected; seconds are truncated. - break_type_id: - type: string - docs: The [BreakType](entity:BreakType) that this break was templated on. - validation: - minLength: 1 - name: - type: string - docs: A human-readable name. - validation: - minLength: 1 - expected_duration: - type: string - docs: |- - Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of - the break. - - Example for break expected duration of 15 minutes: PT15M - validation: - minLength: 1 - is_paid: - type: boolean - docs: |- - Whether this break counts towards time worked for compensation - purposes. - source: - openapi: ../default/openapi/openapi.json - BreakType: - docs: >- - A template for a type of [break](entity:Break) that can be added to a - - [timecard](entity:Timecard), including the expected duration and paid - status. - properties: - id: - type: optional - docs: The UUID for this object. - validation: - maxLength: 255 - location_id: - type: string - docs: The ID of the business location this type of break applies to. - validation: - minLength: 1 - break_name: - type: string - docs: |- - A human-readable name for this type of break. The name is displayed to - team members in Square products. - validation: - minLength: 1 - expected_duration: - type: string - docs: |- - Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of - this break. Precision less than minutes is truncated. - - Example for break expected duration of 15 minutes: PT15M - validation: - minLength: 1 - is_paid: - type: boolean - docs: |- - Whether this break counts towards time worked for compensation - purposes. - version: - type: optional - docs: >- - Used for resolving concurrency issues. The request fails if the - version - - provided does not match the server version at the time of the request. - If a value is not - - provided, Square's servers execute a "blind" write; potentially - - overwriting another writer's data. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - BulkCreateCustomerData: - docs: >- - Defines the customer data provided in individual create requests for a - - [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) - operation. - properties: - given_name: - type: optional> - docs: >- - The given name (that is, the first name) associated with the customer - profile. - validation: - maxLength: 300 - family_name: - type: optional> - docs: >- - The family name (that is, the last name) associated with the customer - profile. - validation: - maxLength: 300 - company_name: - type: optional> - docs: A business name associated with the customer profile. - validation: - maxLength: 500 - nickname: - type: optional> - docs: A nickname for the customer profile. - validation: - maxLength: 100 - email_address: - type: optional> - docs: The email address associated with the customer profile. - validation: - maxLength: 254 - address: - type: optional
- docs: >- - The physical address associated with the customer profile. For maximum - length constraints, - - see [Customer - addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address). - - The `first_name` and `last_name` fields are ignored if they are - present in the request. - phone_number: - type: optional> - docs: >- - The phone number associated with the customer profile. The phone - number must be valid - - and can contain 9–16 digits, with an optional `+` prefix and country - code. For more information, - - see [Customer phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). - reference_id: - type: optional> - docs: |- - An optional second ID used to associate the customer profile with an - entity in another system. - validation: - maxLength: 100 - note: - type: optional> - docs: A custom note associated with the customer profile. - birthday: - type: optional> - docs: >- - The birthday associated with the customer profile, in `YYYY-MM-DD` or - `MM-DD` format. - - For example, specify `1998-09-21` for September 21, 1998, or `09-21` - for September 21. - - Birthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the - specified birth year or - - `0000` if a birth year is not specified. - tax_ids: - type: optional - docs: >- - The tax ID associated with the customer profile. This field is - available only for - - customers of sellers in EU countries or the United Kingdom. For more - information, see - - [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - source: - openapi: ../default/openapi/openapi.json - BulkCreateCustomersResponse: - docs: >- - Defines the fields included in the response body from the - - [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) - endpoint. - properties: - responses: - type: optional> - docs: >- - A map of responses that correspond to individual create requests, - represented by - - key-value pairs. - - - Each key is the idempotency key that was provided for a create request - and each value - - is the corresponding response. - - If the request succeeds, the value is the new customer profile. - - If the request fails, the value contains any errors that occurred - during the request. - errors: - type: optional> - docs: Any top-level errors that prevented the bulk operation from running. - source: - openapi: ../default/openapi/openapi.json - BatchCreateTeamMembersResponse: - docs: >- - Represents a response from a bulk create request containing the created - `TeamMember` objects or error messages. - properties: - team_members: - type: optional> - docs: >- - The successfully created `TeamMember` objects. Each key is the - `idempotency_key` that maps to the `CreateTeamMemberRequest`. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchCreateVendorsResponse: - docs: >- - Represents an output from a call to - [BulkCreateVendors](api-endpoint:Vendors-BulkCreateVendors). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - responses: - type: optional> - docs: >- - A set of [CreateVendorResponse](entity:CreateVendorResponse) objects - encapsulating successfully created [Vendor](entity:Vendor) - - objects or error responses for failed attempts. The set is represented - by - - a collection of idempotency-key/`Vendor`-object or - idempotency-key/error-object pairs. The idempotency keys correspond to - those specified - - in the input. - source: - openapi: ../default/openapi/openapi.json - BulkDeleteBookingCustomAttributesResponse: - docs: >- - Represents a - [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - delete request. - properties: - values: - type: optional> - docs: >- - A map of responses that correspond to individual delete requests. Each - response has the - - same ID as the corresponding request and contains `booking_id` and - `errors` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkDeleteCustomersResponse: - docs: >- - Defines the fields included in the response body from the - - [BulkDeleteCustomers](api-endpoint:Customers-BulkDeleteCustomers) - endpoint. - properties: - responses: - type: optional> - docs: >- - A map of responses that correspond to individual delete requests, - represented by - - key-value pairs. - - - Each key is the customer ID that was specified for a delete request - and each value - - is the corresponding response. - - If the request succeeds, the value is an empty object (`{ }`). - - If the request fails, the value contains any errors that occurred - during the request. - errors: - type: optional> - docs: Any top-level errors that prevented the bulk operation from running. - source: - openapi: ../default/openapi/openapi.json - BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest: - docs: >- - Represents an individual delete request in a - [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) - - request. An individual request contains an optional ID of the associated - custom attribute definition - - and optional key of the associated custom attribute definition. - properties: - key: - type: optional - docs: >- - The key of the associated custom attribute definition. - - Represented as a qualified key if the requesting app is not the - definition owner. - validation: - pattern: ^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$ - access: read-only - source: - openapi: ../default/openapi/openapi.json - BulkDeleteLocationCustomAttributesResponse: - docs: >- - Represents a - [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - delete request. - properties: - values: - type: >- - map - docs: >- - A map of responses that correspond to individual delete requests. Each - response has the - - same key as the corresponding request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse: - docs: >- - Represents an individual delete response in a - [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) - - request. - properties: - location_id: - type: optional - docs: The ID of the location associated with the custom attribute. - errors: - type: optional> - docs: >- - Errors that occurred while processing the individual - LocationCustomAttributeDeleteRequest request - source: - openapi: ../default/openapi/openapi.json - BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest: - docs: >- - Represents an individual delete request in a - [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) - - request. An individual request contains an optional ID of the associated - custom attribute definition - - and optional key of the associated custom attribute definition. - properties: - key: - type: optional - docs: >- - The key of the associated custom attribute definition. - - Represented as a qualified key if the requesting app is not the - definition owner. - validation: - pattern: ^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$ - access: read-only - source: - openapi: ../default/openapi/openapi.json - BulkDeleteMerchantCustomAttributesResponse: - docs: >- - Represents a - [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - delete request. - properties: - values: - type: >- - map - docs: >- - A map of responses that correspond to individual delete requests. Each - response has the - - same key as the corresponding request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse: - docs: >- - Represents an individual delete response in a - [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) - - request. - properties: - errors: - type: optional> - docs: >- - Errors that occurred while processing the individual - MerchantCustomAttributeDeleteRequest request - source: - openapi: ../default/openapi/openapi.json - BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute: - docs: Represents one delete within the bulk operation. - properties: - key: - type: optional - docs: >- - The key of the custom attribute to delete. This key must match the - key - - of an existing custom attribute definition. - validation: - pattern: ^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$ - minLength: 1 - access: read-only - order_id: - type: string - docs: The ID of the target [order](entity:Order). - validation: - minLength: 1 - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - BulkDeleteOrderCustomAttributesResponse: - docs: Represents a response from deleting one or more order custom attributes. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - values: - type: map - docs: >2- - A map of responses that correspond to individual delete requests. Each response has the same ID - as the corresponding request and contains either a `custom_attribute` - or an `errors` field. - source: - openapi: ../default/openapi/openapi.json - BulkPublishScheduledShiftsData: - docs: >- - Represents options for an individual publish request in a - - [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts) - - operation, provided as the value in a key-value pair. - properties: - version: - type: optional - docs: >- - The current version of the scheduled shift, used to enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control. If the provided version doesn't match the server version, the - request fails. - - If omitted, Square executes a blind write, potentially overwriting - data from another publish request. - source: - openapi: ../default/openapi/openapi.json - BulkPublishScheduledShiftsResponse: - docs: >- - Represents a - [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts) - response. - - Either `scheduled_shifts` or `errors` is present in the response. - properties: - responses: - type: optional> - docs: >- - A map of key-value pairs that represent responses for individual - publish requests. - - The order of responses might differ from the order in which the - requests were provided. - - - - Each key is the scheduled shift ID that was specified for a publish - request. - - - Each value is the corresponding response. If the request succeeds, - the value is the - - published scheduled shift. If the request fails, the value is an - `errors` array containing - - any errors that occurred while processing the request. - errors: - type: optional> - docs: >- - Any top-level errors that prevented the bulk operation from - succeeding. - source: - openapi: ../default/openapi/openapi.json - BulkRetrieveBookingsResponse: - docs: Response payload for bulk retrieval of bookings. - properties: - bookings: - type: optional> - docs: >- - Requested bookings returned as a map containing `booking_id` as the - key and `RetrieveBookingResponse` as the value. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkRetrieveChannelsRequestConstants: literal<"MAX_BATCH_SIZE"> - BulkRetrieveChannelsResponse: - docs: >- - Defines the fields that are included in the request body for the - - [BulkRetrieveChannels](api-endpoint:Channels-BulkRetrieveChannels) - endpoint. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - responses: - type: optional> - docs: |- - A map of channel IDs to channel responses which tell whether - retrieval for a specific channel is success or not. - Channel response of a success retrieval would contain channel info - whereas channel response of a failed retrieval would have error info. - source: - openapi: ../default/openapi/openapi.json - BulkRetrieveCustomersResponse: - docs: >- - Defines the fields included in the response body from the - - [BulkRetrieveCustomers](api-endpoint:Customers-BulkRetrieveCustomers) - endpoint. - properties: - responses: - type: optional> - docs: >- - A map of responses that correspond to individual retrieve requests, - represented by - - key-value pairs. - - - Each key is the customer ID that was specified for a retrieve request - and each value - - is the corresponding response. - - If the request succeeds, the value is the requested customer profile. - - If the request fails, the value contains any errors that occurred - during the request. - errors: - type: optional> - docs: Any top-level errors that prevented the bulk operation from running. - source: - openapi: ../default/openapi/openapi.json - BulkRetrieveTeamMemberBookingProfilesResponse: - docs: >- - Response payload for the - [BulkRetrieveTeamMemberBookingProfiles](api-endpoint:Bookings-BulkRetrieveTeamMemberBookingProfiles) - endpoint. - properties: - team_member_booking_profiles: - type: optional> - docs: >- - The returned team members' booking profiles, as a map with - `team_member_id` as the key and - [TeamMemberBookingProfile](entity:TeamMemberBookingProfile) the value. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchGetVendorsResponse: - docs: >- - Represents an output from a call to - [BulkRetrieveVendors](api-endpoint:Vendors-BulkRetrieveVendors). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - responses: - type: optional> - docs: >- - The set of [RetrieveVendorResponse](entity:RetrieveVendorResponse) - objects encapsulating successfully retrieved [Vendor](entity:Vendor) - - objects or error responses for failed attempts. The set is represented - by - - a collection of `Vendor`-ID/`Vendor`-object or - `Vendor`-ID/error-object pairs. - source: - openapi: ../default/openapi/openapi.json - BulkSwapPlanResponse: - docs: |- - Defines output parameters in a response of the - [BulkSwapPlan](api-endpoint:Subscriptions-BulkSwapPlan) endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - affected_subscriptions: - type: optional - docs: The number of affected subscriptions. - source: - openapi: ../default/openapi/openapi.json - BulkUpdateCustomerData: - docs: >- - Defines the customer data provided in individual update requests for a - - [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) - operation. - properties: - given_name: - type: optional> - docs: >- - The given name (that is, the first name) associated with the customer - profile. - validation: - maxLength: 300 - family_name: - type: optional> - docs: >- - The family name (that is, the last name) associated with the customer - profile. - validation: - maxLength: 300 - company_name: - type: optional> - docs: A business name associated with the customer profile. - validation: - maxLength: 500 - nickname: - type: optional> - docs: A nickname for the customer profile. - validation: - maxLength: 100 - email_address: - type: optional> - docs: The email address associated with the customer profile. - validation: - maxLength: 254 - address: - type: optional
- docs: >- - The physical address associated with the customer profile. For maximum - length constraints, - - see [Customer - addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address). - - The `first_name` and `last_name` fields are ignored if they are - present in the request. - phone_number: - type: optional> - docs: >- - The phone number associated with the customer profile. The phone - number must be valid - - and can contain 9–16 digits, with an optional `+` prefix and country - code. For more information, - - see [Customer phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). - reference_id: - type: optional> - docs: |- - An optional second ID used to associate the customer profile with an - entity in another system. - validation: - maxLength: 100 - note: - type: optional> - docs: An custom note associates with the customer profile. - birthday: - type: optional> - docs: >- - The birthday associated with the customer profile, in `YYYY-MM-DD` or - `MM-DD` format. - - For example, specify `1998-09-21` for September 21, 1998, or `09-21` - for September 21. - - Birthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the - specified birth year or - - `0000` if a birth year is not specified. - tax_ids: - type: optional - docs: >- - The tax ID associated with the customer profile. This field is - available only for - - customers of sellers in EU countries or the United Kingdom. For more - information, see - - [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - version: - type: optional - docs: >- - The current version of the customer profile. - - - As a best practice, you should include this field to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control. - source: - openapi: ../default/openapi/openapi.json - BulkUpdateCustomersResponse: - docs: >- - Defines the fields included in the response body from the - - [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) - endpoint. - properties: - responses: - type: optional> - docs: >- - A map of responses that correspond to individual update requests, - represented by - - key-value pairs. - - - Each key is the customer ID that was specified for an update request - and each value - - is the corresponding response. - - If the request succeeds, the value is the updated customer profile. - - If the request fails, the value contains any errors that occurred - during the request. - errors: - type: optional> - docs: Any top-level errors that prevented the bulk operation from running. - source: - openapi: ../default/openapi/openapi.json - BatchUpdateTeamMembersResponse: - docs: >- - Represents a response from a bulk update request containing the updated - `TeamMember` objects or error messages. - properties: - team_members: - type: optional> - docs: >- - The successfully updated `TeamMember` objects. Each key is the - `team_member_id` that maps to the `UpdateTeamMemberRequest`. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchUpdateVendorsResponse: - docs: >- - Represents an output from a call to - [BulkUpdateVendors](api-endpoint:Vendors-BulkUpdateVendors). - properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - responses: - type: optional> - docs: >- - A set of [UpdateVendorResponse](entity:UpdateVendorResponse) objects - encapsulating successfully created [Vendor](entity:Vendor) - - objects or error responses for failed attempts. The set is represented - by a collection of `Vendor`-ID/`UpdateVendorResponse`-object or - - `Vendor`-ID/error-object pairs. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertBookingCustomAttributesResponse: - docs: >- - Represents a - [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - upsert request. - properties: - values: - type: optional> - docs: >- - A map of responses that correspond to individual upsert requests. Each - response has the - - same ID as the corresponding request and contains either a - `booking_id` and `custom_attribute` or an `errors` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest: - docs: >- - Represents an individual upsert request in a - [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) - - request. An individual request contains a customer ID, the custom - attribute to create or update, - - and an optional idempotency key. - properties: - customer_id: - type: string - docs: The ID of the target [customer profile](entity:Customer). - validation: - minLength: 1 - custom_attribute: - type: CustomAttribute - docs: >- - The custom attribute to create or update, with following fields: - - - - `key`. This key must match the `key` of a custom attribute - definition in the Square seller - - account. If the requesting application is not the definition owner, - you must provide the qualified key. - - - - `value`. This value must conform to the `schema` specified by the - definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for update operations, include this optional field in the - request and set the - - value to the current version of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this individual upsert request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - source: - openapi: ../default/openapi/openapi.json - BatchUpsertCustomerCustomAttributesResponse: - docs: >- - Represents a - [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - upsert request. - properties: - values: - type: >- - optional> - docs: >- - A map of responses that correspond to individual upsert requests. Each - response has the - - same ID as the corresponding request and contains either a - `customer_id` and `custom_attribute` or an `errors` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse: - docs: >- - Represents a response for an individual upsert request in a - [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) - operation. - properties: - customer_id: - type: optional - docs: The ID of the customer profile associated with the custom attribute. - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest: - docs: >- - Represents an individual upsert request in a - [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) - - request. An individual request contains a location ID, the custom - attribute to create or update, - - and an optional idempotency key. - properties: - location_id: - type: string - docs: The ID of the target [location](entity:Location). - validation: - minLength: 1 - custom_attribute: - type: CustomAttribute - docs: >- - The custom attribute to create or update, with following fields: - - - `key`. This key must match the `key` of a custom attribute - definition in the Square seller - - account. If the requesting application is not the definition owner, - you must provide the qualified key. - - - `value`. This value must conform to the `schema` specified by the - definition. - - For more information, see [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).. - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, specify the current version of the custom attribute. - - If this is not important for your application, `version` can be set to - -1. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this individual upsert request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - source: - openapi: ../default/openapi/openapi.json - BulkUpsertLocationCustomAttributesResponse: - docs: >- - Represents a - [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - upsert request. - properties: - values: - type: >- - optional> - docs: >- - A map of responses that correspond to individual upsert requests. Each - response has the - - same ID as the corresponding request and contains either a - `location_id` and `custom_attribute` or an `errors` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse: - docs: >- - Represents a response for an individual upsert request in a - [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) - operation. - properties: - location_id: - type: optional - docs: The ID of the location associated with the custom attribute. - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest: - docs: >- - Represents an individual upsert request in a - [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) - - request. An individual request contains a merchant ID, the custom - attribute to create or update, - - and an optional idempotency key. - properties: - merchant_id: - type: string - docs: The ID of the target [merchant](entity:Merchant). - validation: - minLength: 1 - custom_attribute: - type: CustomAttribute - docs: >- - The custom attribute to create or update, with following fields: - - - `key`. This key must match the `key` of a custom attribute - definition in the Square seller - - account. If the requesting application is not the definition owner, - you must provide the qualified key. - - - `value`. This value must conform to the `schema` specified by the - definition. - - For more information, see [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). - - - The version field must match the current version of the custom - attribute definition to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - If this is not important for your application, version can be set to - -1. For any other values, the request fails with a BAD_REQUEST error. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this individual upsert request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - source: - openapi: ../default/openapi/openapi.json - BulkUpsertMerchantCustomAttributesResponse: - docs: >- - Represents a - [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) - response, - - which contains a map of responses that each corresponds to an individual - upsert request. - properties: - values: - type: >- - optional> - docs: >- - A map of responses that correspond to individual upsert requests. Each - response has the - - same ID as the corresponding request and contains either a - `merchant_id` and `custom_attribute` or an `errors` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse: - docs: >- - Represents a response for an individual upsert request in a - [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) - operation. - properties: - merchant_id: - type: optional - docs: The ID of the merchant associated with the custom attribute. - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. - source: - openapi: ../default/openapi/openapi.json - BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute: - docs: Represents one upsert within the bulk operation. - properties: - custom_attribute: - type: CustomAttribute - docs: >- - The custom attribute to create or update, with the following fields: - - - - `value`. This value must conform to the `schema` specified by the - definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include this optional field and specify the current version - of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - order_id: - type: string - docs: The ID of the target [order](entity:Order). - validation: - minLength: 1 - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - BulkUpsertOrderCustomAttributesResponse: - docs: Represents a response from a bulk upsert of order custom attributes. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - values: - type: map - docs: ' A map of responses that correspond to individual upsert operations for custom attributes.' - source: - openapi: ../default/openapi/openapi.json - BusinessAppointmentSettings: - docs: >- - The service appointment settings, including where and how the service is - provided. - properties: - location_types: - type: >- - optional>> - docs: >- - Types of the location allowed for bookings. - - See - [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) - for possible values - alignment_time: - type: optional - docs: >- - The time unit of the service duration for bookings. - - See - [BusinessAppointmentSettingsAlignmentTime](#type-businessappointmentsettingsalignmenttime) - for possible values - min_booking_lead_time_seconds: - type: optional> - docs: >- - The minimum lead time in seconds before a service can be booked. A - booking must be created at least this amount of time before its - starting time. - max_booking_lead_time_seconds: - type: optional> - docs: >- - The maximum lead time in seconds before a service can be booked. A - booking must be created at most this amount of time before its - starting time. - any_team_member_booking_enabled: - type: optional> - docs: >- - Indicates whether a customer can choose from all available time slots - and have a staff member assigned - - automatically (`true`) or not (`false`). - multiple_service_booking_enabled: - type: optional> - docs: >- - Indicates whether a customer can book multiple services in a single - online booking. - max_appointments_per_day_limit_type: - type: optional - docs: >- - Indicates whether the daily appointment limit applies to team members - or to - - business locations. - - See - [BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType](#type-businessappointmentsettingsmaxappointmentsperdaylimittype) - for possible values - max_appointments_per_day_limit: - type: optional> - docs: >- - The maximum number of daily appointments per team member or per - location. - cancellation_window_seconds: - type: optional> - docs: >- - The cut-off time in seconds for allowing clients to cancel or - reschedule an appointment. - cancellation_fee_money: - type: optional - docs: The flat-fee amount charged for a no-show booking. - cancellation_policy: - type: optional - docs: >- - The cancellation policy adopted by the seller. - - See - [BusinessAppointmentSettingsCancellationPolicy](#type-businessappointmentsettingscancellationpolicy) - for possible values - cancellation_policy_text: - type: optional> - docs: The free-form text of the seller's cancellation policy. - validation: - maxLength: 65536 - skip_booking_flow_staff_selection: - type: optional> - docs: >- - Indicates whether customers has an assigned staff member (`true`) or - can select s staff member of their choice (`false`). - source: - openapi: ../default/openapi/openapi.json - BusinessAppointmentSettingsAlignmentTime: - enum: - - SERVICE_DURATION - - QUARTER_HOURLY - - HALF_HOURLY - - HOURLY - docs: Time units of a service duration for bookings. - source: - openapi: ../default/openapi/openapi.json - BusinessAppointmentSettingsBookingLocationType: - enum: - - BUSINESS_LOCATION - - CUSTOMER_LOCATION - - PHONE - docs: Supported types of location where service is provided. - source: - openapi: ../default/openapi/openapi.json - BusinessAppointmentSettingsCancellationPolicy: - enum: - - CANCELLATION_TREATED_AS_NO_SHOW - - CUSTOM_POLICY - docs: The category of the seller’s cancellation policy. - source: - openapi: ../default/openapi/openapi.json - BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType: - enum: - - PER_TEAM_MEMBER - - PER_LOCATION - docs: Types of daily appointment limits. - source: - openapi: ../default/openapi/openapi.json - BusinessBookingProfile: - docs: >- - A seller's business booking profile, including booking policy, appointment - settings, etc. - properties: - seller_id: - type: optional> - docs: The ID of the seller, obtainable using the Merchants API. - validation: - maxLength: 32 - created_at: - type: optional - docs: The RFC 3339 timestamp specifying the booking's creation time. - access: read-only - booking_enabled: - type: optional> - docs: Indicates whether the seller is open for booking. - customer_timezone_choice: - type: optional - docs: >- - The choice of customer's time zone information of a booking. - - The Square online booking site and all notifications to customers uses - either the seller location’s time zone - - or the time zone the customer chooses at booking. - - See - [BusinessBookingProfileCustomerTimezoneChoice](#type-businessbookingprofilecustomertimezonechoice) - for possible values - booking_policy: - type: optional - docs: >- - The policy for the seller to automatically accept booking requests - (`ACCEPT_ALL`) or not (`REQUIRES_ACCEPTANCE`). - - See - [BusinessBookingProfileBookingPolicy](#type-businessbookingprofilebookingpolicy) - for possible values - allow_user_cancel: - type: optional> - docs: >- - Indicates whether customers can cancel or reschedule their own - bookings (`true`) or not (`false`). - business_appointment_settings: - type: optional - docs: Settings for appointment-type bookings. - support_seller_level_writes: - type: optional> - docs: >- - Indicates whether the seller's subscription to Square Appointments - supports creating, updating or canceling an appointment through the - API (`true`) or not (`false`) using seller permission. - source: - openapi: ../default/openapi/openapi.json - BusinessBookingProfileBookingPolicy: - enum: - - ACCEPT_ALL - - REQUIRES_ACCEPTANCE - docs: Policies for accepting bookings. - source: - openapi: ../default/openapi/openapi.json - BusinessBookingProfileCustomerTimezoneChoice: - enum: - - BUSINESS_LOCATION_TIMEZONE - - CUSTOMER_CHOICE - docs: Choices of customer-facing time zone used for bookings. - source: - openapi: ../default/openapi/openapi.json - BusinessHours: - docs: The hours of operation for a location. - properties: - periods: - type: optional>> - docs: >- - The list of time periods during which the business is open. There can - be at most 10 periods per day. - source: - openapi: ../default/openapi/openapi.json - BusinessHoursPeriod: - docs: Represents a period of time during which a business location is open. - properties: - day_of_week: - type: optional - docs: |- - The day of the week for this time period. - See [DayOfWeek](#type-dayofweek) for possible values - start_local_time: - type: optional> - docs: >- - The start time of a business hours period, specified in local time - using partial-time - - RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 - in the morning. - - Note that the seconds value is always :00, but it is appended for - conformance to the RFC. - end_local_time: - type: optional> - docs: >- - The end time of a business hours period, specified in local time using - partial-time - - RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 - in the evening. - - Note that the seconds value is always :00, but it is appended for - conformance to the RFC. - source: - openapi: ../default/openapi/openapi.json - BuyNowPayLaterDetails: - docs: Additional details about a Buy Now Pay Later payment type. - properties: - brand: - type: optional> - docs: |- - The brand used for the Buy Now Pay Later payment. - The brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`. - validation: - maxLength: 50 - afterpay_details: - type: optional - docs: >- - Details about an Afterpay payment. These details are only populated if - the `brand` is - - `AFTERPAY`. - clearpay_details: - type: optional - docs: >- - Details about a Clearpay payment. These details are only populated if - the `brand` is - - `CLEARPAY`. - source: - openapi: ../default/openapi/openapi.json - CalculateLoyaltyPointsResponse: - docs: >- - Represents a - [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) - response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - points: - type: optional - docs: >- - The number of points that the buyer can earn from the base loyalty - program. - promotion_points: - type: optional - docs: >- - The number of points that the buyer can earn from a loyalty promotion. - To be eligible - - to earn promotion points, the purchase must first qualify for program - points. When `order_id` - - is not provided in the request, this value is always 0. - source: - openapi: ../default/openapi/openapi.json - CalculateOrderResponse: - properties: - order: - type: optional - docs: The calculated version of the order provided in the request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CancelBookingResponse: - properties: - booking: - type: optional - docs: The booking that was cancelled. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CancelInvoiceResponse: - docs: The response returned by the `CancelInvoice` request. - properties: - invoice: - type: optional - docs: The canceled invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - CancelLoyaltyPromotionResponse: - docs: >- - Represents a - [CancelLoyaltyPromotion](api-endpoint:Loyalty-CancelLoyaltyPromotion) - response. - - Either `loyalty_promotion` or `errors` is present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotion: - type: optional - docs: The canceled loyalty promotion. - source: - openapi: ../default/openapi/openapi.json - CancelPaymentByIdempotencyKeyResponse: - docs: >- - Defines the response returned by - - [CancelPaymentByIdempotencyKey](api-endpoint:Payments-CancelPaymentByIdempotencyKey). - - On success, `errors` is empty. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CancelPaymentResponse: - docs: >- - Defines the response returned by - [CancelPayment](api-endpoint:Payments-CancelPayment). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The successfully canceled `Payment` object. - source: - openapi: ../default/openapi/openapi.json - CancelSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [CancelSubscription](api-endpoint:Subscriptions-CancelSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: >- - The specified subscription scheduled for cancellation according to the - action created by the request. - actions: - type: optional> - docs: A list of a single `CANCEL` action scheduled for the subscription. - source: - openapi: ../default/openapi/openapi.json - CancelTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: The canceled `TerminalAction` - source: - openapi: ../default/openapi/openapi.json - CancelTerminalCheckoutResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkout: - type: optional - docs: The canceled `TerminalCheckout`. - source: - openapi: ../default/openapi/openapi.json - CancelTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The updated `TerminalRefund`. - source: - openapi: ../default/openapi/openapi.json - CancelTransferOrderResponse: - docs: Response for canceling a transfer order - properties: - transfer_order: - type: optional - docs: The updated transfer order with status changed to CANCELED - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - CaptureTransactionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) - endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - Card: - docs: |- - Represents the payment details of a card to be used for payments. These - details are determined by the payment token generated by Web Payments SDK. - properties: - id: - type: optional - docs: Unique ID for this card. Generated by Square. - validation: - maxLength: 64 - access: read-only - card_brand: - type: optional - docs: |- - The card's brand. - See [CardBrand](#type-cardbrand) for possible values - last_4: - type: optional - docs: The last 4 digits of the card number. - validation: - maxLength: 4 - access: read-only - exp_month: - type: optional> - docs: >- - The expiration month of the associated card as an integer between 1 - and 12. - exp_year: - type: optional> - docs: The four-digit year of the card's expiration date. - cardholder_name: - type: optional> - docs: The name of the cardholder. - validation: - maxLength: 96 - billing_address: - type: optional
- docs: >- - The billing address for this card. `US` postal codes can be provided - as a 5-digit zip code - - or 9-digit ZIP+4 (example: `12345-6789`). For a full list of field - meanings by country, see - - [Working with - Addresses](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-addresses). - fingerprint: - type: optional - docs: >- - Intended as a Square-assigned identifier, based - - on the card number, to identify the card across multiple locations - within a - - single application. - validation: - maxLength: 255 - access: read-only - customer_id: - type: optional> - docs: >- - **Required** The ID of a [customer](entity:Customer) to be associated - with the card. - merchant_id: - type: optional - docs: The ID of the merchant associated with the card. - access: read-only - reference_id: - type: optional> - docs: >- - An optional user-defined reference ID that associates this card with - - another entity in an external system. For example, a customer ID from - an - - external customer management system. - validation: - maxLength: 128 - enabled: - type: optional - docs: Indicates whether or not a card can be used for payments. - access: read-only - card_type: - type: optional - docs: >- - The type of the card. - - The Card object includes this field only in response to Payments API - calls. - - See [CardType](#type-cardtype) for possible values - prepaid_type: - type: optional - docs: |- - Indicates whether the card is prepaid or not. - See [CardPrepaidType](#type-cardprepaidtype) for possible values - bin: - type: optional - docs: >- - The first six digits of the card number, known as the Bank - Identification Number (BIN). Only the Payments API - - returns this field. - validation: - maxLength: 6 - access: read-only - version: - type: optional - docs: >- - Current version number of the card. Increments with each card update. - Requests to update an - - existing Card object will be rejected unless the version in the - request matches the current - - version for the Card. - card_co_brand: - type: optional - docs: >- - The card's co-brand if available. For example, an Afterpay virtual - card would have a - - co-brand of AFTERPAY. - - See [CardCoBrand](#type-cardcobrand) for possible values - issuer_alert: - type: optional - docs: >- - An alert from the issuing bank about the card status. Alerts can - indicate whether - - future charges to the card are likely to fail. For more information, - see - - [Manage Card on File - Declines](https://developer.squareup.com/docs/cards-api/manage-card-on-file-declines). - - - This field is present only if there's an active issuer alert. - - See [IssuerAlert](#type-issueralert) for possible values - issuer_alert_at: - type: optional - docs: >- - The timestamp of when the current issuer alert was received and - processed, in - - RFC 3339 format. - - - This field is present only if there's an active issuer alert. - access: read-only - hsa_fsa: - type: optional - docs: >- - Indicates whether the card is linked to a Health Savings Account (HSA) - or Flexible - - Spending Account (FSA), based on the card BIN. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CardAutomaticallyUpdatedEvent: - docs: >- - Published when Square automatically updates the expiration date or - - primary account number (PAN) of a [card](entity:Card) or adds or removes - an issuer alert. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"card.automatically_updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CardAutomaticallyUpdatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"card"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the automatically updated card. - source: - openapi: ../default/openapi/openapi.json - CardAutomaticallyUpdatedEventObject: - properties: - card: - type: optional - docs: The automatically updated card. - source: - openapi: ../default/openapi/openapi.json - CardBrand: - enum: - - OTHER_BRAND - - VISA - - MASTERCARD - - AMERICAN_EXPRESS - - DISCOVER - - DISCOVER_DINERS - - JCB - - CHINA_UNIONPAY - - SQUARE_GIFT_CARD - - SQUARE_CAPITAL_CARD - - INTERAC - - EFTPOS - - FELICA - - EBT - docs: Indicates a card's brand, such as `VISA` or `MASTERCARD`. - source: - openapi: ../default/openapi/openapi.json - CardCoBrand: - enum: - - UNKNOWN - - AFTERPAY - - CLEARPAY - docs: Indicates the brand for a co-branded card. - source: - openapi: ../default/openapi/openapi.json - CardCreatedEvent: - docs: Published when a [card](entity:Card) is created or imported. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"card.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CardCreatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"card"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the created card. - source: - openapi: ../default/openapi/openapi.json - CardCreatedEventObject: - properties: - card: - type: optional - docs: The created card. - source: - openapi: ../default/openapi/openapi.json - CardDisabledEvent: - docs: Published when a [card](entity:Card) is disabled. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"card.disabled"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CardDisabledEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"card"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the disabled card. - source: - openapi: ../default/openapi/openapi.json - CardDisabledEventObject: - properties: - card: - type: optional - docs: The disabled card. - source: - openapi: ../default/openapi/openapi.json - CardForgottenEvent: - docs: Published when a [card](entity:Card) is GDPR forgotten or vaulted. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"card.forgotten"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CardForgottenEventCard: - properties: - id: - type: optional - docs: Unique ID for this card. Generated by Square. - validation: - maxLength: 64 - access: read-only - customer_id: - type: optional> - docs: >- - The ID of a customer created using the Customers API associated with - the card. - enabled: - type: optional> - docs: Indicates whether or not a card can be used for payments. - reference_id: - type: optional> - docs: >- - An optional user-defined reference ID that associates this card with - - another entity in an external system. For example, a customer ID from - an - - external customer management system. - version: - type: optional - docs: >- - Current version number of the card. Increments with each card update. - Requests to update an - - existing Card object will be rejected unless the version in the - request matches the current - - version for the Card. - merchant_id: - type: optional> - docs: The ID of the merchant associated with the card. - source: - openapi: ../default/openapi/openapi.json - CardForgottenEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"card"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the forgotten card. - source: - openapi: ../default/openapi/openapi.json - CardForgottenEventObject: - properties: - card: - type: optional - docs: The forgotten card. - source: - openapi: ../default/openapi/openapi.json - CardIssuerAlert: - type: literal<"ISSUER_ALERT_CARD_CLOSED"> - docs: Indicates the type of issuer alert for a [card on file](entity:Card). - CardPaymentDetails: - docs: >- - Reflects the current status of a card payment. Contains only - non-confidential information. - properties: - status: - type: optional - docs: >- - The card payment's current state. The state can be AUTHORIZED, - CAPTURED, VOIDED, or - - FAILED. - validation: - maxLength: 50 - access: read-only - card: - type: optional - docs: The credit card's non-confidential details. - entry_method: - type: optional - docs: >- - The method used to enter the card's details for the payment. The - method can be - - `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`. - validation: - maxLength: 50 - access: read-only - cvv_status: - type: optional - docs: >- - The status code returned from the Card Verification Value (CVV) check. - The code can be - - `CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`. - validation: - maxLength: 50 - access: read-only - avs_status: - type: optional - docs: >- - The status code returned from the Address Verification System (AVS) - check. The code can be - - `AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`. - validation: - maxLength: 50 - access: read-only - auth_result_code: - type: optional - docs: >- - The status code returned by the card issuer that describes the - payment's - - authorization status. - validation: - maxLength: 10 - access: read-only - application_identifier: - type: optional - docs: >- - For EMV payments, the application ID identifies the EMV application - used for the payment. - validation: - maxLength: 32 - access: read-only - application_name: - type: optional - docs: >- - For EMV payments, the human-readable name of the EMV application used - for the payment. - validation: - maxLength: 16 - access: read-only - application_cryptogram: - type: optional - docs: For EMV payments, the cryptogram generated for the payment. - validation: - maxLength: 16 - access: read-only - verification_method: - type: optional - docs: >- - For EMV payments, the method used to verify the cardholder's identity. - The method can be - - `PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`. - validation: - maxLength: 50 - access: read-only - verification_results: - type: optional - docs: >- - For EMV payments, the results of the cardholder verification. The - result can be - - `SUCCESS`, `FAILURE`, or `UNKNOWN`. - validation: - maxLength: 50 - access: read-only - statement_description: - type: optional - docs: >- - The statement description sent to the card networks. - - - Note: The actual statement description varies and is likely to be - truncated and appended with - - additional information on a per issuer basis. - validation: - maxLength: 50 - access: read-only - device_details: - type: optional - docs: |- - __Deprecated__: Use `Payment.device_details` instead. - - Details about the device that took the payment. - card_payment_timeline: - type: optional - docs: The timeline for card payments. - refund_requires_card_presence: - type: optional - docs: |- - Whether the card must be physically present for the payment to - be refunded. If set to `true`, the card must be present. - access: read-only - errors: - type: optional> - docs: Information about errors encountered during the request. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CardPaymentTimeline: - docs: The timeline for card payments. - properties: - authorized_at: - type: optional> - docs: The timestamp when the payment was authorized, in RFC 3339 format. - captured_at: - type: optional> - docs: The timestamp when the payment was captured, in RFC 3339 format. - voided_at: - type: optional> - docs: The timestamp when the payment was voided, in RFC 3339 format. - source: - openapi: ../default/openapi/openapi.json - CardPrepaidType: - enum: - - UNKNOWN_PREPAID_TYPE - - NOT_PREPAID - - PREPAID - docs: Indicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`. - source: - openapi: ../default/openapi/openapi.json - CardType: - enum: - - UNKNOWN_CARD_TYPE - - CREDIT - - DEBIT - docs: Indicates a card's type, such as `CREDIT` or `DEBIT`. - source: - openapi: ../default/openapi/openapi.json - CardUpdatedEvent: - docs: >- - Published when a [card](entity:Card) is updated by the seller in the - Square Dashboard. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: The type of this event. The value is `"card.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CardUpdatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"card"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the updated card. - source: - openapi: ../default/openapi/openapi.json - CardUpdatedEventObject: - properties: - card: - type: optional - docs: The updated card. - source: - openapi: ../default/openapi/openapi.json - CashAppDetails: - docs: >- - Additional details about `WALLET` type payments with the `brand` of - `CASH_APP`. - properties: - buyer_full_name: - type: optional> - docs: The name of the Cash App account holder. - validation: - maxLength: 255 - buyer_country_code: - type: optional> - docs: >- - The country of the Cash App account holder, in ISO 3166-1-alpha-2 - format. - - - For possible values, see [Country](entity:Country). - validation: - minLength: 2 - maxLength: 2 - buyer_cashtag: - type: optional - docs: $Cashtag of the Cash App account holder. - validation: - minLength: 1 - maxLength: 21 - access: read-only - source: - openapi: ../default/openapi/openapi.json - CashDrawerDevice: - properties: - id: - type: optional - docs: The device Square-issued ID - name: - type: optional> - docs: The device merchant-specified name. - source: - openapi: ../default/openapi/openapi.json - CashDrawerEventType: - enum: - - NO_SALE - - CASH_TENDER_PAYMENT - - OTHER_TENDER_PAYMENT - - CASH_TENDER_CANCELLED_PAYMENT - - OTHER_TENDER_CANCELLED_PAYMENT - - CASH_TENDER_REFUND - - OTHER_TENDER_REFUND - - PAID_IN - - PAID_OUT - docs: |- - The types of events on a CashDrawerShift. - Each event type represents an employee action on the actual cash drawer - represented by a CashDrawerShift. - source: - openapi: ../default/openapi/openapi.json - CashDrawerShift: - docs: >- - This model gives the details of a cash drawer shift. - - The cash_payment_money, cash_refund_money, cash_paid_in_money, - - and cash_paid_out_money fields are all computed by summing their - respective - - event types. - properties: - id: - type: optional - docs: The shift unique ID. - state: - type: optional - docs: >- - The shift current state. - - See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible - values - opened_at: - type: optional> - docs: The time when the shift began, in ISO 8601 format. - ended_at: - type: optional> - docs: The time when the shift ended, in ISO 8601 format. - closed_at: - type: optional> - docs: The time when the shift was closed, in ISO 8601 format. - description: - type: optional> - docs: The free-form text description of a cash drawer by an employee. - opened_cash_money: - type: optional - docs: |- - The amount of money in the cash drawer at the start of the shift. - The amount must be greater than or equal to zero. - cash_payment_money: - type: optional - docs: >- - The amount of money added to the cash drawer from cash payments. - - This is computed by summing all events with the types - CASH_TENDER_PAYMENT and - - CASH_TENDER_CANCELED_PAYMENT. The amount is always greater than or - equal to - - zero. - cash_refunds_money: - type: optional - docs: >- - The amount of money removed from the cash drawer from cash refunds. - - It is computed by summing the events of type CASH_TENDER_REFUND. The - amount - - is always greater than or equal to zero. - cash_paid_in_money: - type: optional - docs: >- - The amount of money added to the cash drawer for reasons other than - cash - - payments. It is computed by summing the events of type PAID_IN. The - amount is - - always greater than or equal to zero. - cash_paid_out_money: - type: optional - docs: >- - The amount of money removed from the cash drawer for reasons other - than - - cash refunds. It is computed by summing the events of type PAID_OUT. - The amount - - is always greater than or equal to zero. - expected_cash_money: - type: optional - docs: >- - The amount of money that should be in the cash drawer at the end of - the - - shift, based on the shift's other money amounts. - - This can be negative if employees have not correctly recorded all the - events - - on the cash drawer. - - cash_paid_out_money is a summation of amounts from cash_payment_money - (zero - - or positive), cash_refunds_money (zero or negative), - cash_paid_in_money (zero - - or positive), and cash_paid_out_money (zero or negative) event types. - closed_cash_money: - type: optional - docs: |- - The amount of money found in the cash drawer at the end of the shift - by an auditing employee. The amount should be positive. - device: - type: optional - docs: >- - The device running Square Point of Sale that was connected to the cash - drawer. - created_at: - type: optional - docs: The shift start time in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The shift updated at time in RFC 3339 format. - access: read-only - location_id: - type: optional - docs: The ID of the location the cash drawer shift belongs to. - access: read-only - team_member_ids: - type: optional> - docs: >- - The IDs of all team members that were logged into Square Point of Sale - at any - - point while the cash drawer shift was open. - access: read-only - opening_team_member_id: - type: optional - docs: The ID of the team member that started the cash drawer shift. - access: read-only - ending_team_member_id: - type: optional - docs: The ID of the team member that ended the cash drawer shift. - access: read-only - closing_team_member_id: - type: optional - docs: >- - The ID of the team member that closed the cash drawer shift by - auditing - - the cash drawer contents. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CashDrawerShiftEvent: - properties: - id: - type: optional - docs: The unique ID of the event. - event_type: - type: optional - docs: >- - The type of cash drawer shift event. - - See [CashDrawerEventType](#type-cashdrawereventtype) for possible - values - event_money: - type: optional - docs: >- - The amount of money that was added to or removed from the cash drawer - - in the event. The amount can be positive (for added money) - - or zero (for other tender type payments). The addition or removal of - money can be determined by - - by the event type. - created_at: - type: optional - docs: The event time in RFC 3339 format. - access: read-only - description: - type: optional> - docs: |- - An optional description of the event, entered by the employee that - created the event. - team_member_id: - type: optional - docs: The ID of the team member that created the event. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CashDrawerShiftState: - enum: - - OPEN - - ENDED - - CLOSED - docs: The current state of a cash drawer shift. - source: - openapi: ../default/openapi/openapi.json - CashDrawerShiftSummary: - docs: >- - The summary of a closed cash drawer shift. - - This model contains only the money counted to start a cash drawer shift, - counted - - at the end of the shift, and the amount that should be in the drawer at - shift - - end based on summing all cash drawer shift events. - properties: - id: - type: optional - docs: The shift unique ID. - state: - type: optional - docs: >- - The shift current state. - - See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible - values - opened_at: - type: optional> - docs: The shift start time in ISO 8601 format. - ended_at: - type: optional> - docs: The shift end time in ISO 8601 format. - closed_at: - type: optional> - docs: The shift close time in ISO 8601 format. - description: - type: optional> - docs: An employee free-text description of a cash drawer shift. - opened_cash_money: - type: optional - docs: |- - The amount of money in the cash drawer at the start of the shift. This - must be a positive amount. - expected_cash_money: - type: optional - docs: >- - The amount of money that should be in the cash drawer at the end of - the - - shift, based on the cash drawer events on the shift. - - The amount is correct if all shift employees accurately recorded their - - cash drawer shift events. Unrecorded events and events with the wrong - amount - - result in an incorrect expected_cash_money amount that can be - negative. - closed_cash_money: - type: optional - docs: >- - The amount of money found in the cash drawer at the end of the shift - by - - an auditing employee. The amount must be greater than or equal to - zero. - created_at: - type: optional - docs: The shift start time in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The shift updated at time in RFC 3339 format. - access: read-only - location_id: - type: optional - docs: The ID of the location the cash drawer shift belongs to. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CashPaymentDetails: - docs: >- - Stores details about a cash payment. Contains only non-confidential - information. For more information, see - - [Take Cash - Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments). - properties: - buyer_supplied_money: - type: Money - docs: The amount and currency of the money supplied by the buyer. - change_back_money: - type: optional - docs: |- - The amount of change due back to the buyer. - This read-only field is calculated - from the `amount_money` and `buyer_supplied_money` fields. - source: - openapi: ../default/openapi/openapi.json - CatalogAvailabilityPeriod: - docs: Represents a time period of availability. - properties: - start_local_time: - type: optional> - docs: >- - The start time of an availability period, specified in local time - using partial-time - - RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 - in the morning. - - Note that the seconds value is always :00, but it is appended for - conformance to the RFC. - end_local_time: - type: optional> - docs: >- - The end time of an availability period, specified in local time using - partial-time - - RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 - in the evening. - - Note that the seconds value is always :00, but it is appended for - conformance to the RFC. - day_of_week: - type: optional - docs: |- - The day of the week for this availability period. - See [DayOfWeek](#type-dayofweek) for possible values - source: - openapi: ../default/openapi/openapi.json - CatalogCategory: - docs: A category to which a `CatalogItem` instance belongs. - properties: - name: - type: optional> - docs: >- - The category name. This is a searchable attribute for use in - applicable query filters, and its value length is of Unicode code - points. - validation: - maxLength: 255 - image_ids: - type: optional>> - docs: >- - The IDs of images associated with this `CatalogCategory` instance. - - Currently these images are not displayed by Square, but are free to be - displayed in 3rd party applications. - category_type: - type: optional - docs: >- - The type of the category. - - See [CatalogCategoryType](#type-catalogcategorytype) for possible - values - parent_category: - type: optional - docs: The ID of the parent category of this category instance. - is_top_level: - type: optional> - docs: >- - Indicates whether a category is a top level category, which does not - have any parent_category. - channels: - type: optional>> - docs: >- - A list of IDs representing channels, such as a Square Online site, - where the category can be made visible. - availability_period_ids: - type: optional>> - docs: >- - The IDs of the `CatalogAvailabilityPeriod` objects associated with the - category. - online_visibility: - type: optional> - docs: >- - Indicates whether the category is visible (`true`) or hidden (`false`) - on all of the seller's Square Online sites. - root_category: - type: optional - docs: The top-level category in a category hierarchy. - access: read-only - ecom_seo_data: - type: optional - docs: The SEO data for a seller's Square Online store. - path_to_root: - type: optional>> - docs: >- - The path from the category to its root category. The first node of the - path is the parent of the category - - and the last is the root category. The path is empty if the category - is a root category. - source: - openapi: ../default/openapi/openapi.json - CatalogCategoryType: - enum: - - REGULAR_CATEGORY - - MENU_CATEGORY - - KITCHEN_CATEGORY - docs: Indicates the type of a category. - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinition: - docs: >- - Contains information defining a custom attribute. Custom attributes are - - intended to store additional information about a catalog object or to - associate a - - catalog object with an entity in another system. Do not use custom - attributes - - to store any sensitive information (personally identifiable information, - card details, etc.). - - [Read more about custom - attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes) - properties: - type: - type: CatalogCustomAttributeDefinitionType - docs: >- - The type of this custom attribute. Cannot be modified after creation. - - Required. - - See - [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) - for possible values - name: - type: string - docs: >2- - The name of this definition for API and seller-facing UI purposes. - The name must be unique within the (merchant, application) pair. - Required. - - May not be empty and may not exceed 255 characters. Can be modified - after creation. - validation: - minLength: 1 - maxLength: 255 - description: - type: optional> - docs: >- - 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. - validation: - maxLength: 255 - source_application: - type: optional - docs: |- - __Read only.__ Contains information about the application that - created this custom attribute definition. - allowed_object_types: - docs: >- - The set of `CatalogObject` types that this custom atttribute may be - applied to. - - Currently, only `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, - and `CATEGORY` are allowed. At least one type must be included. - - See [CatalogObjectType](#type-catalogobjecttype) for possible values - type: list - seller_visibility: - type: optional - docs: >- - 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 - app_visibility: - type: optional - docs: >- - The visibility of a custom attribute to applications other than the - application - - that created the attribute. - - See - [CatalogCustomAttributeDefinitionAppVisibility](#type-catalogcustomattributedefinitionappvisibility) - for possible values - string_config: - type: optional - docs: Optionally, populated when `type` = `STRING`, unset otherwise. - number_config: - type: optional - docs: Optionally, populated when `type` = `NUMBER`, unset otherwise. - selection_config: - type: optional - docs: Populated when `type` is set to `SELECTION`, unset otherwise. - custom_attribute_usage_count: - type: optional - docs: >- - 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`. - access: read-only - key: - type: optional> - docs: >- - 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_-]`. - validation: - pattern: ^[a-zA-Z0-9_-]*$ - minLength: 1 - maxLength: 60 - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionAppVisibility: - enum: - - APP_VISIBILITY_HIDDEN - - APP_VISIBILITY_READ_ONLY - - APP_VISIBILITY_READ_WRITE_VALUES - docs: >- - Defines the visibility of a custom attribute to applications other than - their - - creating application. - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionNumberConfig: - properties: - precision: - type: optional> - docs: |- - 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: 5 - validation: - max: 5 - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionSelectionConfig: - docs: >- - Configuration associated with `SELECTION`-type custom attribute - definitions. - properties: - max_allowed_selections: - type: optional> - docs: >- - 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. - validation: - max: 100 - allowed_selections: - type: >- - optional>> - docs: >- - The set of valid `CatalogCustomAttributeSelections`. Up to a maximum - of 100 - - selections can be defined. Can be modified. - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection: - docs: A named selection for this `SELECTION`-type custom attribute definition. - properties: - uid: - type: optional> - docs: Unique ID set by Square. - name: - type: string - docs: Selection name, unique within `allowed_selections`. - validation: - minLength: 1 - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionSellerVisibility: - enum: - - SELLER_VISIBILITY_HIDDEN - - SELLER_VISIBILITY_READ_WRITE_VALUES - docs: |- - Defines the visibility of a custom attribute to sellers in Square - client applications, Square APIs or in Square UIs (including Square Point - of Sale applications and Square Dashboard). - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionStringConfig: - docs: >- - Configuration associated with Custom Attribute Definitions of type - `STRING`. - properties: - enforce_uniqueness: - type: optional> - docs: >- - If true, each Custom Attribute instance associated with this Custom - Attribute - - Definition must have a unique value within the seller's catalog. For - - example, this may be used for a value like a SKU that should not be - - duplicated within a seller's catalog. May not be modified after the - - definition has been created. - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeDefinitionType: - enum: - - STRING - - BOOLEAN - - NUMBER - - SELECTION - docs: Defines the possible types for a custom attribute. - source: - openapi: ../default/openapi/openapi.json - CatalogCustomAttributeValue: - docs: >- - An instance of a custom attribute. Custom attributes can be defined and - - added to `ITEM` and `ITEM_VARIATION` type catalog objects. - - [Read more about custom - attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes). - properties: - name: - type: optional> - docs: The name of the custom attribute. - string_value: - type: optional> - docs: >- - The string value of the custom attribute. Populated if `type` = - `STRING`. - custom_attribute_definition_id: - type: optional - docs: >- - The id of the - [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - this value belongs to. - access: read-only - type: - type: optional - docs: >- - A copy of type from the associated `CatalogCustomAttributeDefinition`. - - See - [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) - for possible values - number_value: - type: optional> - docs: >- - Populated if `type` = `NUMBER`. Contains a string - - representation of a decimal number, using a `.` as the decimal - separator. - boolean_value: - type: optional> - docs: A `true` or `false` value. Populated if `type` = `BOOLEAN`. - selection_uid_values: - type: optional>> - docs: >- - One or more choices from `allowed_selections`. Populated if `type` = - `SELECTION`. - key: - type: optional - docs: >- - If the associated `CatalogCustomAttributeDefinition` object is defined - by another application, this key is prefixed by the defining - application ID. - - For example, if the CatalogCustomAttributeDefinition has a key - attribute of "cocoa_brand" and the defining application ID is - "abcd1234", this key is "abcd1234:cocoa_brand" - - when the application making the request is different from the - application defining the custom attribute definition. Otherwise, the - key is simply "cocoa_brand". - access: read-only - source: - openapi: ../default/openapi/openapi.json - CatalogDiscount: - docs: A discount applicable to items. - properties: - name: - type: optional> - docs: >- - The discount name. This is a searchable attribute for use in - applicable query filters, and its value length is of Unicode code - points. - validation: - maxLength: 255 - discount_type: - type: optional - docs: >- - Indicates whether the discount is a fixed amount or percentage, or - entered at the time of sale. - - See [CatalogDiscountType](#type-catalogdiscounttype) for possible - values - percentage: - type: optional> - docs: >- - The percentage of the discount as a string representation of a decimal - number, using a `.` as the decimal - - separator and without a `%` sign. A value of `7.5` corresponds to - `7.5%`. Specify a percentage of `0` if `discount_type` - - is `VARIABLE_PERCENTAGE`. - - - Do not use this field for amount-based or variable discounts. - amount_money: - type: optional - docs: >- - The amount of the discount. Specify an amount of `0` if - `discount_type` is `VARIABLE_AMOUNT`. - - - Do not use this field for percentage-based or variable discounts. - pin_required: - type: optional> - docs: >- - Indicates whether a mobile staff member needs to enter their PIN to - apply the - - discount to a payment in the Square Point of Sale app. - label_color: - type: optional> - docs: >- - The color of the discount display label in the Square Point of Sale - app. This must be a valid hex color code. - modify_tax_basis: - type: optional - docs: >- - Indicates whether this discount should reduce the price used to - calculate tax. - - - Most discounts should use `MODIFY_TAX_BASIS`. However, in some - circumstances taxes must - - be calculated based on an item's price, ignoring a particular - discount. For example, - - in many US jurisdictions, a manufacturer coupon or instant rebate - reduces the price a - - customer pays but does not reduce the sale price used to calculate how - much sales tax is - - due. In this case, the discount representing that manufacturer coupon - should have - - `DO_NOT_MODIFY_TAX_BASIS` for this field. - - - If you are unsure whether you need to use this field, consult your tax - professional. - - See - [CatalogDiscountModifyTaxBasis](#type-catalogdiscountmodifytaxbasis) - for possible values - maximum_amount_money: - type: optional - docs: >- - For a percentage discount, the maximum absolute value of the discount. - For example, if a - - 50% discount has a `maximum_amount_money` of $20, a $100 purchase will - yield a $20 discount, - - not a $50 discount. - source: - openapi: ../default/openapi/openapi.json - CatalogDiscountModifyTaxBasis: - enum: - - MODIFY_TAX_BASIS - - DO_NOT_MODIFY_TAX_BASIS - source: - openapi: ../default/openapi/openapi.json - CatalogDiscountType: - enum: - - FIXED_PERCENTAGE - - FIXED_AMOUNT - - VARIABLE_PERCENTAGE - - VARIABLE_AMOUNT - docs: How to apply a CatalogDiscount to a CatalogItem. - source: - openapi: ../default/openapi/openapi.json - CatalogEcomSeoData: - docs: SEO data for for a seller's Square Online store. - properties: - page_title: - type: optional> - docs: The SEO title used for the Square Online store. - page_description: - type: optional> - docs: The SEO description used for the Square Online store. - permalink: - type: optional> - docs: The SEO permalink used for the Square Online store. - source: - openapi: ../default/openapi/openapi.json - CatalogIdMapping: - docs: >- - A mapping between a temporary client-supplied ID and a permanent - server-generated ID. - - - When calling - [UpsertCatalogObject](api-endpoint:Catalog-UpsertCatalogObject) or - - [BatchUpsertCatalogObjects](api-endpoint:Catalog-BatchUpsertCatalogObjects) - to - - create a [CatalogObject](entity:CatalogObject) instance, you can supply - - a temporary ID for the to-be-created object, especially when the object is - to be referenced - - elsewhere in the same request body. This temporary ID can be any string - unique within - - the call, but must be prefixed by "#". - - - After the request is submitted and the object created, a permanent - server-generated ID is assigned - - to the new object. The permanent ID is unique across the Square catalog. - properties: - client_object_id: - type: optional> - docs: >- - The client-supplied temporary `#`-prefixed ID for a new - `CatalogObject`. - object_id: - type: optional> - docs: The permanent ID for the CatalogObject created by the server. - source: - openapi: ../default/openapi/openapi.json - CatalogImage: - docs: >- - An image file to use in Square catalogs. It can be associated with - - `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and - `CatalogModifierList` objects. - - Only the images on items and item variations are exposed in Dashboard. - - Only the first image on an item is displayed in Square Point of Sale - (SPOS). - - Images on items and variations are displayed through Square Online Store. - - Images on other object types are for use by 3rd party application - developers. - properties: - name: - type: optional> - docs: >- - The internal name to identify this image in calls to the Square API. - - This is a searchable attribute for use in applicable query filters - - using the - [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). - - It is not unique and should not be shown in a buyer facing context. - url: - type: optional> - docs: >- - The URL of this image, generated by Square after an image is uploaded - - using the - [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) - endpoint. - - To modify the image, use the UpdateCatalogImage endpoint. Do not - change the URL field. - caption: - type: optional> - docs: >- - A caption that describes what is shown in the image. Displayed in the - - Square Online Store. This is a searchable attribute for use in - applicable query filters - - using the - [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). - photo_studio_order_id: - type: optional> - docs: >- - The immutable order ID for this image object created by the Photo - Studio service in Square Online Store. - source: - openapi: ../default/openapi/openapi.json - CatalogInfoResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - limits: - type: optional - docs: Limits that apply to this API. - standard_unit_description_group: - type: optional - docs: Names and abbreviations for standard units. - source: - openapi: ../default/openapi/openapi.json - CatalogInfoResponseLimits: - properties: - batch_upsert_max_objects_per_batch: - type: optional> - docs: >- - The maximum number of objects that may appear within a single batch in - a - - `/v2/catalog/batch-upsert` request. - batch_upsert_max_total_objects: - type: optional> - docs: |- - The maximum number of objects that may appear across all batches in a - `/v2/catalog/batch-upsert` request. - batch_retrieve_max_object_ids: - type: optional> - docs: >- - The maximum number of object IDs that may appear in a - `/v2/catalog/batch-retrieve` - - request. - search_max_page_limit: - type: optional> - docs: |- - The maximum number of results that may be returned in a page of a - `/v2/catalog/search` response. - batch_delete_max_object_ids: - type: optional> - docs: |- - The maximum number of object IDs that may be included in a single - `/v2/catalog/batch-delete` request. - update_item_taxes_max_item_ids: - type: optional> - docs: |- - The maximum number of item IDs that may be included in a single - `/v2/catalog/update-item-taxes` request. - update_item_taxes_max_taxes_to_enable: - type: optional> - docs: >- - The maximum number of tax IDs to be enabled that may be included in a - single - - `/v2/catalog/update-item-taxes` request. - update_item_taxes_max_taxes_to_disable: - type: optional> - docs: >- - The maximum number of tax IDs to be disabled that may be included in a - single - - `/v2/catalog/update-item-taxes` request. - update_item_modifier_lists_max_item_ids: - type: optional> - docs: |- - The maximum number of item IDs that may be included in a single - `/v2/catalog/update-item-modifier-lists` request. - update_item_modifier_lists_max_modifier_lists_to_enable: - type: optional> - docs: >- - The maximum number of modifier list IDs to be enabled that may be - included in - - a single `/v2/catalog/update-item-modifier-lists` request. - update_item_modifier_lists_max_modifier_lists_to_disable: - type: optional> - docs: >- - The maximum number of modifier list IDs to be disabled that may be - included in - - a single `/v2/catalog/update-item-modifier-lists` request. - source: - openapi: ../default/openapi/openapi.json - CatalogItem: - docs: >- - A [CatalogObject](entity:CatalogObject) instance of the `ITEM` type, also - referred to as an item, in the catalog. - properties: - name: - type: optional> - docs: >- - The item's name. This is a searchable attribute for use in applicable - query filters, its value must not be empty, and the length is of - Unicode code points. - validation: - maxLength: 512 - description: - type: optional> - docs: >- - The item's description. This is a searchable attribute for use in - applicable query filters, and its value length is of Unicode code - points. - - - Deprecated at 2022-07-20, this field is planned to retire in 6 months. - You should migrate to use `description_html` to set the description - - of the [CatalogItem](entity:CatalogItem) instance. The `description` - and `description_html` field values are kept in sync. If you try to - - set the both fields, the `description_html` text value overwrites the - `description` value. Updates in one field are also reflected in the - other, - - except for when you use an early version before Square API 2022-07-20 - and `description_html` is set to blank, setting the `description` - value to null - - does not nullify `description_html`. - validation: - maxLength: 4096 - abbreviation: - type: optional> - docs: >- - The text of the item's display label in the Square Point of Sale app. - Only up to the first five characters of the string are used. - - This attribute is searchable, and its value length is of Unicode code - points. - validation: - maxLength: 24 - label_color: - type: optional> - docs: >- - The color of the item's display label in the Square Point of Sale app. - This must be a valid hex color code. - is_taxable: - type: optional> - docs: >- - Indicates whether the item is taxable (`true`) or non-taxable - (`false`). Default is `true`. - category_id: - type: optional> - docs: >- - The ID of the item's category, if any. Deprecated since 2023-12-13. - Use `CatalogItem.categories`, instead. - tax_ids: - type: optional>> - docs: >- - A set of IDs indicating the taxes enabled for - - this item. When updating an item, any taxes listed here will be added - to the item. - - Taxes may also be added to or deleted from an item using - `UpdateItemTaxes`. - modifier_list_info: - type: optional>> - docs: >- - A set of `CatalogItemModifierListInfo` objects - - representing the modifier lists that apply to this item, along with - the overrides and min - - and max limits that are specific to this item. Modifier lists - - may also be added to or deleted from an item using - `UpdateItemModifierLists`. - variations: - type: optional>> - docs: >- - A list of [CatalogItemVariation](entity:CatalogItemVariation) objects - for this item. An item must have - - at least one variation. - product_type: - type: optional - docs: >- - The product type of the item. Once set, the `product_type` value - cannot be modified. - - - Items of the `LEGACY_SQUARE_ONLINE_SERVICE` and - `LEGACY_SQUARE_ONLINE_MEMBERSHIP` product types can be updated - - but cannot be created using the API. - - See [CatalogItemProductType](#type-catalogitemproducttype) for - possible values - skip_modifier_screen: - type: optional> - docs: >- - If `false`, the Square Point of Sale app will present the - `CatalogItem`'s - - details screen immediately, allowing the merchant to choose - `CatalogModifier`s - - before adding the item to the cart. This is the default behavior. - - - If `true`, the Square Point of Sale app will immediately add the item - to the cart with the pre-selected - - modifiers, and merchants can edit modifiers by drilling down onto the - item's details. - - - Third-party clients are encouraged to implement similar behaviors. - item_options: - type: optional>> - docs: |- - List of item options IDs for this item. Used to manage and group item - variations in a specified order. - - Maximum: 6 item options. - ecom_uri: - type: optional> - docs: >- - Deprecated. A URI pointing to a published e-commerce product page for - the Item. - ecom_image_uris: - type: optional>> - docs: >- - Deprecated. A comma-separated list of encoded URIs pointing to a set - of published e-commerce images for the Item. - image_ids: - type: optional>> - docs: |- - The IDs of images associated with this `CatalogItem` instance. - These images will be shown to customers in Square Online Store. - The first image will show up as the icon for this item in POS. - sort_name: - type: optional> - docs: >- - A name to sort the item by. If this name is unspecified, namely, the - `sort_name` field is absent, the regular `name` field is used for - sorting. - - Its value must not be empty. - - - It is currently supported for sellers of the Japanese locale only. - categories: - type: optional>> - docs: The list of categories. - description_html: - type: optional> - docs: >- - The item's description as expressed in valid HTML elements. The length - of this field value, including those of HTML tags, - - is of Unicode points. With application query filters, the text values - of the HTML elements and attributes are searchable. Invalid or - - unsupported HTML elements or attributes are ignored. - - - Supported HTML elements include: - - - `a`: Link. Supports linking to website URLs, email address, and - telephone numbers. - - - `b`, `strong`: Bold text - - - `br`: Line break - - - `code`: Computer code - - - `div`: Section - - - `h1-h6`: Headings - - - `i`, `em`: Italics - - - `li`: List element - - - `ol`: Numbered list - - - `p`: Paragraph - - - `ul`: Bullet list - - - `u`: Underline - - - - Supported HTML attributes include: - - - `align`: Alignment of the text content - - - `href`: Link destination - - - `rel`: Relationship between link's target and source - - - `target`: Place to open the linked document - validation: - maxLength: 65535 - description_plaintext: - type: optional - docs: >- - A server-generated plaintext version of the `description_html` field, - without formatting tags. - validation: - maxLength: 65535 - access: read-only - channels: - type: optional>> - docs: >- - A list of IDs representing channels, such as a Square Online site, - where the item can be made visible or available. - - This field is read only and cannot be edited. - is_archived: - type: optional> - docs: Indicates whether this item is archived (`true`) or not (`false`). - ecom_seo_data: - type: optional - docs: The SEO data for a seller's Square Online store. - food_and_beverage_details: - type: optional - docs: The food and beverage-specific details for the `FOOD_AND_BEV` item. - reporting_category: - type: optional - docs: The item's reporting category. - is_alcoholic: - type: optional> - docs: Indicates whether this item is alcoholic (`true`) or not (`false`). - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetails: - docs: The food and beverage-specific details of a `FOOD_AND_BEV` item. - properties: - calorie_count: - type: optional> - docs: >- - The calorie count (in the unit of kcal) for the `FOOD_AND_BEV` type of - items. - dietary_preferences: - type: >- - optional>> - docs: The dietary preferences for the `FOOD_AND_BEV` item. - ingredients: - type: optional>> - docs: The ingredients for the `FOOD_AND_BEV` type item. - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetailsDietaryPreference: - docs: >- - Dietary preferences that can be assigned to an `FOOD_AND_BEV` item and its - ingredients. - properties: - type: - type: optional - docs: >- - The dietary preference type. Supported values include `STANDARD` and - `CUSTOM` as specified in - `FoodAndBeverageDetails.DietaryPreferenceType`. - - See [DietaryPreferenceType](#type-dietarypreferencetype) for possible - values - standard_name: - type: >- - optional - docs: >- - The name of the dietary preference from a standard pre-defined list. - This should be null if it's a custom dietary preference. - - See [StandardDietaryPreference](#type-standarddietarypreference) for - possible values - custom_name: - type: optional> - docs: >- - The name of a user-defined custom dietary preference. This should be - null if it's a standard dietary preference. - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference: - enum: - - DAIRY_FREE - - GLUTEN_FREE - - HALAL - - KOSHER - - NUT_FREE - - VEGAN - - VEGETARIAN - docs: >- - Standard dietary preferences for food and beverage items that are - recommended on item creation. - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetailsDietaryPreferenceType: - enum: - - STANDARD - - CUSTOM - docs: >- - The type of dietary preference for the `FOOD_AND_BEV` type of items and - integredients. - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetailsIngredient: - docs: Describes the ingredient used in a `FOOD_AND_BEV` item. - properties: - type: - type: optional - docs: >- - The dietary preference type of the ingredient. Supported values - include `STANDARD` and `CUSTOM` as specified in - `FoodAndBeverageDetails.DietaryPreferenceType`. - - See [DietaryPreferenceType](#type-dietarypreferencetype) for possible - values - standard_name: - type: >- - optional - docs: >- - The name of the ingredient from a standard pre-defined list. This - should be null if it's a custom dietary preference. - - See [StandardIngredient](#type-standardingredient) for possible values - custom_name: - type: optional> - docs: >- - The name of a custom user-defined ingredient. This should be null if - it's a standard dietary preference. - source: - openapi: ../default/openapi/openapi.json - CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient: - enum: - - CELERY - - CRUSTACEANS - - EGGS - - FISH - - GLUTEN - - LUPIN - - MILK - - MOLLUSCS - - MUSTARD - - PEANUTS - - SESAME - - SOY - - SULPHITES - - TREE_NUTS - docs: >- - Standard ingredients for food and beverage items that are recommended on - item creation. - source: - openapi: ../default/openapi/openapi.json - CatalogItemModifierListInfo: - docs: >- - Controls how a modifier list is applied to a specific item. This object - allows for item-specific customization of modifier list behavior - - and provides the ability to override global modifier list settings. - properties: - modifier_list_id: - type: string - docs: >- - The ID of the `CatalogModifierList` controlled by this - `CatalogModifierListInfo`. - validation: - minLength: 1 - modifier_overrides: - type: optional>> - docs: >- - A set of `CatalogModifierOverride` objects that override default - modifier settings for this item. - min_selected_modifiers: - type: optional> - docs: >- - The minimum number of modifiers that must be selected from this - modifier list. - - Values: - - - - 0: No selection is required. - - - -1: Default value, the attribute was not set by the client. When - `max_selected_modifiers` is - - also -1, use the minimum and maximum selection values set on the - `CatalogItemModifierList`. - - - >0: The required minimum modifier selections. This can be larger - than the total `CatalogModifiers` when `allow_quantities` is enabled. - - - < -1: Invalid. Treated as no selection required. - max_selected_modifiers: - type: optional> - docs: >- - The maximum number of modifiers that can be selected. - - Values: - - - - 0: No maximum limit. - - - -1: Default value, the attribute was not set by the client. When - `min_selected_modifiers` is - - also -1, use the minimum and maximum selection values set on the - `CatalogItemModifierList`. - - - >0: The maximum total modifier selections. This can be larger - than the total `CatalogModifiers` when `allow_quantities` is enabled. - - - < -1: Invalid. Treated as no maximum limit. - enabled: - type: optional> - docs: >- - If `true`, enable this `CatalogModifierList`. The default value is - `true`. - ordinal: - type: optional> - docs: >- - The position of this `CatalogItemModifierListInfo` object within the - `modifier_list_info` list applied - - to a `CatalogItem` instance. - allow_quantities: optional - is_conversational: optional - hidden_from_customer_override: optional - source: - openapi: ../default/openapi/openapi.json - CatalogItemOption: - docs: A group of variations for a `CatalogItem`. - properties: - name: - type: optional> - docs: >- - The item option's display name for the seller. Must be unique across - - all item options. This is a searchable attribute for use in applicable - query filters. - display_name: - type: optional> - docs: >- - The item option's display name for the customer. This is a searchable - attribute for use in applicable query filters. - description: - type: optional> - docs: >- - The item option's human-readable description. Displayed in the Square - - Point of Sale app for the seller and in the Online Store or on - receipts for - - the buyer. This is a searchable attribute for use in applicable query - filters. - show_colors: - type: optional> - docs: If true, display colors for entries in `values` when present. - values: - type: optional>> - docs: |- - A list of CatalogObjects containing the - `CatalogItemOptionValue`s for this item. - source: - openapi: ../default/openapi/openapi.json - CatalogItemOptionForItem: - docs: |2- - An option that can be assigned to an item. - For example, a t-shirt item may offer a color option or a size option. - properties: - item_option_id: - type: optional> - docs: >- - The unique id of the item option, used to form the dimensions of the - item option matrix in a specified order. - source: - openapi: ../default/openapi/openapi.json - CatalogItemOptionValue: - docs: |- - An enumerated value that can link a - `CatalogItemVariation` to an item option as one of - its item option values. - properties: - item_option_id: - type: optional> - docs: Unique ID of the associated item option. - name: - type: optional> - docs: >- - Name of this item option value. This is a searchable attribute for use - in applicable query filters. - description: - type: optional> - docs: >- - A human-readable description for the option value. This is a - searchable attribute for use in applicable query filters. - color: - type: optional> - docs: >- - The HTML-supported hex color for the item option (e.g., "#ff8d4e85"). - - Only displayed if `show_colors` is enabled on the parent `ItemOption`. - When - - left unset, `color` defaults to white ("#ffffff") when `show_colors` - is - - enabled on the parent `ItemOption`. - ordinal: - type: optional> - docs: Determines where this option value appears in a list of option values. - source: - openapi: ../default/openapi/openapi.json - CatalogItemOptionValueForItemVariation: - docs: >- - A `CatalogItemOptionValue` links an item variation to an item option as - - an item option value. For example, a t-shirt item may offer a color option - and - - a size option. An item option value would represent each variation of - t-shirt: - - For example, "Color:Red, Size:Small" or "Color:Blue, Size:Medium". - properties: - item_option_id: - type: optional> - docs: The unique id of an item option. - item_option_value_id: - type: optional> - docs: The unique id of the selected value for the item option. - source: - openapi: ../default/openapi/openapi.json - CatalogItemProductType: - enum: - - REGULAR - - GIFT_CARD - - APPOINTMENTS_SERVICE - - FOOD_AND_BEV - - EVENT - - DIGITAL - - DONATION - - LEGACY_SQUARE_ONLINE_SERVICE - - LEGACY_SQUARE_ONLINE_MEMBERSHIP - docs: >- - The type of a CatalogItem. Connect V2 only allows the creation of - `REGULAR` or `APPOINTMENTS_SERVICE` items. - source: - openapi: ../default/openapi/openapi.json - CatalogItemVariation: - docs: >- - An item variation, representing a product for sale, in the Catalog object - model. Each [item](entity:CatalogItem) must have at least one - - item variation and can have at most 250 item variations. - - - An item variation can be sellable, stockable, or both if it has a unit of - measure for its count for the sold number of the variation, the stocked - - number of the variation, or both. For example, when a variation - representing wine is stocked and sold by the bottle, the variation is both - - stockable and sellable. But when a variation of the wine is sold by the - glass, the sold units cannot be used as a measure of the stocked units. - This by-the-glass - - variation is sellable, but not stockable. To accurately keep track of the - wine's inventory count at any time, the sellable count must be - - converted to stockable count. Typically, the seller defines this unit - conversion. For example, 1 bottle equals 5 glasses. The Square API exposes - - the `stockable_conversion` property on the variation to specify the - conversion. Thus, when two glasses of the wine are sold, the sellable - count - - decreases by 2, and the stockable count automatically decreases by 0.4 - bottle according to the conversion. - properties: - item_id: - type: optional> - docs: The ID of the `CatalogItem` associated with this item variation. - name: - type: optional> - docs: >- - The item variation's name. This is a searchable attribute for use in - applicable query filters. - - - Its value has a maximum length of 255 Unicode code points. However, - when the parent [item](entity:CatalogItem) - - uses [item options](entity:CatalogItemOption), this attribute is - auto-generated, read-only, and can be - - longer than 255 Unicode code points. - sku: - type: optional> - docs: >- - The item variation's SKU, if any. This is a searchable attribute for - use in applicable query filters. - upc: - type: optional> - docs: >- - The universal product code (UPC) of the item variation, if any. This - is a searchable attribute for use in applicable query filters. - - - The value of this attribute should be a number of 12-14 digits long. - This restriction is enforced on the Square Seller Dashboard, - - Square Point of Sale or Retail Point of Sale apps, where this - attribute shows in the GTIN field. If a non-compliant UPC value is - assigned - - to this attribute using the API, the value is not editable on the - Seller Dashboard, Square Point of Sale or Retail Point of Sale apps - - unless it is updated to fit the expected format. - ordinal: - type: optional - docs: >- - The order in which this item variation should be displayed. This value - is read-only. On writes, the ordinal - - for each item variation within a parent `CatalogItem` is set according - to the item variations's - - position. On reads, the value is not guaranteed to be sequential or - unique. - access: read-only - pricing_type: - type: optional - docs: >- - Indicates whether the item variation's price is fixed or determined at - the time - - of sale. - - See [CatalogPricingType](#type-catalogpricingtype) for possible values - price_money: - type: optional - docs: The item variation's price, if fixed pricing is used. - location_overrides: - type: optional>> - docs: Per-location price and inventory overrides. - track_inventory: - type: optional> - docs: If `true`, inventory tracking is active for the variation. - inventory_alert_type: - type: optional - docs: >- - Indicates whether the item variation displays an alert when its - inventory quantity is less than or equal - - to its `inventory_alert_threshold`. - - See [InventoryAlertType](#type-inventoryalerttype) for possible values - inventory_alert_threshold: - type: optional> - docs: >- - If the inventory quantity for the variation is less than or equal to - this value and `inventory_alert_type` - - is `LOW_QUANTITY`, the variation displays an alert in the merchant - dashboard. - - - This value is always an integer. - user_data: - type: optional> - docs: >- - Arbitrary user metadata to associate with the item variation. This - attribute value length is of Unicode code points. - validation: - maxLength: 255 - service_duration: - type: optional> - docs: >- - If the `CatalogItem` that owns this item variation is of type - - `APPOINTMENTS_SERVICE`, then this is the duration of the service in - milliseconds. For - - example, a 30 minute appointment would have the value `1800000`, which - is equal to - - 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per - second). - available_for_booking: - type: optional> - docs: >- - If the `CatalogItem` that owns this item variation is of type - - `APPOINTMENTS_SERVICE`, a bool representing whether this service is - available for booking. - item_option_values: - type: optional>> - docs: |- - List of item option values associated with this item variation. Listed - in the same order as the item options of the parent item. - measurement_unit_id: - type: optional> - docs: >- - ID of the ‘CatalogMeasurementUnit’ that is used to measure the - quantity - - sold of this item variation. If left unset, the item will be sold in - - whole quantities. - sellable: - type: optional> - docs: >- - Whether this variation can be sold. The inventory count of a sellable - variation indicates - - the number of units available for sale. When a variation is both - stockable and sellable, - - its sellable inventory count can be smaller than or equal to its - stockable count. - stockable: - type: optional> - docs: >- - Whether stock is counted directly on this variation (TRUE) or only on - its components (FALSE). - - When a variation is both stockable and sellable, the inventory count - of a stockable variation keeps track of the number of units of this - variation in stock - - and is not an indicator of the number of units of the variation that - can be sold. - image_ids: - type: optional>> - docs: >- - The IDs of images associated with this `CatalogItemVariation` - instance. - - These images will be shown to customers in Square Online Store. - team_member_ids: - type: optional>> - docs: >- - Tokens of employees that can perform the service represented by this - variation. Only valid for - - variations of type `APPOINTMENTS_SERVICE`. - stockable_conversion: - type: optional - docs: >- - The unit conversion rule, as prescribed by the - [CatalogStockConversion](entity:CatalogStockConversion) type, - - that describes how this non-stockable (i.e., sellable/receivable) item - variation is converted - - to/from the stockable item variation sharing the same parent item. - With the stock conversion, - - you can accurately track inventory when an item variation is sold in - one unit, but stocked in - - another unit. - source: - openapi: ../default/openapi/openapi.json - CatalogMeasurementUnit: - docs: |- - Represents the unit used to measure a `CatalogItemVariation` and - specifies the precision for decimal quantities. - properties: - measurement_unit: - type: optional - docs: >- - Indicates the unit used to measure the quantity of a catalog item - variation. - precision: - type: optional> - docs: >- - An integer between 0 and 5 that represents the maximum number of - - positions allowed after the decimal in quantities measured with this - unit. - - 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 - source: - openapi: ../default/openapi/openapi.json - CatalogModifier: - docs: >- - A modifier that can be applied to items at the time of sale. For example, - a cheese modifier for a burger, or a flavor modifier for a serving of ice - cream. - properties: - name: - type: optional> - docs: >- - The modifier name. This is a searchable attribute for use in - applicable query filters, and its value length is of Unicode code - points. - validation: - maxLength: 255 - price_money: - type: optional - docs: The modifier price. - on_by_default: - type: optional> - docs: >- - When `true`, this modifier is selected by default when displaying the - modifier list. - - This setting can be overridden at the item level using - `CatalogModifierListInfo.modifier_overrides`. - ordinal: - type: optional> - docs: >- - Determines where this `CatalogModifier` appears in the - `CatalogModifierList`. - modifier_list_id: - type: optional> - docs: The ID of the `CatalogModifierList` associated with this modifier. - location_overrides: - type: optional>> - docs: Location-specific price overrides. - image_id: - type: optional> - docs: >- - The ID of the image associated with this `CatalogModifier` instance. - - Currently this image is not displayed by Square, but is free to be - displayed in 3rd party applications. - hidden_online: - type: optional> - docs: >- - When `true`, this modifier is hidden from online ordering channels. - This setting can be overridden at the item level using - `CatalogModifierListInfo.modifier_overrides`. - source: - openapi: ../default/openapi/openapi.json - CatalogModifierList: - docs: >- - A container for a list of modifiers, or a text-based modifier. - - For text-based modifiers, this represents text configuration for an item. - (For example, custom text to print on a t-shirt). - - For non text-based modifiers, this represents a list of modifiers that can - be applied to items at the time of sale. - - (For example, a list of condiments for a hot dog, or a list of ice cream - flavors). - - Each element of the modifier list is a `CatalogObject` instance of the - `MODIFIER` type. - properties: - name: - type: optional> - docs: >- - The name of the `CatalogModifierList` instance. This is a searchable - attribute for use in applicable query filters, and its value length is - of - - Unicode code points. - validation: - maxLength: 255 - ordinal: - type: optional> - docs: >- - The position of this `CatalogModifierList` within a list of - `CatalogModifierList` instances. - selection_type: - type: optional - docs: >- - __Deprecated__: Indicates whether a single (`SINGLE`) modifier or - multiple (`MULTIPLE`) modifiers can be selected. Use - - `min_selected_modifiers` and `max_selected_modifiers` instead. - - See - [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) - for possible values - modifiers: - type: optional>> - docs: >- - A non-empty list of `CatalogModifier` objects to be included in the - `CatalogModifierList`, - - for non text-based modifiers when the `modifier_type` attribute is - `LIST`. Each element of this list - - is a `CatalogObject` instance of the `MODIFIER` type, containing the - following attributes: - - ``` - - { - - "id": "{{catalog_modifier_id}}", - - "type": "MODIFIER", - - "modifier_data": {{a CatalogModifier instance>}} - - } - - ``` - image_ids: - type: optional>> - docs: >- - The IDs of images associated with this `CatalogModifierList` instance. - - Currently these images are not displayed on Square products, but may - be displayed in 3rd-party applications. - allow_quantities: - type: optional> - docs: >- - When `true`, allows multiple quantities of the same modifier to be - selected. - is_conversational: - type: optional> - docs: True if modifiers belonging to this list can be used conversationally. - modifier_type: - type: optional - docs: >- - The type of the modifier. - - - When this `modifier_type` value is `TEXT`, the `CatalogModifierList` - represents a text-based modifier. - - When this `modifier_type` value is `LIST`, the `CatalogModifierList` - contains a list of `CatalogModifier` objects. - - See - [CatalogModifierListModifierType](#type-catalogmodifierlistmodifiertype) - for possible values - max_length: - type: optional> - docs: >- - The maximum length, in Unicode points, of the text string of the - text-based modifier as represented by - - this `CatalogModifierList` object with the `modifier_type` set to - `TEXT`. - text_required: - type: optional> - docs: >- - Whether the text string must be a non-empty string (`true`) or not - (`false`) for a text-based modifier - - as represented by this `CatalogModifierList` object with the - `modifier_type` set to `TEXT`. - internal_name: - type: optional> - docs: >- - A note for internal use by the business. - - - For example, for a text-based modifier applied to a T-shirt item, if - the buyer-supplied text of "Hello, Kitty!" - - is to be printed on the T-shirt, this `internal_name` attribute can be - "Use italic face" as - - an instruction for the business to follow. - - - For non text-based modifiers, this `internal_name` attribute can be - - used to include SKUs, internal codes, or supplemental descriptions for - internal use. - validation: - maxLength: 512 - min_selected_modifiers: - type: optional> - docs: >- - The minimum number of modifiers that must be selected from this list. - The value can be overridden with `CatalogItemModifierListInfo`. - - - Values: - - - - 0: No selection is required. - - - -1: Default value, the attribute was not set by the client. Treated - as no selection required. - - - >0: The required minimum modifier selections. This can be larger - than the total `CatalogModifiers` when `allow_quantities` is enabled. - - - < -1: Invalid. Treated as no selection required. - max_selected_modifiers: - type: optional> - docs: >- - The maximum number of modifiers that must be selected from this list. - The value can be overridden with `CatalogItemModifierListInfo`. - - - Values: - - - - 0: No maximum limit. - - - -1: Default value, the attribute was not set by the client. Treated - as no maximum limit. - - - >0: The maximum total modifier selections. This can be larger - than the total `CatalogModifiers` when `allow_quantities` is enabled. - - - < -1: Invalid. Treated as no maximum limit. - hidden_from_customer: - type: optional> - docs: >- - If `true`, modifiers from this list are hidden from customer receipts. - The default value is `false`. - - This setting can be overridden with - `CatalogItemModifierListInfo.hidden_from_customer_override`. - source: - openapi: ../default/openapi/openapi.json - CatalogModifierListModifierType: - enum: - - LIST - - TEXT - docs: Defines the type of `CatalogModifierList`. - source: - openapi: ../default/openapi/openapi.json - CatalogModifierListSelectionType: - enum: - - SINGLE - - MULTIPLE - docs: Indicates whether a CatalogModifierList supports multiple selections. - source: - openapi: ../default/openapi/openapi.json - CatalogModifierOverride: - docs: >- - Options to control how to override the default behavior of the specified - modifier. - properties: - modifier_id: - type: string - docs: >- - The ID of the `CatalogModifier` whose default behavior is being - overridden. - validation: - minLength: 1 - on_by_default: - type: optional> - docs: '__Deprecated__: Use `on_by_default_override` instead.' - hidden_online_override: optional - on_by_default_override: optional - source: - openapi: ../default/openapi/openapi.json - CatalogObject: - discriminant: type - base-properties: {} - docs: >- - The wrapper object for the catalog entries of a given object type. - - - Depending on the `type` attribute value, a `CatalogObject` instance - assumes a type-specific data to yield the corresponding type of catalog - object. - - - For example, if `type=ITEM`, the `CatalogObject` instance must have the - ITEM-specific data set on the `item_data` attribute. The resulting - `CatalogObject` instance is also a `CatalogItem` instance. - - - In general, if `type=`, the `CatalogObject` instance must - have the ``-specific data set on the `_data` - attribute. The resulting `CatalogObject` instance is also a - `Catalog` instance. - - - For a more detailed discussion of the Catalog data model, please see the - - [Design a - Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog) - guide. - union: - ITEM: CatalogObjectItem - IMAGE: CatalogObjectImage - CATEGORY: CatalogObjectCategory - ITEM_VARIATION: CatalogObjectItemVariation - TAX: CatalogObjectTax - DISCOUNT: CatalogObjectDiscount - MODIFIER_LIST: CatalogObjectModifierList - MODIFIER: CatalogObjectModifier - PRICING_RULE: CatalogObjectPricingRule - PRODUCT_SET: CatalogObjectProductSet - TIME_PERIOD: CatalogObjectTimePeriod - MEASUREMENT_UNIT: CatalogObjectMeasurementUnit - SUBSCRIPTION_PLAN_VARIATION: CatalogObjectSubscriptionPlanVariation - ITEM_OPTION: CatalogObjectItemOption - ITEM_OPTION_VAL: CatalogObjectItemOptionValue - CUSTOM_ATTRIBUTE_DEFINITION: CatalogObjectCustomAttributeDefinition - QUICK_AMOUNTS_SETTINGS: CatalogObjectQuickAmountsSettings - SUBSCRIPTION_PLAN: CatalogObjectSubscriptionPlan - AVAILABILITY_PERIOD: CatalogObjectAvailabilityPeriod - source: - openapi: ../default/openapi/openapi.json - CatalogObjectBatch: - docs: A batch of catalog objects. - properties: - objects: - docs: A list of CatalogObjects belonging to this batch. - type: list - source: - openapi: ../default/openapi/openapi.json - CatalogObjectCategory: - docs: >- - A category that can be assigned to an item or a parent category that can - be assigned - - to another category. For example, a clothing category can be assigned to a - t-shirt item or - - be made as the parent category to the pants category. - properties: - id: - type: optional - docs: The ID of the object's category. - ordinal: - type: optional> - docs: The order of the object within the context of the category. - category_data: - type: optional - docs: >- - Structured data for a `CatalogCategory`, set for CatalogObjects of - type `CATEGORY`. - updated_at: - type: optional - docs: >- - Last modification - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - - would indicate the UTC time (denoted by `Z`) of August 15, 2016 at - 23:59:33 and 123 milliseconds. - version: - type: optional - docs: >- - The version of the object. When updating an object, the version - supplied - - must match the version in the database, otherwise the write will be - rejected as conflicting. - is_deleted: - type: optional - docs: >- - If `true`, the object has been deleted from the database. Must be - `false` for new objects - - being inserted. When deleted, the `updated_at` field will equal the - deletion time. - custom_attribute_values: - type: optional> - docs: >- - A map (key-value pairs) of application-defined custom attribute - values. The value of a key-value pair - - is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) - object. The key is the `key` attribute - - value defined in the associated - [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - - object defined by the application making the request. - - - If the `CatalogCustomAttributeDefinition` object is - - defined by another application, the - `CatalogCustomAttributeDefinition`'s key attribute value is prefixed - by - - the defining application ID. For example, if the - `CatalogCustomAttributeDefinition` has a `key` attribute of - - `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the - key in the map is `"abcd1234:cocoa_brand"` - - if the application making the request is different from the - application defining the custom attribute definition. - - Otherwise, the key used in the map is simply `"cocoa_brand"`. - - - Application-defined custom attributes are set at a global - (location-independent) level. - - Custom attribute values are intended to store additional information - about a catalog object - - or associations with an entity in another system. Do not use custom - attributes - - to store any sensitive information (personally identifiable - information, card details, etc.). - catalog_v1_ids: - type: optional> - docs: >- - The Connect v1 IDs for this object at each location where it is - present, where they - - differ from the object's Connect V2 ID. The field will only be present - for objects that - - have been created or modified by legacy APIs. - present_at_all_locations: - type: optional - docs: >- - If `true`, this object is present at all locations (including future - locations), except where specified in - - the `absent_at_location_ids` field. If `false`, this object is not - present at any locations (including future locations), - - except where specified in the `present_at_location_ids` field. If not - specified, defaults to `true`. - present_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is present, even if - `present_at_all_locations` is `false`. - - This can include locations that are deactivated. - absent_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is not present, even if - `present_at_all_locations` is `true`. - - This can include locations that are deactivated. - image_id: - type: optional - docs: Identifies the `CatalogImage` attached to this `CatalogObject`. - source: - openapi: ../default/openapi/openapi.json - CatalogObjectBase: - properties: - id: - type: string - docs: >- - An identifier to reference this object in the catalog. When a new - `CatalogObject` - - is inserted, the client should set the id to a temporary identifier - starting with - - a "`#`" character. Other objects being inserted or updated within the - same request - - may use this identifier to refer to the new object. - - - When the server receives the new object, it will supply a unique - identifier that - - replaces the temporary identifier for all future references. - validation: - minLength: 1 - updated_at: - type: optional - docs: >- - Last modification - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - - would indicate the UTC time (denoted by `Z`) of August 15, 2016 at - 23:59:33 and 123 milliseconds. - access: read-only - version: - type: optional - docs: >- - The version of the object. When updating an object, the version - supplied - - must match the version in the database, otherwise the write will be - rejected as conflicting. - is_deleted: - type: optional - docs: >- - If `true`, the object has been deleted from the database. Must be - `false` for new objects - - being inserted. When deleted, the `updated_at` field will equal the - deletion time. - custom_attribute_values: - type: optional> - docs: >- - A map (key-value pairs) of application-defined custom attribute - values. The value of a key-value pair - - is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) - object. The key is the `key` attribute - - value defined in the associated - [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - - object defined by the application making the request. - - - If the `CatalogCustomAttributeDefinition` object is - - defined by another application, the - `CatalogCustomAttributeDefinition`'s key attribute value is prefixed - by - - the defining application ID. For example, if the - `CatalogCustomAttributeDefinition` has a `key` attribute of - - `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the - key in the map is `"abcd1234:cocoa_brand"` - - if the application making the request is different from the - application defining the custom attribute definition. - - Otherwise, the key used in the map is simply `"cocoa_brand"`. - - - Application-defined custom attributes are set at a global - (location-independent) level. - - Custom attribute values are intended to store additional information - about a catalog object - - or associations with an entity in another system. Do not use custom - attributes - - to store any sensitive information (personally identifiable - information, card details, etc.). - catalog_v1_ids: - type: optional> - docs: >- - The Connect v1 IDs for this object at each location where it is - present, where they - - differ from the object's Connect V2 ID. The field will only be present - for objects that - - have been created or modified by legacy APIs. - present_at_all_locations: - type: optional - docs: >- - If `true`, this object is present at all locations (including future - locations), except where specified in - - the `absent_at_location_ids` field. If `false`, this object is not - present at any locations (including future locations), - - except where specified in the `present_at_location_ids` field. If not - specified, defaults to `true`. - present_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is present, even if - `present_at_all_locations` is `false`. - - This can include locations that are deactivated. - absent_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is not present, even if - `present_at_all_locations` is `true`. - - This can include locations that are deactivated. - image_id: - type: optional - docs: Identifies the `CatalogImage` attached to this `CatalogObject`. - source: - openapi: ../default/openapi/openapi.json - CatalogObjectReference: - docs: >- - A reference to a Catalog object at a specific version. In general this is - - used as an entry point into a graph of catalog objects, where the objects - exist - - at a specific version. - properties: - object_id: - type: optional> - docs: The ID of the referenced object. - catalog_version: - type: optional> - docs: The version of the object. - source: - openapi: ../default/openapi/openapi.json - CatalogObjectType: - enum: - - ITEM - - IMAGE - - CATEGORY - - ITEM_VARIATION - - TAX - - DISCOUNT - - MODIFIER_LIST - - MODIFIER - - PRICING_RULE - - PRODUCT_SET - - TIME_PERIOD - - MEASUREMENT_UNIT - - SUBSCRIPTION_PLAN_VARIATION - - ITEM_OPTION - - ITEM_OPTION_VAL - - CUSTOM_ATTRIBUTE_DEFINITION - - QUICK_AMOUNTS_SETTINGS - - SUBSCRIPTION_PLAN - - AVAILABILITY_PERIOD - docs: >- - Possible types of CatalogObjects returned from the catalog, each - - containing type-specific properties in the `*_data` field corresponding to - the specified object type. - source: - openapi: ../default/openapi/openapi.json - CatalogPricingRule: - docs: >- - Defines how discounts are automatically applied to a set of items that - match the pricing rule - - during the active time period. - properties: - name: - type: optional> - docs: |- - User-defined name for the pricing rule. For example, "Buy one get one - free" or "10% off". - time_period_ids: - type: optional>> - docs: >- - A list of unique IDs for the catalog time periods when - - this pricing rule is in effect. If left unset, the pricing rule is - always - - in effect. - discount_id: - type: optional> - docs: |- - Unique ID for the `CatalogDiscount` to take off - the price of all matched items. - match_products_id: - type: optional> - docs: >- - Unique ID for the `CatalogProductSet` that will be matched by this - rule. A match rule - - matches within the entire cart, and can match multiple times. This - field will always be set. - apply_products_id: - type: optional> - docs: >- - __Deprecated__: Please use the `exclude_products_id` field to apply - - an exclude set instead. Exclude sets allow better control over - quantity - - ranges and offer more flexibility for which matched items receive a - discount. - - - `CatalogProductSet` to apply the pricing to. - - An apply rule matches within the subset of the cart that fits the - match rules (the match set). - - An apply rule can only match once in the match set. - - If not supplied, the pricing will be applied to all products in the - match set. - - Other products retain their base price, or a price generated by other - rules. - exclude_products_id: - type: optional> - docs: >- - `CatalogProductSet` to exclude from the pricing rule. - - An exclude rule matches within the subset of the cart that fits the - match rules (the match set). - - An exclude rule can only match once in the match set. - - If not supplied, the pricing will be applied to all products in the - match set. - - Other products retain their base price, or a price generated by other - rules. - valid_from_date: - type: optional> - docs: >- - Represents the date the Pricing Rule is valid from. Represented in RFC - 3339 full-date format (YYYY-MM-DD). - valid_from_local_time: - type: optional> - docs: >- - Represents the local time the pricing rule should be valid from. - Represented in RFC 3339 partial-time format - - (HH:MM:SS). Partial seconds will be truncated. - valid_until_date: - type: optional> - docs: >- - Represents the date the Pricing Rule is valid until. Represented in - RFC 3339 full-date format (YYYY-MM-DD). - valid_until_local_time: - type: optional> - docs: >- - Represents the local time the pricing rule should be valid until. - Represented in RFC 3339 partial-time format - - (HH:MM:SS). Partial seconds will be truncated. - exclude_strategy: - type: optional - docs: >- - If an `exclude_products_id` was given, controls which subset of - matched - - products is excluded from any discounts. - - - Default value: `LEAST_EXPENSIVE` - - See [ExcludeStrategy](#type-excludestrategy) for possible values - minimum_order_subtotal_money: - type: optional - docs: |- - The minimum order subtotal (before discounts or taxes are applied) - that must be met before this rule may be applied. - customer_group_ids_any: - type: optional>> - docs: >- - A list of IDs of customer groups, the members of which are eligible - for discounts specified in this pricing rule. - - Notice that a group ID is generated by the Customers API. - - If this field is not set, the specified discount applies to matched - products sold to anyone whether the buyer - - has a customer profile created or not. If this - `customer_group_ids_any` field is set, the specified discount - - applies only to matched products sold to customers belonging to the - specified customer groups. - source: - openapi: ../default/openapi/openapi.json - CatalogPricingType: - enum: - - FIXED_PRICING - - VARIABLE_PRICING - docs: >- - Indicates whether the price of a CatalogItemVariation should be entered - manually at the time of sale. - source: - openapi: ../default/openapi/openapi.json - CatalogProductSet: - docs: >- - Represents a collection of catalog objects for the purpose of applying a - - `PricingRule`. Including a catalog object will include all of its - subtypes. - - For example, including a category in a product set will include all of its - - items and associated item variations in the product set. Including an item - in - - a product set will also include its item variations. - properties: - name: - type: optional> - docs: |- - User-defined name for the product set. For example, "Clearance Items" - or "Winter Sale Items". - product_ids_any: - type: optional>> - docs: >2- - Unique IDs for any `CatalogObject` included in this product set. Any - number of these catalog objects can be in an order for a pricing rule - to apply. - - - This can be used with `product_ids_all` in a parent - `CatalogProductSet` to - - match groups of products for a bulk discount, such as a discount for - an - - entree and side combo. - - - Only one of `product_ids_all`, `product_ids_any`, or `all_products` - can be set. - - - Max: 500 catalog object IDs. - product_ids_all: - type: optional>> - docs: >- - Unique IDs for any `CatalogObject` included in this product set. - - All objects in this set must be included in an order for a pricing - rule to apply. - - - Only one of `product_ids_all`, `product_ids_any`, or `all_products` - can be set. - - - Max: 500 catalog object IDs. - quantity_exact: - type: optional> - docs: >- - If set, there must be exactly this many items from `products_any` or - `products_all` - - in the cart for the discount to apply. - - - Cannot be combined with either `quantity_min` or `quantity_max`. - quantity_min: - type: optional> - docs: >- - If set, there must be at least this many items from `products_any` or - `products_all` - - in a cart for the discount to apply. See `quantity_exact`. Defaults to - 0 if - - `quantity_exact`, `quantity_min` and `quantity_max` are all - unspecified. - quantity_max: - type: optional> - docs: >- - If set, the pricing rule will apply to a maximum of this many items - from - - `products_any` or `products_all`. - all_products: - type: optional> - docs: >- - If set to `true`, the product set will include every item in the - catalog. - - Only one of `product_ids_all`, `product_ids_any`, or `all_products` - can be set. - source: - openapi: ../default/openapi/openapi.json - CatalogQuery: - docs: >- - A query composed of one or more different types of filters to narrow the - scope of targeted objects when calling the `SearchCatalogObjects` - endpoint. - - - Although a query can have multiple filters, only certain query types can - be combined per call to - [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). - - Any combination of the following types may be used together: - - - [exact_query](entity:CatalogQueryExact) - - - [prefix_query](entity:CatalogQueryPrefix) - - - [range_query](entity:CatalogQueryRange) - - - [sorted_attribute_query](entity:CatalogQuerySortedAttribute) - - - [text_query](entity:CatalogQueryText) - - - All other query types cannot be combined with any others. - - - When a query filter is based on an attribute, the attribute must be - searchable. - - Searchable attributes are listed as follows, along their parent types that - can be searched for with applicable query filters. - - - Searchable attribute and objects queryable by searchable attributes: - - - `name`: `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, - `CatalogTax`, `CatalogDiscount`, `CatalogModifier`, `CatalogModifierList`, - `CatalogItemOption`, `CatalogItemOptionValue` - - - `description`: `CatalogItem`, `CatalogItemOptionValue` - - - `abbreviation`: `CatalogItem` - - - `upc`: `CatalogItemVariation` - - - `sku`: `CatalogItemVariation` - - - `caption`: `CatalogImage` - - - `display_name`: `CatalogItemOption` - - - For example, to search for [CatalogItem](entity:CatalogItem) objects by - searchable attributes, you can use - - the `"name"`, `"description"`, or `"abbreviation"` attribute in an - applicable query filter. - properties: - sorted_attribute_query: - type: optional - docs: >- - A query expression to sort returned query result by the given - attribute. - exact_query: - type: optional - docs: >- - An exact query expression to return objects with attribute name and - value - - matching the specified attribute name and value exactly. Value - matching is case insensitive. - set_query: - type: optional - docs: >- - A set query expression to return objects with attribute name and value - - matching the specified attribute name and any of the specified - attribute values exactly. - - Value matching is case insensitive. - prefix_query: - type: optional - docs: >- - A prefix query expression to return objects with attribute values - - that have a prefix matching the specified string value. Value matching - is case insensitive. - range_query: - type: optional - docs: |- - A range query expression to return objects with numeric values - that lie in the specified range. - text_query: - type: optional - docs: >- - A text query expression to return objects whose searchable attributes - contain all of the given - - keywords, irrespective of their order. For example, if a `CatalogItem` - contains custom attribute values of - - `{"name": "t-shirt"}` and `{"description": "Small, Purple"}`, the - query filter of `{"keywords": ["shirt", "sma", "purp"]}` - - returns this item. - items_for_tax_query: - type: optional - docs: >- - A query expression to return items that have any of the specified - taxes (as identified by the corresponding `CatalogTax` object IDs) - enabled. - items_for_modifier_list_query: - type: optional - docs: >- - A query expression to return items that have any of the given modifier - list (as identified by the corresponding `CatalogModifierList`s IDs) - enabled. - items_for_item_options_query: - type: optional - docs: >- - A query expression to return items that contains the specified item - options (as identified the corresponding `CatalogItemOption` IDs). - item_variations_for_item_option_values_query: - type: optional - docs: >- - A query expression to return item variations (of the - [CatalogItemVariation](entity:CatalogItemVariation) type) that - - contain all of the specified `CatalogItemOption` IDs. - source: - openapi: ../default/openapi/openapi.json - CatalogQueryExact: - docs: >- - The query filter to return the search result by exact match of the - specified attribute name and value. - properties: - attribute_name: - type: string - docs: >- - The name of the attribute to be searched. Matching of the attribute - name is exact. - validation: - minLength: 1 - attribute_value: - type: string - docs: >- - The desired value of the search attribute. Matching of the attribute - value is case insensitive and can be partial. - - For example, if a specified value of "sma", objects with the named - attribute value of "Small", "small" are both matched. - source: - openapi: ../default/openapi/openapi.json - CatalogQueryItemVariationsForItemOptionValues: - docs: >- - The query filter to return the item variations containing the specified - item option value IDs. - properties: - item_option_value_ids: - type: optional>> - docs: >- - A set of `CatalogItemOptionValue` IDs to be used to find associated - - `CatalogItemVariation`s. All ItemVariations that contain all of the - given - - Item Option Values (in any order) will be returned. - source: - openapi: ../default/openapi/openapi.json - CatalogQueryItemsForItemOptions: - docs: >- - The query filter to return the items containing the specified item option - IDs. - properties: - item_option_ids: - type: optional>> - docs: >- - A set of `CatalogItemOption` IDs to be used to find associated - - `CatalogItem`s. All Items that contain all of the given Item Options - (in any order) - - will be returned. - source: - openapi: ../default/openapi/openapi.json - CatalogQueryItemsForModifierList: - docs: >- - The query filter to return the items containing the specified modifier - list IDs. - properties: - modifier_list_ids: - docs: >- - A set of `CatalogModifierList` IDs to be used to find associated - `CatalogItem`s. - type: list - source: - openapi: ../default/openapi/openapi.json - CatalogQueryItemsForTax: - docs: The query filter to return the items containing the specified tax IDs. - properties: - tax_ids: - docs: >- - A set of `CatalogTax` IDs to be used to find associated - `CatalogItem`s. - type: list - source: - openapi: ../default/openapi/openapi.json - CatalogQueryPrefix: - docs: >- - The query filter to return the search result whose named attribute values - are prefixed by the specified attribute value. - properties: - attribute_name: - type: string - docs: The name of the attribute to be searched. - validation: - minLength: 1 - attribute_prefix: - type: string - docs: The desired prefix of the search attribute value. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - CatalogQueryRange: - docs: >- - The query filter to return the search result whose named attribute values - fall between the specified range. - properties: - attribute_name: - type: string - docs: The name of the attribute to be searched. - validation: - minLength: 1 - attribute_min_value: - type: optional> - docs: The desired minimum value for the search attribute (inclusive). - attribute_max_value: - type: optional> - docs: The desired maximum value for the search attribute (inclusive). - source: - openapi: ../default/openapi/openapi.json - CatalogQuerySet: - docs: >- - The query filter to return the search result(s) by exact match of the - specified `attribute_name` and any of - - the `attribute_values`. - properties: - attribute_name: - type: string - docs: >- - The name of the attribute to be searched. Matching of the attribute - name is exact. - validation: - minLength: 1 - attribute_values: - docs: >- - The desired values of the search attribute. Matching of the attribute - values is exact and case insensitive. - - A maximum of 250 values may be searched in a request. - type: list - source: - openapi: ../default/openapi/openapi.json - CatalogQuerySortedAttribute: - docs: The query expression to specify the key to sort search results. - properties: - attribute_name: - type: string - docs: The attribute whose value is used as the sort key. - validation: - minLength: 1 - initial_attribute_value: - type: optional> - docs: >- - The first attribute value to be returned by the query. Ascending sorts - will return only - - objects with this value or greater, while descending sorts will return - only objects with this value - - or less. If unset, start at the beginning (for ascending sorts) or end - (for descending sorts). - sort_order: - type: optional - docs: |- - The desired sort order, `"ASC"` (ascending) or `"DESC"` (descending). - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - CatalogQueryText: - docs: >- - The query filter to return the search result whose searchable attribute - values contain all of the specified keywords or tokens, independent of the - token order or case. - properties: - keywords: - docs: >- - A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 - alphanumeric characters are ignored. - type: list - source: - openapi: ../default/openapi/openapi.json - CatalogQuickAmount: - docs: Represents a Quick Amount in the Catalog. - properties: - type: - type: CatalogQuickAmountType - docs: >- - Represents the type of the Quick Amount. - - See [CatalogQuickAmountType](#type-catalogquickamounttype) for - possible values - amount: - type: Money - docs: Represents the actual amount of the Quick Amount with Money type. - score: - type: optional> - docs: >- - Describes the ranking of the Quick Amount provided by machine learning - model, in the range [0, 100]. - - MANUAL type amount will always have score = 100. - ordinal: - type: optional> - docs: The order in which this Quick Amount should be displayed. - source: - openapi: ../default/openapi/openapi.json - CatalogQuickAmountType: - enum: - - QUICK_AMOUNT_TYPE_MANUAL - - QUICK_AMOUNT_TYPE_AUTO - docs: Determines the type of a specific Quick Amount. - source: - openapi: ../default/openapi/openapi.json - CatalogQuickAmountsSettings: - docs: >- - A parent Catalog Object model represents a set of Quick Amounts and the - settings control the amounts. - properties: - option: - type: CatalogQuickAmountsSettingsOption - docs: >- - Represents the option seller currently uses on Quick Amounts. - - See - [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) - for possible values - eligible_for_auto_amounts: - type: optional> - docs: >- - Represents location's eligibility for auto amounts - - The boolean should be consistent with whether there are AUTO amounts - in the `amounts`. - amounts: - type: optional>> - docs: Represents a set of Quick Amounts at this location. - source: - openapi: ../default/openapi/openapi.json - CatalogQuickAmountsSettingsOption: - enum: - - DISABLED - - MANUAL - - AUTO - docs: Determines a seller's option on Quick Amounts feature. - source: - openapi: ../default/openapi/openapi.json - CatalogStockConversion: - docs: >- - Represents the rule of conversion between a stockable - [CatalogItemVariation](entity:CatalogItemVariation) - - and a non-stockable sell-by or receive-by `CatalogItemVariation` that - - share the same underlying stock. - properties: - stockable_item_variation_id: - type: string - docs: >- - References to the stockable - [CatalogItemVariation](entity:CatalogItemVariation) - - for this stock conversion. Selling, receiving or recounting the - non-stockable `CatalogItemVariation` - - defined with a stock conversion results in adjustments of this - stockable `CatalogItemVariation`. - - This immutable field must reference a stockable `CatalogItemVariation` - - that shares the parent [CatalogItem](entity:CatalogItem) of the - converted `CatalogItemVariation.` - validation: - minLength: 1 - stockable_quantity: - type: string - docs: >- - The quantity of the stockable item variation (as identified by - `stockable_item_variation_id`) - - equivalent to the non-stockable item variation quantity (as specified - in `nonstockable_quantity`) - - as defined by this stock conversion. It accepts a decimal number in a - string format that can take - - up to 10 digits before the decimal point and up to 5 digits after the - decimal point. - validation: - minLength: 1 - maxLength: 16 - nonstockable_quantity: - type: string - docs: >- - The converted equivalent quantity of the non-stockable - [CatalogItemVariation](entity:CatalogItemVariation) - - in its measurement unit. The `stockable_quantity` value and this - `nonstockable_quantity` value together - - define the conversion ratio between stockable item variation and the - non-stockable item variation. - - It accepts a decimal number in a string format that can take up to 10 - digits before the decimal point - - and up to 5 digits after the decimal point. - validation: - minLength: 1 - maxLength: 16 - source: - openapi: ../default/openapi/openapi.json - CatalogSubscriptionPlan: - docs: >- - Describes a subscription plan. A subscription plan represents what you - want to sell in a subscription model, and includes references to each of - the associated subscription plan variations. - - For more information, see [Subscription Plans and - Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations). - properties: - name: - type: string - docs: The name of the plan. - phases: - type: optional>> - docs: >- - A list of SubscriptionPhase containing the - [SubscriptionPhase](entity:SubscriptionPhase) for this plan. - - This field it required. Not including this field will throw a - REQUIRED_FIELD_MISSING error - subscription_plan_variations: - type: optional>> - docs: The list of subscription plan variations available for this product - eligible_item_ids: - type: optional>> - docs: >- - The list of IDs of `CatalogItems` that are eligible for subscription - by this SubscriptionPlan's variations. - eligible_category_ids: - type: optional>> - docs: >- - The list of IDs of `CatalogCategory` that are eligible for - subscription by this SubscriptionPlan's variations. - all_items: - type: optional> - docs: >- - If true, all items in the merchant's catalog are subscribable by this - SubscriptionPlan. - source: - openapi: ../default/openapi/openapi.json - CatalogSubscriptionPlanVariation: - docs: >- - Describes a subscription plan variation. A subscription plan variation - represents how the subscription for a product or service is sold. - - For more information, see [Subscription Plans and - Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations). - properties: - name: - type: string - docs: The name of the plan variation. - phases: - docs: >- - A list containing each [SubscriptionPhase](entity:SubscriptionPhase) - for this plan variation. - type: list - subscription_plan_id: - type: optional> - docs: The id of the subscription plan, if there is one. - monthly_billing_anchor_date: - type: optional> - docs: The day of the month the billing period starts. - can_prorate: - type: optional> - docs: Whether bills for this plan variation can be split for proration. - successor_plan_variation_id: - type: optional> - docs: >- - The ID of a "successor" plan variation to this one. If the field is - set, and this object is disabled at all - - locations, it indicates that this variation is deprecated and the - object identified by the successor ID be used in - - its stead. - source: - openapi: ../default/openapi/openapi.json - CatalogTax: - docs: A tax applicable to an item. - properties: - name: - type: optional> - docs: >- - The tax's name. This is a searchable attribute for use in applicable - query filters, and its value length is of Unicode code points. - validation: - maxLength: 255 - calculation_phase: - type: optional - docs: >- - Whether the tax is calculated based on a payment's subtotal or total. - - See [TaxCalculationPhase](#type-taxcalculationphase) for possible - values - inclusion_type: - type: optional - docs: |- - Whether the tax is `ADDITIVE` or `INCLUSIVE`. - See [TaxInclusionType](#type-taxinclusiontype) for possible values - percentage: - type: optional> - docs: >- - The percentage of the tax in decimal form, using a `'.'` as the - decimal separator and without a `'%'` sign. - - A value of `7.5` corresponds to 7.5%. For a location-specific tax - rate, contact the tax authority of the location or a tax consultant. - applies_to_custom_amounts: - type: optional> - docs: >- - If `true`, the fee applies to custom amounts entered into the Square - Point of Sale - - app that are not associated with a particular `CatalogItem`. - enabled: - type: optional> - docs: >- - A Boolean flag to indicate whether the tax is displayed as enabled - (`true`) in the Square Point of Sale app or not (`false`). - applies_to_product_set_id: - type: optional> - docs: >- - The ID of a `CatalogProductSet` object. If set, the tax is applicable - to all products in the product set. - source: - openapi: ../default/openapi/openapi.json - CatalogTimePeriod: - docs: Represents a time period - either a single period or a repeating period. - properties: - event: - type: optional> - docs: >- - An iCalendar (RFC 5545) - [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which - - specifies the name, timing, duration and recurrence of this time - period. - - - Example: - - - ``` - - DTSTART:20190707T180000 - - DURATION:P2H - - RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR - - ``` - - - Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are - supported. - - `DTSTART` must be in local (unzoned) time format. Note that while - `BEGIN:VEVENT` - - and `END:VEVENT` is not required in the request. The response will - always - - include them. - source: - openapi: ../default/openapi/openapi.json - CatalogV1Id: - docs: >- - A Square API V1 identifier of an item, including the object ID and its - associated location ID. - properties: - catalog_v1_id: - type: optional> - docs: >- - The ID for an object used in the Square API V1, if the object ID - differs from the Square API V2 object ID. - location_id: - type: optional> - docs: The ID of the `Location` this Connect V1 ID is associated with. - source: - openapi: ../default/openapi/openapi.json - CatalogVersionUpdatedEvent: - docs: Published when the catalog is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CatalogVersionUpdatedEventCatalogVersion: - properties: - updated_at: - type: optional - docs: Last modification timestamp in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CatalogVersionUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type. - object: - type: optional - docs: >- - An object containing fields and values relevant to the event. Is - absent if affected object was deleted. - source: - openapi: ../default/openapi/openapi.json - CatalogVersionUpdatedEventObject: - properties: - catalog_version: - type: optional - docs: The version of the object. - source: - openapi: ../default/openapi/openapi.json - CategoryPathToRootNode: - docs: A node in the path from a retrieved category to its root node. - properties: - category_id: - type: optional> - docs: The category's ID. - category_name: - type: optional> - docs: The category's name. - source: - openapi: ../default/openapi/openapi.json - ChangeBillingAnchorDateResponse: - docs: >- - Defines output parameters in a request to the - - [ChangeBillingAnchorDate](api-endpoint:Subscriptions-ChangeBillingAnchorDate) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The specified subscription for updating billing anchor date. - actions: - type: optional> - docs: A list of a single billing anchor date change for the subscription. - source: - openapi: ../default/openapi/openapi.json - ChangeTiming: - enum: - - IMMEDIATE - - END_OF_BILLING_CYCLE - docs: >- - Supported timings when a pending change, as an action, takes place to a - subscription. - source: - openapi: ../default/openapi/openapi.json - Channel: - properties: - id: - type: optional - docs: The channel's unique ID. - access: read-only - merchant_id: - type: optional - docs: The unique ID of the merchant this channel belongs to. - access: read-only - name: - type: optional> - docs: The name of the channel. - version: - type: optional - docs: >- - The version number which is incremented each time an update is made to - the channel. - access: read-only - reference: - type: optional - docs: Represents an entity the channel is associated with. - status: - type: optional - docs: |- - Status of the channel. - See [Status](#type-status) for possible values - created_at: - type: optional - docs: >- - The timestamp for when the channel was created, in RFC 3339 format - (for example, "2016-09-04T23:59:33.123Z"). - - For more information, see [Working with - Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - access: read-only - updated_at: - type: optional - docs: >- - The timestamp for when the channel was last updated, in RFC 3339 - format (for example, "2016-09-04T23:59:33.123Z"). - - For more information, see [Working with - Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - access: read-only - source: - openapi: ../default/openapi/openapi.json - ChannelStatus: - enum: - - ACTIVE - - INACTIVE - source: - openapi: ../default/openapi/openapi.json - ChargeRequestAdditionalRecipient: - docs: >- - Represents an additional recipient (other than the merchant) entitled to a - portion of the tender. - - Support is currently limited to USD, CAD and GBP currencies - properties: - location_id: - type: string - docs: >- - The location ID for a recipient (other than the merchant) receiving a - portion of the tender. - validation: - minLength: 1 - maxLength: 50 - description: - type: string - docs: The description of the additional recipient. - validation: - minLength: 1 - maxLength: 100 - amount_money: - type: Money - docs: The amount of money distributed to the recipient. - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettings: - properties: - location_id: - type: optional> - docs: The ID of the location that these settings apply to. - customer_notes_enabled: - type: optional> - docs: Indicates whether customers are allowed to leave notes at checkout. - policies: - type: optional>> - docs: |- - Policy information is displayed at the bottom of the checkout pages. - You can set a maximum of two policies. - branding: - type: optional - docs: The branding settings for this location. - tipping: - type: optional - docs: The tip settings for this location. - coupons: - type: optional - docs: The coupon settings for this location. - updated_at: - type: optional - docs: |- - The timestamp when the settings were last updated, in RFC 3339 format. - Examples for January 25th, 2020 6:25:34pm Pacific Standard Time: - UTC: 2020-01-26T02:25:34Z - Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00 - access: read-only - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsBranding: - properties: - header_type: - type: optional - docs: |- - Show the location logo on the checkout page. - See [HeaderType](#type-headertype) for possible values - button_color: - type: optional> - docs: >- - The HTML-supported hex color for the button on the checkout page (for - example, "#FFFFFF"). - validation: - minLength: 7 - maxLength: 7 - button_shape: - type: optional - docs: |- - The shape of the button on the checkout page. - See [ButtonShape](#type-buttonshape) for possible values - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsBrandingButtonShape: - enum: - - SQUARED - - ROUNDED - - PILL - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsBrandingHeaderType: - enum: - - BUSINESS_NAME - - FRAMED_LOGO - - FULL_WIDTH_LOGO - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsCoupons: - properties: - enabled: - type: optional> - docs: Indicates whether coupons are enabled for this location. - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsPolicy: - properties: - uid: - type: optional> - docs: >- - A unique ID to identify the policy when making changes. You must set - the UID for policy updates, but it’s optional when setting new - policies. - title: - type: optional> - docs: >- - The title of the policy. This is required when setting the - description, though you can update it in a different request. - validation: - maxLength: 50 - description: - type: optional> - docs: The description of the policy. - validation: - maxLength: 4096 - source: - openapi: ../default/openapi/openapi.json - CheckoutLocationSettingsTipping: - properties: - percentages: - type: optional>> - docs: >- - Set three custom percentage amounts that buyers can select at - checkout. If Smart Tip is enabled, this only applies to transactions - totaling $10 or more. - smart_tipping_enabled: - type: optional> - docs: >- - Enables Smart Tip Amounts. If Smart Tip Amounts is enabled, tipping - works as follows: - - If a transaction is less than $10, the available tipping options - include No Tip, $1, $2, or $3. - - If a transaction is $10 or more, the available tipping options include - No Tip, 15%, 20%, or 25%. - - You can set custom percentage amounts with the `percentages` field. - default_percent: - type: optional> - docs: >- - Set the pre-selected percentage amounts that appear at checkout. If - Smart Tip is enabled, this only applies to transactions totaling $10 - or more. - smart_tips: - type: optional>> - docs: Show the Smart Tip Amounts for this location. - default_smart_tip: - type: optional - docs: >- - Set the pre-selected whole amount that appears at checkout when Smart - Tip is enabled and the transaction amount is less than $10. - source: - openapi: ../default/openapi/openapi.json - CheckoutMerchantSettings: - properties: - payment_methods: - type: optional - docs: The set of payment methods accepted for the merchant's account. - updated_at: - type: optional - docs: |- - The timestamp when the settings were last updated, in RFC 3339 format. - Examples for January 25th, 2020 6:25:34pm Pacific Standard Time: - UTC: 2020-01-26T02:25:34Z - Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00 - access: read-only - source: - openapi: ../default/openapi/openapi.json - CheckoutMerchantSettingsPaymentMethods: - properties: - apple_pay: optional - google_pay: optional - cash_app: optional - afterpay_clearpay: optional - source: - openapi: ../default/openapi/openapi.json - CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay: - docs: The settings allowed for AfterpayClearpay. - properties: - order_eligibility_range: - type: >- - optional - docs: >- - Afterpay is shown as an option for order totals falling within the - configured range. - item_eligibility_range: - type: >- - optional - docs: >- - Afterpay is shown as an option for item totals falling within the - configured range. - enabled: - type: optional - docs: Indicates whether the payment method is enabled for the account. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange: - docs: A range of purchase price that qualifies. - properties: - min: Money - max: Money - source: - openapi: ../default/openapi/openapi.json - CheckoutMerchantSettingsPaymentMethodsPaymentMethod: - docs: The settings allowed for a payment method. - properties: - enabled: - type: optional> - docs: Indicates whether the payment method is enabled for the account. - source: - openapi: ../default/openapi/openapi.json - CheckoutOptions: - properties: - allow_tipping: - type: optional> - docs: Indicates whether the payment allows tipping. - custom_fields: - type: optional>> - docs: The custom fields requesting information from the buyer. - subscription_plan_id: - type: optional> - docs: >- - The ID of the subscription plan for the buyer to pay and subscribe. - - For more information, see [Subscription Plan - Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout). - validation: - maxLength: 255 - redirect_url: - type: optional> - docs: >- - The confirmation page URL to redirect the buyer to after Square - processes the payment. - validation: - maxLength: 2048 - merchant_support_email: - type: optional> - docs: The email address that buyers can use to contact the seller. - validation: - maxLength: 256 - ask_for_shipping_address: - type: optional> - docs: Indicates whether to include the address fields in the payment form. - accepted_payment_methods: - type: optional - docs: The methods allowed for buyers during checkout. - app_fee_money: - type: optional - docs: >- - The amount of money that the developer is taking as a fee for - facilitating the payment on behalf of the seller. - - - The amount cannot be more than 90% of the total amount of the payment. - - - The amount must be specified in the smallest denomination of the - applicable currency (for example, US dollar amounts are specified in - cents). For more information, see [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-monetary-amounts). - - - The fee currency code must match the currency associated with the - seller that is accepting the payment. The application must be from a - developer account in the same country and using the same currency code - as the seller. For more information about the application fee - scenario, see [Take Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - - - To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission is required. For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/collect-fees/additional-considerations#permissions). - shipping_fee: - type: optional - docs: >- - The fee associated with shipping to be applied to the `Order` as a - service charge. - enable_coupon: - type: optional> - docs: >- - Indicates whether to include the `Add coupon` section for the buyer to - provide a Square marketing coupon in the payment form. - enable_loyalty: - type: optional> - docs: >- - Indicates whether to include the `REWARDS` section for the buyer to - opt in to loyalty, redeem rewards in the payment form, or both. - source: - openapi: ../default/openapi/openapi.json - CheckoutOptionsPaymentType: - enum: - - CARD_PRESENT - - MANUAL_CARD_ENTRY - - FELICA_ID - - FELICA_QUICPAY - - FELICA_TRANSPORTATION_GROUP - - FELICA_ALL - - PAYPAY - - QR_CODE - source: - openapi: ../default/openapi/openapi.json - ClearpayDetails: - docs: Additional details about Clearpay payments. - properties: - email_address: - type: optional> - docs: Email address on the buyer's Clearpay account. - validation: - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - CloneOrderResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the [CloneOrder](api-endpoint:Orders-CloneOrder) endpoint. - properties: - order: - type: optional - docs: The cloned order. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CollectedData: - properties: - input_text: - type: optional - docs: The buyer's input text. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CompletePaymentResponse: - docs: >- - Defines the response returned - by[CompletePayment](api-endpoint:Payments-CompletePayment). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The successfully completed payment. - source: - openapi: ../default/openapi/openapi.json - Component: - docs: The wrapper object for the component entries of a given component type. - properties: - type: - type: ComponentComponentType - docs: >- - The type of this component. Each component type has expected - properties expressed - - in a structured format within its corresponding `*_details` field. - - See [ComponentType](#type-componenttype) for possible values - application_details: - type: optional - docs: >- - Structured data for an `Application`, set for Components of type - `APPLICATION`. - card_reader_details: - type: optional - docs: >- - Structured data for a `CardReader`, set for Components of type - `CARD_READER`. - battery_details: - type: optional - docs: Structured data for a `Battery`, set for Components of type `BATTERY`. - wifi_details: - type: optional - docs: >- - Structured data for a `WiFi` interface, set for Components of type - `WIFI`. - ethernet_details: - type: optional - docs: >- - Structured data for an `Ethernet` interface, set for Components of - type `ETHERNET`. - source: - openapi: ../default/openapi/openapi.json - ComponentComponentType: - enum: - - APPLICATION - - CARD_READER - - BATTERY - - WIFI - - ETHERNET - - PRINTER - docs: An enum for ComponentType. - source: - openapi: ../default/openapi/openapi.json - ConfirmationDecision: - properties: - has_agreed: - type: optional - docs: The buyer's decision to the displayed terms. - access: read-only - source: - openapi: ../default/openapi/openapi.json - ConfirmationOptions: - properties: - title: - type: string - docs: >- - The title text to display in the confirmation screen flow on the - Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: >- - The agreement details to display in the confirmation flow on the - Terminal. - validation: - minLength: 1 - maxLength: 10000 - agree_button_text: - type: string - docs: >- - The button text to display indicating the customer agrees to the - displayed terms. - validation: - minLength: 1 - maxLength: 250 - disagree_button_text: - type: optional> - docs: >- - The button text to display indicating the customer does not agree to - the displayed terms. - validation: - minLength: 1 - maxLength: 250 - decision: - type: optional - docs: >- - The result of the buyer’s actions when presented with the confirmation - screen. - source: - openapi: ../default/openapi/openapi.json - Coordinates: - docs: Latitude and longitude coordinates. - properties: - latitude: - type: optional> - docs: The latitude of the coordinate expressed in degrees. - longitude: - type: optional> - docs: The longitude of the coordinate expressed in degrees. - source: - openapi: ../default/openapi/openapi.json - Country: - enum: - - ZZ - - AD - - AE - - AF - - AG - - AI - - AL - - AM - - AO - - AQ - - AR - - AS - - AT - - AU - - AW - - AX - - AZ - - BA - - BB - - BD - - BE - - BF - - BG - - BH - - BI - - BJ - - BL - - BM - - BN - - BO - - BQ - - BR - - BS - - BT - - BV - - BW - - BY - - BZ - - CA - - CC - - CD - - CF - - CG - - CH - - CI - - CK - - CL - - CM - - CN - - CO - - CR - - CU - - CV - - CW - - CX - - CY - - CZ - - DE - - DJ - - DK - - DM - - DO - - DZ - - EC - - EE - - EG - - EH - - ER - - ES - - ET - - FI - - FJ - - FK - - FM - - FO - - FR - - GA - - GB - - GD - - GE - - GF - - GG - - GH - - GI - - GL - - GM - - GN - - GP - - GQ - - GR - - GS - - GT - - GU - - GW - - GY - - HK - - HM - - HN - - HR - - HT - - HU - - ID - - IE - - IL - - IM - - IN - - IO - - IQ - - IR - - IS - - IT - - JE - - JM - - JO - - JP - - KE - - KG - - KH - - KI - - KM - - KN - - KP - - KR - - KW - - KY - - KZ - - LA - - LB - - LC - - LI - - LK - - LR - - LS - - LT - - LU - - LV - - LY - - MA - - MC - - MD - - ME - - MF - - MG - - MH - - MK - - ML - - MM - - MN - - MO - - MP - - MQ - - MR - - MS - - MT - - MU - - MV - - MW - - MX - - MY - - MZ - - NA - - NC - - NE - - NF - - NG - - NI - - NL - - 'NO' - - NP - - NR - - NU - - NZ - - OM - - PA - - PE - - PF - - PG - - PH - - PK - - PL - - PM - - PN - - PR - - PS - - PT - - PW - - PY - - QA - - RE - - RO - - RS - - RU - - RW - - SA - - SB - - SC - - SD - - SE - - SG - - SH - - SI - - SJ - - SK - - SL - - SM - - SN - - SO - - SR - - SS - - ST - - SV - - SX - - SY - - SZ - - TC - - TD - - TF - - TG - - TH - - TJ - - TK - - TL - - TM - - TN - - TO - - TR - - TT - - TV - - TW - - TZ - - UA - - UG - - UM - - US - - UY - - UZ - - VA - - VC - - VE - - VG - - VI - - VN - - VU - - WF - - WS - - YE - - YT - - ZA - - ZM - - ZW - docs: >- - Indicates the country associated with another entity, such as a business. - - Values are in [ISO 3166-1-alpha-2 - format](http://www.iso.org/iso/home/standards/country_codes.htm). - source: - openapi: ../default/openapi/openapi.json - CreateBookingCustomAttributeDefinitionResponse: - docs: >- - Represents a - [CreateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-CreateBookingCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The newly created custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateBookingResponse: - properties: - booking: - type: optional - docs: The booking that was created. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateBreakTypeResponse: - docs: >- - The response to the request to create a `BreakType`. The response contains - - the created `BreakType` object and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - break_type: - type: optional - docs: The `BreakType` that was created by the request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateCardResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [CreateCard](api-endpoint:Cards-CreateCard) endpoint. - - - Note: if there are errors processing the request, the card field will not - be - - present. - properties: - errors: - type: optional> - docs: Errors resulting from the request. - card: - type: optional - docs: The card created by the request. - source: - openapi: ../default/openapi/openapi.json - CreateCatalogImageRequest: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this CreateCatalogImage request. - - Keys can be any valid string but must be unique for every - CreateCatalogImage request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - object_id: - type: optional - docs: >- - Unique ID of the `CatalogObject` to attach this `CatalogImage` object - to. Leave this - - field empty to create unattached images, for example if you are - building an integration - - where an image can be attached to catalog items at a later time. - image: - type: CatalogObject - docs: >- - The new `CatalogObject` of the `IMAGE` type, namely, a `CatalogImage` - object, to encapsulate the specified image file. - is_primary: - type: optional - docs: >- - If this is set to `true`, the image created will be the primary, or - first image of the object referenced by `object_id`. - - If the `CatalogObject` already has a primary `CatalogImage`, setting - this field to `true` will replace the primary image. - - If this is set to `false` and you use the Square API version - 2021-12-15 or later, the image id will be appended to the list of - `image_ids` on the object. - - - With Square API version 2021-12-15 or later, the default value is - `false`. Otherwise, the effective default value is `true`. - source: - openapi: ../default/openapi/openapi.json - CreateCatalogImageResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - image: - type: optional - docs: |- - The newly created `CatalogImage` including a Square-generated - URL for the encapsulated image file. - source: - openapi: ../default/openapi/openapi.json - CreateCheckoutResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `CreateCheckout` endpoint. - properties: - checkout: - type: optional - docs: >- - The newly created `checkout` object associated with the provided - idempotency key. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateCustomerCardResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `CreateCustomerCard` endpoint. - - Either `errors` or `card` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - card: - type: optional - docs: The created card on file. - source: - openapi: ../default/openapi/openapi.json - CreateCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents a - [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The new custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateCustomerGroupResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [CreateCustomerGroup](api-endpoint:CustomerGroups-CreateCustomerGroup) - endpoint. - - - Either `errors` or `group` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - group: - type: optional - docs: The successfully created customer group. - source: - openapi: ../default/openapi/openapi.json - CreateCustomerResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [CreateCustomer](api-endpoint:Customers-CreateCustomer) - or - - [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) - endpoint. - - - Either `errors` or `customer` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customer: - type: optional - docs: The created customer. - source: - openapi: ../default/openapi/openapi.json - CreateDeviceCodeResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_code: - type: optional - docs: The created DeviceCode object containing the device code string. - source: - openapi: ../default/openapi/openapi.json - CreateDisputeEvidenceFileRequest: - docs: Defines the parameters for a `CreateDisputeEvidenceFile` request. - properties: - idempotency_key: - type: string - docs: >- - A unique key identifying the request. For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - maxLength: 45 - evidence_type: - type: optional - docs: >- - The type of evidence you are uploading. - - See [DisputeEvidenceType](#type-disputeevidencetype) for possible - values - content_type: - type: optional - docs: >- - The MIME type of the uploaded file. - - The type can be image/heic, image/heif, image/jpeg, application/pdf, - image/png, or image/tiff. - validation: - minLength: 1 - maxLength: 40 - source: - openapi: ../default/openapi/openapi.json - CreateDisputeEvidenceFileResponse: - docs: Defines the fields in a `CreateDisputeEvidenceFile` response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - evidence: - type: optional - docs: The metadata of the newly uploaded dispute evidence. - source: - openapi: ../default/openapi/openapi.json - CreateDisputeEvidenceTextResponse: - docs: Defines the fields in a `CreateDisputeEvidenceText` response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - evidence: - type: optional - docs: The newly uploaded dispute evidence metadata. - source: - openapi: ../default/openapi/openapi.json - CreateGiftCardActivityResponse: - docs: >- - A response that contains a `GiftCardActivity` that was created. - - The response might contain a set of `Error` objects if the request - resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card_activity: - type: optional - docs: The gift card activity that was created. - source: - openapi: ../default/openapi/openapi.json - CreateGiftCardResponse: - docs: >- - A response that contains a `GiftCard`. The response might contain a set of - `Error` objects if the request - - resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: The new gift card. - source: - openapi: ../default/openapi/openapi.json - CreateInvoiceAttachmentRequestData: - docs: >- - Represents a - [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) - request. - properties: - idempotency_key: - type: optional - docs: >- - A unique string that identifies the `CreateInvoiceAttachment` request. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 128 - description: - type: optional - docs: The description of the attachment to display on the invoice. - validation: - maxLength: 128 - source: - openapi: ../default/openapi/openapi.json - CreateInvoiceAttachmentResponse: - docs: >- - Represents a - [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) - response. - properties: - attachment: - type: optional - docs: Metadata about the attachment that was added to the invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - CreateInvoiceResponse: - docs: The response returned by the `CreateInvoice` request. - properties: - invoice: - type: optional - docs: The newly created invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - CreateJobResponse: - docs: >- - Represents a [CreateJob](api-endpoint:Team-CreateJob) response. Either - `job` or `errors` - - is present in the response. - properties: - job: - type: optional - docs: The new job. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateLocationCustomAttributeDefinitionResponse: - docs: >- - Represents a - [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The new custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateLocationResponse: - docs: >- - The response object returned by the - [CreateLocation](api-endpoint:Locations-CreateLocation) endpoint. - properties: - errors: - type: optional> - docs: >- - Information about - [errors](https://developer.squareup.com/docs/build-basics/handling-errors) - encountered during the request. - location: - type: optional - docs: The newly created `Location` object. - source: - openapi: ../default/openapi/openapi.json - CreateLoyaltyAccountResponse: - docs: A response that includes loyalty account created. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_account: - type: optional - docs: The newly created loyalty account. - source: - openapi: ../default/openapi/openapi.json - CreateLoyaltyPromotionResponse: - docs: >- - Represents a - [CreateLoyaltyPromotion](api-endpoint:Loyalty-CreateLoyaltyPromotion) - response. - - Either `loyalty_promotion` or `errors` is present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotion: - type: optional - docs: The new loyalty promotion. - source: - openapi: ../default/openapi/openapi.json - CreateLoyaltyRewardResponse: - docs: A response that includes the loyalty reward created. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - reward: - type: optional - docs: The loyalty reward created. - source: - openapi: ../default/openapi/openapi.json - CreateMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents a - [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The new custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateMobileAuthorizationCodeResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `CreateMobileAuthorizationCode` endpoint. - properties: - authorization_code: - type: optional - docs: >- - The generated authorization code that connects a mobile application - instance - - to a Square account. - validation: - maxLength: 191 - expires_at: - type: optional - docs: >- - The timestamp when `authorization_code` expires, in - - [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, - "2016-09-04T23:59:33.123Z"). - validation: - minLength: 20 - maxLength: 48 - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateOrderCustomAttributeDefinitionResponse: - docs: Represents a response from creating an order custom attribute definition. - properties: - custom_attribute_definition: - type: optional - docs: The new custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateOrderRequest: - properties: - order: - type: optional - docs: >- - The order to create. If this field is set, the only other top-level - field that can be - - set is the `idempotency_key`. - idempotency_key: - type: optional - docs: >- - A value you specify that uniquely identifies this - - order among orders you have created. - - - If you are unsure whether a particular order was created successfully, - - you can try it again with the same idempotency key without - - worrying about creating duplicate orders. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - CreateOrderResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `CreateOrder` endpoint. - - Either `errors` or `order` is present in a given response, but never both. - properties: - order: - type: optional - docs: The newly created order. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreatePaymentLinkResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - payment_link: - type: optional - docs: The created payment link. - related_resources: - type: optional - docs: The list of related objects. - source: - openapi: ../default/openapi/openapi.json - CreatePaymentResponse: - docs: >- - Defines the response returned by - [CreatePayment](api-endpoint:Payments-CreatePayment). - - - If there are errors processing the request, the `payment` field might not - be - - present, or it might be present with a status of `FAILED`. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The newly created payment. - source: - openapi: ../default/openapi/openapi.json - CreateScheduledShiftResponse: - docs: >- - Represents a - [CreateScheduledShift](api-endpoint:Labor-CreateScheduledShift) response. - - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional - docs: >- - The new scheduled shift. To make the shift public, call - - [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) or - - [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateShiftResponse: - docs: |- - The response to a request to create a `Shift`. The response contains - the created `Shift` object and might contain a set of `Error` objects if - the request resulted in errors. - properties: - shift: - type: optional - docs: The `Shift` that was created on the request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [CreateSubscription](api-endpoint:Subscriptions-CreateSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: >- - The newly created subscription. - - - For more information, see - - [Subscription - object](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#subscription-object). - source: - openapi: ../default/openapi/openapi.json - CreateTeamMemberRequest: - docs: Represents a create request for a `TeamMember` object. - properties: - idempotency_key: - type: optional - docs: >- - A unique string that identifies this `CreateTeamMember` request. - - Keys can be any valid string, but must be unique for every request. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - - - The minimum length is 1 and the maximum length is 45. - team_member: - type: optional - docs: >- - **Required** The data used to create the `TeamMember` object. If you - include `wage_setting`, you must provide - - `job_id` for each job assignment. To get job IDs, call - [ListJobs](api-endpoint:Team-ListJobs). - source: - openapi: ../default/openapi/openapi.json - CreateTeamMemberResponse: - docs: >- - Represents a response from a create request containing the created - `TeamMember` object or error messages. - properties: - team_member: - type: optional - docs: The successfully created `TeamMember` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: The created `TerminalAction` - source: - openapi: ../default/openapi/openapi.json - CreateTerminalCheckoutResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkout: - type: optional - docs: The created `TerminalCheckout`. - source: - openapi: ../default/openapi/openapi.json - CreateTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The created `TerminalRefund`. - source: - openapi: ../default/openapi/openapi.json - CreateTimecardResponse: - docs: >- - The response to a request to create a `Timecard`. The response contains - - the created `Timecard` object and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - timecard: - type: optional - docs: The `Timecard` that was created on the request. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - CreateTransferOrderData: - docs: >- - Data for creating a new transfer order to move - [CatalogItemVariation](entity:CatalogItemVariation)s - - between [Location](entity:Location)s. Used with the - [CreateTransferOrder](api-endpoint:TransferOrders-CreateTransferOrder) - - endpoint. - properties: - source_location_id: - type: string - docs: >- - The source [Location](entity:Location) that will send the items. Must - be an active location - - in your Square account with sufficient inventory of the requested - items. - validation: - minLength: 1 - maxLength: 64 - destination_location_id: - type: string - docs: >- - The destination [Location](entity:Location) that will receive the - items. Must be an active location - - in your Square account - validation: - minLength: 1 - maxLength: 64 - expected_at: - type: optional> - docs: >- - Expected transfer date in RFC 3339 format (e.g. - "2023-10-01T12:00:00Z"). - notes: - type: optional> - docs: Optional notes about the transfer - validation: - maxLength: 4096 - tracking_number: - type: optional> - docs: Optional shipment tracking number - validation: - maxLength: 64 - created_by_team_member_id: - type: optional> - docs: >- - ID of the [TeamMember](entity:TeamMember) creating this transfer - order. Used for tracking - - and auditing purposes. - validation: - maxLength: 64 - line_items: - type: optional>> - docs: >- - List of [CatalogItemVariation](entity:CatalogItemVariation)s to - transfer, including quantities - source: - openapi: ../default/openapi/openapi.json - CreateTransferOrderLineData: - docs: >- - Data for creating a new transfer order line item. Each line item specifies - a - - [CatalogItemVariation](entity:CatalogItemVariation) and quantity to - transfer. - properties: - item_variation_id: - type: string - docs: >- - ID of the [CatalogItemVariation](entity:CatalogItemVariation) to - transfer. Must reference a valid - - item variation in the [Catalog](api:Catalog). The item variation must - be: - - - Active and available for sale - - - Enabled for inventory tracking - - - Available at the source location - validation: - minLength: 1 - maxLength: 64 - quantity_ordered: - type: string - docs: Total quantity ordered - validation: - pattern: ^(0|[1-9]\d*)(\.\d{1,4})?$ - minLength: 1 - maxLength: 16 - source: - openapi: ../default/openapi/openapi.json - CreateTransferOrderResponse: - docs: Response for creating a transfer order. - properties: - transfer_order: - type: optional - docs: The created transfer order - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - CreateVendorResponse: - docs: >- - Represents an output from a call to - [CreateVendor](api-endpoint:Vendors-CreateVendor). - properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - vendor: - type: optional - docs: The successfully created [Vendor](entity:Vendor) object. - source: - openapi: ../default/openapi/openapi.json - CreateWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [CreateWebhookSubscription](api-endpoint:WebhookSubscriptions-CreateWebhookSubscription) - endpoint. - - - Note: if there are errors processing the request, the - [Subscription](entity:WebhookSubscription) will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription: - type: optional - docs: The new [Subscription](entity:WebhookSubscription). - source: - openapi: ../default/openapi/openapi.json - Currency: - enum: - - UNKNOWN_CURRENCY - - AED - - AFN - - ALL - - AMD - - ANG - - AOA - - ARS - - AUD - - AWG - - AZN - - BAM - - BBD - - BDT - - BGN - - BHD - - BIF - - BMD - - BND - - BOB - - BOV - - BRL - - BSD - - BTN - - BWP - - BYR - - BZD - - CAD - - CDF - - CHE - - CHF - - CHW - - CLF - - CLP - - CNY - - COP - - COU - - CRC - - CUC - - CUP - - CVE - - CZK - - DJF - - DKK - - DOP - - DZD - - EGP - - ERN - - ETB - - EUR - - FJD - - FKP - - GBP - - GEL - - GHS - - GIP - - GMD - - GNF - - GTQ - - GYD - - HKD - - HNL - - HRK - - HTG - - HUF - - IDR - - ILS - - INR - - IQD - - IRR - - ISK - - JMD - - JOD - - JPY - - KES - - KGS - - KHR - - KMF - - KPW - - KRW - - KWD - - KYD - - KZT - - LAK - - LBP - - LKR - - LRD - - LSL - - LTL - - LVL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRO - - MUR - - MVR - - MWK - - MXN - - MXV - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SLL - - SLE - - SOS - - SRD - - SSP - - STD - - SVC - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY - - TTD - - TWD - - TZS - - UAH - - UGX - - USD - - USN - - USS - - UYI - - UYU - - UZS - - VEF - - VND - - VUV - - WST - - XAF - - XAG - - XAU - - XBA - - XBB - - XBC - - XBD - - XCD - - XDR - - XOF - - XPD - - XPF - - XPT - - XTS - - XXX - - YER - - ZAR - - ZMK - - ZMW - - BTC - - XUS - docs: >- - Indicates the associated currency for an amount of money. Values - correspond - - to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). - source: - openapi: ../default/openapi/openapi.json - CustomAttribute: - docs: |- - A custom attribute value. Each custom attribute value has a corresponding - `CustomAttributeDefinition` object. - properties: - key: - type: optional> - docs: >- - The identifier - - of the custom attribute definition and its corresponding custom - attributes. This value - - can be a simple key, which is the key that is provided when the custom - attribute definition - - is created, or a qualified key, if the requesting - - application is not the definition owner. The qualified key consists of - the application ID - - of the custom attribute definition owner - - followed by the simple key that was provided when the definition was - created. It has the - - format application_id:simple key. - - - The value for a simple key can contain up to 60 alphanumeric - characters, periods (.), - - underscores (_), and hyphens (-). - validation: - pattern: ^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$ - minLength: 1 - value: - type: optional> - docs: >- - The value assigned to the custom attribute. It is validated against - the custom - - attribute definition's schema on write operations. For more - information about custom - - attribute values, - - see [Custom Attributes - Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). - version: - type: optional - docs: >- - Read only. The current version of the custom attribute. This field is - incremented when the custom attribute is changed. - - When updating an existing custom attribute value, you can provide this - field - - and specify the current version of the custom attribute to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency). - - This field can also be used to enforce strong consistency for reads. - For more information about strong consistency for reads, - - see [Custom Attributes - Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). - visibility: - type: optional - docs: >- - A copy of the `visibility` field value for the associated custom - attribute definition. - - See - [CustomAttributeDefinitionVisibility](#type-customattributedefinitionvisibility) - for possible values - definition: - type: optional - docs: >- - A copy of the associated custom attribute definition object. This - field is only set when - - the optional field is specified on the request. - updated_at: - type: optional - docs: >- - The timestamp that indicates when the custom attribute was created or - was most recently - - updated, in RFC 3339 format. - access: read-only - created_at: - type: optional - docs: >- - The timestamp that indicates when the custom attribute was created, in - RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CustomAttributeDefinition: - docs: >- - Represents a definition for custom attribute values. A custom attribute - definition - - specifies the key, visibility, schema, and other properties for a custom - attribute. - properties: - key: - type: optional> - docs: >- - The identifier - - of the custom attribute definition and its corresponding custom - attributes. This value - - can be a simple key, which is the key that is provided when the custom - attribute definition - - is created, or a qualified key, if the requesting - - application is not the definition owner. The qualified key consists of - the application ID - - of the custom attribute definition owner - - followed by the simple key that was provided when the definition was - created. It has the - - format application_id:simple key. - - - The value for a simple key can contain up to 60 alphanumeric - characters, periods (.), - - underscores (_), and hyphens (-). - - - This field can not be changed - - after the custom attribute definition is created. This field is - required when creating - - a definition and must be unique per application, seller, and resource - type. - validation: - pattern: ^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$ - minLength: 1 - schema: - type: optional>> - docs: >- - The JSON schema for the custom attribute definition, which determines - the data type of the corresponding custom attributes. For more - information, - - see [Custom Attributes - Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). - This field is required when creating a definition. - name: - type: optional> - docs: >- - The name of the custom attribute definition for API and seller-facing - UI purposes. The name must - - be unique within the seller and application pair. This field is - required if the - - `visibility` field is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - validation: - maxLength: 255 - description: - type: optional> - docs: >- - Seller-oriented description of the custom attribute definition, - including any constraints - - that the seller should observe. May be displayed as a tooltip in - Square UIs. This field is - - required if the `visibility` field is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - validation: - maxLength: 255 - visibility: - type: optional - docs: >- - Specifies how the custom attribute definition and its values should be - shared with - - the seller and other applications. If no value is specified, the value - defaults to `VISIBILITY_HIDDEN`. - - See [Visibility](#type-visibility) for possible values - version: - type: optional - docs: >- - Read only. The current version of the custom attribute definition. - - The value is incremented each time the custom attribute definition is - updated. - - When updating a custom attribute definition, you can provide this - field - - and specify the current version of the custom attribute definition to - enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency). - - - On writes, this field must be set to the latest version. Stale writes - are rejected. - - - This field can also be used to enforce strong consistency for reads. - For more information about strong consistency for reads, - - see [Custom Attributes - Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). - updated_at: - type: optional - docs: >- - The timestamp that indicates when the custom attribute definition was - created or most recently updated, - - in RFC 3339 format. - access: read-only - created_at: - type: optional - docs: >- - The timestamp that indicates when the custom attribute definition was - created, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CustomAttributeDefinitionEventData: - docs: |- - Represents an object in the CustomAttributeDefinition event notification - payload that contains the affected custom attribute definition. - properties: - type: - type: optional> - docs: >- - The type of the event data object. The value is - `"custom_attribute_definition"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - CustomAttributeDefinitionEventDataObject: - properties: - custom_attribute_definition: - type: optional - docs: The custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - CustomAttributeDefinitionVisibility: - enum: - - VISIBILITY_HIDDEN - - VISIBILITY_READ_ONLY - - VISIBILITY_READ_WRITE_VALUES - docs: >- - The level of permission that a seller or other applications requires to - - view this custom attribute definition. - - The `Visibility` field controls who can read and write the custom - attribute values - - and custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - CustomAttributeEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"custom_attribute"`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the event data object. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the custom attribute. - source: - openapi: ../default/openapi/openapi.json - CustomAttributeEventDataObject: - properties: - custom_attribute: - type: optional - docs: The custom attribute. - source: - openapi: ../default/openapi/openapi.json - CustomAttributeFilter: - docs: |- - Supported custom attribute query expressions for calling the - [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) - endpoint to search for items or item variations. - properties: - custom_attribute_definition_id: - type: optional> - docs: >- - A query expression to filter items or item variations by matching - their custom attributes' - - `custom_attribute_definition_id` property value against the the - specified id. - - Exactly one of `custom_attribute_definition_id` or `key` must be - specified. - key: - type: optional> - docs: >- - A query expression to filter items or item variations by matching - their custom attributes' - - `key` property value against the specified key. - - Exactly one of `custom_attribute_definition_id` or `key` must be - specified. - string_filter: - type: optional> - docs: >- - A query expression to filter items or item variations by matching - their custom attributes' - - `string_value` property value against the specified text. - - Exactly one of `string_filter`, `number_filter`, - `selection_uids_filter`, or `bool_filter` must be specified. - number_filter: - type: optional - docs: >- - A query expression to filter items or item variations with their - custom attributes - - containing a number value within the specified range. - - Exactly one of `string_filter`, `number_filter`, - `selection_uids_filter`, or `bool_filter` must be specified. - selection_uids_filter: - type: optional>> - docs: >- - A query expression to filter items or item variations by matching - their custom attributes' - - `selection_uid_values` values against the specified selection uids. - - Exactly one of `string_filter`, `number_filter`, - `selection_uids_filter`, or `bool_filter` must be specified. - bool_filter: - type: optional> - docs: >- - A query expression to filter items or item variations by matching - their custom attributes' - - `boolean_value` property values against the specified Boolean - expression. - - Exactly one of `string_filter`, `number_filter`, - `selection_uids_filter`, or `bool_filter` must be specified. - source: - openapi: ../default/openapi/openapi.json - CustomField: - docs: >- - Describes a custom form field to add to the checkout page to collect more - information from buyers during checkout. - - For more information, - - see [Specify checkout - options](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#specify-checkout-options-1). - properties: - title: - type: string - docs: The title of the custom field. - validation: - minLength: 1 - maxLength: 50 - source: - openapi: ../default/openapi/openapi.json - Customer: - docs: >- - Represents a Square customer profile in the Customer Directory of a Square - seller. - properties: - id: - type: optional - docs: >- - A unique Square-assigned ID for the customer profile. - - - If you need this ID for an API request, use the ID returned when you - created the customer profile or call the - [SearchCustomers](api-endpoint:Customers-SearchCustomers) - - or [ListCustomers](api-endpoint:Customers-ListCustomers) endpoint. - created_at: - type: optional - docs: >- - The timestamp when the customer profile was created, in RFC 3339 - format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the customer profile was last updated, in RFC 3339 - format. - access: read-only - given_name: - type: optional> - docs: >- - The given name (that is, the first name) associated with the customer - profile. - family_name: - type: optional> - docs: >- - The family name (that is, the last name) associated with the customer - profile. - nickname: - type: optional> - docs: A nickname for the customer profile. - company_name: - type: optional> - docs: A business name associated with the customer profile. - email_address: - type: optional> - docs: The email address associated with the customer profile. - address: - type: optional
- docs: The physical address associated with the customer profile. - phone_number: - type: optional> - docs: The phone number associated with the customer profile. - birthday: - type: optional> - docs: >- - The birthday associated with the customer profile, in `YYYY-MM-DD` - format. For example, `1998-09-21` - - represents September 21, 1998, and `0000-09-21` represents September - 21 (without a birth year). - reference_id: - type: optional> - docs: |- - An optional second ID used to associate the customer profile with an - entity in another system. - note: - type: optional> - docs: A custom note associated with the customer profile. - preferences: - type: optional - docs: Represents general customer preferences. - creation_source: - type: optional - docs: >- - The method used to create the customer profile. - - See [CustomerCreationSource](#type-customercreationsource) for - possible values - group_ids: - type: optional>> - docs: >- - The IDs of [customer groups](entity:CustomerGroup) the customer - belongs to. - segment_ids: - type: optional>> - docs: >- - The IDs of [customer segments](entity:CustomerSegment) the customer - belongs to. - version: - type: optional - docs: >- - The Square-assigned version number of the customer profile. The - version number is incremented each time an update is committed to the - customer profile, except for changes to customer segment membership. - tax_ids: - type: optional - docs: >- - The tax ID associated with the customer profile. This field is present - only for customers of sellers in EU countries or the United Kingdom. - - For more information, see [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - source: - openapi: ../default/openapi/openapi.json - CustomerAddressFilter: - docs: >- - The customer address filter. This filter is used in a - [CustomerCustomAttributeFilterValue](entity:CustomerCustomAttributeFilterValue) - filter when - - searching by an `Address`-type custom attribute. - properties: - postal_code: - type: optional - docs: The postal code to search for. Only an `exact` match is supported. - country: - type: optional - docs: |- - The country code to search for. - See [Country](#type-country) for possible values - source: - openapi: ../default/openapi/openapi.json - CustomerCreatedEvent: - docs: >- - Published when a [customer](entity:Customer) is created. Subscribe to this - event to track customer profiles affected by a merge operation. - - For more information, see [Use Customer - Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). - - - The `customer` object in the event notification does not include the - `segment_ids` field. - properties: - merchant_id: - type: optional> - docs: The ID of the seller associated with the event. - type: - type: optional> - docs: The type of event. For this object, the value is `customer.created`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CustomerCreatedEventData: - docs: The data associated with the event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `customer`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the new customer. - validation: - maxLength: 192 - object: - type: optional - docs: An object that contains the new customer. - source: - openapi: ../default/openapi/openapi.json - CustomerCreatedEventEventContext: - docs: Information about the change that triggered the event. - properties: - merge: - type: optional - docs: Information about the merge operation associated with the event. - source: - openapi: ../default/openapi/openapi.json - CustomerCreatedEventEventContextMerge: - docs: >- - Information about a merge operation, which creates a new customer using - aggregated properties from two or more existing customers. - properties: - from_customer_ids: - type: optional>> - docs: The IDs of the existing customers that were merged and then deleted. - to_customer_id: - type: optional> - docs: The ID of the new customer created by the merge. - source: - openapi: ../default/openapi/openapi.json - CustomerCreatedEventObject: - docs: An object that contains the customer associated with the event. - properties: - customer: - type: optional - docs: The new customer. - event_context: - type: optional - docs: >- - Information about the change that triggered the event. This field is - returned only if the customer is created by a merge operation. - source: - openapi: ../default/openapi/openapi.json - CustomerCreationSource: - enum: - - OTHER - - APPOINTMENTS - - COUPON - - DELETION_RECOVERY - - DIRECTORY - - EGIFTING - - EMAIL_COLLECTION - - FEEDBACK - - IMPORT - - INVOICES - - LOYALTY - - MARKETING - - MERGE - - ONLINE_STORE - - INSTANT_PROFILE - - TERMINAL - - THIRD_PARTY - - THIRD_PARTY_IMPORT - - UNMERGE_RECOVERY - docs: Indicates the method used to create the customer profile. - source: - openapi: ../default/openapi/openapi.json - CustomerCreationSourceFilter: - docs: >- - The creation source filter. - - - If one or more creation sources are set, customer profiles are included - in, - - or excluded from, the result if they match at least one of the filter - criteria. - properties: - values: - type: optional>> - docs: >- - The list of creation sources used as filtering criteria. - - See [CustomerCreationSource](#type-customercreationsource) for - possible values - rule: - type: optional - docs: >- - Indicates whether a customer profile matching the filter criteria - - should be included in the result or excluded from the result. - - - Default: `INCLUDE`. - - See [CustomerInclusionExclusion](#type-customerinclusionexclusion) for - possible values - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionCreatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - is created by the subscribing application. - - - This event is replaced by - - [customer.custom_attribute_definition.owned.created](webhook:customer.custom_attribute_definition.owned.created). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionCreatedPublicEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to all applications is created. A notification is sent - when any application creates a custom - - attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - - - This event is replaced by - - [customer.custom_attribute_definition.visible.created](webhook:customer.custom_attribute_definition.visible.created), - - which applies to custom attribute definitions that are visible to the - subscribing application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.public.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionDeletedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is deleted. A custom attribute - definition can only be deleted by - - the application that created it. - - - This event is replaced by - - [customer.custom_attribute_definition.owned.deleted](webhook:customer.custom_attribute_definition.owned.deleted). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionDeletedPublicEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to all applications is deleted. A notification is sent - when any application deletes a custom - - attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - - - This event is replaced by - - [customer.custom_attribute_definition.visible.deleted](webhook:customer.custom_attribute_definition.visible.deleted), - - which applies to custom attribute definitions that are visible to the - subscribing application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.public.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionOwnedCreatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - is created by the subscribing application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.owned.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionOwnedDeletedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is deleted. A custom attribute - definition can only be deleted by - - the application that created it. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionOwnedUpdatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is updated. A custom attribute - definition can only be updated by - - the application that created it. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionUpdatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is updated. A custom attribute - definition can only be updated by - - the application that created it. - - - This event is replaced by - - [customer.custom_attribute_definition.owned.updated](webhook:customer.custom_attribute_definition.owned.updated). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionUpdatedPublicEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to all applications is updated. A notification is sent - when any application updates a custom - - attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - - - This event is replaced by - - [customer.custom_attribute_definition.visible.updated](webhook:customer.custom_attribute_definition.visible.updated), - - which applies to custom attribute definitions that are visible to the - subscribing application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.public.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionVisibleCreatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is created. A notification - is sent when your application - - creates a custom attribute definition or another application creates a - custom attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.visible.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionVisibleDeletedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is deleted. A custom - attribute definition can only be deleted - - by the application that created it. A notification is sent when your - application deletes a custom attribute - - definition or when another application deletes a custom attribute - definition whose `visibility` is - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDefinitionVisibleUpdatedEvent: - docs: >- - Published when a customer [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is updated. A custom - attribute definition can only be updated - - by the application that created it. A notification is sent when your - application updates a custom - - attribute definition or when another application updates a custom - attribute definition whose `visibility` is - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute_definition.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDeletedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) owned - by the - - subscribing application is deleted. Custom attributes are owned by the - application that created the - - corresponding [custom attribute - definition](entity:CustomAttributeDefinition). Custom attributes whose - - `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any - application. - - - This event is replaced by - - [customer.custom_attribute.owned.deleted](webhook:customer.custom_attribute.owned.deleted). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeDeletedPublicEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) that - is visible - - to all applications is deleted. A notification is sent when any - application deletes a custom attribute - - whose `visibility` is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - - - This event is replaced by - - [customer.custom_attribute.visible.deleted](webhook:customer.custom_attribute.visible.deleted), - - which applies to custom attributes that are visible to the subscribing - application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.public.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeFilter: - docs: >- - The custom attribute filter. Use this filter in a set of [custom attribute - filters](entity:CustomerCustomAttributeFilters) to search - - based on the value or last updated date of a customer-related [custom - attribute](entity:CustomAttribute). - properties: - key: - type: string - docs: >- - The `key` of the [custom attribute](entity:CustomAttribute) to filter - by. The key is the identifier of the custom attribute - - (and the corresponding custom attribute definition) and can be - retrieved using the [Customer Custom Attributes - API](api:CustomerCustomAttributes). - filter: - type: optional - docs: >- - A filter that corresponds to the data type of the target custom - attribute. For example, provide the `phone` filter to - - search based on the value of a `PhoneNumber`-type custom attribute. - The data type is specified by the schema field of the custom attribute - definition, - - which can be retrieved using the [Customer Custom Attributes - API](api:CustomerCustomAttributes). - - - You must provide this `filter` field, the `updated_at` field, or both. - updated_at: - type: optional - docs: >- - The date range for when the custom attribute was last updated. The - date range can include `start_at`, `end_at`, or - - both. Range boundaries are inclusive. Dates are specified as RFC 3339 - timestamps. - - - You must provide this `updated_at` field, the `filter` field, or both. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeFilterValue: - docs: >- - A type-specific filter used in a [custom attribute - filter](entity:CustomerCustomAttributeFilter) to search based on the - value - - of a customer-related [custom attribute](entity:CustomAttribute). - properties: - email: - type: optional - docs: >- - A filter for a query based on the value of an `Email`-type custom - attribute. This filter is case-insensitive and can - - include `exact` or `fuzzy`, but not both. - - - For an `exact` match, provide the complete email address. - - - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the email address. Square removes - - any punctuation (including periods (.), underscores (_), and the @ - symbol) and tokenizes the email addresses on spaces. A match is found - - if a tokenized email address contains all the tokens in the search - query, irrespective of the token order. For example, `Steven gmail` - - matches steven.jones@gmail.com and mygmail@stevensbakery.com. - phone: - type: optional - docs: >- - A filter for a query based on the value of a `PhoneNumber`-type custom - attribute. This filter is case-insensitive and - - can include `exact` or `fuzzy`, but not both. - - - For an `exact` match, provide the complete phone number. This is - always an E.164-compliant phone number that starts - - with the + sign followed by the country code and subscriber number. - For example, the format for a US phone number is +12061112222. - - - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the phone number. - - Square removes any punctuation and tokenizes the expression on spaces. - A match is found if a tokenized phone number contains - - all the tokens in the search query, irrespective of the token order. - For example, `415 123 45` is tokenized to `415`, `123`, and `45`, - - which matches +14151234567 and +12345674158, but does not match - +1234156780. Similarly, the expression `415` matches - - +14151234567, +12345674158, and +1234156780. - text: - type: optional - docs: >- - A filter for a query based on the value of a `String`-type custom - attribute. This filter is case-insensitive and - - can include `exact` or `fuzzy`, but not both. - - - For an `exact` match, provide the complete string. - - - For a `fuzzy` match, provide a query expression containing one or more - query tokens in any order that contain complete words - - to match against the string. Square tokenizes the expression using a - grammar-based tokenizer. For example, the expressions `quick brown`, - - `brown quick`, and `quick fox` match "The quick brown fox jumps over - the lazy dog". However, `quick foxes` and `qui` do not match. - selection: - type: optional - docs: >- - A filter for a query based on the display name for a `Selection`-type - custom attribute value. This filter is case-sensitive - - and can contain `any`, `all`, or both. The `none` condition is not - supported. - - - Provide the display name of each item that you want to search for. To - find the display names for the selection, use the - - [Customer Custom Attributes API](api:CustomerCustomAttributes) to - retrieve the corresponding custom attribute definition - - and then check the `schema.items.names` field. For more information, - see - - [Search based on - selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). - - - Note that when a `Selection`-type custom attribute is assigned to a - customer profile, the custom attribute value is a list of one - - or more UUIDs (sourced from the `schema.items.enum` field) that map to - the item names. These UUIDs are unique per seller. - date: - type: optional - docs: >- - A filter for a query based on the value of a `Date`-type custom - attribute. - - - Provide a date range for this filter using `start_at`, `end_at`, or - both. Range boundaries are inclusive. Dates can be specified - - in `YYYY-MM-DD` format or as RFC 3339 timestamps. - number: - type: optional - docs: >- - A filter for a query based on the value of a `Number`-type custom - attribute, which can be an integer or a decimal with up to - - 5 digits of precision. - - - Provide a numerical range for this filter using `start_at`, `end_at`, - or both. Range boundaries are inclusive. Numbers are specified - - as decimals or integers. The absolute value of range boundaries must - not exceed `(2^63-1)/10^5`, or 92233720368547. - boolean: - type: optional> - docs: >- - A filter for a query based on the value of a `Boolean`-type custom - attribute. - address: - type: optional - docs: >- - A filter for a query based on the value of an `Address`-type custom - attribute. The filter can include `postal_code`, `country`, or both. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeFilters: - docs: >- - The custom attribute filters in a set of [customer - filters](entity:CustomerFilter) used in a search query. Use this filter - - to search based on [custom attributes](entity:CustomAttribute) that are - assigned to customer profiles. For more information, see - - [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). - properties: - filters: - type: optional>> - docs: >- - The custom attribute filters. Each filter must specify `key` and - include the `filter` field with a type-specific filter, - - the `updated_at` field, or both. The provided keys must be unique - within the list of custom attribute filters. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeOwnedDeletedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) owned - by the - - subscribing application is deleted. Custom attributes are owned by the - application that created the - - corresponding [custom attribute - definition](entity:CustomAttributeDefinition). Custom attributes whose - - `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any - application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeOwnedUpdatedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) owned - by the - - subscribing application is created or updated. Custom attributes are owned - by the application that created - - the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). Custom attributes whose - - `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated - by any application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeUpdatedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) owned - by the - - subscribing application is created or updated. Custom attributes are owned - by the application that created - - the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). Custom attributes whose - - `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated - by any application. - - - This event is replaced by - - [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeUpdatedPublicEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) that - is visible - - to all applications is created or updated. A notification is sent when any - application creates or updates - - a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - - - This event is replaced by - - [customer.custom_attribute.visible.updated](webhook:customer.custom_attribute.visible.updated), - - which applies to custom attributes that are visible to the subscribing - application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.public.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeVisibleDeletedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) that - is visible to the - - subscribing application is deleted. A notification is sent when: - - - Your application deletes a custom attribute owned by your application, - regardless of the `visibility` setting. - - - Any application deletes a custom attribute whose `visibility` is - `VISIBILITY_READ_ONLY` - - or `VISIBILITY_READ_WRITE_VALUES`. - - - Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by - any application, but those set to - - `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the - owner. Custom attributes are owned - - by the application that created the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerCustomAttributeVisibleUpdatedEvent: - docs: >- - Published when a customer [custom attribute](entity:CustomAttribute) that - is visible to the - - subscribing application is created or updated. A notification is sent - when: - - - Your application creates or updates a custom attribute owned by your - application, regardless of the `visibility` setting. - - - Any application creates or updates a custom attribute whose `visibility` - is `VISIBILITY_READ_ONLY` - - or `VISIBILITY_READ_WRITE_VALUES`. - - - Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or - updated by any application, but those set to - - `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or - updated by the owner. Custom attributes are owned - - by the application that created the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"customer.custom_attribute.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - CustomerDeletedEvent: - docs: >- - Published when a [customer](entity:Customer) is deleted. For more - information, see [Use Customer - Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). - - - The `customer` object in the event notification does not include the - following fields: `group_ids` and `segment_ids`. - properties: - merchant_id: - type: optional> - docs: The ID of the seller associated with the event. - type: - type: optional> - docs: The type of event. For this object, the value is `customer.deleted`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CustomerDeletedEventData: - docs: The data associated with the event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `customer`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the deleted customer. - validation: - maxLength: 192 - object: - type: optional - docs: An object that contains the deleted customer. - source: - openapi: ../default/openapi/openapi.json - CustomerDeletedEventEventContext: - docs: Information about the change that triggered the event. - properties: - merge: - type: optional - docs: Information about the merge operation associated with the event. - source: - openapi: ../default/openapi/openapi.json - CustomerDeletedEventEventContextMerge: - docs: >- - Information about a merge operation, which creates a new customer using - aggregated properties from two or more existing customers. - properties: - from_customer_ids: - type: optional>> - docs: The IDs of the existing customers that were merged and then deleted. - to_customer_id: - type: optional> - docs: The ID of the new customer created by the merge. - source: - openapi: ../default/openapi/openapi.json - CustomerDeletedEventObject: - docs: An object that contains the customer associated with the event. - properties: - customer: - type: optional - docs: The deleted customer. - event_context: - type: optional - docs: >- - Information about the change that triggered the event. This field is - returned only if the customer is deleted by a merge operation. - source: - openapi: ../default/openapi/openapi.json - CustomerDetails: - docs: Details about the customer making the payment. - properties: - customer_initiated: - type: optional> - docs: Indicates whether the customer initiated the payment. - seller_keyed_in: - type: optional> - docs: >- - Indicates that the seller keyed in payment details on behalf of the - customer. - - This is used to flag a payment as Mail Order / Telephone Order (MOTO). - source: - openapi: ../default/openapi/openapi.json - CustomerFilter: - docs: >- - Represents the filtering criteria in a [search - query](entity:CustomerQuery) that defines how to filter - - customer profiles returned in - [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. - properties: - creation_source: - type: optional - docs: A filter to select customers based on their creation source. - created_at: - type: optional - docs: A filter to select customers based on when they were created. - updated_at: - type: optional - docs: A filter to select customers based on when they were last updated. - email_address: - type: optional - docs: >- - A filter to [select customers by their email - address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) - - visible to the seller. - - This filter is case-insensitive. - - - For [exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/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/customers-api/use-the-api/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 is - `steven.johnson@gmail.com` - - or `mygmail@stevensbakery.com`. Square removes any punctuation - (including periods (.), - - underscores (_), and the @ symbol) and tokenizes the email addresses - on spaces. A match is - - found if a tokenized email address contains all the tokens in the - search query, - - irrespective of the token order. - phone_number: - type: optional - docs: >- - A filter to [select customers by their phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number) - - visible to the seller. - - - For [exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number), - - this filter returns 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 country code and then a subscriber number. - - For example, the standard E.164 form of a US phone number is - `+12062223333` and an E.164-compliant variation is `+1 (206) - 222-3333`. - - To match the query expression, stored customer phone numbers are - converted to the standard E.164 form. - - - For [fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number), - - this filter returns customers whose phone number matches the token or - tokens provided in the query expression. For example, with `415` - - provided in a search query, the search returns customers with the - phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) - 234-1567`. - - Similarly, a search query of `415 123` returns customers with the - phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not - - `+1-212-415-1200`. A match is found if a tokenized phone number - contains all the tokens in the search query, irrespective of the token - order. - reference_id: - type: optional - docs: >- - A filter to [select customers by their reference - IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id). - - This filter is case-insensitive. - - - [Exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) - - of a customer's reference ID against a query's reference ID is - evaluated as an - - exact match between two strings, character by character in the given - order. - - - [Fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/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` matches customer profiles with the `reference_id` - value of `NYC_M_35_JOHNSON` - - and `NYC_27_MURRAY`. - group_ids: - type: optional - docs: >- - A filter to select customers based on the - [groups](entity:CustomerGroup) they belong to. - - Group membership is controlled by sellers and developers. - - - The `group_ids` filter has the following syntax: - - ``` - - "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 `any`, `all`, and `none` fields in - the filter. - - With `any`, the search returns customers in groups `a` or `b` or any - other group specified in the list. - - With `all`, the search returns customers in groups `1` and `2` and all - other groups specified in the list. - - With `none`, the search returns customers not in groups `i` or `ii` or - any other group specified in 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 object (`{}`). - custom_attribute: - type: optional - docs: >- - A filter to select customers based on one or more custom attributes. - - This filter can contain up to 10 custom attribute filters. Each custom - attribute filter specifies filtering criteria for a target custom - - attribute. If multiple custom attribute filters are provided, they are - combined as an `AND` operation. - - - To be valid for a search, the custom attributes must be visible to the - requesting application. For more information, including example - queries, - - see [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). - - - Square returns matching customer profiles, which do not contain custom - attributes. To retrieve customer-related custom attributes, - - use the [Customer Custom Attributes - API](api:CustomerCustomAttributes). For example, you can call - - [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) - using a customer ID from the result set. - segment_ids: - type: optional - docs: >2- - A filter to select customers based on the [segments](entity:CustomerSegment) they belong to. - Segment membership is dynamic and adjusts automatically based on - whether customers meet the segment criteria. - - - You can provide up to three segment IDs in the filter, using any - combination of the `all`, `any`, and `none` fields. - - For the following example, the results include customers who belong to - both segment A and segment B but do not belong to segment C. - - - ``` - - "segment_ids": { - - "all": ["{segment_A_id}", "{segment_B_id}"], - - "none": ["{segment_C_id}"] - - } - - ``` - - - If an invalid or non-existent segment ID is provided in the filter, - Square stops processing the request - - and returns a `400 BAD_REQUEST` error that includes the segment ID. - source: - openapi: ../default/openapi/openapi.json - CustomerGroup: - docs: >- - Represents a group of customer profiles. - - - Customer groups can be created, be modified, and have their membership - defined using - - the Customers API or within the Customer Directory in the Square Seller - Dashboard or Point of Sale. - properties: - id: - type: optional - docs: A unique Square-generated ID for the customer group. - validation: - maxLength: 255 - access: read-only - name: - type: string - docs: The name of the customer group. - created_at: - type: optional - docs: The timestamp when the customer group was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the customer group was last updated, in RFC 3339 - format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CustomerInclusionExclusion: - enum: - - INCLUDE - - EXCLUDE - docs: |- - Indicates whether customers should be included in, or excluded from, - the result set when they match the filtering criteria. - source: - openapi: ../default/openapi/openapi.json - CustomerPreferences: - docs: Represents communication preferences for the customer profile. - properties: - email_unsubscribed: - type: optional> - docs: >- - Indicates whether the customer has unsubscribed from marketing - campaign emails. A value of `true` means that the customer chose to - opt out of email marketing from the current Square seller or from all - Square sellers. This value is read-only from the Customers API. - source: - openapi: ../default/openapi/openapi.json - CustomerQuery: - docs: >- - Represents filtering and sorting criteria for a - [SearchCustomers](api-endpoint:Customers-SearchCustomers) request. - properties: - filter: - type: optional - docs: >- - The filtering criteria for the search query. A query can contain - multiple filters in any combination. - - Multiple filters are combined as `AND` statements. - - - __Note:__ Combining multiple filters as `OR` statements is not - supported. Instead, send multiple single-filter - - searches and join the result sets. - sort: - type: optional - docs: |- - Sorting criteria for query results. The default behavior is to sort - customers alphabetically by `given_name` and `family_name`. - source: - openapi: ../default/openapi/openapi.json - CustomerSegment: - docs: >- - Represents a group of customer profiles that match one or more predefined - filter criteria. - - - Segments (also known as Smart Groups) are defined and created within the - Customer Directory in the - - Square Seller Dashboard or Point of Sale. - properties: - id: - type: optional - docs: A unique Square-generated ID for the segment. - validation: - maxLength: 255 - access: read-only - name: - type: optional - docs: The name of the segment. - access: read-only - created_at: - type: optional - docs: The timestamp when the segment was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the segment was last updated, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CustomerSort: - docs: >- - Represents the sorting criteria in a [search query](entity:CustomerQuery) - that defines how to sort - - customer profiles returned in - [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. - properties: - field: - type: optional - docs: >- - Indicates the fields to use as the sort key, which is either the - default set of fields or `created_at`. - - - The default value is `DEFAULT`. - - See [CustomerSortField](#type-customersortfield) for possible values - order: - type: optional - docs: >- - 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. - - - The default value is `ASC`. - - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - CustomerSortField: - enum: - - DEFAULT - - CREATED_AT - docs: >- - Specifies customer attributes as the sort key to customer profiles - returned from a search. - source: - openapi: ../default/openapi/openapi.json - CustomerTaxIds: - docs: >- - Represents the tax ID associated with a [customer - profile](entity:Customer). The corresponding `tax_ids` field is available - only for customers of sellers in EU countries or the United Kingdom. - - For more information, see [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - properties: - eu_vat: - type: optional> - docs: >- - The EU VAT identification number for the customer. For example, - `IE3426675K`. The ID can contain alphanumeric characters only. - validation: - maxLength: 20 - source: - openapi: ../default/openapi/openapi.json - CustomerTextFilter: - docs: >- - A filter to select customers based on exact or fuzzy matching of - - customer attributes against a specified query. Depending on the customer - attributes, - - the filter can be case-sensitive. This filter can be exact or fuzzy, but - it cannot be both. - properties: - exact: - type: optional> - docs: >- - Use the exact filter to select customers whose attributes match - exactly the specified query. - fuzzy: - type: optional> - docs: >- - 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. - source: - openapi: ../default/openapi/openapi.json - CustomerUpdatedEvent: - docs: >- - Published when a [customer](entity:Customer) is updated. For more - information, see [Use Customer - Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). - - - Updates to the 'segment_ids' customer field does not invoke a - `customer.updated` event. In addition, the `customer` object in the event - notification does not include this field. - properties: - merchant_id: - type: optional> - docs: The ID of the seller associated with the event. - type: - type: optional> - docs: The type of event. For this object, the value is `customer.updated`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - CustomerUpdatedEventData: - docs: The data associated with the event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `customer`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the updated customer. - validation: - maxLength: 192 - object: - type: optional - docs: An object that contains the updated customer. - source: - openapi: ../default/openapi/openapi.json - CustomerUpdatedEventObject: - docs: An object that contains the customer associated with the event. - properties: - customer: - type: optional - docs: The updated customer. - source: - openapi: ../default/openapi/openapi.json - DataCollectionOptions: - properties: - title: - type: string - docs: The title text to display in the data collection flow on the Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: >- - The body text to display under the title in the data collection screen - flow on the - - Terminal. - validation: - minLength: 1 - maxLength: 10000 - input_type: - type: DataCollectionOptionsInputType - docs: |- - Represents the type of the input text. - See [InputType](#type-inputtype) for possible values - collected_data: - type: optional - docs: The buyer’s input text from the data collection screen. - source: - openapi: ../default/openapi/openapi.json - DataCollectionOptionsInputType: - enum: - - EMAIL - - PHONE_NUMBER - docs: Describes the input type of the data. - source: - openapi: ../default/openapi/openapi.json - DateRange: - docs: |- - A range defined by two dates. Used for filtering a query for Connect v2 - objects that have date properties. - properties: - start_date: - type: optional> - docs: >- - A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO - 8601 - - extended format for calendar dates. - - The beginning of a date range (inclusive). - end_date: - type: optional> - docs: >- - A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO - 8601 - - extended format for calendar dates. - - The end of a date range (inclusive). - source: - openapi: ../default/openapi/openapi.json - DayOfWeek: - enum: - - SUN - - MON - - TUE - - WED - - THU - - FRI - - SAT - docs: Indicates the specific day of the week. - source: - openapi: ../default/openapi/openapi.json - DeleteBookingCustomAttributeDefinitionResponse: - docs: >- - Represents a - [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) - response - - containing error messages when errors occurred during the request. The - successful response does not contain any payload. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteBookingCustomAttributeResponse: - docs: >- - Represents a - [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) - response. - - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteBreakTypeResponse: - docs: >- - The response to a request to delete a `BreakType`. The response might - contain a set - - of `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteCatalogObjectResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - deleted_object_ids: - type: optional> - docs: >- - The IDs of all catalog objects deleted by this request. - - Multiple IDs may be returned when associated objects are also deleted, - for example - - a catalog item variation will be deleted (and its ID included in this - field) - - when its parent catalog item is deleted. - deleted_at: - type: optional - docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. - source: - openapi: ../default/openapi/openapi.json - DeleteCustomerCardResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `DeleteCustomerCard` endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents a response from a delete request containing error messages if - there are any. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteCustomerCustomAttributeResponse: - docs: >- - Represents a - [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) - response. - - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteCustomerGroupResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) - endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteCustomerResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `DeleteCustomer` endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteDisputeEvidenceResponse: - docs: Defines the fields in a `DeleteDisputeEvidence` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteInvoiceAttachmentResponse: - docs: >- - Represents a - [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) - response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteInvoiceResponse: - docs: Describes a `DeleteInvoice` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteLocationCustomAttributeDefinitionResponse: - docs: >- - Represents a response from a delete request containing error messages if - there are any. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteLocationCustomAttributeResponse: - docs: >- - Represents a - [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) - response. - - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteLoyaltyRewardResponse: - docs: A response returned by the API call. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents a response from a delete request containing error messages if - there are any. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteMerchantCustomAttributeResponse: - docs: >- - Represents a - [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) - response. - - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteOrderCustomAttributeDefinitionResponse: - docs: Represents a response from deleting an order custom attribute definition. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteOrderCustomAttributeResponse: - docs: Represents a response from deleting an order custom attribute. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeletePaymentLinkResponse: - properties: - errors: optional> - id: - type: optional - docs: The ID of the link that is deleted. - cancelled_order_id: - type: optional - docs: >- - The ID of the order that is canceled. When a payment link is deleted, - Square updates the - - the `state` (of the order that the checkout link created) to CANCELED. - source: - openapi: ../default/openapi/openapi.json - DeleteShiftResponse: - docs: >- - The response to a request to delete a `Shift`. The response might contain - a set of - - `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteSnippetResponse: - docs: Represents a `DeleteSnippet` response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteSubscriptionActionResponse: - docs: >- - Defines output parameters in a response of the - [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction) - - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription that has the specified action deleted. - source: - openapi: ../default/openapi/openapi.json - DeleteTimecardResponse: - docs: >- - The response to a request to delete a `Timecard`. The response might - contain a set of - - `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - DeleteTransferOrderResponse: - docs: Response for deleting a transfer order - properties: - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - DeleteWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - Destination: - docs: Information about the destination against which the payout was made. - properties: - type: - type: optional - docs: |- - Type of the destination such as a bank account or debit card. - See [DestinationType](#type-destinationtype) for possible values - id: - type: optional - docs: >- - Square issued unique ID (also known as the instrument ID) associated - with this destination. - source: - openapi: ../default/openapi/openapi.json - DestinationDetails: - docs: Details about a refund's destination. - properties: - card_details: - type: optional - docs: >- - Details about a card refund. Only populated if the destination_type is - `CARD`. - cash_details: - type: optional - docs: >- - Details about a cash refund. Only populated if the destination_type is - `CASH`. - external_details: - type: optional - docs: >- - Details about an external refund. Only populated if the - destination_type is `EXTERNAL`. - source: - openapi: ../default/openapi/openapi.json - DestinationDetailsCardRefundDetails: - properties: - card: - type: optional - docs: The card's non-confidential details. - entry_method: - type: optional> - docs: >- - The method used to enter the card's details for the refund. The method - can be - - `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`. - validation: - maxLength: 50 - auth_result_code: - type: optional> - docs: >- - The authorization code provided by the issuer when a refund is - approved. - validation: - maxLength: 10 - source: - openapi: ../default/openapi/openapi.json - DestinationDetailsCashRefundDetails: - docs: >- - Stores details about a cash refund. Contains only non-confidential - information. - properties: - seller_supplied_money: - type: Money - docs: The amount and currency of the money supplied by the seller. - change_back_money: - type: optional - docs: |- - The amount of change due back to the seller. - This read-only field is calculated - from the `amount_money` and `seller_supplied_money` fields. - source: - openapi: ../default/openapi/openapi.json - DestinationDetailsExternalRefundDetails: - docs: >- - Stores details about an external refund. Contains only non-confidential - information. - properties: - type: - type: string - docs: >- - The type of external refund the seller paid to the buyer. It can be - one of the - - following: - - - CHECK - Refunded using a physical check. - - - BANK_TRANSFER - Refunded using external bank transfer. - - - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card. - - - CRYPTO - Refunded using a crypto currency. - - - SQUARE_CASH - Refunded using Square Cash App. - - - SOCIAL - Refunded using peer-to-peer payment applications. - - - EXTERNAL - A third-party application gathered this refund outside of - Square. - - - EMONEY - Refunded using an E-money provider. - - - CARD - A credit or debit card that Square does not support. - - - STORED_BALANCE - Use for house accounts, store credit, and so forth. - - - FOOD_VOUCHER - Restaurant voucher provided by employers to employees - to pay for meals - - - OTHER - A type not listed here. - validation: - maxLength: 50 - source: - type: string - docs: |- - A description of the external refund source. For example, - "Food Delivery Service". - validation: - maxLength: 255 - source_id: - type: optional> - docs: An ID to associate the refund to its originating source. - validation: - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - DestinationType: - enum: - - BANK_ACCOUNT - - CARD - - SQUARE_BALANCE - - SQUARE_STORED_BALANCE - docs: List of possible destinations against which a payout can be made. - source: - openapi: ../default/openapi/openapi.json - Device: - properties: - id: - type: optional - docs: >- - A synthetic identifier for the device. The identifier includes a - standardized prefix and - - is otherwise an opaque id generated from key device fields. - access: read-only - attributes: - type: DeviceAttributes - docs: A collection of DeviceAttributes representing the device. - components: - type: optional>> - docs: A list of components applicable to the device. - status: - type: optional - docs: The current status of the device. - source: - openapi: ../default/openapi/openapi.json - DeviceAttributes: - properties: - type: - type: DeviceAttributesDeviceType - docs: |- - The device type. - See [DeviceType](#type-devicetype) for possible values - manufacturer: - type: string - docs: The maker of the device. - model: - type: optional> - docs: The specific model of the device. - name: - type: optional> - docs: A seller-specified name for the device. - manufacturers_id: - type: optional> - docs: >- - The manufacturer-supplied identifier for the device (where available). - In many cases, - - this identifier will be a serial number. - updated_at: - type: optional - docs: >- - The RFC 3339-formatted value of the most recent update to the device - information. - - (Could represent any field update on the device.) - access: read-only - version: - type: optional - docs: The current version of software installed on the device. - merchant_token: - type: optional> - docs: The merchant_token identifying the merchant controlling the device. - source: - openapi: ../default/openapi/openapi.json - DeviceAttributesDeviceType: - enum: - - TERMINAL - - HANDHELD - docs: An enum identifier of the device type. - source: - openapi: ../default/openapi/openapi.json - DeviceCheckoutOptions: - properties: - device_id: - type: string - docs: >- - The unique ID of the device intended for this `TerminalCheckout`. - - A list of `DeviceCode` objects can be retrieved from the - /v2/devices/codes endpoint. - - Match a `DeviceCode.device_id` value with `device_id` to get the - associated device code. - skip_receipt_screen: - type: optional> - docs: Instructs the device to skip the receipt screen. Defaults to false. - collect_signature: - type: optional> - docs: >- - Indicates that signature collection is desired during checkout. - Defaults to false. - tip_settings: - type: optional - docs: Tip-specific settings. - show_itemized_cart: - type: optional> - docs: >- - Show the itemization screen prior to taking a payment. This field is - only meaningful when the - - checkout includes an order ID. Defaults to true. - source: - openapi: ../default/openapi/openapi.json - DeviceCode: - properties: - id: - type: optional - docs: The unique id for this device code. - access: read-only - name: - type: optional> - docs: An optional user-defined name for the device code. - validation: - maxLength: 128 - code: - type: optional - docs: The unique code that can be used to login. - access: read-only - device_id: - type: optional - docs: >- - The unique id of the device that used this code. Populated when the - device is paired up. - access: read-only - product_type: - type: ProductType - docs: The targeting product type of the device code. - location_id: - type: optional> - docs: The location assigned to this code. - validation: - maxLength: 50 - status: - type: optional - docs: |- - The pairing status of the device code. - See [DeviceCodeStatus](#type-devicecodestatus) for possible values - pair_by: - type: optional - docs: >- - When this DeviceCode will expire and no longer login. Timestamp in RFC - 3339 format. - access: read-only - created_at: - type: optional - docs: When this DeviceCode was created. Timestamp in RFC 3339 format. - access: read-only - status_changed_at: - type: optional - docs: >- - When this DeviceCode's status was last changed. Timestamp in RFC 3339 - format. - access: read-only - paired_at: - type: optional - docs: When this DeviceCode was paired. Timestamp in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - DeviceCodePairedEvent: - docs: |- - Published when a Square Terminal has been paired with a - Terminal API client and the device_id of the paired Square Terminal is - available. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"device.code.paired"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DeviceCodePairedEventData: - properties: - type: - type: optional> - docs: Name of the paired object’s type, `"device_code"`. - id: - type: optional - docs: ID of the paired device code. - object: - type: optional - docs: An object containing the paired device code. - source: - openapi: ../default/openapi/openapi.json - DeviceCodePairedEventObject: - properties: - device_code: - type: optional - docs: The created terminal checkout - source: - openapi: ../default/openapi/openapi.json - DeviceCodeStatus: - enum: - - UNKNOWN - - UNPAIRED - - PAIRED - - EXPIRED - docs: DeviceCode.Status enum. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsApplicationDetails: - properties: - application_type: - type: optional - docs: |- - The type of application. - See [ApplicationType](#type-applicationtype) for possible values - version: - type: optional - docs: The version of the application. - session_location: - type: optional> - docs: The location_id of the session for the application. - device_code_id: - type: optional> - docs: The id of the device code that was used to log in to the device. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsBatteryDetails: - properties: - visible_percent: - type: optional> - docs: The battery charge percentage as displayed on the device. - external_power: - type: optional - docs: |- - The status of external_power. - See [ExternalPower](#type-externalpower) for possible values - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsCardReaderDetails: - properties: - version: - type: optional - docs: The version of the card reader. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsEthernetDetails: - properties: - active: - type: optional> - docs: >- - A boolean to represent whether the Ethernet interface is currently - active. - ip_address_v4: - type: optional> - docs: The string representation of the device’s IPv4 address. - mac_address: - type: optional> - docs: The mac address of the device in this network. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsExternalPower: - enum: - - AVAILABLE_CHARGING - - AVAILABLE_NOT_IN_USE - - UNAVAILABLE - - AVAILABLE_INSUFFICIENT - docs: An enum for ExternalPower. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsMeasurement: - docs: A value qualified by unit of measure. - properties: - value: - type: optional> - docs: Value of measure. - source: - openapi: ../default/openapi/openapi.json - DeviceComponentDetailsWiFiDetails: - properties: - active: - type: optional> - docs: A boolean to represent whether the WiFI interface is currently active. - ssid: - type: optional> - docs: The name of the connected WIFI network. - ip_address_v4: - type: optional> - docs: The string representation of the device’s IPv4 address. - secure_connection: - type: optional> - docs: >- - The security protocol for a secure connection (e.g. WPA2). None - provided if the connection - - is unsecured. - signal_strength: - type: optional - docs: A representation of signal strength of the WIFI network connection. - mac_address: - type: optional> - docs: The mac address of the device in this network. - source: - openapi: ../default/openapi/openapi.json - DeviceCreatedEvent: - docs: Published when a Device is created. - properties: - merchant_id: - type: optional> - docs: The merchant the newly created device belongs to. - type: - type: optional> - docs: The type of event this represents. The value is `"device.created"`. - event_id: - type: optional> - docs: A UUID that uniquely identifies this device creation event. - created_at: - type: optional - docs: >- - The time when the device creation event was first created, in RFC 3339 - format. - access: read-only - data: - type: optional - docs: The metadata associated with the device creation event. - source: - openapi: ../default/openapi/openapi.json - DeviceCreatedEventData: - properties: - type: - type: optional> - docs: The type of the event data object. The value is `"device"`. - id: - type: optional - docs: The ID of the device. - object: - type: optional - docs: An object containing the created device. - source: - openapi: ../default/openapi/openapi.json - DeviceCreatedEventObject: - properties: - device: - type: optional - docs: The created device. - source: - openapi: ../default/openapi/openapi.json - DeviceDetails: - docs: Details about the device that took the payment. - properties: - device_id: - type: optional> - docs: The Square-issued ID of the device. - validation: - maxLength: 255 - device_installation_id: - type: optional> - docs: The Square-issued installation ID for the device. - validation: - maxLength: 255 - device_name: - type: optional> - docs: The name of the device set by the seller. - validation: - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - DeviceMetadata: - properties: - battery_percentage: - type: optional> - docs: The Terminal’s remaining battery percentage, between 1-100. - charging_state: - type: optional> - docs: |- - The current charging state of the Terminal. - Options: `CHARGING`, `NOT_CHARGING` - location_id: - type: optional> - docs: >- - The ID of the Square seller business location associated with the - Terminal. - merchant_id: - type: optional> - docs: >- - The ID of the Square merchant account that is currently signed-in to - the Terminal. - network_connection_type: - type: optional> - docs: |- - The Terminal’s current network connection type. - Options: `WIFI`, `ETHERNET` - payment_region: - type: optional> - docs: The country in which the Terminal is authorized to take payments. - serial_number: - type: optional> - docs: >- - The unique identifier assigned to the Terminal, which can be found on - the lower back - - of the device. - os_version: - type: optional> - docs: The current version of the Terminal’s operating system. - app_version: - type: optional> - docs: The current version of the application running on the Terminal. - wifi_network_name: - type: optional> - docs: The name of the Wi-Fi network to which the Terminal is connected. - wifi_network_strength: - type: optional> - docs: |- - The signal strength of the Wi-FI network connection. - Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT` - ip_address: - type: optional> - docs: The IP address of the Terminal. - source: - openapi: ../default/openapi/openapi.json - DeviceStatus: - properties: - category: - type: optional - docs: |- - Category of the device status. - See [Category](#type-category) for possible values - source: - openapi: ../default/openapi/openapi.json - DeviceStatusCategory: - enum: - - AVAILABLE - - NEEDS_ATTENTION - - OFFLINE - source: - openapi: ../default/openapi/openapi.json - DigitalWalletDetails: - docs: >- - Additional details about `WALLET` type payments. Contains only - non-confidential information. - properties: - status: - type: optional> - docs: >- - The status of the `WALLET` payment. The status can be `AUTHORIZED`, - `CAPTURED`, `VOIDED`, or - - `FAILED`. - validation: - maxLength: 50 - brand: - type: optional> - docs: >- - The brand used for the `WALLET` payment. The brand can be `CASH_APP`, - `PAYPAY`, `ALIPAY`, - - `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or - `UNKNOWN`. - validation: - maxLength: 50 - cash_app_details: - type: optional - docs: Brand-specific details for payments with the `brand` of `CASH_APP`. - source: - openapi: ../default/openapi/openapi.json - DisableCardResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint. - - - Note: if there are errors processing the request, the card field will not - be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - card: - type: optional - docs: The retrieved card. - source: - openapi: ../default/openapi/openapi.json - DisableEventsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [DisableEvents](api-endpoint:Events-DisableEvents) - endpoint. - - - Note: if there are errors processing the request, the events field will - not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - DismissTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: Current state of the action to be dismissed. - source: - openapi: ../default/openapi/openapi.json - DismissTerminalCheckoutResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - checkout: - type: optional - docs: Current state of the checkout to be dismissed. - source: - openapi: ../default/openapi/openapi.json - DismissTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - refund: - type: optional - docs: Current state of the refund to be dismissed. - source: - openapi: ../default/openapi/openapi.json - Dispute: - docs: >- - Represents a - [dispute](https://developer.squareup.com/docs/disputes-api/overview) a - cardholder initiated with their bank. - properties: - dispute_id: - type: optional> - docs: The unique ID for this `Dispute`, generated by Square. - validation: - minLength: 1 - maxLength: 40 - id: - type: optional - docs: The unique ID for this `Dispute`, generated by Square. - validation: - minLength: 1 - maxLength: 40 - amount_money: - type: optional - docs: >- - The disputed amount, which can be less than the total transaction - amount. - - For instance, if multiple items were purchased but the cardholder only - initiates a dispute over some of the items. - reason: - type: optional - docs: |- - The reason why the cardholder initiated the dispute. - See [DisputeReason](#type-disputereason) for possible values - state: - type: optional - docs: |- - The current state of this dispute. - See [DisputeState](#type-disputestate) for possible values - due_at: - type: optional> - docs: >- - The deadline by which the seller must respond to the dispute, in [RFC - 3339 - format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates). - validation: - minLength: 1 - maxLength: 40 - disputed_payment: - type: optional - docs: The payment challenged in this dispute. - evidence_ids: - type: optional>> - docs: The IDs of the evidence associated with the dispute. - card_brand: - type: optional - docs: |- - The card brand used in the disputed payment. - See [CardBrand](#type-cardbrand) for possible values - created_at: - type: optional - docs: The timestamp when the dispute was created, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 - access: read-only - updated_at: - type: optional - docs: The timestamp when the dispute was last updated, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 - access: read-only - brand_dispute_id: - type: optional> - docs: >- - The ID of the dispute in the card brand system, generated by the card - brand. - validation: - minLength: 1 - maxLength: 40 - reported_date: - type: optional> - docs: The timestamp when the dispute was reported, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 - reported_at: - type: optional> - docs: The timestamp when the dispute was reported, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 - version: - type: optional - docs: The current version of the `Dispute`. - location_id: - type: optional> - docs: The ID of the location where the dispute originated. - validation: - minLength: 1 - maxLength: 40 - source: - openapi: ../default/openapi/openapi.json - DisputeCreatedEvent: - docs: Published when a [Dispute](entity:Dispute) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeCreatedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidence: - properties: - evidence_id: - type: optional> - docs: The Square-generated ID of the evidence. - validation: - minLength: 1 - maxLength: 40 - id: - type: optional - docs: The Square-generated ID of the evidence. - validation: - minLength: 1 - maxLength: 40 - dispute_id: - type: optional> - docs: The ID of the dispute the evidence is associated with. - validation: - minLength: 1 - maxLength: 40 - evidence_file: - type: optional - docs: Image, PDF, TXT - evidence_text: - type: optional> - docs: Raw text - validation: - minLength: 1 - maxLength: 500 - uploaded_at: - type: optional> - docs: The time when the evidence was uploaded, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 - evidence_type: - type: optional - docs: >- - The type of the evidence. - - See [DisputeEvidenceType](#type-disputeevidencetype) for possible - values - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceAddedEvent: - docs: >- - Published when evidence is added to a [Dispute](entity:Dispute) - - from the Disputes Dashboard in the Seller Dashboard, the Square Point of - Sale app, - - or by calling either - [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) - or - [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceAddedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceAddedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceCreatedEvent: - docs: >- - Published when evidence is added to a [Dispute](entity:Dispute) - - from the Disputes Dashboard in the Seller Dashboard, the Square Point of - Sale app, - - or by calling either - [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) - or - [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceCreatedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceDeletedEvent: - docs: >- - Published when evidence is removed from a [Dispute](entity:Dispute) - - from the Disputes Dashboard in the Seller Dashboard, the Square Point of - Sale app, - - or by calling - [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceDeletedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceDeletedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceFile: - docs: A file to be uploaded as dispute evidence. - properties: - filename: - type: optional> - docs: >- - The file name including the file extension. For example: - "receipt.tiff". - validation: - minLength: 1 - maxLength: 40 - filetype: - type: optional> - docs: >- - Dispute evidence files must be application/pdf, image/heic, - image/heif, image/jpeg, image/png, or image/tiff formats. - validation: - minLength: 1 - maxLength: 40 - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceRemovedEvent: - docs: >- - Published when evidence is removed from a [Dispute](entity:Dispute) - - from the Disputes Dashboard in the Seller Dashboard, the Square Point of - Sale app, - - or by calling - [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceRemovedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceRemovedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeEvidenceType: - enum: - - GENERIC_EVIDENCE - - ONLINE_OR_APP_ACCESS_LOG - - AUTHORIZATION_DOCUMENTATION - - CANCELLATION_OR_REFUND_DOCUMENTATION - - CARDHOLDER_COMMUNICATION - - CARDHOLDER_INFORMATION - - PURCHASE_ACKNOWLEDGEMENT - - DUPLICATE_CHARGE_DOCUMENTATION - - PRODUCT_OR_SERVICE_DESCRIPTION - - RECEIPT - - SERVICE_RECEIVED_DOCUMENTATION - - PROOF_OF_DELIVERY_DOCUMENTATION - - RELATED_TRANSACTION_DOCUMENTATION - - REBUTTAL_EXPLANATION - - TRACKING_NUMBER - docs: The type of the dispute evidence. - source: - openapi: ../default/openapi/openapi.json - DisputeReason: - enum: - - AMOUNT_DIFFERS - - CANCELLED - - DUPLICATE - - NO_KNOWLEDGE - - NOT_AS_DESCRIBED - - NOT_RECEIVED - - PAID_BY_OTHER_MEANS - - CUSTOMER_REQUESTS_CREDIT - - EMV_LIABILITY_SHIFT - docs: |- - The list of possible reasons why a cardholder might initiate a - dispute with their bank. - source: - openapi: ../default/openapi/openapi.json - DisputeState: - enum: - - INQUIRY_EVIDENCE_REQUIRED - - INQUIRY_PROCESSING - - INQUIRY_CLOSED - - EVIDENCE_REQUIRED - - PROCESSING - - WON - - LOST - - ACCEPTED - docs: The list of possible dispute states. - source: - openapi: ../default/openapi/openapi.json - DisputeStateChangedEvent: - docs: >- - Published when the state of a [Dispute](entity:Dispute) changes. - - This includes the dispute resolution (WON, LOST) reported by the bank. The - event - - data includes details of what changed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeStateChangedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeStateChangedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputeStateUpdatedEvent: - docs: >- - Published when the state of a [Dispute](entity:Dispute) changes. - - This includes the dispute resolution (WON, LOST) reported by the bank. The - event - - data includes details of what changed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - DisputeStateUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected dispute's type. - id: - type: optional - docs: ID of the affected dispute. - object: - type: optional - docs: An object containing fields and values relevant to the event. - source: - openapi: ../default/openapi/openapi.json - DisputeStateUpdatedEventObject: - properties: - object: - type: optional - docs: The dispute object. - source: - openapi: ../default/openapi/openapi.json - DisputedPayment: - docs: The payment the cardholder disputed. - properties: - payment_id: - type: optional> - docs: Square-generated unique ID of the payment being disputed. - validation: - minLength: 1 - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - EcomVisibility: - enum: - - UNINDEXED - - UNAVAILABLE - - HIDDEN - - VISIBLE - docs: Determines item visibility in Ecom (Online Store) and Online Checkout. - source: - openapi: ../default/openapi/openapi.json - Employee: - docs: >- - An employee object that is used by the external API. - - - DEPRECATED at version 2020-08-26. Replaced by - [TeamMember](entity:TeamMember). - properties: - id: - type: optional - docs: UUID for this object. - first_name: - type: optional> - docs: The employee's first name. - last_name: - type: optional> - docs: The employee's last name. - email: - type: optional> - docs: The employee's email address - phone_number: - type: optional> - docs: The employee's phone number in E.164 format, i.e. "+12125554250" - location_ids: - type: optional>> - docs: A list of location IDs where this employee has access to. - status: - type: optional - docs: |- - Specifies the status of the employees being fetched. - See [EmployeeStatus](#type-employeestatus) for possible values - is_owner: - type: optional> - docs: |- - Whether this employee is the owner of the merchant. Each merchant - has one owner employee, and that employee has full authority over - the account. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - EmployeeStatus: - enum: - - ACTIVE - - INACTIVE - docs: >- - The status of the Employee being retrieved. - - - DEPRECATED at version 2020-08-26. Replaced by - [TeamMemberStatus](entity:TeamMemberStatus). - source: - openapi: ../default/openapi/openapi.json - EmployeeWage: - docs: >- - The hourly wage rate that an employee earns on a `Shift` for doing the job - specified by the `title` property of this object. Deprecated at version - 2020-08-26. Use [TeamMemberWage](entity:TeamMemberWage). - properties: - id: - type: optional - docs: The UUID for this object. - employee_id: - type: optional> - docs: The `Employee` that this wage is assigned to. - title: - type: optional> - docs: The job title that this wage relates to. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - source: - openapi: ../default/openapi/openapi.json - EnableEventsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [EnableEvents](api-endpoint:Events-EnableEvents) - endpoint. - - - Note: if there are errors processing the request, the events field will - not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - Error: - docs: >- - Represents an error encountered during a request to the Connect API. - - - See [Handling - errors](https://developer.squareup.com/docs/build-basics/handling-errors) - for more information. - properties: - category: - type: ErrorCategory - docs: |- - The high-level category for the error. - See [ErrorCategory](#type-errorcategory) for possible values - code: - type: ErrorCode - docs: |- - The specific code of the error. - See [ErrorCode](#type-errorcode) for possible values - detail: - type: optional - docs: A human-readable description of the error for debugging purposes. - field: - type: optional - docs: |- - The name of the field provided in the original request (if any) that - the error pertains to. - source: - openapi: ../default/openapi/openapi.json - ErrorCategory: - enum: - - API_ERROR - - AUTHENTICATION_ERROR - - INVALID_REQUEST_ERROR - - RATE_LIMIT_ERROR - - PAYMENT_METHOD_ERROR - - REFUND_ERROR - - MERCHANT_SUBSCRIPTION_ERROR - - EXTERNAL_VENDOR_ERROR - docs: |- - Indicates which high-level category of error has occurred during a - request to the Connect API. - source: - openapi: ../default/openapi/openapi.json - ErrorCode: - enum: - - INTERNAL_SERVER_ERROR - - UNAUTHORIZED - - ACCESS_TOKEN_EXPIRED - - ACCESS_TOKEN_REVOKED - - CLIENT_DISABLED - - FORBIDDEN - - INSUFFICIENT_SCOPES - - APPLICATION_DISABLED - - V1_APPLICATION - - V1_ACCESS_TOKEN - - CARD_PROCESSING_NOT_ENABLED - - MERCHANT_SUBSCRIPTION_NOT_FOUND - - BAD_REQUEST - - MISSING_REQUIRED_PARAMETER - - INCORRECT_TYPE - - INVALID_TIME - - INVALID_TIME_RANGE - - INVALID_VALUE - - INVALID_CURSOR - - UNKNOWN_QUERY_PARAMETER - - CONFLICTING_PARAMETERS - - EXPECTED_JSON_BODY - - INVALID_SORT_ORDER - - VALUE_REGEX_MISMATCH - - VALUE_TOO_SHORT - - VALUE_TOO_LONG - - VALUE_TOO_LOW - - VALUE_TOO_HIGH - - VALUE_EMPTY - - ARRAY_LENGTH_TOO_LONG - - ARRAY_LENGTH_TOO_SHORT - - ARRAY_EMPTY - - EXPECTED_BOOLEAN - - EXPECTED_INTEGER - - EXPECTED_FLOAT - - EXPECTED_STRING - - EXPECTED_OBJECT - - EXPECTED_ARRAY - - EXPECTED_MAP - - EXPECTED_BASE64_ENCODED_BYTE_ARRAY - - INVALID_ARRAY_VALUE - - INVALID_ENUM_VALUE - - INVALID_CONTENT_TYPE - - INVALID_FORM_VALUE - - CUSTOMER_NOT_FOUND - - ONE_INSTRUMENT_EXPECTED - - NO_FIELDS_SET - - TOO_MANY_MAP_ENTRIES - - MAP_KEY_LENGTH_TOO_SHORT - - MAP_KEY_LENGTH_TOO_LONG - - CUSTOMER_MISSING_NAME - - CUSTOMER_MISSING_EMAIL - - INVALID_PAUSE_LENGTH - - INVALID_DATE - - UNSUPPORTED_COUNTRY - - UNSUPPORTED_CURRENCY - - APPLE_TTP_PIN_TOKEN - - CARD_EXPIRED - - INVALID_EXPIRATION - - INVALID_EXPIRATION_YEAR - - INVALID_EXPIRATION_DATE - - UNSUPPORTED_CARD_BRAND - - UNSUPPORTED_ENTRY_METHOD - - INVALID_ENCRYPTED_CARD - - INVALID_CARD - - PAYMENT_AMOUNT_MISMATCH - - GENERIC_DECLINE - - CVV_FAILURE - - ADDRESS_VERIFICATION_FAILURE - - INVALID_ACCOUNT - - CURRENCY_MISMATCH - - INSUFFICIENT_FUNDS - - INSUFFICIENT_PERMISSIONS - - CARDHOLDER_INSUFFICIENT_PERMISSIONS - - INVALID_LOCATION - - TRANSACTION_LIMIT - - VOICE_FAILURE - - PAN_FAILURE - - EXPIRATION_FAILURE - - CARD_NOT_SUPPORTED - - READER_DECLINED - - INVALID_PIN - - MISSING_PIN - - MISSING_ACCOUNT_TYPE - - INVALID_POSTAL_CODE - - INVALID_FEES - - MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED - - PAYMENT_LIMIT_EXCEEDED - - GIFT_CARD_AVAILABLE_AMOUNT - - ACCOUNT_UNUSABLE - - BUYER_REFUSED_PAYMENT - - DELAYED_TRANSACTION_EXPIRED - - DELAYED_TRANSACTION_CANCELED - - DELAYED_TRANSACTION_CAPTURED - - DELAYED_TRANSACTION_FAILED - - CARD_TOKEN_EXPIRED - - CARD_TOKEN_USED - - AMOUNT_TOO_HIGH - - UNSUPPORTED_INSTRUMENT_TYPE - - REFUND_AMOUNT_INVALID - - REFUND_ALREADY_PENDING - - PAYMENT_NOT_REFUNDABLE - - PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE - - REFUND_ERROR_PAYMENT_NEEDS_COMPLETION - - REFUND_DECLINED - - INSUFFICIENT_PERMISSIONS_FOR_REFUND - - INVALID_CARD_DATA - - SOURCE_USED - - SOURCE_EXPIRED - - UNSUPPORTED_LOYALTY_REWARD_TIER - - LOCATION_MISMATCH - - ORDER_UNPAID_NOT_RETURNABLE - - IDEMPOTENCY_KEY_REUSED - - UNEXPECTED_VALUE - - SANDBOX_NOT_SUPPORTED - - INVALID_EMAIL_ADDRESS - - INVALID_PHONE_NUMBER - - CHECKOUT_EXPIRED - - BAD_CERTIFICATE - - INVALID_SQUARE_VERSION_FORMAT - - API_VERSION_INCOMPATIBLE - - CARD_PRESENCE_REQUIRED - - UNSUPPORTED_SOURCE_TYPE - - CARD_MISMATCH - - PLAID_ERROR - - PLAID_ERROR_ITEM_LOGIN_REQUIRED - - PLAID_ERROR_RATE_LIMIT - - CARD_DECLINED - - VERIFY_CVV_FAILURE - - VERIFY_AVS_FAILURE - - CARD_DECLINED_CALL_ISSUER - - CARD_DECLINED_VERIFICATION_REQUIRED - - BAD_EXPIRATION - - CHIP_INSERTION_REQUIRED - - ALLOWABLE_PIN_TRIES_EXCEEDED - - RESERVATION_DECLINED - - UNKNOWN_BODY_PARAMETER - - NOT_FOUND - - APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND - - METHOD_NOT_ALLOWED - - NOT_ACCEPTABLE - - REQUEST_TIMEOUT - - CONFLICT - - GONE - - REQUEST_ENTITY_TOO_LARGE - - UNSUPPORTED_MEDIA_TYPE - - UNPROCESSABLE_ENTITY - - RATE_LIMITED - - NOT_IMPLEMENTED - - BAD_GATEWAY - - SERVICE_UNAVAILABLE - - TEMPORARY_ERROR - - GATEWAY_TIMEOUT - docs: |- - Indicates the specific error that occurred during a request to a - Square API. - source: - openapi: ../default/openapi/openapi.json - Event: - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - EventData: - properties: - type: - type: optional> - docs: The name of the affected object’s type. - id: - type: optional - docs: The ID of the affected object. - deleted: - type: optional> - docs: >- - This is true if the affected object has been deleted; otherwise, it's - absent. - object: - type: optional>> - docs: >- - An object containing fields and values relevant to the event. It is - absent if the affected object has been deleted. - source: - openapi: ../default/openapi/openapi.json - EventMetadata: - docs: Contains metadata about a particular [Event](entity:Event). - properties: - event_id: - type: optional> - docs: A unique ID for the event. - api_version: - type: optional> - docs: >- - The API version of the event. This corresponds to the default API - version of the developer application at the time when the event was - created. - source: - openapi: ../default/openapi/openapi.json - EventTypeMetadata: - docs: Contains the metadata of a webhook event type. - properties: - event_type: - type: optional - docs: The event type. - access: read-only - api_version_introduced: - type: optional - docs: The API version at which the event type was introduced. - access: read-only - release_status: - type: optional - docs: The release status of the event type. - access: read-only - source: - openapi: ../default/openapi/openapi.json - ExcludeStrategy: - enum: - - LEAST_EXPENSIVE - - MOST_EXPENSIVE - docs: |- - Indicates which products matched by a CatalogPricingRule - will be excluded if the pricing rule uses an exclude set. - source: - openapi: ../default/openapi/openapi.json - ExternalPaymentDetails: - docs: >- - Stores details about an external payment. Contains only non-confidential - information. - - For more information, see - - [Take External - Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). - properties: - type: - type: string - docs: >- - The type of external payment the seller received. It can be one of the - following: - - - CHECK - Paid using a physical check. - - - BANK_TRANSFER - Paid using external bank transfer. - - - OTHER\_GIFT\_CARD - Paid using a non-Square gift card. - - - CRYPTO - Paid using a crypto currency. - - - SQUARE_CASH - Paid using Square Cash App. - - - SOCIAL - Paid using peer-to-peer payment applications. - - - EXTERNAL - A third-party application gathered this payment outside - of Square. - - - EMONEY - Paid using an E-money provider. - - - CARD - A credit or debit card that Square does not support. - - - STORED_BALANCE - Use for house accounts, store credit, and so forth. - - - FOOD_VOUCHER - Restaurant voucher provided by employers to employees - to pay for meals - - - OTHER - A type not listed here. - validation: - maxLength: 50 - source: - type: string - docs: |- - A description of the external payment source. For example, - "Food Delivery Service". - validation: - maxLength: 255 - source_id: - type: optional> - docs: An ID to associate the payment to its originating source. - validation: - maxLength: 255 - source_fee_money: - type: optional - docs: |- - The fees paid to the source. The `amount_money` minus this field is - the net amount seller receives. - source: - openapi: ../default/openapi/openapi.json - FilterValue: - docs: >- - A filter to select resources based on an exact field value. For any given - - value, the value can only be in one property. Depending on the field, - either - - all properties can be set or only a subset will be available. - - - Refer to the documentation of the field. - properties: - all: - type: optional>> - docs: A list of terms that must be present on the field of the resource. - any: - type: optional>> - docs: |- - A list of terms where at least one of them must be present on the - field of the resource. - none: - type: optional>> - docs: A list of terms that must not be present on the field the resource - source: - openapi: ../default/openapi/openapi.json - FloatNumberRange: - docs: Specifies a decimal number range. - properties: - start_at: - type: optional> - docs: A decimal value indicating where the range starts. - end_at: - type: optional> - docs: A decimal value indicating where the range ends. - source: - openapi: ../default/openapi/openapi.json - Fulfillment: - docs: >- - Contains details about how to fulfill this order. - - Orders can only be created with at most one fulfillment using the API. - - However, orders returned by the Orders API might contain multiple - fulfillments because sellers can create multiple fulfillments using Square - products such as Square Online. - properties: - uid: - type: optional> - docs: A unique ID that identifies the fulfillment only within this order. - validation: - maxLength: 60 - type: - type: optional - docs: |- - The type of the fulfillment. - See [FulfillmentType](#type-fulfillmenttype) for possible values - state: - type: optional - docs: |- - The state of the fulfillment. - See [FulfillmentState](#type-fulfillmentstate) for possible values - line_item_application: - type: optional - docs: >- - Describes what order line items this fulfillment applies to. - - It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. - - See - [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) - for possible values - entries: - type: optional> - docs: >- - A list of entries pertaining to the fulfillment of an order. Each - entry must reference - - a valid `uid` for an order line item in the `line_item_uid` field, as - well as a `quantity` to - - fulfill. - - - Multiple entries can reference the same line item `uid`, as long as - the total quantity among - - all fulfillment entries referencing a single line item does not exceed - the quantity of the - - order's line item itself. - - - An order cannot be marked as `COMPLETED` before all fulfillments are - `COMPLETED`, - - `CANCELED`, or `FAILED`. Fulfillments can be created and completed - independently - - before order completion. - access: read-only - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this fulfillment. Metadata fields - are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - pickup_details: - type: optional - docs: >- - Contains details for a pickup fulfillment. These details are required - when the fulfillment - - type is `PICKUP`. - shipment_details: - type: optional - docs: >- - Contains details for a shipment fulfillment. These details are - required when the fulfillment type - - is `SHIPMENT`. - - - A shipment fulfillment's relationship to fulfillment `state`: - - `PROPOSED`: A shipment is requested. - - `RESERVED`: Fulfillment in progress. Shipment processing. - - `PREPARED`: Shipment packaged. Shipping label created. - - `COMPLETED`: Package has been shipped. - - `CANCELED`: Shipment has been canceled. - - `FAILED`: Shipment has failed. - delivery_details: - type: optional - docs: Describes delivery details of an order fulfillment. - source: - openapi: ../default/openapi/openapi.json - FulfillmentDeliveryDetails: - docs: Describes delivery details of an order fulfillment. - properties: - recipient: - type: optional - docs: The contact information for the person to receive the fulfillment. - schedule_type: - type: >- - optional - docs: >- - Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then - - `deliver_at` is required. If `ASAP`, then `prep_time_duration` is - required. The default is `SCHEDULED`. - - See - [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) - for possible values - placed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was placed. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - - - Must be in RFC 3339 timestamp format, e.g., - "2016-09-04T23:59:33.123Z". - access: read-only - deliver_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - that represents the start of the delivery period. - - When the fulfillment `schedule_type` is `ASAP`, the field is - automatically - - set to the current time plus the `prep_time_duration`. - - Otherwise, the application can set this field while the fulfillment - `state` is - - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the - - terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). - - - The timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - prep_time_duration: - type: optional> - docs: |- - The duration of time it takes to prepare and deliver this fulfillment. - The duration must be in RFC 3339 format (for example, "P1W3D"). - delivery_window_duration: - type: optional> - docs: >- - The time period after `deliver_at` in which to deliver the order. - - Applications can set this field when the fulfillment `state` is - - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal - state - - such as `COMPLETED`, `CANCELED`, and `FAILED`). - - - The duration must be in RFC 3339 format (for example, "P1W3D"). - note: - type: optional> - docs: >- - Provides additional instructions about the delivery fulfillment. - - It is displayed in the Square Point of Sale application and set by the - API. - validation: - maxLength: 550 - completed_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicates when the seller completed the fulfillment. - - This field is automatically set when fulfillment `state` changes to - `COMPLETED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - in_progress_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicates when the seller started processing the fulfillment. - - This field is automatically set when the fulfillment `state` changes - to `RESERVED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - rejected_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was rejected. This field is - - automatically set when the fulfillment `state` changes to `FAILED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - ready_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the seller marked the fulfillment as ready for - - courier pickup. This field is automatically set when the fulfillment - `state` changes - - to PREPARED. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - delivered_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was delivered to the recipient. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was canceled. This field is - automatically - - set when the fulfillment `state` changes to `CANCELED`. - - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - cancel_reason: - type: optional> - docs: 'The delivery cancellation reason. Max length: 100 characters.' - validation: - maxLength: 100 - courier_pickup_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when an order can be picked up by the courier for delivery. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - courier_pickup_window_duration: - type: optional> - docs: >- - The time period after `courier_pickup_at` in which the courier should - pick up the order. - - The duration must be in RFC 3339 format (for example, "P1W3D"). - is_no_contact_delivery: - type: optional> - docs: Whether the delivery is preferred to be no contact. - dropoff_notes: - type: optional> - docs: >- - A note to provide additional instructions about how to deliver the - order. - validation: - maxLength: 550 - courier_provider_name: - type: optional> - docs: The name of the courier provider. - validation: - maxLength: 255 - courier_support_phone_number: - type: optional> - docs: The support phone number of the courier. - validation: - maxLength: 17 - square_delivery_id: - type: optional> - docs: The identifier for the delivery created by Square. - validation: - maxLength: 50 - external_delivery_id: - type: optional> - docs: >- - The identifier for the delivery created by the third-party courier - service. - validation: - maxLength: 50 - managed_delivery: - type: optional> - docs: >- - The flag to indicate the delivery is managed by a third party (ie - DoorDash), which means - - we may not receive all recipient information for PII purposes. - source: - openapi: ../default/openapi/openapi.json - FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: - enum: - - SCHEDULED - - ASAP - docs: The schedule type of the delivery fulfillment. - source: - openapi: ../default/openapi/openapi.json - FulfillmentFulfillmentEntry: - docs: >- - Links an order line item to a fulfillment. Each entry must reference - - a valid `uid` for an order line item in the `line_item_uid` field, as well - as a `quantity` to - - fulfill. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the fulfillment entry only within this - order. - validation: - maxLength: 60 - line_item_uid: - type: string - docs: The `uid` from the order line item. - validation: - minLength: 1 - quantity: - type: string - docs: >- - The quantity of the line item being fulfilled, formatted as a decimal - number. - - For example, `"3"`. - - - Fulfillments for line items with a `quantity_unit` can have - non-integer quantities. - - For example, `"1.70000"`. - validation: - minLength: 1 - maxLength: 12 - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this fulfillment entry. 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 (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - source: - openapi: ../default/openapi/openapi.json - FulfillmentFulfillmentLineItemApplication: - enum: - - ALL - - ENTRY_LIST - docs: >- - The `line_item_application` describes what order line items this - fulfillment applies - - to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. - source: - openapi: ../default/openapi/openapi.json - FulfillmentPickupDetails: - docs: Contains details necessary to fulfill a pickup order. - properties: - recipient: - type: optional - docs: >- - Information about the person to pick up this fulfillment from a - physical - - location. - expires_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment expires if it is not marked in - progress. The timestamp must be - - in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The - expiration time can only be set - - up to 7 days in the future. If `expires_at` is not set, any new - payments attached to the order - - are automatically completed. - auto_complete_duration: - type: optional> - docs: >- - The duration of time after which an in progress pickup fulfillment is - automatically moved - - to the `COMPLETED` state. The duration must be in RFC 3339 format (for - example, "P1W3D"). - - - If not set, this pickup fulfillment remains in progress until it is - canceled or completed. - schedule_type: - type: optional - docs: >- - The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. - - See - [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) - for possible values - pickup_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - that represents the start of the pickup window. Must be in RFC 3339 - timestamp format, e.g., - - "2016-09-04T23:59:33.123Z". - - - For fulfillments with the schedule type `ASAP`, this is automatically - set - - to the current time plus the expected duration to prepare the - fulfillment. - pickup_window_duration: - type: optional> - docs: >- - The window of time in which the order should be picked up after the - `pickup_at` timestamp. - - Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an - - informational guideline for merchants. - prep_time_duration: - type: optional> - docs: |- - The duration of time it takes to prepare this fulfillment. - The duration must be in RFC 3339 format (for example, "P1W3D"). - note: - type: optional> - docs: >- - A note to provide additional instructions about the pickup - - fulfillment displayed in the Square Point of Sale application and set - by the API. - validation: - maxLength: 500 - placed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was placed. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - accepted_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was marked in progress. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - rejected_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was rejected. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - ready_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment is marked as ready for pickup. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - expired_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment expired. The timestamp must be in RFC - 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - picked_up_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was picked up by the recipient. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was canceled. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - cancel_reason: - type: optional> - docs: >- - A description of why the pickup was canceled. The maximum length: 100 - characters. - validation: - maxLength: 100 - is_curbside_pickup: - type: optional> - docs: >- - If set to `true`, indicates that this pickup order is for curbside - pickup, not in-store pickup. - curbside_pickup_details: - type: optional - docs: >- - Specific details for curbside pickup. These details can only be - populated if `is_curbside_pickup` is set to `true`. - source: - openapi: ../default/openapi/openapi.json - FulfillmentPickupDetailsCurbsidePickupDetails: - docs: Specific details for curbside pickup. - properties: - curbside_details: - type: optional> - docs: >- - Specific details for curbside pickup, such as parking number and - vehicle model. - validation: - maxLength: 250 - buyer_arrived_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the buyer arrived and is waiting for pickup. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - source: - openapi: ../default/openapi/openapi.json - FulfillmentPickupDetailsScheduleType: - enum: - - SCHEDULED - - ASAP - docs: The schedule type of the pickup fulfillment. - source: - openapi: ../default/openapi/openapi.json - FulfillmentRecipient: - docs: Information about the fulfillment recipient. - properties: - customer_id: - type: optional> - docs: >- - The ID of the customer associated with the fulfillment. - - - If `customer_id` is provided, the fulfillment recipient's - `display_name`, - - `email_address`, and `phone_number` are automatically populated from - the - - targeted customer profile. If these fields are set in the request, the - request - - values override the information from the customer profile. If the - - targeted customer profile does not contain the necessary information - and - - these fields are left unset, the request results in an error. - validation: - maxLength: 191 - display_name: - type: optional> - docs: >- - The display name of the fulfillment recipient. This field is required. - - - If provided, the display name overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 255 - email_address: - type: optional> - docs: >- - The email address of the fulfillment recipient. - - - If provided, the email address overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 255 - phone_number: - type: optional> - docs: >- - The phone number of the fulfillment recipient. This field is required. - - - If provided, the phone number overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 17 - address: - type: optional
- docs: >- - The address of the fulfillment recipient. This field is required. - - - If provided, the address overrides the corresponding customer profile - value - - indicated by `customer_id`. - source: - openapi: ../default/openapi/openapi.json - FulfillmentShipmentDetails: - docs: Contains the details necessary to fulfill a shipment order. - properties: - recipient: - type: optional - docs: Information about the person to receive this shipment fulfillment. - carrier: - type: optional> - docs: >- - The shipping carrier being used to ship this fulfillment (such as UPS, - FedEx, or USPS). - validation: - maxLength: 50 - shipping_note: - type: optional> - docs: A note with additional information for the shipping carrier. - validation: - maxLength: 500 - shipping_type: - type: optional> - docs: >- - A description of the type of shipping product purchased from the - carrier - - (such as First Class, Priority, or Express). - validation: - maxLength: 50 - tracking_number: - type: optional> - docs: >- - The reference number provided by the carrier to track the shipment's - progress. - validation: - maxLength: 100 - tracking_url: - type: optional> - docs: A link to the tracking webpage on the carrier's website. - validation: - maxLength: 2000 - placed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment was requested. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - in_progress_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `RESERVED` state, - which indicates that preparation - - of this shipment has begun. The timestamp must be in RFC 3339 format - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - packaged_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `PREPARED` state, - which indicates that the - - fulfillment is packaged. The timestamp must be in RFC 3339 format (for - example, "2016-09-04T23:59:33.123Z"). - access: read-only - expected_shipped_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment is expected to be delivered to the - shipping carrier. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - shipped_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `COMPLETED` state, - which indicates that - - the fulfillment has been given to the shipping carrier. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating the shipment was canceled. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - cancel_reason: - type: optional> - docs: A description of why the shipment was canceled. - validation: - maxLength: 100 - failed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment failed to be completed. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - failure_reason: - type: optional> - docs: A description of why the shipment failed to be completed. - validation: - maxLength: 100 - source: - openapi: ../default/openapi/openapi.json - FulfillmentState: - enum: - - PROPOSED - - RESERVED - - PREPARED - - COMPLETED - - CANCELED - - FAILED - docs: The current state of this fulfillment. - source: - openapi: ../default/openapi/openapi.json - FulfillmentType: - enum: - - PICKUP - - SHIPMENT - - DELIVERY - docs: The type of fulfillment. - source: - openapi: ../default/openapi/openapi.json - GetBankAccountByV1IdResponse: - docs: Response object returned by GetBankAccountByV1Id. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_account: - type: optional - docs: The requested `BankAccount` object. - source: - openapi: ../default/openapi/openapi.json - GetBankAccountResponse: - docs: Response object returned by `GetBankAccount`. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_account: - type: optional - docs: The requested `BankAccount` object. - source: - openapi: ../default/openapi/openapi.json - GetBreakTypeResponse: - docs: >- - The response to a request to get a `BreakType`. The response contains - - the requested `BreakType` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - break_type: - type: optional - docs: The response object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetDeviceCodeResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_code: - type: optional - docs: The queried DeviceCode. - source: - openapi: ../default/openapi/openapi.json - GetDeviceResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - device: - type: optional - docs: The requested `Device`. - source: - openapi: ../default/openapi/openapi.json - GetEmployeeWageResponse: - docs: >- - A response to a request to get an `EmployeeWage`. The response contains - - the requested `EmployeeWage` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - employee_wage: - type: optional - docs: The requested `EmployeeWage` object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetInvoiceResponse: - docs: Describes a `GetInvoice` response. - properties: - invoice: - type: optional - docs: The invoice requested. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - GetPaymentRefundResponse: - docs: >- - Defines the response returned by - [GetRefund](api-endpoint:Refunds-GetPaymentRefund). - - - Note: If there are errors processing the request, the refund field might - not be - - present or it might be present in a FAILED state. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The requested `PaymentRefund`. - source: - openapi: ../default/openapi/openapi.json - GetPaymentResponse: - docs: >- - Defines the response returned by - [GetPayment](api-endpoint:Payments-GetPayment). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The requested `Payment`. - source: - openapi: ../default/openapi/openapi.json - GetPayoutResponse: - properties: - payout: - type: optional - docs: The requested payout. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - GetShiftResponse: - docs: |- - A response to a request to get a `Shift`. The response contains - the requested `Shift` object and might contain a set of `Error` objects if - the request resulted in errors. - properties: - shift: - type: optional - docs: The requested `Shift`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetTeamMemberWageResponse: - docs: >- - A response to a request to get a `TeamMemberWage`. The response contains - - the requested `TeamMemberWage` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - team_member_wage: - type: optional - docs: The requested `TeamMemberWage` object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: The requested `TerminalAction` - source: - openapi: ../default/openapi/openapi.json - GetTerminalCheckoutResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkout: - type: optional - docs: The requested `TerminalCheckout`. - source: - openapi: ../default/openapi/openapi.json - GetTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The requested `Refund`. - source: - openapi: ../default/openapi/openapi.json - GiftCard: - docs: Represents a Square gift card. - properties: - id: - type: optional - docs: The Square-assigned ID of the gift card. - access: read-only - type: - type: GiftCardType - docs: |- - The gift card type. - See [Type](#type-type) for possible values - gan_source: - type: optional - docs: >- - The source that generated the gift card account number (GAN). The - default value is `SQUARE`. - - See [GANSource](#type-gansource) for possible values - state: - type: optional - docs: |- - The current gift card state. - See [Status](#type-status) for possible values - balance_money: - type: optional - docs: >- - The current gift card balance. This balance is always greater than or - equal to zero. - gan: - type: optional> - docs: >- - The gift card account number (GAN). Buyers can use the GAN to make - purchases or check - - the gift card balance. - created_at: - type: optional - docs: >- - The timestamp when the gift card was created, in RFC 3339 format. - - In the case of a digital gift card, it is the time when you create a - card - - (using the Square Point of Sale application, Seller Dashboard, or Gift - Cards API). - - In the case of a plastic gift card, it is the time when Square - associates the card with the - - seller at the time of activation. - access: read-only - customer_ids: - type: optional> - docs: >- - The IDs of the [customer profiles](entity:Customer) to whom this gift - card is linked. - access: read-only - source: - openapi: ../default/openapi/openapi.json - GiftCardActivity: - docs: >- - Represents an action performed on a [gift card](entity:GiftCard) that - affects its state or balance. - - A gift card activity contains information about a specific activity type. - For example, a `REDEEM` activity - - includes a `redeem_activity_details` field that contains information about - the redemption. - properties: - id: - type: optional - docs: The Square-assigned ID of the gift card activity. - access: read-only - type: - type: GiftCardActivityType - docs: |- - The type of gift card activity. - See [Type](#type-type) for possible values - location_id: - type: string - docs: >- - The ID of the [business location](entity:Location) where the activity - occurred. - created_at: - type: optional - docs: >- - The timestamp when the gift card activity was created, in RFC 3339 - format. - access: read-only - gift_card_id: - type: optional> - docs: >- - The gift card ID. When creating a gift card activity, `gift_card_id` - is not required if - - `gift_card_gan` is specified. - gift_card_gan: - type: optional> - docs: >- - The gift card account number (GAN). When creating a gift card - activity, `gift_card_gan` - - is not required if `gift_card_id` is specified. - gift_card_balance_money: - type: optional - docs: The final balance on the gift card after the action is completed. - load_activity_details: - type: optional - docs: >- - Additional details about a `LOAD` activity, which is used to reload - money onto a gift card. - activate_activity_details: - type: optional - docs: >- - Additional details about an `ACTIVATE` activity, which is used to - activate a gift card with - - an initial balance. - redeem_activity_details: - type: optional - docs: >- - Additional details about a `REDEEM` activity, which is used to redeem - a gift card for a purchase. - - - For applications that process payments using the Square Payments API, - Square creates a `REDEEM` activity that - - updates the gift card balance after the corresponding - [CreatePayment](api-endpoint:Payments-CreatePayment) - - request is completed. Applications that use a custom payment - processing system must call - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REDEEM` activity. - clear_balance_activity_details: - type: optional - docs: >- - Additional details about a `CLEAR_BALANCE` activity, which is used to - set the balance of a gift card to zero. - deactivate_activity_details: - type: optional - docs: >- - Additional details about a `DEACTIVATE` activity, which is used to - deactivate a gift card. - adjust_increment_activity_details: - type: optional - docs: >- - Additional details about an `ADJUST_INCREMENT` activity, which is used - to add money to a gift card - - outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow. - adjust_decrement_activity_details: - type: optional - docs: >- - Additional details about an `ADJUST_DECREMENT` activity, which is used - to deduct money from a gift - - card outside of a typical `REDEEM` activity flow. - refund_activity_details: - type: optional - docs: >- - Additional details about a `REFUND` activity, which is used to add - money to a gift card when - - refunding a payment. - - - For applications that refund payments to a gift card using the Square - Refunds API, Square automatically - - creates a `REFUND` activity that updates the gift card balance after a - [RefundPayment](api-endpoint:Refunds-RefundPayment) - - request is completed. Applications that use a custom processing system - must call - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REFUND` activity. - unlinked_activity_refund_activity_details: - type: optional - docs: >- - Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This - activity is used to add money - - to a gift card when refunding a payment that was processed using a - custom payment processing system - - and not linked to the gift card. - import_activity_details: - type: optional - docs: >- - Additional details about an `IMPORT` activity, which Square uses to - import a third-party - - gift card with a balance. - block_activity_details: - type: optional - docs: >- - Additional details about a `BLOCK` activity, which Square uses to - temporarily block a gift card. - unblock_activity_details: - type: optional - docs: >- - Additional details about an `UNBLOCK` activity, which Square uses to - unblock a gift card. - import_reversal_activity_details: - type: optional - docs: >- - Additional details about an `IMPORT_REVERSAL` activity, which Square - uses to reverse the - - import of a third-party gift card. - transfer_balance_to_activity_details: - type: optional - docs: >- - Additional details about a `TRANSFER_BALANCE_TO` activity, which - Square uses to add money to - - a gift card as the result of a transfer from another gift card. - transfer_balance_from_activity_details: - type: optional - docs: >- - Additional details about a `TRANSFER_BALANCE_FROM` activity, which - Square uses to deduct money from - - a gift as the result of a transfer to another gift card. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityActivate: - docs: >- - Represents details about an `ACTIVATE` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: optional - docs: >- - The amount added to the gift card. This value is a positive integer. - - - Applications that use a custom order processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - order_id: - type: optional> - docs: >- - The ID of the [order](entity:Order) that contains the `GIFT_CARD` line - item. - - - Applications that use the Square Orders API to process orders must - specify the order ID - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: - type: optional> - docs: >- - The UID of the `GIFT_CARD` line item in the order that represents the - gift card purchase. - - - Applications that use the Square Orders API to process orders must - specify the line item UID - - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - - - Applications that use a custom order processing system can use this - field to track information - - related to an order or payment. - buyer_payment_instrument_ids: - type: optional>> - docs: >- - The payment instrument IDs used to process the gift card purchase, - such as a credit card ID - - or bank account ID. - - - Applications that use a custom order processing system must specify - payment instrument IDs in - - the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - - Square uses this information to perform compliance checks. - - - For applications that use the Square Orders API to process payments, - Square has the necessary - - instrument IDs to perform compliance checks. - - - Each buyer payment instrument ID can contain a maximum of 255 - characters. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityAdjustDecrement: - docs: >- - Represents details about an `ADJUST_DECREMENT` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount deducted from the gift card balance. This value is a - positive integer. - reason: - type: GiftCardActivityAdjustDecrementReason - docs: |- - The reason the gift card balance was adjusted. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityAdjustDecrementReason: - enum: - - SUSPICIOUS_ACTIVITY - - BALANCE_ACCIDENTALLY_INCREASED - - SUPPORT_ISSUE - - PURCHASE_WAS_REFUNDED - docs: >- - Indicates the reason for deducting money from a [gift - card](entity:GiftCard). - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityAdjustIncrement: - docs: >- - Represents details about an `ADJUST_INCREMENT` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount added to the gift card balance. This value is a positive - integer. - reason: - type: GiftCardActivityAdjustIncrementReason - docs: |- - The reason the gift card balance was adjusted. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityAdjustIncrementReason: - enum: - - COMPLIMENTARY - - SUPPORT_ISSUE - - TRANSACTION_VOIDED - docs: Indicates the reason for adding money to a [gift card](entity:GiftCard). - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityBlock: - docs: >- - Represents details about a `BLOCK` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityBlockReason - docs: |- - The reason the gift card was blocked. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityBlockReason: - type: literal<"CHARGEBACK_BLOCK"> - docs: Indicates the reason for blocking a [gift card](entity:GiftCard). - GiftCardActivityClearBalance: - docs: >- - Represents details about a `CLEAR_BALANCE` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityClearBalanceReason - docs: |- - The reason the gift card balance was cleared. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityClearBalanceReason: - enum: - - SUSPICIOUS_ACTIVITY - - REUSE_GIFTCARD - - UNKNOWN_REASON - docs: >- - Indicates the reason for clearing the balance of a [gift - card](entity:GiftCard). - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityCreatedEvent: - docs: Published when a [gift card activity](entity:GiftCardActivity) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `gift_card.activity.created`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityCreatedEventData: - docs: Represents the data associated with a `gift_card.activity.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card_activity`. - id: - type: optional - docs: The ID of the new gift card activity. - object: - type: optional - docs: An object that contains the new gift card activity. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityCreatedEventObject: - docs: |- - An object that contains the gift card activity associated with a - `gift_card.activity.created` event. - properties: - gift_card_activity: - type: optional - docs: The new gift card activity. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityDeactivate: - docs: >- - Represents details about a `DEACTIVATE` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityDeactivateReason - docs: |- - The reason the gift card was deactivated. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityDeactivateReason: - enum: - - SUSPICIOUS_ACTIVITY - - UNKNOWN_REASON - - CHARGEBACK_DEACTIVATE - docs: Indicates the reason for deactivating a [gift card](entity:GiftCard). - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityImport: - docs: >- - Represents details about an `IMPORT` [gift card activity - type](entity:GiftCardActivityType). - - This activity type is used when Square imports a third-party gift card, in - which case the - - `gan_source` of the gift card is set to `OTHER`. - properties: - amount_money: - type: Money - docs: The balance amount on the imported gift card. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityImportReversal: - docs: >- - Represents details about an `IMPORT_REVERSAL` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: |- - The amount of money cleared from the third-party gift card when - the import was reversed. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityLoad: - docs: >- - Represents details about a `LOAD` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: optional - docs: >- - The amount added to the gift card. This value is a positive integer. - - - Applications that use a custom order processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - order_id: - type: optional> - docs: >- - The ID of the [order](entity:Order) that contains the `GIFT_CARD` line - item. - - - Applications that use the Square Orders API to process orders must - specify the order ID in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: - type: optional> - docs: >- - The UID of the `GIFT_CARD` line item in the order that represents the - additional funds for the gift card. - - - Applications that use the Square Orders API to process orders must - specify the line item UID - - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - - - Applications that use a custom order processing system can use this - field to track information related to - - an order or payment. - buyer_payment_instrument_ids: - type: optional>> - docs: >- - The payment instrument IDs used to process the order for the - additional funds, such as a credit card ID - - or bank account ID. - - - Applications that use a custom order processing system must specify - payment instrument IDs in - - the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - - Square uses this information to perform compliance checks. - - - For applications that use the Square Orders API to process payments, - Square has the necessary - - instrument IDs to perform compliance checks. - - - Each buyer payment instrument ID can contain a maximum of 255 - characters. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityRedeem: - docs: >- - Represents details about a `REDEEM` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount deducted from the gift card for the redemption. This value - is a positive integer. - - - Applications that use a custom payment processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - payment_id: - type: optional - docs: >- - The ID of the payment that represents the gift card redemption. Square - populates this field - - if the payment was processed by Square. - access: read-only - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - - - Applications that use a custom payment processing system can use this - field to track information - - related to an order or payment. - status: - type: optional - docs: >- - The status of the gift card redemption. Gift cards redeemed from - Square Point of Sale or the - - Square Seller Dashboard use a two-state process: `PENDING` - - to `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using - the Gift Card Activities API - - always have a `COMPLETED` status. - - See [Status](#type-status) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityRedeemStatus: - enum: - - PENDING - - COMPLETED - - CANCELED - docs: >- - Indicates the status of a [gift card](entity:GiftCard) redemption. This - status is relevant only for - - redemptions made from Square products (such as Square Point of Sale) - because Square products use a - - two-state process. Gift cards redeemed using the Gift Card Activities API - always have a `COMPLETED` status. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityRefund: - docs: >- - Represents details about a `REFUND` [gift card activity - type](entity:GiftCardActivityType). - properties: - redeem_activity_id: - type: optional> - docs: >- - The ID of the refunded `REDEEM` gift card activity. Square populates - this field if the - - `payment_id` in the corresponding - [RefundPayment](api-endpoint:Refunds-RefundPayment) request - - represents a gift card redemption. - - - For applications that use a custom payment processing system, this - field is required when creating - - a `REFUND` activity. The provided `REDEEM` activity ID must be linked - to the same gift card. - amount_money: - type: optional - docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. - - - This field is required when creating a `REFUND` activity. The amount - can represent a full or partial refund. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: - type: optional - docs: >- - The ID of the refunded payment. Square populates this field if the - refund is for a - - payment processed by Square. This field matches the `payment_id` in - the corresponding - - [RefundPayment](api-endpoint:Refunds-RefundPayment) request. - access: read-only - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityTransferBalanceFrom: - docs: >- - Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity - type](entity:GiftCardActivityType). - properties: - transfer_to_gift_card_id: - type: string - docs: The ID of the gift card to which the specified amount was transferred. - amount_money: - type: Money - docs: >- - The amount deducted from the gift card for the transfer. This value is - a positive integer. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityTransferBalanceTo: - docs: >- - Represents details about a `TRANSFER_BALANCE_TO` [gift card activity - type](entity:GiftCardActivityType). - properties: - transfer_from_gift_card_id: - type: string - docs: >- - The ID of the gift card from which the specified amount was - transferred. - amount_money: - type: Money - docs: >- - The amount added to the gift card balance for the transfer. This value - is a positive integer. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityType: - enum: - - ACTIVATE - - LOAD - - REDEEM - - CLEAR_BALANCE - - DEACTIVATE - - ADJUST_INCREMENT - - ADJUST_DECREMENT - - REFUND - - UNLINKED_ACTIVITY_REFUND - - IMPORT - - BLOCK - - UNBLOCK - - IMPORT_REVERSAL - - TRANSFER_BALANCE_FROM - - TRANSFER_BALANCE_TO - docs: Indicates the type of [gift card activity](entity:GiftCardActivity). - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityUnblock: - docs: >- - Represents details about an `UNBLOCK` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityUnblockReason - docs: |- - The reason the gift card was unblocked. - See [Reason](#type-reason) for possible values - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityUnblockReason: - type: literal<"CHARGEBACK_UNBLOCK"> - docs: Indicates the reason for unblocking a [gift card](entity:GiftCard). - GiftCardActivityUnlinkedActivityRefund: - docs: >- - Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: - type: optional - docs: >- - The ID of the refunded payment. This field is not used starting in - Square version 2022-06-16. - access: read-only - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityUpdatedEvent: - docs: >- - Published when a [gift card activity](entity:GiftCardActivity) is - updated. - - Subscribe to this event to be notified about the following changes: - - - An update to the `REDEEM` activity for a gift card redemption made from - a Square product (such as Square Point of Sale). - - These redemptions are initially assigned a `PENDING` state, but then - change to a `COMPLETED` or `CANCELED` state. - - - An update to the `IMPORT` activity for an imported gift card when the - balance is later adjusted by Square. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `gift_card.activity.updated`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityUpdatedEventData: - docs: The data associated with a `gift_card.activity.updated` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card_activity`. - id: - type: optional - docs: The ID of the updated gift card activity. - object: - type: optional - docs: An object that contains the updated gift card activity. - source: - openapi: ../default/openapi/openapi.json - GiftCardActivityUpdatedEventObject: - docs: |- - An object that contains the gift card activity associated with a - `gift_card.activity.updated` event. - properties: - gift_card_activity: - type: optional - docs: The updated gift card activity. - source: - openapi: ../default/openapi/openapi.json - GiftCardCreatedEvent: - docs: Published when a [gift card](entity:GiftCard) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: The type of event. For this event, the value is `gift_card.created`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardCreatedEventData: - docs: The data associated with a `gift_card.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card`. - id: - type: optional - docs: The ID of the new gift card. - object: - type: optional - docs: An object that contains the new gift card. - source: - openapi: ../default/openapi/openapi.json - GiftCardCreatedEventObject: - docs: >- - An object that contains the gift card associated with a - `gift_card.created` event. - properties: - gift_card: - type: optional - docs: The new gift card. - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerLinkedEvent: - docs: >- - Published when a [customer](entity:Customer) is linked to a [gift - card](entity:GiftCard). - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `gift_card.customer_linked`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerLinkedEventData: - docs: The data associated with a `gift_card.customer_linked` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card`. - id: - type: optional - docs: The ID of the updated gift card. - object: - type: optional - docs: >- - An object that contains the updated gift card and the ID of the linked - customer. - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerLinkedEventObject: - docs: |- - An object that contains the gift card and customer ID associated with a - `gift_card.customer_linked` event. - properties: - gift_card: - type: optional - docs: The gift card with the updated `customer_ids` field. - linked_customer_id: - type: optional> - docs: The ID of the linked [customer](entity:Customer). - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerUnlinkedEvent: - docs: >- - Published when a [customer](entity:Customer) is unlinked from a [gift - card](entity:GiftCard). - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `gift_card.customer_unlinked`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerUnlinkedEventData: - docs: The data associated with a `gift_card.customer_unlinked` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card`. - id: - type: optional - docs: The ID of the updated gift card. - object: - type: optional - docs: >- - An object that contains the updated gift card and the ID of the - unlinked customer. - source: - openapi: ../default/openapi/openapi.json - GiftCardCustomerUnlinkedEventObject: - docs: >- - An object that contains the gift card and the customer ID associated with - a - - `gift_card.customer_linked` event. - properties: - gift_card: - type: optional - docs: |- - The gift card with the updated `customer_ids` field. - The field is removed if the gift card is not linked to any customers. - unlinked_customer_id: - type: optional> - docs: The ID of the unlinked [customer](entity:Customer). - source: - openapi: ../default/openapi/openapi.json - GiftCardGanSource: - enum: - - SQUARE - - OTHER - docs: |- - Indicates the source that generated the gift card - account number (GAN). - source: - openapi: ../default/openapi/openapi.json - GiftCardStatus: - enum: - - ACTIVE - - DEACTIVATED - - BLOCKED - - PENDING - docs: Indicates the gift card state. - source: - openapi: ../default/openapi/openapi.json - GiftCardType: - enum: - - PHYSICAL - - DIGITAL - docs: Indicates the gift card type. - source: - openapi: ../default/openapi/openapi.json - GiftCardUpdatedEvent: - docs: |- - Published when a [gift card](entity:GiftCard) is updated. This includes - changes to the state, balance, and customer association. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. For this event, the value is - `gift_card.updated`. - event_id: - type: optional> - docs: >- - The unique ID of the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - GiftCardUpdatedEventData: - docs: The data associated with a `gift_card.updated` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `gift_card`. - id: - type: optional - docs: The ID of the updated gift card. - object: - type: optional - docs: An object that contains the updated gift card. - source: - openapi: ../default/openapi/openapi.json - GiftCardUpdatedEventObject: - docs: >- - An object that contains the gift card associated with a - `gift_card.updated` event. - properties: - gift_card: - type: optional - docs: >- - The gift card with the updated `balance_money`, `state`, or - `customer_ids` field. - - Some events can affect both `balance_money` and `state`. - source: - openapi: ../default/openapi/openapi.json - InventoryAdjustment: - docs: |- - Represents a change in state or quantity of product inventory at a - particular time and location. - properties: - id: - type: optional - docs: |- - A unique ID generated by Square for the - `InventoryAdjustment`. - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - `InventoryAdjustment` to an external - system. - validation: - maxLength: 255 - from_state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) of the related quantity - of items before the adjustment. - See [InventoryState](#type-inventorystate) for possible values - to_state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) of the related quantity - of items after the adjustment. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items is being tracked. - validation: - maxLength: 100 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: - type: optional> - docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - quantity: - type: optional> - docs: |- - The number of items affected by the adjustment as a decimal string. - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - total_price_money: - type: optional - docs: |- - The total price paid for goods associated with the - adjustment. Present if and only if `to_state` is `SOLD`. Always - non-negative. - occurred_at: - type: optional> - docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the inventory adjustment took place. For inventory adjustment updates, - the `occurred_at` - - timestamp cannot be older than 24 hours or in the future relative to - the - - time of the request. - validation: - maxLength: 34 - created_at: - type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the inventory - adjustment is received. - validation: - maxLength: 34 - access: read-only - source: - type: optional - docs: |- - Information about the application that caused the - inventory adjustment. - employee_id: - type: optional> - docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the - - inventory adjustment. - validation: - maxLength: 100 - team_member_id: - type: optional> - docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the - - inventory adjustment. - validation: - maxLength: 100 - transaction_id: - type: optional - docs: |- - The Square-generated ID of the [Transaction](entity:Transaction) that - caused the adjustment. Only relevant for payment-related state - transitions. - validation: - maxLength: 255 - access: read-only - refund_id: - type: optional - docs: |- - The Square-generated ID of the [Refund](entity:Refund) that - caused the adjustment. Only relevant for refund-related state - transitions. - validation: - maxLength: 255 - access: read-only - purchase_order_id: - type: optional - docs: >- - The Square-generated ID of the purchase order that caused the - - adjustment. Only relevant for state transitions from the Square for - Retail - - app. - validation: - maxLength: 100 - access: read-only - goods_receipt_id: - type: optional - docs: >- - The Square-generated ID of the goods receipt that caused the - - adjustment. Only relevant for state transitions from the Square for - Retail - - app. - validation: - maxLength: 100 - access: read-only - adjustment_group: - type: optional - docs: >- - An adjustment group bundling the related adjustments of item - variations through stock conversions in a single inventory event. - source: - openapi: ../default/openapi/openapi.json - InventoryAdjustmentGroup: - properties: - id: - type: optional - docs: |- - A unique ID generated by Square for the - `InventoryAdjustmentGroup`. - validation: - maxLength: 100 - access: read-only - root_adjustment_id: - type: optional - docs: The inventory adjustment of the composed variation. - validation: - maxLength: 100 - access: read-only - from_state: - type: optional - docs: >- - Representative `from_state` for adjustments within the group. For - example, for a group adjustment from `IN_STOCK` to `SOLD`, - - there can be two component adjustments in the group: one from - `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`. - - Here, the representative `from_state` for the - `InventoryAdjustmentGroup` is `IN_STOCK`. - - See [InventoryState](#type-inventorystate) for possible values - to_state: - type: optional - docs: >- - Representative `to_state` for adjustments within group. For example, - for a group adjustment from `IN_STOCK` to `SOLD`, - - the two component adjustments in the group can be from `IN_STOCK` to - `COMPOSED` and from `COMPOSED` to `SOLD`. - - Here, the representative `to_state` of the `InventoryAdjustmentGroup` - is `SOLD`. - - See [InventoryState](#type-inventorystate) for possible values - source: - openapi: ../default/openapi/openapi.json - InventoryAlertType: - enum: - - NONE - - LOW_QUANTITY - docs: >- - Indicates whether Square should alert the merchant when the inventory - quantity of a CatalogItemVariation is low. - source: - openapi: ../default/openapi/openapi.json - InventoryChange: - docs: |- - Represents a single physical count, inventory, adjustment, or transfer - that is part of the history of inventory changes for a particular - [CatalogObject](entity:CatalogObject) instance. - properties: - type: - type: optional - docs: >- - Indicates how the inventory change is applied. See - - [InventoryChangeType](entity:InventoryChangeType) for all possible - values. - - See [InventoryChangeType](#type-inventorychangetype) for possible - values - physical_count: - type: optional - docs: |- - Contains details about the physical count when `type` is - `PHYSICAL_COUNT`, and is unset for all other change types. - adjustment: - type: optional - docs: |- - Contains details about the inventory adjustment when `type` is - `ADJUSTMENT`, and is unset for all other change types. - transfer: - type: optional - docs: >- - Contains details about the inventory transfer when `type` is - - `TRANSFER`, and is unset for all other change types. - - - _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can - only be set in the input to the - - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) - endpoint when the seller has an active Retail Plus subscription. - measurement_unit: - type: optional - docs: >- - The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object - representing the catalog measurement unit associated with the - inventory change. - measurement_unit_id: - type: optional - docs: >- - The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) - object representing the catalog measurement unit associated with the - inventory change. - access: read-only - source: - openapi: ../default/openapi/openapi.json - InventoryChangeType: - enum: - - PHYSICAL_COUNT - - ADJUSTMENT - - TRANSFER - docs: >- - Indicates how the inventory change was applied to a tracked product - quantity. - source: - openapi: ../default/openapi/openapi.json - InventoryCount: - docs: >- - Represents Square-estimated quantity of items in a particular state at a - - particular seller location based on the known history of physical counts - and - - inventory adjustments. - properties: - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: - type: optional> - docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: - type: optional> - docs: >- - The number of items affected by the estimated count as a decimal - string. - - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - calculated_at: - type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the most recent - physical count or adjustment affecting - - the estimated count is received. - validation: - maxLength: 34 - access: read-only - is_estimated: - type: optional - docs: >- - Whether the inventory count is for composed variation (TRUE) or not - (FALSE). If true, the inventory count will not be present in the - response of - - any of these endpoints: - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory), - - [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges), - - [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), - and - - [RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges). - access: read-only - source: - openapi: ../default/openapi/openapi.json - InventoryCountUpdatedEvent: - docs: |- - Published when the quantity is updated for a - [CatalogItemVariation](entity:CatalogItemVariation). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InventoryCountUpdatedEventData: - properties: - type: - type: optional> - docs: >- - Name of the affected object’s type. For this event, the value is - `inventory_counts`. - id: - type: optional - docs: ID of the affected object. - object: - type: optional - docs: >- - An object containing fields and values relevant to the event. Is - absent if affected object was deleted. - source: - openapi: ../default/openapi/openapi.json - InventoryCountUpdatedEventObject: - properties: - inventory_counts: - type: optional>> - docs: The inventory counts. - source: - openapi: ../default/openapi/openapi.json - InventoryPhysicalCount: - docs: >- - Represents the quantity of an item variation that is physically present - - at a specific location, verified by a seller or a seller's employee. For - example, - - a physical count might come from an employee counting the item variations - on - - hand or from syncing with an external system. - properties: - id: - type: optional - docs: |- - A unique Square-generated ID for the - [InventoryPhysicalCount](entity:InventoryPhysicalCount). - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - [InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external - system. - validation: - maxLength: 255 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: - type: optional> - docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: - type: optional> - docs: >- - The number of items affected by the physical count as a decimal - string. - - The number can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - source: - type: optional - docs: |- - Information about the application with which the - physical count is submitted. - employee_id: - type: optional> - docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the - - physical count. - validation: - maxLength: 100 - team_member_id: - type: optional> - docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the - - physical count. - validation: - maxLength: 100 - occurred_at: - type: optional> - docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the physical count was examined. For physical count updates, the - `occurred_at` - - timestamp cannot be older than 24 hours or in the future relative to - the - - time of the request. - validation: - maxLength: 34 - created_at: - type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the physical count - is received. - validation: - maxLength: 34 - access: read-only - source: - openapi: ../default/openapi/openapi.json - InventoryState: - enum: - - CUSTOM - - IN_STOCK - - SOLD - - RETURNED_BY_CUSTOMER - - RESERVED_FOR_SALE - - SOLD_ONLINE - - ORDERED_FROM_VENDOR - - RECEIVED_FROM_VENDOR - - IN_TRANSIT_TO - - NONE - - WASTE - - UNLINKED_RETURN - - COMPOSED - - DECOMPOSED - - SUPPORTED_BY_NEWER_VERSION - - IN_TRANSIT - docs: Indicates the state of a tracked item quantity in the lifecycle of goods. - source: - openapi: ../default/openapi/openapi.json - InventoryTransfer: - docs: |- - Represents the transfer of a quantity of product inventory at a - particular time from one location to another. - properties: - id: - type: optional - docs: |- - A unique ID generated by Square for the - `InventoryTransfer`. - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - `InventoryTransfer` to an external system. - validation: - maxLength: 255 - state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) for the quantity of - items being transferred. - See [InventoryState](#type-inventorystate) for possible values - from_location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items was tracked before the transfer. - validation: - maxLength: 100 - to_location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items was tracked after the transfer. - validation: - maxLength: 100 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: - type: optional> - docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - quantity: - type: optional> - docs: |- - The number of items affected by the transfer as a decimal string. - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - occurred_at: - type: optional> - docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the transfer took place. For write actions, the `occurred_at` - timestamp - - cannot be older than 24 hours or in the future relative to the time of - the - - request. - validation: - maxLength: 34 - created_at: - type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when Square - received the transfer request. - validation: - maxLength: 34 - access: read-only - source: - type: optional - docs: |- - Information about the application that initiated the - inventory transfer. - employee_id: - type: optional> - docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the - - inventory transfer. - validation: - maxLength: 100 - team_member_id: - type: optional> - docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the - - inventory transfer. - validation: - maxLength: 100 - source: - openapi: ../default/openapi/openapi.json - Invoice: - docs: >- - Stores information about an invoice. You use the Invoices API to create - and manage - - invoices. For more information, see [Invoices API - Overview](https://developer.squareup.com/docs/invoices-api/overview). - properties: - id: - type: optional - docs: The Square-assigned ID of the invoice. - access: read-only - version: - type: optional - docs: >- - The Square-assigned version number, which is incremented each time an - update is committed to the invoice. - location_id: - type: optional> - docs: >- - The ID of the location that this invoice is associated with. - - - If specified in a `CreateInvoice` request, the value must match the - `location_id` of the associated order. - validation: - minLength: 1 - maxLength: 255 - order_id: - type: optional> - docs: >- - The ID of the [order](entity:Order) for which the invoice is created. - - This field is required when creating an invoice, and the order must be - in the `OPEN` state. - - - To view the line items and other information for the associated order, - call the - - [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the - order ID. - validation: - minLength: 1 - maxLength: 255 - primary_recipient: - type: optional - docs: >- - The customer who receives the invoice. This customer data is displayed - on the invoice and used by Square to deliver the invoice. - - - This field is required to publish an invoice, and it must specify the - `customer_id`. - payment_requests: - type: optional>> - docs: >- - The payment schedule for the invoice, represented by one or more - payment requests that - - define payment settings, such as amount due and due date. An invoice - supports the following payment request combinations: - - - One balance - - - One deposit with one balance - - - 2–12 installments - - - One deposit with 2–12 installments - - - This field is required when creating an invoice. It must contain at - least one payment request. - - All payment requests for the invoice must equal the total order - amount. For more information, see - - [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - - - Adding `INSTALLMENT` payment requests to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - delivery_method: - type: optional - docs: >- - The delivery method that Square uses to send the invoice, reminders, - and receipts to - - the customer. After the invoice is published, Square processes the - invoice based on the delivery - - method and payment request settings, either immediately or on the - `scheduled_at` date, if specified. - - For example, Square might send the invoice or receipt for an automatic - payment. For invoices with - - automatic payments, this field must be set to `EMAIL`. - - - One of the following is required when creating an invoice: - - - (Recommended) This `delivery_method` field. To configure an - automatic payment, the - - `automatic_payment_source` field of the payment request is also - required. - - - The deprecated `request_method` field of the payment request. Note - that `invoice` - - objects returned in responses do not include `request_method`. - - See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible - values - invoice_number: - type: optional> - docs: >- - A user-friendly invoice number that is displayed on the invoice. The - value is unique within a location. - - If not provided when creating an invoice, Square assigns a value. - - It increments from 1 and is padded with zeros making it 7 characters - long - - (for example, 0000001 and 0000002). - validation: - minLength: 1 - maxLength: 191 - title: - type: optional> - docs: The title of the invoice, which is displayed on the invoice. - validation: - minLength: 1 - maxLength: 255 - description: - type: optional> - docs: The description of the invoice, which is displayed on the invoice. - validation: - minLength: 1 - maxLength: 65536 - scheduled_at: - type: optional> - docs: >- - The timestamp when the invoice is scheduled for processing, in RFC - 3339 format. - - After the invoice is published, Square processes the invoice on the - specified date, - - according to the delivery method and payment request settings. - - - If the field is not set, Square processes the invoice immediately - after it is published. - public_url: - type: optional - docs: >- - A temporary link to the Square-hosted payment page where the customer - can pay the - - invoice. If the link expires, customers can provide the email address - or phone number - - associated with the invoice and request a new link directly from the - expired payment page. - - - This field is added after the invoice is published and reaches the - scheduled date - - (if one is defined). - access: read-only - next_payment_amount_money: - type: optional - docs: >- - The current amount due for the invoice. In addition to the - - amount due on the next payment request, this includes any overdue - payment amounts. - status: - type: optional - docs: |- - The status of the invoice. - See [InvoiceStatus](#type-invoicestatus) for possible values - timezone: - type: optional - docs: >- - The time zone used to interpret calendar dates on the invoice, such as - `due_date`. - - When an invoice is created, this field is set to the `timezone` - specified for the seller - - location. The value cannot be changed. - - - For example, a payment `due_date` of 2021-03-09 with a `timezone` of - America/Los\_Angeles - - becomes overdue at midnight on March 9 in America/Los\_Angeles (which - equals a UTC timestamp - - of 2021-03-10T08:00:00Z). - access: read-only - created_at: - type: optional - docs: The timestamp when the invoice was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the invoice was last updated, in RFC 3339 format. - access: read-only - accepted_payment_methods: - type: optional - docs: >- - The payment methods that customers can use to pay the invoice on the - Square-hosted - - invoice page. This setting is independent of any automatic payment - requests for the invoice. - - - This field is required when creating an invoice and must set at least - one payment method to `true`. - custom_fields: - type: optional>> - docs: >- - Additional seller-defined fields that are displayed on the invoice. - For more information, see - - [Custom - fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - - - Adding custom fields to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - - - Max: 2 custom fields - subscription_id: - type: optional - docs: >- - The ID of the [subscription](entity:Subscription) associated with the - invoice. - - This field is present only on subscription billing invoices. - access: read-only - sale_or_service_date: - type: optional> - docs: >- - The date of the sale or the date that the service is rendered, in - `YYYY-MM-DD` format. - - This field can be used to specify a past or future date which is - displayed on the invoice. - payment_conditions: - type: optional> - docs: >- - **France only.** The payment terms and conditions that are displayed - on the invoice. For more information, - - see [Payment - conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions). - - - For countries other than France, Square returns an - `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and - - "Payment conditions are not supported for this location's country" - detail if this field is included in `CreateInvoice` or `UpdateInvoice` - requests. - validation: - minLength: 1 - maxLength: 2000 - store_payment_method_enabled: - type: optional> - docs: >- - Indicates whether to allow a customer to save a credit or debit card - as a card on file or a bank transfer as a - - bank account on file. If `true`, Square displays a __Save my card on - file__ or __Save my bank on file__ checkbox on the - - invoice payment page. Stored payment information can be used for - future automatic payments. The default value is `false`. - attachments: - type: optional> - docs: >- - Metadata about the attachments on the invoice. Invoice attachments are - managed using the - - [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) - and - [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) - endpoints. - access: read-only - creator_team_member_id: - type: optional - docs: >- - The ID of the [team member](entity:TeamMember) who created the - invoice. - - This field is present only on invoices created in the Square Dashboard - or Square Invoices app by a logged-in team member. - access: read-only - source: - openapi: ../default/openapi/openapi.json - InvoiceAcceptedPaymentMethods: - docs: >- - The payment methods that customers can use to pay an - [invoice](entity:Invoice) on the Square-hosted invoice payment page. - properties: - card: - type: optional> - docs: >- - Indicates whether credit card or debit card payments are accepted. The - default value is `false`. - square_gift_card: - type: optional> - docs: >- - Indicates whether Square gift card payments are accepted. The default - value is `false`. - bank_account: - type: optional> - docs: >- - Indicates whether ACH bank transfer payments are accepted. The default - value is `false`. - buy_now_pay_later: - type: optional> - docs: >- - Indicates whether Afterpay (also known as Clearpay) payments are - accepted. The default value is `false`. - - - This option is allowed only for invoices that have a single payment - request of the `BALANCE` type. This payment method is - - supported if the seller account accepts Afterpay payments and the - seller location is in a country where Afterpay - - invoice payments are supported. As a best practice, consider enabling - an additional payment method when allowing - - `buy_now_pay_later` payments. For more information, including detailed - requirements and processing limits, see - - [Buy Now Pay Later payments with - Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). - cash_app_pay: - type: optional> - docs: >- - Indicates whether Cash App payments are accepted. The default value is - `false`. - - - This payment method is supported only for seller - [locations](entity:Location) in the United States. - source: - openapi: ../default/openapi/openapi.json - InvoiceAttachment: - docs: Represents a file attached to an [invoice](entity:Invoice). - properties: - id: - type: optional - docs: The Square-assigned ID of the attachment. - access: read-only - filename: - type: optional - docs: The file name of the attachment, which is displayed on the invoice. - access: read-only - description: - type: optional - docs: |- - The description of the attachment, which is displayed on the invoice. - This field maps to the seller-defined **Message** field. - access: read-only - filesize: - type: optional - docs: The file size of the attachment in bytes. - access: read-only - hash: - type: optional - docs: The MD5 hash that was generated from the file contents. - access: read-only - mime_type: - type: optional - docs: >- - The mime type of the attachment. - - The following mime types are supported: - - image/gif, image/jpeg, image/png, image/tiff, image/bmp, - application/pdf. - access: read-only - uploaded_at: - type: optional - docs: The timestamp when the attachment was uploaded, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - InvoiceAutomaticPaymentSource: - enum: - - NONE - - CARD_ON_FILE - - BANK_ON_FILE - docs: >- - Indicates the automatic payment method for an [invoice payment - request](entity:InvoicePaymentRequest). - source: - openapi: ../default/openapi/openapi.json - InvoiceCanceledEvent: - docs: Published when an [Invoice](entity:Invoice) is canceled. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.canceled"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceCanceledEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the canceled invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceCanceledEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceCreatedEvent: - docs: Published when an [Invoice](entity:Invoice) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the created invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceCreatedEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceCustomField: - docs: >- - An additional seller-defined and customer-facing field to include on the - invoice. For more information, - - see [Custom - fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - - - Adding custom fields to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - properties: - label: - type: optional> - docs: >- - The label or title of the custom field. This field is required for a - custom field. - validation: - maxLength: 30 - value: - type: optional> - docs: The text of the custom field. If omitted, only the label is rendered. - validation: - maxLength: 2000 - placement: - type: optional - docs: >- - The location of the custom field on the invoice. This field is - required for a custom field. - - See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) - for possible values - source: - openapi: ../default/openapi/openapi.json - InvoiceCustomFieldPlacement: - enum: - - ABOVE_LINE_ITEMS - - BELOW_LINE_ITEMS - docs: >- - Indicates where to render a custom field on the Square-hosted invoice page - and in emailed or PDF - - copies of the invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceDeletedEvent: - docs: Published when a draft [Invoice](entity:Invoice) is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceDeletedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - deleted: - type: optional> - docs: Indicates that the invoice was deleted. - source: - openapi: ../default/openapi/openapi.json - InvoiceDeliveryMethod: - enum: - - EMAIL - - SHARE_MANUALLY - - SMS - docs: >- - Indicates how Square delivers the [invoice](entity:Invoice) to the - customer. - source: - openapi: ../default/openapi/openapi.json - InvoiceFilter: - docs: Describes query filters to apply. - properties: - location_ids: - docs: |- - Limits the search to the specified locations. A location is required. - In the current implementation, only one location can be specified. - type: list - customer_ids: - type: optional>> - docs: >- - Limits the search to the specified customers, within the specified - locations. - - Specifying a customer is optional. In the current implementation, - - a maximum of one customer can be specified. - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentMadeEvent: - docs: >- - Published when a payment that is associated with an - [invoice](entity:Invoice) is completed. - - For more information about invoice payments, see [Pay an - invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#pay-invoice). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.payment_made"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentMadeEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the invoice that was paid. - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentMadeEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentReminder: - docs: >- - Describes a payment request reminder (automatic notification) that Square - sends - - to the customer. You configure a reminder relative to the payment request - - `due_date`. - properties: - uid: - type: optional - docs: |- - A Square-assigned ID that uniquely identifies the reminder within the - `InvoicePaymentRequest`. - access: read-only - relative_scheduled_days: - type: optional> - docs: >- - The number of days before (a negative number) or after (a positive - number) - - the payment request `due_date` when the reminder is sent. For example, - -3 indicates that - - the reminder should be sent 3 days before the payment request - `due_date`. - validation: - min: -32767 - max: 32767 - message: - type: optional> - docs: The reminder message. - validation: - minLength: 1 - maxLength: 1000 - status: - type: optional - docs: >- - The status of the reminder. - - See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) - for possible values - sent_at: - type: optional - docs: If sent, the timestamp when the reminder was sent, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentReminderStatus: - enum: - - PENDING - - NOT_APPLICABLE - - SENT - docs: The status of a payment request reminder. - source: - openapi: ../default/openapi/openapi.json - InvoicePaymentRequest: - docs: >- - Represents a payment request for an [invoice](entity:Invoice). Invoices - can specify a maximum - - of 13 payment requests, with up to 12 `INSTALLMENT` request types. For - more information, - - see [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - - - Adding `INSTALLMENT` payment requests to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - properties: - uid: - type: optional> - docs: >- - The Square-generated ID of the payment request in an - [invoice](entity:Invoice). - validation: - minLength: 1 - maxLength: 255 - request_method: - type: optional - docs: >- - Indicates how Square processes the payment request. DEPRECATED at - version 2021-01-21. Replaced by the - - `Invoice.delivery_method` and - `InvoicePaymentRequest.automatic_payment_source` fields. - - - One of the following is required when creating an invoice: - - - (Recommended) The `delivery_method` field of the invoice. To - configure an automatic payment, the - - `automatic_payment_source` field of the payment request is also - required. - - - This `request_method` field. Note that `invoice` objects returned in - responses do not include `request_method`. - - See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible - values - request_type: - type: optional - docs: >- - Identifies the payment request type. This type defines how the payment - request amount is determined. - - This field is required to create a payment request. - - See [InvoiceRequestType](#type-invoicerequesttype) for possible values - due_date: - type: optional> - docs: >- - The due date (in the invoice's time zone) for the payment request, in - `YYYY-MM-DD` format. This field - - is required to create a payment request. If an - `automatic_payment_source` is defined for the request, Square - - charges the payment source on this date. - - - After this date, the invoice becomes overdue. For example, a payment - `due_date` of 2021-03-09 with a `timezone` - - of America/Los\_Angeles becomes overdue at midnight on March 9 in - America/Los\_Angeles (which equals a UTC - - timestamp of 2021-03-10T08:00:00Z). - fixed_amount_requested_money: - type: optional - docs: >- - If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the - `request_type`, - - this indicates the request amount. - - You cannot specify this when `request_type` is `BALANCE` or when the - - payment request includes the `percentage_requested` field. - percentage_requested: - type: optional> - docs: >- - Specifies the amount for the payment request in percentage: - - - - When the payment `request_type` is `DEPOSIT`, it is the percentage - of the order's total amount. - - - When the payment `request_type` is `INSTALLMENT`, it is the - percentage of the order's total less - - the deposit, if requested. The sum of the `percentage_requested` in - all installment - - payment requests must be equal to 100. - - - You cannot specify this when the payment `request_type` is `BALANCE` - or when the - - payment request specifies the `fixed_amount_requested_money` field. - tipping_enabled: - type: optional> - docs: >- - If set to true, the Square-hosted invoice page (the `public_url` field - of the invoice) - - provides a place for the customer to pay a tip. - - - This field is allowed only on the final payment request - - and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. - automatic_payment_source: - type: optional - docs: >- - The payment method for an automatic payment. - - - The default value is `NONE`. - - See - [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) - for possible values - card_id: - type: optional> - docs: >- - The ID of the credit or debit card on file to charge for the payment - request. To get the cards on file for a customer, - - call [ListCards](api-endpoint:Cards-ListCards) and include the - `customer_id` of the invoice recipient. - validation: - minLength: 1 - maxLength: 255 - reminders: - type: optional>> - docs: A list of one or more reminders to send for the payment request. - computed_amount_money: - type: optional - docs: >- - The amount of the payment request, computed using the order amount and - information from the various payment - - request fields (`request_type`, `fixed_amount_requested_money`, and - `percentage_requested`). - total_completed_amount_money: - type: optional - docs: >- - The amount of money already paid for the specific payment request. - - This amount might include a rounding adjustment if the most recent - invoice payment - - was in cash in a currency that rounds cash payments (such as, `CAD` or - `AUD`). - rounding_adjustment_included_money: - type: optional - docs: >- - If the most recent payment was a cash payment - - in a currency that rounds cash payments (such as, `CAD` or `AUD`) and - the payment - - is rounded from `computed_amount_money` in the payment request, then - this - - field specifies the rounding adjustment applied. This amount - - might be negative. - source: - openapi: ../default/openapi/openapi.json - InvoicePublishedEvent: - docs: >- - Published when an [Invoice](entity:Invoice) transitions from a draft to a - non-draft status. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.published"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoicePublishedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the published invoice. - source: - openapi: ../default/openapi/openapi.json - InvoicePublishedEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceQuery: - docs: Describes query criteria for searching invoices. - properties: - filter: - type: InvoiceFilter - docs: >- - Query filters to apply in searching invoices. - - For more information, see [Search for - invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices). - sort: - type: optional - docs: Describes the sort order for the search result. - source: - openapi: ../default/openapi/openapi.json - InvoiceRecipient: - docs: >- - Represents a snapshot of customer data. This object stores customer data - that is displayed on the invoice - - and that Square uses to deliver the invoice. - - - When you provide a customer ID for a draft invoice, Square retrieves the - associated customer profile and populates - - the remaining `InvoiceRecipient` fields. You cannot update these fields - after the invoice is published. - - Square updates the customer ID in response to a merge operation, but does - not update other fields. - properties: - customer_id: - type: optional> - docs: |- - The ID of the customer. This is the customer profile ID that - you provide when creating a draft invoice. - validation: - minLength: 1 - maxLength: 255 - given_name: - type: optional - docs: The recipient's given (that is, first) name. - access: read-only - family_name: - type: optional - docs: The recipient's family (that is, last) name. - access: read-only - email_address: - type: optional - docs: The recipient's email address. - access: read-only - address: - type: optional
- docs: The recipient's physical address. - phone_number: - type: optional - docs: The recipient's phone number. - access: read-only - company_name: - type: optional - docs: The name of the recipient's company. - access: read-only - tax_ids: - type: optional - docs: >- - The recipient's tax IDs. The country of the seller account determines - whether this field - - is available for the customer. For more information, see [Invoice - recipient tax - IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). - source: - openapi: ../default/openapi/openapi.json - InvoiceRecipientTaxIds: - docs: >- - Represents the tax IDs for an invoice recipient. The country of the seller - account determines - - whether the corresponding `tax_ids` field is available for the customer. - For more information, - - see [Invoice recipient tax - IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). - properties: - eu_vat: - type: optional - docs: >- - The EU VAT identification number for the invoice recipient. For - example, `IE3426675K`. - access: read-only - source: - openapi: ../default/openapi/openapi.json - InvoiceRefundedEvent: - docs: >- - Published when a refund is applied toward a payment of an - [invoice](entity:Invoice). - - For more information about invoice refunds, see [Refund an - invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#refund-invoice). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.refunded"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceRefundedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the refunded invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceRefundedEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceRequestMethod: - enum: - - EMAIL - - CHARGE_CARD_ON_FILE - - SHARE_MANUALLY - - CHARGE_BANK_ON_FILE - - SMS - - SMS_CHARGE_CARD_ON_FILE - - SMS_CHARGE_BANK_ON_FILE - docs: >- - Specifies the action for Square to take for processing the invoice. For - example, - - email the invoice, charge a customer's card on file, or do nothing. - DEPRECATED at - - version 2021-01-21. The corresponding `request_method` field is replaced - by the - - `Invoice.delivery_method` and - `InvoicePaymentRequest.automatic_payment_source` fields. - source: - openapi: ../default/openapi/openapi.json - InvoiceRequestType: - enum: - - BALANCE - - DEPOSIT - - INSTALLMENT - docs: >- - Indicates the type of the payment request. For more information, see - - [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - source: - openapi: ../default/openapi/openapi.json - InvoiceScheduledChargeFailedEvent: - docs: >- - Published when an automatic scheduled payment for an - [Invoice](entity:Invoice) has failed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: >- - The type of event this represents, - `"invoice.scheduled_charge_failed"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceScheduledChargeFailedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: >- - An object containing the invoice that experienced the failed scheduled - charge. - source: - openapi: ../default/openapi/openapi.json - InvoiceScheduledChargeFailedEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceSort: - docs: Identifies the sort field and sort order. - properties: - field: - type: InvoiceSortField - docs: |- - The field to use for sorting. - See [InvoiceSortField](#type-invoicesortfield) for possible values - order: - type: optional - docs: |- - The order to use for sorting the results. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - InvoiceSortField: - type: literal<"INVOICE_SORT_DATE"> - docs: The field to use for sorting. - InvoiceStatus: - enum: - - DRAFT - - UNPAID - - SCHEDULED - - PARTIALLY_PAID - - PAID - - PARTIALLY_REFUNDED - - REFUNDED - - CANCELED - - FAILED - - PAYMENT_PENDING - docs: Indicates the status of an [invoice](entity:Invoice). - source: - openapi: ../default/openapi/openapi.json - InvoiceUpdatedEvent: - docs: Published when an [Invoice](entity:Invoice) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"invoice.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - InvoiceUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"invoice"`. - id: - type: optional - docs: ID of the affected invoice. - object: - type: optional - docs: An object containing the updated invoice. - source: - openapi: ../default/openapi/openapi.json - InvoiceUpdatedEventObject: - properties: - invoice: - type: optional - docs: The related invoice. - source: - openapi: ../default/openapi/openapi.json - ItemVariationLocationOverrides: - docs: >- - Price and inventory alerting overrides for a `CatalogItemVariation` at a - specific `Location`. - properties: - location_id: - type: optional> - docs: >- - The ID of the `Location`. This can include locations that are - deactivated. - price_money: - type: optional - docs: >- - The price of the `CatalogItemVariation` at the given `Location`, or - blank for variable pricing. - pricing_type: - type: optional - docs: >- - The pricing type (fixed or variable) for the `CatalogItemVariation` at - the given `Location`. - - See [CatalogPricingType](#type-catalogpricingtype) for possible values - track_inventory: - type: optional> - docs: >- - If `true`, inventory tracking is active for the `CatalogItemVariation` - at this `Location`. - inventory_alert_type: - type: optional - docs: >- - Indicates whether the `CatalogItemVariation` displays an alert when - its inventory - - quantity is less than or equal to its `inventory_alert_threshold`. - - See [InventoryAlertType](#type-inventoryalerttype) for possible values - inventory_alert_threshold: - type: optional> - docs: >- - If the inventory quantity for the variation is less than or equal to - this value and `inventory_alert_type` - - is `LOW_QUANTITY`, the variation displays an alert in the merchant - dashboard. - - - This value is always an integer. - sold_out: - type: optional - docs: >- - Indicates whether the overridden item variation is sold out at the - specified location. - - - When inventory tracking is enabled on the item variation either - globally or at the specified location, - - the item variation is automatically marked as sold out when its - inventory count reaches zero. The seller - - can manually set the item variation as sold out even when the - inventory count is greater than zero. - - Attempts by an application to set this attribute are ignored. - Regardless how the sold-out status is set, - - applications should treat its inventory count as zero when this - attribute value is `true`. - access: read-only - sold_out_valid_until: - type: optional - docs: >- - The seller-assigned timestamp, of the RFC 3339 format, to indicate - when this sold-out variation - - becomes available again at the specified location. Attempts by an - application to set this attribute are ignored. - - When the current time is later than this attribute value, the affected - item variation is no longer sold out. - access: read-only - source: - openapi: ../default/openapi/openapi.json - Job: - docs: >- - Represents a job that can be assigned to [team - members](entity:TeamMember). This object defines the - - job's title and tip eligibility. Compensation is defined in a [job - assignment](entity:JobAssignment) - - in a team member's wage setting. - properties: - id: - type: optional - docs: >- - **Read only** The unique Square-assigned ID of the job. If you need a - job ID for an API request, - - call [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned - when you created the job. - - You can also get job IDs from a team member's wage setting. - title: - type: optional> - docs: The title of the job. - validation: - maxLength: 150 - is_tip_eligible: - type: optional> - docs: Indicates whether team members can earn tips for the job. - created_at: - type: optional - docs: The timestamp when the job was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the job was last updated, in RFC 3339 format. - access: read-only - version: - type: optional - docs: >- - **Read only** The current version of the job. Include this field in - `UpdateJob` requests to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) - - control and avoid overwrites from concurrent requests. Requests fail - if the provided version doesn't - - match the server version at the time of the request. - source: - openapi: ../default/openapi/openapi.json - JobAssignment: - docs: >- - Represents a job assigned to a [team member](entity:TeamMember), including - the compensation the team - - member earns for the job. Job assignments are listed in the team member's - [wage setting](entity:WageSetting). - properties: - job_title: - type: optional> - docs: The title of the job. - pay_type: - type: JobAssignmentPayType - docs: >- - The current pay type for the job assignment used to - - calculate the pay amount in a pay period. - - See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible - values - hourly_rate: - type: optional - docs: >- - The hourly pay rate of the job. For `SALARY` pay types, Square - calculates the hourly rate based on - - `annual_rate` and `weekly_hours`. - annual_rate: - type: optional - docs: >- - The total pay amount for a 12-month period on the job. Set if the job - `PayType` is `SALARY`. - weekly_hours: - type: optional> - docs: >- - The planned hours per week for the job. Set if the job `PayType` is - `SALARY`. - job_id: - type: optional> - docs: The ID of the [job](entity:Job). - source: - openapi: ../default/openapi/openapi.json - JobAssignmentPayType: - enum: - - NONE - - HOURLY - - SALARY - docs: Enumerates the possible pay types that a job can be assigned. - source: - openapi: ../default/openapi/openapi.json - JobCreatedEvent: - docs: Published when a Job is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"job.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - JobCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"job"`. - id: - type: optional - docs: ID of the created job. - object: - type: optional - docs: An object containing the created job. - source: - openapi: ../default/openapi/openapi.json - JobCreatedEventObject: - properties: - job: - type: optional - docs: The created job. - source: - openapi: ../default/openapi/openapi.json - JobUpdatedEvent: - docs: Published when a Job is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"job.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - JobUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"job"`. - id: - type: optional - docs: ID of the updated job. - object: - type: optional - docs: An object containing the updated job. - source: - openapi: ../default/openapi/openapi.json - JobUpdatedEventObject: - properties: - job: - type: optional - docs: The updated job. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftCreatedEvent: - docs: Published when a [ScheduledShift](entity:ScheduledShift) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - location_id: - type: optional> - docs: The ID of the location associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.scheduled_shift.created`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftCreatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `scheduled_shift`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the affected `ScheduledShift`. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the affected `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftCreatedEventObject: - properties: - ScheduledShift: - type: optional - docs: The new `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftDeletedEvent: - docs: Published when a [ScheduledShift](entity:ScheduledShift) is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - location_id: - type: optional> - docs: The ID of the location associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.scheduled_shift.deleted`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftDeletedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `scheduled_shift`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the affected `ScheduledShift`. - validation: - maxLength: 255 - deleted: - type: optional> - docs: Is true if the affected object was deleted. Otherwise absent. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftPublishedEvent: - docs: Published when a [ScheduledShift](entity:ScheduledShift) is published. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - location_id: - type: optional> - docs: The ID of the location associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.scheduled_shift.published`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftPublishedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `scheduled_shift`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the affected `ScheduledShift`. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the affected `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftPublishedEventObject: - properties: - ScheduledShift: - type: optional - docs: The published `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftUpdatedEvent: - docs: Published when a [ScheduledShift](entity:ScheduledShift) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - location_id: - type: optional> - docs: The ID of the location associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.scheduled_shift.updated`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftUpdatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `scheduled_shift`. - validation: - maxLength: 50 - id: - type: optional - docs: The ID of the affected `ScheduledShift`. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the affected `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborScheduledShiftUpdatedEventObject: - properties: - ScheduledShift: - type: optional - docs: The updated `ScheduledShift`. - source: - openapi: ../default/openapi/openapi.json - LaborShiftCreatedEvent: - docs: >- - Published when a worker starts a [Shift](entity:Shift). - - - Deprecated at Square API version 2025-05-21. Replaced by - `labor.timecard.created`. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - type: - type: optional> - docs: The type of event. For this event, the value is `labor.shift.created`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborShiftCreatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `shift`. - id: - type: optional - docs: The ID of the affected `Shift`. - object: - type: optional - docs: An object containing the affected `Shift`. - source: - openapi: ../default/openapi/openapi.json - LaborShiftCreatedEventObject: - properties: - shift: - type: optional - docs: The new `Shift`. - source: - openapi: ../default/openapi/openapi.json - LaborShiftDeletedEvent: - docs: >- - Published when a [Shift](entity:Shift) is deleted. - - - Deprecated at Square API version 2025-05-21. Replaced by - `labor.timecard.deleted`. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - type: - type: optional> - docs: The type of event. For this event, the value is `labor.shift.deleted`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborShiftDeletedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `shift`. - id: - type: optional - docs: The ID of the affected `Shift`. - deleted: - type: optional> - docs: Is true if the affected object was deleted. Otherwise absent. - source: - openapi: ../default/openapi/openapi.json - LaborShiftUpdatedEvent: - docs: >- - Published when a [Shift](entity:Shift) is updated. - - - Deprecated at Square API version 2025-05-21. Replaced by - `labor.timecard.updated`. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - type: - type: optional> - docs: The type of event. For this event, the value is `labor.shift.updated`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborShiftUpdatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `shift`. - id: - type: optional - docs: ID of the affected `Shift`. - object: - type: optional - docs: An object containing the affected `Shift`. - source: - openapi: ../default/openapi/openapi.json - LaborShiftUpdatedEventObject: - properties: - shift: - type: optional - docs: The updated `Shift`. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardCreatedEvent: - docs: Published when a worker starts a [Timecard](entity:Timecard). - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.timecard.created`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardCreatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `timecard`. - id: - type: optional - docs: The ID of the affected `Timecard`. - object: - type: optional - docs: An object containing the affected `Timecard`. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardCreatedEventObject: - properties: - timecard: - type: optional - docs: The new `Timecard`. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardDeletedEvent: - docs: Published when a [Timecard](entity:Timecard) is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.timecard.deleted`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardDeletedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `timecard`. - id: - type: optional - docs: The ID of the affected `Timecard`. - deleted: - type: optional> - docs: Is true if the affected object was deleted. Otherwise absent. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardUpdatedEvent: - docs: Published when a [Timecard](entity:Timecard) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the merchant associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `labor.timecard.updated`. - event_id: - type: optional> - docs: The unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardUpdatedEventData: - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `timecard`. - id: - type: optional - docs: The ID of the affected `Timecard`. - object: - type: optional - docs: An object containing the affected `Timecard`. - source: - openapi: ../default/openapi/openapi.json - LaborTimecardUpdatedEventObject: - properties: - timecard: - type: optional - docs: The updated `Timecard`. - source: - openapi: ../default/openapi/openapi.json - LinkCustomerToGiftCardResponse: - docs: >- - A response that contains the linked `GiftCard` object. If the request - resulted in errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: >- - The gift card with the ID of the linked customer listed in the - `customer_ids` field. - source: - openapi: ../default/openapi/openapi.json - ListBankAccountsResponse: - docs: Response object returned by ListBankAccounts. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_accounts: - type: optional> - docs: List of BankAccounts associated with this account. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can - - use in a subsequent request to fetch next set of bank accounts. - - If empty, this is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - source: - openapi: ../default/openapi/openapi.json - ListBookingCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. - - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of - - results for your original request. This field is present only if the - request succeeded and - - additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListBookingCustomAttributesResponse: - docs: >- - Represents a - [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListBookingsResponse: - properties: - bookings: - type: optional> - docs: The list of targeted bookings. - cursor: - type: optional - docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. - validation: - maxLength: 65536 - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListBreakTypesResponse: - docs: >- - The response to a request for a set of `BreakType` objects. The response - contains - - the requested `BreakType` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - break_types: - type: optional> - docs: ' A page of `BreakType` results.' - cursor: - type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `BreakType` results. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListCardsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint. - - - Note: if there are errors processing the request, the card field will not - be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - cards: - type: optional> - docs: The requested list of `Card`s. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - ListCashDrawerShiftEventsResponse: - properties: - cursor: - type: optional - docs: |- - Opaque cursor for fetching the next page. Cursor is not present in - the last page of results. - errors: - type: optional> - docs: Any errors that occurred during the request. - cash_drawer_shift_events: - type: optional> - docs: |- - All of the events (payments, refunds, etc.) for a cash drawer during - the shift. - source: - openapi: ../default/openapi/openapi.json - ListCashDrawerShiftsResponse: - properties: - cursor: - type: optional - docs: |- - Opaque cursor for fetching the next page of results. Cursor is not - present in the last page of results. - errors: - type: optional> - docs: Any errors that occurred during the request. - cash_drawer_shifts: - type: optional> - docs: |- - A collection of CashDrawerShiftSummary objects for shifts that match - the query. - source: - openapi: ../default/openapi/openapi.json - ListCatalogResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - objects: - type: optional> - docs: The CatalogObjects returned. - source: - openapi: ../default/openapi/openapi.json - ListChannelsRequestConstants: literal<"MAX_PAGE_SIZE"> - ListChannelsResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - channels: - type: optional> - docs: List of requested Channel. - cursor: - type: optional - docs: The token required to retrieve the next page of results. - source: - openapi: ../default/openapi/openapi.json - ListCustomerCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. - - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of - - results for your original request. This field is present only if the - request succeeded and - - additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListCustomerCustomAttributesResponse: - docs: >- - Represents a - [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListCustomerGroupsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) - endpoint. - - - Either `errors` or `groups` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - groups: - type: optional> - docs: A list of customer groups belonging to the current seller. - cursor: - type: optional - docs: >- - A pagination cursor to retrieve the next set of results for your - - original query to the endpoint. This value is present only if the - request - - succeeded and additional results are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListCustomerSegmentsResponse: - docs: >- - Defines the fields that are included in the response body for requests to - the `ListCustomerSegments` endpoint. - - - Either `errors` or `segments` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - segments: - type: optional> - docs: >- - The list of customer segments belonging to the associated Square - account. - cursor: - type: optional - docs: >- - A pagination cursor to be used in subsequent calls to - `ListCustomerSegments` - - to retrieve the next set of query results. The cursor is only present - if the request succeeded and - - additional results are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListCustomersResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the `ListCustomers` endpoint. - - - Either `errors` or `customers` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customers: - type: optional> - docs: >- - The customer profiles associated with the Square account or an empty - object (`{}`) if none are found. - - Only customer profiles with public information (`given_name`, - `family_name`, `company_name`, `email_address`, or - - `phone_number`) are included in the response. - cursor: - type: optional - docs: >- - A pagination cursor to retrieve the next set of results for the - - original query. A cursor is only present if the request succeeded and - additional results - - are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - count: - type: optional - docs: >- - The total count of customers associated with the Square account. Only - customer profiles with public information - - (`given_name`, `family_name`, `company_name`, `email_address`, or - `phone_number`) are counted. This field is present - - only if `count` is set to `true` in the request. - source: - openapi: ../default/openapi/openapi.json - ListDeviceCodesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_codes: - type: optional> - docs: The queried DeviceCode. - cursor: - type: optional - docs: >- - A pagination cursor to retrieve the next set of results for your - - original query to the endpoint. This value is present only if the - request - - succeeded and additional results are available. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - ListDevicesResponse: - properties: - errors: - type: optional> - docs: Information about errors that occurred during the request. - devices: - type: optional> - docs: The requested list of `Device` objects. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - ListDisputeEvidenceResponse: - docs: Defines the fields in a `ListDisputeEvidence` response. - properties: - evidence: - type: optional> - docs: The list of evidence previously uploaded to the specified dispute. - errors: - type: optional> - docs: Information about errors encountered during the request. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. - - If unset, this is the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListDisputesResponse: - docs: Defines fields in a `ListDisputes` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - disputes: - type: optional> - docs: The list of disputes. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. - - If unset, this is the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListEmployeeWagesResponse: - docs: >- - The response to a request for a set of `EmployeeWage` objects. The - response contains - - a set of `EmployeeWage` objects. - properties: - employee_wages: - type: optional> - docs: A page of `EmployeeWage` results. - cursor: - type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `EmployeeWage` results. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListEmployeesResponse: - properties: - employees: optional> - cursor: - type: optional - docs: The token to be used to retrieve the next page of results. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListEventTypesResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) - endpoint. - - - Note: if there are errors processing the request, the event types field - will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> - docs: >- - Contains the metadata of an event type. For more information, see - [EventTypeMetadata](entity:EventTypeMetadata). - source: - openapi: ../default/openapi/openapi.json - ListGiftCardActivitiesResponse: - docs: >- - A response that contains a list of `GiftCardActivity` objects. If the - request resulted in errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card_activities: - type: optional> - docs: >- - The requested gift card activities or an empty object if none are - found. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to retrieve the next set of activities. If a cursor - is not present, this is - - the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - source: - openapi: ../default/openapi/openapi.json - ListGiftCardsResponse: - docs: >- - A response that contains a list of `GiftCard` objects. If the request - resulted in errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_cards: - type: optional> - docs: The requested gift cards or an empty object if none are found. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to retrieve the next set of gift cards. If a cursor - is not present, this is - - the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - source: - openapi: ../default/openapi/openapi.json - ListInvoicesResponse: - docs: Describes a `ListInvoice` response. - properties: - invoices: - type: optional> - docs: The invoices retrieved. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to retrieve the next set of invoices. If empty, - this is the final - - response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - ListJobsResponse: - docs: >- - Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either - `jobs` or `errors` - - is present in the response. If additional results are available, the - `cursor` field is also present. - properties: - jobs: - type: optional> - docs: The retrieved jobs. A single paged response contains up to 100 jobs. - cursor: - type: optional - docs: >- - An opaque cursor used to retrieve the next page of results. This field - is present only - - if the request succeeded and additional results are available. For - more information, see - - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListLocationBookingProfilesResponse: - properties: - location_booking_profiles: - type: optional> - docs: The list of a seller's location booking profiles. - cursor: - type: optional - docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListLocationCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. - - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of - - results for your original request. This field is present only if the - request succeeded and - - additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListLocationCustomAttributesResponse: - docs: >- - Represents a - [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListLocationsResponse: - docs: >- - Defines the fields that are included in the response body of a request - - to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint. - - - Either `errors` or `locations` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - locations: - type: optional> - docs: The business locations. - source: - openapi: ../default/openapi/openapi.json - ListLoyaltyProgramsResponse: - docs: A response that contains all loyalty programs. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - programs: - type: optional> - docs: A list of `LoyaltyProgram` for the merchant. - source: - openapi: ../default/openapi/openapi.json - ListLoyaltyPromotionsResponse: - docs: >- - Represents a - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) - response. - - One of `loyalty_promotions`, an empty object, or `errors` is present in - the response. - - If additional results are available, the `cursor` field is also present - along with `loyalty_promotions`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotions: - type: optional> - docs: The retrieved loyalty promotions. - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListMerchantCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. - - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of - - results for your original request. This field is present only if the - request succeeded and - - additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListMerchantCustomAttributesResponse: - docs: >- - Represents a - [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListMerchantsResponse: - docs: >- - The response object returned by the - [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - merchant: - type: optional> - docs: The requested `Merchant` entities. - cursor: - type: optional - docs: >- - If the response is truncated, the cursor to use in next request to - fetch next set of objects. - source: - openapi: ../default/openapi/openapi.json - ListOrderCustomAttributeDefinitionsResponse: - docs: Represents a response from listing order custom attribute definitions. - properties: - custom_attribute_definitions: - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, Square returns an empty object (`{}`). - type: list - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. - - This field is present only if the request succeeded and additional - results are available. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - validation: - minLength: 1 - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListOrderCustomAttributesResponse: - docs: Represents a response from listing order custom attributes. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If no custom attribute are found, - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. - - This field is present only if the request succeeded and additional - results are available. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - validation: - minLength: 1 - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListPaymentLinksResponse: - properties: - errors: - type: optional> - docs: Errors that occurred during the request. - payment_links: - type: optional> - docs: The list of payment links. - cursor: - type: optional - docs: >2- - When a response is truncated, it includes a cursor that you can use in a subsequent request - to retrieve the next set of gift cards. If a cursor is not present, - this is the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListPaymentRefundsRequestSortField: - enum: - - CREATED_AT - - UPDATED_AT - source: - openapi: ../default/openapi/openapi.json - ListPaymentRefundsResponse: - docs: >- - Defines the response returned by - [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds). - - - Either `errors` or `refunds` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refunds: - type: optional> - docs: The list of requested refunds. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListPaymentsRequestSortField: - enum: - - CREATED_AT - - OFFLINE_CREATED_AT - - UPDATED_AT - source: - openapi: ../default/openapi/openapi.json - ListPaymentsResponse: - docs: >- - Defines the response returned by - [ListPayments](api-endpoint:Payments-ListPayments). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payments: - type: optional> - docs: The requested list of payments. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListPayoutEntriesResponse: - docs: The response to retrieve payout records entries. - properties: - payout_entries: - type: optional> - docs: >- - The requested list of payout entries, ordered with the given or - default sort order. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - ListPayoutsResponse: - docs: The response to retrieve payout records entries. - properties: - payouts: - type: optional> - docs: The requested list of payouts. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - ListSitesResponse: - docs: >- - Represents a `ListSites` response. The response can include either `sites` - or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - sites: - type: optional> - docs: The sites that belong to the seller. - source: - openapi: ../default/openapi/openapi.json - ListSubscriptionEventsResponse: - docs: >- - Defines output parameters in a response from the - - [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents). - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription_events: - type: optional> - docs: The retrieved subscription events. - cursor: - type: optional - docs: >- - When the total number of resulting subscription events exceeds the - limit of a paged response, - - the response includes a cursor for you to use in a subsequent request - to fetch the next set of events. - - If the cursor is unset, the response contains the last page of the - results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListTeamMemberBookingProfilesResponse: - properties: - team_member_booking_profiles: - type: optional> - docs: >- - The list of team member booking profiles. The results are returned in - the ascending order of the time - - when the team member booking profiles were last updated. Multiple - booking profiles updated at the same time - - are further sorted in the ascending order of their IDs. - cursor: - type: optional - docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. - validation: - maxLength: 65536 - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListTeamMemberWagesResponse: - docs: >- - The response to a request for a set of `TeamMemberWage` objects. The - response contains - - a set of `TeamMemberWage` objects. - properties: - team_member_wages: - type: optional> - docs: A page of `TeamMemberWage` results. - cursor: - type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `TeamMemberWage` results. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ListTransactionsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint. - - - One of `errors` or `transactions` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transactions: - type: optional> - docs: An array of transactions that match your query. - cursor: - type: optional - docs: >- - A pagination cursor for retrieving the next set of results, - - if any remain. Provide this value as the `cursor` parameter in a - subsequent - - request to this endpoint. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - ListWebhookEventTypesResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) - endpoint. - - - Note: if there are errors processing the request, the event types field - will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> - docs: >- - Contains the metadata of a webhook event type. For more information, - see [EventTypeMetadata](entity:EventTypeMetadata). - source: - openapi: ../default/openapi/openapi.json - ListWebhookSubscriptionsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) - endpoint. - - - Note: if there are errors processing the request, the subscriptions field - will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscriptions: - type: optional> - docs: The requested list of [Subscription](entity:WebhookSubscription)s. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - ListWorkweekConfigsResponse: - docs: >- - The response to a request for a set of `WorkweekConfig` objects. The - response contains - - the requested `WorkweekConfig` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - workweek_configs: - type: optional> - docs: A page of `WorkweekConfig` results. - cursor: - type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page of - `WorkweekConfig` results. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - Location: - docs: >- - Represents one of a business' - [locations](https://developer.squareup.com/docs/locations-api). - properties: - id: - type: optional - docs: >- - A short generated string of letters and numbers that uniquely - identifies this location instance. - validation: - maxLength: 32 - access: read-only - name: - type: optional> - docs: |- - The name of the location. - This information appears in the Seller Dashboard as the nickname. - A location name must be unique within a seller account. - validation: - maxLength: 255 - address: - type: optional
- docs: The physical address of the location. - timezone: - type: optional> - docs: |- - The [IANA time zone](https://www.iana.org/time-zones) identifier for - the time zone of the location. For example, `America/Los_Angeles`. - validation: - maxLength: 30 - capabilities: - type: optional> - docs: >- - The Square features that are enabled for the location. - - See [LocationCapability](entity:LocationCapability) for possible - values. - - See [LocationCapability](#type-locationcapability) for possible values - access: read-only - status: - type: optional - docs: |- - The status of the location. - See [LocationStatus](#type-locationstatus) for possible values - created_at: - type: optional - docs: >- - The time when the location was created, in RFC 3339 format. - - For more information, see [Working with - Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - validation: - minLength: 20 - maxLength: 25 - access: read-only - merchant_id: - type: optional - docs: The ID of the merchant that owns the location. - validation: - maxLength: 32 - access: read-only - country: - type: optional - docs: >- - The country of the location, in the two-letter format of ISO 3166. For - example, `US` or `JP`. - - - See [Country](entity:Country) for possible values. - - See [Country](#type-country) for possible values - language_code: - type: optional> - docs: >- - The language associated with the location, in - - [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). - - For more information, see [Language - Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences). - validation: - minLength: 2 - maxLength: 5 - currency: - type: optional - docs: >- - The currency used for all transactions at this location, - - in ISO 4217 format. For example, the currency code for US dollars is - `USD`. - - See [Currency](entity:Currency) for possible values. - - See [Currency](#type-currency) for possible values - phone_number: - type: optional> - docs: The phone number of the location. For example, `+1 855-700-6000`. - validation: - maxLength: 17 - business_name: - type: optional> - docs: >- - The name of the location's overall business. This name is present on - receipts and other customer-facing branding, and can be changed no - more than three times in a twelve-month period. - validation: - maxLength: 255 - type: - type: optional - docs: |- - The type of the location. - See [LocationType](#type-locationtype) for possible values - website_url: - type: optional> - docs: The website URL of the location. For example, `https://squareup.com`. - validation: - maxLength: 255 - business_hours: - type: optional - docs: The hours of operation for the location. - business_email: - type: optional> - docs: >- - The email address of the location. This can be unique to the location - and is not always the email address for the business owner or - administrator. - validation: - maxLength: 255 - description: - type: optional> - docs: The description of the location. For example, `Main Street location`. - validation: - maxLength: 1024 - twitter_username: - type: optional> - docs: >- - The Twitter username of the location without the '@' symbol. For - example, `Square`. - validation: - minLength: 1 - maxLength: 15 - instagram_username: - type: optional> - docs: >- - The Instagram username of the location without the '@' symbol. For - example, `square`. - validation: - minLength: 1 - maxLength: 30 - facebook_url: - type: optional> - docs: >- - The Facebook profile URL of the location. The URL should begin with - 'facebook.com/'. For example, `https://www.facebook.com/square`. - validation: - maxLength: 255 - coordinates: - type: optional - docs: The physical coordinates (latitude and longitude) of the location. - logo_url: - type: optional - docs: >- - The URL of the logo image for the location. When configured in the - Seller - - Dashboard (Receipts section), the logo appears on transactions (such - as receipts and invoices) that Square generates on behalf of the - seller. - - This image should have a roughly square (1:1) aspect ratio and should - be at least 200x200 pixels. - validation: - maxLength: 255 - access: read-only - pos_background_url: - type: optional - docs: The URL of the Point of Sale background image for the location. - validation: - maxLength: 255 - access: read-only - mcc: - type: optional> - docs: >- - A four-digit number that describes the kind of goods or services sold - at the location. - - The [merchant category code - (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) - of the location as standardized by ISO 18245. - - For example, `5045`, for a location that sells computer goods and - software. - validation: - minLength: 4 - maxLength: 4 - full_format_logo_url: - type: optional - docs: >- - The URL of a full-format logo image for the location. When configured - in the Seller - - Dashboard (Receipts section), the logo appears on transactions (such - as receipts and invoices) that Square generates on behalf of the - seller. - - This image can be wider than it is tall and should be at least - 1280x648 pixels. - access: read-only - tax_ids: - type: optional - docs: The tax IDs for this location. - source: - openapi: ../default/openapi/openapi.json - LocationBookingProfile: - docs: >- - The booking profile of a seller's location, including the location's ID - and whether the location is enabled for online booking. - properties: - location_id: - type: optional> - docs: The ID of the [location](entity:Location). - booking_site_url: - type: optional> - docs: Url for the online booking site for this location. - online_booking_enabled: - type: optional> - docs: Indicates whether the location is enabled for online booking. - source: - openapi: ../default/openapi/openapi.json - LocationCapability: - enum: - - CREDIT_CARD_PROCESSING - - AUTOMATIC_TRANSFERS - - UNLINKED_REFUNDS - docs: The capabilities a location might have. - source: - openapi: ../default/openapi/openapi.json - LocationCreatedEvent: - docs: Published when a [Location](entity:Location) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the [Location](entity:Location) associated with the event. - type: - type: optional> - docs: The type of event this represents, `"location.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LocationCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"location"`. - id: - type: optional - docs: ID of the updated [Location](entity:Location). - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionOwnedCreatedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - is created by the subscribing application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.owned.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionOwnedDeletedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is deleted. A custom attribute - definition can only be deleted by - - the application that created it. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionOwnedUpdatedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - created by the subscribing application is updated. A custom attribute - definition can only be updated - - by the application that created it. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionVisibleCreatedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is created. A notification - is sent when your application - - creates a custom attribute definition or another application creates a - custom attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.visible.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionVisibleDeletedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is deleted. A custom - attribute definition can only - - be deleted by the application that created it. A notification is sent when - your application deletes - - a custom attribute definition or when another application deletes a custom - attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeDefinitionVisibleUpdatedEvent: - docs: >- - Published when a location [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is updated. A custom - attribute definition can only be updated - - by the application that created it. A notification is sent when your - application updates a custom attribute - - definition or when another application updates a custom attribute - definition whose `visibility` is - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute_definition.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeOwnedDeletedEvent: - docs: >- - Published when a location [custom attribute](entity:CustomAttribute) - - owned by the subscribing application is deleted. Custom attributes are - owned by the - - application that created the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). - - Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can - be deleted by any application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeOwnedUpdatedEvent: - docs: >- - Published when a location [custom attribute](entity:CustomAttribute) owned - by the - - subscribing application is created or updated. Custom attributes are owned - by the application that created - - the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). Custom attributes whose - - `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated - by any application. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeVisibleDeletedEvent: - docs: >- - Published when a location [custom attribute](entity:CustomAttribute) that - is visible to the - - subscribing application is deleted. A notification is sent when: - - - Your application deletes a custom attribute owned by your application, - regardless of the `visibility` setting. - - - Any application deletes a custom attribute whose `visibility` is - `VISIBILITY_READ_ONLY` - - or `VISIBILITY_READ_WRITE_VALUES`. - - - Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by - any application, but those set to - - `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the - owner. Custom attributes are owned - - by the application that created the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationCustomAttributeVisibleUpdatedEvent: - docs: >- - Published when a location [custom attribute](entity:CustomAttribute) that - is visible - - to the subscribing application is created or updated. A notification is - sent when: - - - Your application creates or updates a custom attribute owned by your - application, regardless of the `visibility` setting. - - - Any application creates or updates a custom attribute whose `visibility` - is `VISIBILITY_READ_ONLY` - - or `VISIBILITY_READ_WRITE_VALUES`. - - - Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or - updated by any application, but those set to - - `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or - updated by the owner. Custom attributes are owned - - by the application that created the corresponding [custom attribute - definition](entity:CustomAttributeDefinition). - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"location.custom_attribute.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - LocationSettingsUpdatedEvent: - docs: Published when online checkout location settings are updated - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: >- - The type of event this represents, - `"online_checkout.location_settings.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LocationSettingsUpdatedEventData: - properties: - type: - type: optional> - docs: >- - Name of the updated object’s type, - `"online_checkout.location_settings"`. - id: - type: optional - docs: ID of the updated location settings. - object: - type: optional - docs: An object containing the updated location settings. - source: - openapi: ../default/openapi/openapi.json - LocationSettingsUpdatedEventObject: - properties: - location_settings: - type: optional - docs: The updated location settings. - source: - openapi: ../default/openapi/openapi.json - LocationStatus: - enum: - - ACTIVE - - INACTIVE - docs: A location's status. - source: - openapi: ../default/openapi/openapi.json - LocationType: - enum: - - PHYSICAL - - MOBILE - docs: A location's type. - source: - openapi: ../default/openapi/openapi.json - LocationUpdatedEvent: - docs: Published when a [Location](entity:Location) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the [Location](entity:Location) associated with the event. - type: - type: optional> - docs: The type of event this represents, `"location.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LocationUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"location"`. - id: - type: optional - docs: ID of the updated [Location](entity:Location). - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccount: - docs: >- - Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). - For more information, see - - [Create and Retrieve Loyalty - Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts). - properties: - id: - type: optional - docs: The Square-assigned ID of the loyalty account. - validation: - maxLength: 36 - access: read-only - program_id: - type: string - docs: >- - The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) - to which the account belongs. - validation: - minLength: 1 - maxLength: 36 - balance: - type: optional - docs: >- - The available point balance in the loyalty account. If points are - scheduled to expire, they are listed in the `expiring_point_deadlines` - field. - - - Your application should be able to handle loyalty accounts that have a - negative point balance (`balance` is less than 0). This might occur if - a seller makes a manual adjustment or as a result of a refund or - exchange. - access: read-only - lifetime_points: - type: optional - docs: The total points accrued during the lifetime of the account. - access: read-only - customer_id: - type: optional> - docs: >- - The Square-assigned ID of the [customer](entity:Customer) that is - associated with the account. - enrolled_at: - type: optional> - docs: >- - The timestamp when the buyer joined the loyalty program, in RFC 3339 - format. This field is used to display the **Enrolled On** or **Member - Since** date in first-party Square products. - - - If this field is not set in a `CreateLoyaltyAccount` request, Square - populates it after the buyer's first action on their account - - (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). - In first-party flows, Square populates the field when the buyer agrees - to the terms of service on Square Point of Sale. - - - If this field is set in a `CreateLoyaltyAccount` request, it is meant - to be used when there is a loyalty migration from another system and - into Square. - - In that case, the timestamp can reflect when the buyer originally - enrolled in the previous system. It may represent a current or past - date, but cannot be set in the future. - - Note: Setting this field in this scenario does not, by itself, impact - the first-party enrollment flow on Square Point of Sale. - created_at: - type: optional - docs: >- - The timestamp when the loyalty account was created, in RFC 3339 - format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the loyalty account was last updated, in RFC 3339 - format. - access: read-only - mapping: - type: optional - docs: >- - The mapping that associates the loyalty account with a buyer. - Currently, - - a loyalty account can only be mapped to a buyer by phone number. - - - To create a loyalty account, you must specify the `mapping` field, - with the buyer's phone number - - in the `phone_number` field. - expiring_point_deadlines: - type: optional>> - docs: >- - The schedule for when points expire in the loyalty account balance. - This field is present only if the account has points that are - scheduled to expire. - - - The total number of points in this field equals the number of points - in the `balance` field. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountCreatedEvent: - docs: Published when a [loyalty account](entity:LoyaltyAccount) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.account.created`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountCreatedEventData: - docs: The data associated with a `loyalty.account.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_account`. - id: - type: optional - docs: The ID of the affected loyalty account. - object: - type: optional - docs: An object that contains the new loyalty account. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountCreatedEventObject: - properties: - loyalty_account: - type: optional - docs: The loyalty account that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountDeletedEvent: - docs: Published when a [loyalty account](entity:LoyaltyAccount) is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.account.deleted`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountDeletedEventData: - docs: The data associated with a `loyalty.account.deleted` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_account`. - id: - type: optional - docs: The ID of the affected loyalty account. - object: - type: optional - docs: An object that contains the loyalty account that was deleted. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountDeletedEventObject: - properties: - loyalty_account: - type: optional - docs: The loyalty account that was deleted. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountExpiringPointDeadline: - docs: >- - Represents a set of points for a loyalty account that are scheduled to - expire on a specific date. - properties: - points: - type: integer - docs: >- - The number of points scheduled to expire at the `expires_at` - timestamp. - expires_at: - type: string - docs: >- - The timestamp of when the points are scheduled to expire, in RFC 3339 - format. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountMapping: - docs: >- - Represents the mapping that associates a loyalty account with a buyer. - - - Currently, a loyalty account can only be mapped to a buyer by phone - number. For more information, see - - [Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview). - properties: - id: - type: optional - docs: The Square-assigned ID of the mapping. - validation: - maxLength: 36 - access: read-only - created_at: - type: optional - docs: The timestamp when the mapping was created, in RFC 3339 format. - access: read-only - phone_number: - type: optional> - docs: >- - The phone number of the buyer, in E.164 format. For example, - "+14155551111". - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountMappingType: - type: literal<"PHONE"> - docs: The type of mapping. - LoyaltyAccountUpdatedEvent: - docs: Published when a [loyalty account](entity:LoyaltyAccount) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.account.updated`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountUpdatedEventData: - docs: The data associated with a `loyalty.account.updated` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_account`. - id: - type: optional - docs: The ID of the affected loyalty account. - object: - type: optional - docs: An object that contains the loyalty account that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyAccountUpdatedEventObject: - properties: - loyalty_account: - type: optional - docs: The loyalty account that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEvent: - docs: >- - Provides information about a loyalty event. - - For more information, see [Search for Balance-Changing Loyalty - Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). - properties: - id: - type: optional - docs: The Square-assigned ID of the loyalty event. - validation: - minLength: 1 - access: read-only - type: - type: LoyaltyEventType - docs: |- - The type of the loyalty event. - See [LoyaltyEventType](#type-loyaltyeventtype) for possible values - created_at: - type: optional - docs: The timestamp when the event was created, in RFC 3339 format. - validation: - minLength: 1 - access: read-only - accumulate_points: - type: optional - docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. - create_reward: - type: optional - docs: Provides metadata when the event `type` is `CREATE_REWARD`. - redeem_reward: - type: optional - docs: Provides metadata when the event `type` is `REDEEM_REWARD`. - delete_reward: - type: optional - docs: Provides metadata when the event `type` is `DELETE_REWARD`. - adjust_points: - type: optional - docs: Provides metadata when the event `type` is `ADJUST_POINTS`. - loyalty_account_id: - type: optional - docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) associated with - the event. - validation: - minLength: 1 - maxLength: 36 - access: read-only - location_id: - type: optional - docs: The ID of the [location](entity:Location) where the event occurred. - access: read-only - source: - type: LoyaltyEventSource - docs: |- - Defines whether the event was generated by the Square Point of Sale. - See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values - expire_points: - type: optional - docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. - other_event: - type: optional - docs: Provides metadata when the event `type` is `OTHER`. - accumulate_promotion_points: - type: optional - docs: >- - Provides metadata when the event `type` is - `ACCUMULATE_PROMOTION_POINTS`. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventAccumulatePoints: - docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. - properties: - loyalty_program_id: - type: optional - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - points: - type: optional> - docs: The number of points accumulated by the event. - validation: - min: 1 - order_id: - type: optional> - docs: >- - The ID of the [order](entity:Order) for which the buyer accumulated - the points. - - This field is returned only if the Orders API is used to process - orders. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventAccumulatePromotionPoints: - docs: Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. - properties: - loyalty_program_id: - type: optional - docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - loyalty_promotion_id: - type: optional - docs: >- - The Square-assigned ID of the [loyalty - promotion](entity:LoyaltyPromotion). - validation: - minLength: 1 - maxLength: 255 - access: read-only - points: - type: optional - docs: The number of points earned by the event. - access: read-only - order_id: - type: optional - docs: >- - The ID of the [order](entity:Order) for which the buyer earned the - promotion points. - - Only applications that use the Orders API to process orders can - trigger this event. - validation: - minLength: 1 - access: read-only - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventAdjustPoints: - docs: Provides metadata when the event `type` is `ADJUST_POINTS`. - properties: - loyalty_program_id: - type: optional - docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points added or removed. - reason: - type: optional> - docs: The reason for the adjustment of points. - validation: - maxLength: 3500 - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventCreateReward: - docs: Provides metadata when the event `type` is `CREATE_REWARD`. - properties: - loyalty_program_id: - type: optional - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional - docs: >- - The Square-assigned ID of the created [loyalty - reward](entity:LoyaltyReward). - - This field is returned only if the event source is `LOYALTY_API`. - validation: - maxLength: 36 - access: read-only - points: - type: optional - docs: The loyalty points used to create the reward. - access: read-only - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventCreatedEvent: - docs: Published when a [loyalty event](entity:LoyaltyEvent) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.event.created`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventCreatedEventData: - docs: The data associated with a `loyalty.event.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_event`. - id: - type: optional - docs: ID of the affected loyalty event. - object: - type: optional - docs: An object that contains the new loyalty event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventCreatedEventObject: - properties: - loyalty_event: - type: optional - docs: The loyalty event that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventDateTimeFilter: - docs: Filter events by date time range. - properties: - created_at: - type: TimeRange - docs: The `created_at` date time range used to filter the result. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventDeleteReward: - docs: Provides metadata when the event `type` is `DELETE_REWARD`. - properties: - loyalty_program_id: - type: optional - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional - docs: |- - The ID of the deleted [loyalty reward](entity:LoyaltyReward). - This field is returned only if the event source is `LOYALTY_API`. - validation: - maxLength: 36 - access: read-only - points: - type: optional - docs: The number of points returned to the loyalty account. - access: read-only - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventExpirePoints: - docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. - properties: - loyalty_program_id: - type: optional - docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points expired. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventFilter: - docs: |- - The filtering criteria. If the request specifies multiple filters, - the endpoint uses a logical AND to evaluate them. - properties: - loyalty_account_filter: - type: optional - docs: Filter events by loyalty account. - type_filter: - type: optional - docs: Filter events by event type. - date_time_filter: - type: optional - docs: |- - Filter events by date time range. - For each range, the start time is inclusive and the end time - is exclusive. - location_filter: - type: optional - docs: Filter events by location. - order_filter: - type: optional - docs: Filter events by the order associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventLocationFilter: - docs: Filter events by location. - properties: - location_ids: - docs: |- - The [location](entity:Location) IDs for loyalty events to query. - If multiple values are specified, the endpoint uses - a logical OR to combine them. - type: list - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventLoyaltyAccountFilter: - docs: Filter events by loyalty account. - properties: - loyalty_account_id: - type: string - docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) associated with - loyalty events. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventOrderFilter: - docs: Filter events by the order associated with the event. - properties: - order_id: - type: string - docs: The ID of the [order](entity:Order) associated with the event. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventOther: - docs: Provides metadata when the event `type` is `OTHER`. - properties: - loyalty_program_id: - type: optional - docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points added or removed. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventQuery: - docs: Represents a query used to search for loyalty events. - properties: - filter: - type: optional - docs: The query filter criteria. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventRedeemReward: - docs: Provides metadata when the event `type` is `REDEEM_REWARD`. - properties: - loyalty_program_id: - type: optional - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional - docs: |- - The ID of the redeemed [loyalty reward](entity:LoyaltyReward). - This field is returned only if the event source is `LOYALTY_API`. - validation: - maxLength: 36 - access: read-only - order_id: - type: optional - docs: >- - The ID of the [order](entity:Order) that redeemed the reward. - - This field is returned only if the Orders API is used to process - orders. - access: read-only - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventSource: - enum: - - SQUARE - - LOYALTY_API - docs: Defines whether the event was generated by the Square Point of Sale. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventType: - enum: - - ACCUMULATE_POINTS - - CREATE_REWARD - - REDEEM_REWARD - - DELETE_REWARD - - ADJUST_POINTS - - EXPIRE_POINTS - - OTHER - - ACCUMULATE_PROMOTION_POINTS - docs: The type of the loyalty event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyEventTypeFilter: - docs: Filter events by event type. - properties: - types: - docs: |- - 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 - type: list - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgram: - docs: >- - Represents a Square loyalty program. Loyalty programs define how buyers - can earn points and redeem points for rewards. - - Square sellers can have only one loyalty program, which is created and - managed from the Seller Dashboard. - - For more information, see [Loyalty Program - Overview](https://developer.squareup.com/docs/loyalty/overview). - properties: - id: - type: optional - docs: |- - The Square-assigned ID of the loyalty program. Updates to - the loyalty program do not modify the identifier. - validation: - maxLength: 36 - access: read-only - status: - type: optional - docs: >- - Whether the program is currently active. - - See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible - values - reward_tiers: - type: optional>> - docs: The list of rewards for buyers, sorted by ascending points. - expiration_policy: - type: optional - docs: If present, details for how points expire. - terminology: - type: optional - docs: A cosmetic name for the “points” currency. - location_ids: - type: optional>> - docs: The [locations](entity:Location) at which the program is active. - created_at: - type: optional - docs: The timestamp when the program was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the reward was last updated, in RFC 3339 format. - access: read-only - accrual_rules: - type: optional>> - docs: >- - Defines how buyers can earn loyalty points from the base loyalty - program. - - To check for associated [loyalty promotions](entity:LoyaltyPromotion) - that enable - - buyers to earn extra points, call - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRule: - docs: >- - Represents an accrual rule, which defines how buyers can earn points from - the base [loyalty program](entity:LoyaltyProgram). - properties: - accrual_type: - type: LoyaltyProgramAccrualRuleType - docs: >- - The type of the accrual rule that defines how buyers can earn points. - - See - [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) - for possible values - points: - type: optional> - docs: |- - The number of points that - buyers earn based on the `accrual_type`. - validation: - min: 1 - visit_data: - type: optional - docs: Additional data for rules with the `VISIT` accrual type. - spend_data: - type: optional - docs: Additional data for rules with the `SPEND` accrual type. - item_variation_data: - type: optional - docs: Additional data for rules with the `ITEM_VARIATION` accrual type. - category_data: - type: optional - docs: Additional data for rules with the `CATEGORY` accrual type. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleCategoryData: - docs: Represents additional data for rules with the `CATEGORY` accrual type. - properties: - category_id: - type: string - docs: >- - The ID of the `CATEGORY` [catalog object](entity:CatalogObject) that - buyers can purchase to earn - - points. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleItemVariationData: - docs: >- - Represents additional data for rules with the `ITEM_VARIATION` accrual - type. - properties: - item_variation_id: - type: string - docs: >- - The ID of the `ITEM_VARIATION` [catalog object](entity:CatalogObject) - that buyers can purchase to earn - - points. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleSpendData: - docs: Represents additional data for rules with the `SPEND` accrual type. - properties: - amount_money: - type: Money - docs: >- - The amount that buyers must spend to earn points. - - For example, given an "Earn 1 point for every $10 spent" accrual rule, - a buyer who spends $105 earns 10 points. - excluded_category_ids: - type: optional>> - docs: >- - The IDs of any `CATEGORY` catalog objects that are excluded from - points accrual. - - - You can use the - [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) - - endpoint to retrieve information about the excluded categories. - excluded_item_variation_ids: - type: optional>> - docs: >- - The IDs of any `ITEM_VARIATION` catalog objects that are excluded from - points accrual. - - - You can use the - [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) - - endpoint to retrieve information about the excluded item variations. - tax_mode: - type: LoyaltyProgramAccrualRuleTaxMode - docs: >- - Indicates how taxes should be treated when calculating the purchase - amount used for points accrual. - - See - [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) - for possible values - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleTaxMode: - enum: - - BEFORE_TAX - - AFTER_TAX - docs: >- - Indicates how taxes should be treated when calculating the purchase amount - used for loyalty points accrual. - - This setting applies only to `SPEND` accrual rules or `VISIT` accrual - rules that have a minimum spend requirement. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleType: - enum: - - VISIT - - SPEND - - ITEM_VARIATION - - CATEGORY - docs: The type of the accrual rule that defines how buyers can earn points. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramAccrualRuleVisitData: - docs: Represents additional data for rules with the `VISIT` accrual type. - properties: - minimum_amount_money: - type: optional - docs: The minimum purchase required during the visit to quality for points. - tax_mode: - type: LoyaltyProgramAccrualRuleTaxMode - docs: >- - Indicates how taxes should be treated when calculating the purchase - amount to determine whether the visit qualifies for points. - - This setting applies only if `minimum_amount_money` is specified. - - See - [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) - for possible values - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramCreatedEvent: - docs: Published when a [loyalty program](entity:LoyaltyProgram) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.program.created`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramCreatedEventData: - docs: The data associated with a `loyalty.program.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_program`. - id: - type: optional - docs: The ID of the created loyalty program. - object: - type: optional - docs: An object that contains the loyalty program that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramCreatedEventObject: - docs: >- - An object that contains the loyalty program associated with a - `loyalty.program.created` event. - properties: - loyalty_program: - type: optional - docs: The loyalty program that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramExpirationPolicy: - docs: Describes when the loyalty program expires. - properties: - expiration_duration: - type: string - docs: >- - The number of months before points expire, in `P[n]M` RFC 3339 - duration format. For example, a value of `P12M` represents a duration - of 12 months. - - Points are valid through the last day of the month in which they are - scheduled to expire. For example, with a `P12M` duration, points - earned on July 6, 2020 expire on August 1, 2021. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramRewardTier: - docs: >- - Represents a reward tier in a loyalty program. A reward tier defines how - buyers can redeem points for a reward, such as the number of points - required and the value and scope of the discount. A loyalty program can - offer multiple reward tiers. - properties: - id: - type: optional - docs: The Square-assigned ID of the reward tier. - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The points exchanged for the reward tier. - validation: - min: 1 - name: - type: optional - docs: The name of the reward tier. - access: read-only - created_at: - type: optional - docs: The timestamp when the reward tier was created, in RFC 3339 format. - access: read-only - pricing_rule_reference: - type: CatalogObjectReference - docs: >- - A reference to the specific version of a `PRICING_RULE` catalog object - that contains information about the reward tier discount. - - - Use `object_id` and `catalog_version` with the - [RetrieveCatalogObject](api-endpoint:Catalog-RetrieveCatalogObject) - endpoint - - to get discount details. Make sure to set `include_related_objects` to - true in the request to retrieve all catalog objects - - that define the discount. For more information, see [Getting discount - details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramStatus: - enum: - - INACTIVE - - ACTIVE - docs: Indicates whether the program is currently active. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramTerminology: - docs: Represents the naming used for loyalty points. - properties: - one: - type: string - docs: A singular unit for a point (for example, 1 point is called 1 star). - validation: - minLength: 1 - other: - type: string - docs: A plural unit for point (for example, 10 points is called 10 stars). - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramUpdatedEvent: - docs: Published when a [loyalty program](entity:LoyaltyProgram) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.program.updated`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramUpdatedEventData: - docs: The data associated with a `loyalty.program.updated` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_program`. - id: - type: optional - docs: The ID of the affected loyalty program. - object: - type: optional - docs: An object that contains the loyalty program that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyProgramUpdatedEventObject: - docs: >- - An object that contains the loyalty program associated with a - `loyalty.program.updated` event. - properties: - loyalty_program: - type: optional - docs: The loyalty program that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotion: - docs: >- - Represents a promotion for a [loyalty program](entity:LoyaltyProgram). - Loyalty promotions enable buyers - - to earn extra points on top of those earned from the base program. - - - A loyalty program can have a maximum of 10 loyalty promotions with an - `ACTIVE` or `SCHEDULED` status. - properties: - id: - type: optional - docs: The Square-assigned ID of the promotion. - validation: - minLength: 1 - maxLength: 255 - access: read-only - name: - type: string - docs: The name of the promotion. - validation: - minLength: 1 - maxLength: 70 - incentive: - type: LoyaltyPromotionIncentive - docs: >- - The points incentive for the promotion. This field defines whether - promotion points - - are earned by multiplying base program points or by adding a specified - number of points. - available_time: - type: LoyaltyPromotionAvailableTimeData - docs: >- - The scheduling information that defines when purchases can qualify to - earn points from an `ACTIVE` promotion. - trigger_limit: - type: optional - docs: >- - The number of times a buyer can earn promotion points during a - specified interval. - - If not specified, buyers can trigger the promotion an unlimited number - of times. - status: - type: optional - docs: >- - The current status of the promotion. - - See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for - possible values - created_at: - type: optional - docs: The timestamp of when the promotion was created, in RFC 3339 format. - access: read-only - canceled_at: - type: optional - docs: The timestamp of when the promotion was canceled, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the promotion was last updated, in RFC 3339 format. - access: read-only - loyalty_program_id: - type: optional - docs: >- - The ID of the [loyalty program](entity:LoyaltyProgram) associated with - the promotion. - access: read-only - minimum_spend_amount_money: - type: optional - docs: >- - The minimum purchase amount required to earn promotion points. If - specified, this amount is positive. - qualifying_item_variation_ids: - type: optional>> - docs: >- - The IDs of any qualifying `ITEM_VARIATION` [catalog - objects](entity:CatalogObject). If specified, - - the purchase must include at least one of these items to qualify for - the promotion. - - - This option is valid only if the base loyalty program uses a `VISIT` - or `SPEND` accrual rule. - - With `SPEND` accrual rules, make sure that qualifying promotional - items are not excluded. - - - You can specify `qualifying_item_variation_ids` or - `qualifying_category_ids` for a given promotion, but not both. - qualifying_category_ids: - type: optional>> - docs: >- - The IDs of any qualifying `CATEGORY` [catalog - objects](entity:CatalogObject). If specified, - - the purchase must include at least one item from one of these - categories to qualify for the promotion. - - - This option is valid only if the base loyalty program uses a `VISIT` - or `SPEND` accrual rule. - - With `SPEND` accrual rules, make sure that qualifying promotional - items are not excluded. - - - You can specify `qualifying_category_ids` or - `qualifying_item_variation_ids` for a promotion, but not both. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionAvailableTimeData: - docs: >- - Represents scheduling information that determines when purchases can - qualify to earn points - - from a [loyalty promotion](entity:LoyaltyPromotion). - properties: - start_date: - type: optional - docs: >- - The date that the promotion starts, in `YYYY-MM-DD` format. Square - populates this field - - based on the provided `time_periods`. - access: read-only - end_date: - type: optional - docs: >- - The date that the promotion ends, in `YYYY-MM-DD` format. Square - populates this field - - based on the provided `time_periods`. If an end date is not specified, - an `ACTIVE` promotion - - remains available until it is canceled. - access: read-only - time_periods: - docs: >- - A list of [iCalendar (RFC 5545) - events](https://tools.ietf.org/html/rfc5545#section-3.6.1) - - (`VEVENT`). Each event represents an available time period per day or - days of the week. - - A day can have a maximum of one available time period. - - - Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and - `DURATION` are required and - - timestamps must be in local (unzoned) time format. Include `RRULE` to - specify recurring promotions, - - an end date (using the `UNTIL` keyword), or both. For more - information, see - - [Available - time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time). - - - Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a - `CreateLoyaltyPromotion` request - - but are always included in the response. - type: list - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionCreatedEvent: - docs: Published when a [loyalty promotion](entity:LoyaltyPromotion) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.promotion.created`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionCreatedEventData: - docs: The data associated with a `loyalty.promotion.created` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_promotion`. - id: - type: optional - docs: The ID of the affected loyalty promotion. - object: - type: optional - docs: An object that contains the loyalty promotion that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionCreatedEventObject: - docs: >- - An object that contains the loyalty promotion associated with a - `loyalty.promotion.created` event. - properties: - loyalty_promotion: - type: optional - docs: The loyalty promotion that was created. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionIncentive: - docs: >- - Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) - are calculated, - - either by multiplying the points earned from the base program or by adding - a specified number - - of points to the points earned from the base program. - properties: - type: - type: LoyaltyPromotionIncentiveType - docs: >- - The type of points incentive. - - See - [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) - for possible values - points_multiplier_data: - type: optional - docs: Additional data for a `POINTS_MULTIPLIER` incentive type. - points_addition_data: - type: optional - docs: Additional data for a `POINTS_ADDITION` incentive type. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionIncentivePointsAdditionData: - docs: >- - Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion - incentive](entity:LoyaltyPromotionIncentive). - properties: - points_addition: - type: integer - docs: >- - The number of additional points to earn each time the promotion is - triggered. For example, - - suppose a purchase qualifies for 5 points from the base loyalty - program. If the purchase also - - qualifies for a `POINTS_ADDITION` promotion incentive with a - `points_addition` of 3, the buyer - - earns a total of 8 points (5 program points + 3 promotion points = 8 - points). - validation: - min: 1 - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionIncentivePointsMultiplierData: - docs: >- - Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty - promotion incentive](entity:LoyaltyPromotionIncentive). - properties: - points_multiplier: - type: optional> - docs: >- - The multiplier used to calculate the number of points earned each time - the promotion - - is triggered. For example, suppose a purchase qualifies for 5 points - from the base loyalty program. - - If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion - incentive with a `points_multiplier` - - of 3, the buyer earns a total of 15 points (5 program points x 3 - promotion multiplier = 15 points). - - - DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. - - - One of the following is required when specifying a points multiplier: - - - (Recommended) The `multiplier` field. - - - This deprecated `points_multiplier` field. If provided in the - request, Square also returns `multiplier` - - with the equivalent value. - validation: - min: 2 - max: 10 - multiplier: - type: optional> - docs: >- - The multiplier used to calculate the number of points earned each time - the promotion is triggered, - - specified as a string representation of a decimal. Square supports - multipliers up to 10x, with three - - point precision for decimal multipliers. For example, suppose a - purchase qualifies for 4 points from the - - base loyalty program. If the purchase also qualifies for a - `POINTS_MULTIPLIER` promotion incentive with a - - `multiplier` of "1.5", the buyer earns a total of 6 points (4 program - points x 1.5 promotion multiplier = 6 points). - - Fractional points are dropped. - - - One of the following is required when specifying a points multiplier: - - - (Recommended) This `multiplier` field. - - - The deprecated `points_multiplier` field. If provided in the - request, Square also returns `multiplier` - - with the equivalent value. - validation: - maxLength: 5 - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionIncentiveType: - enum: - - POINTS_MULTIPLIER - - POINTS_ADDITION - docs: >- - Indicates the type of points incentive for a [loyalty - promotion](entity:LoyaltyPromotion), - - which is used to determine how buyers can earn points from the promotion. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionStatus: - enum: - - ACTIVE - - ENDED - - CANCELED - - SCHEDULED - docs: Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion). - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionTriggerLimit: - docs: >- - Represents the number of times a buyer can earn points during a [loyalty - promotion](entity:LoyaltyPromotion). - - If this field is not set, buyers can trigger the promotion an unlimited - number of times to earn points during - - the time that the promotion is available. - - - A purchase that is disqualified from earning points because of this limit - might qualify for another active promotion. - properties: - times: - type: integer - docs: >- - The maximum number of times a buyer can trigger the promotion during - the specified `interval`. - validation: - min: 1 - max: 30 - interval: - type: optional - docs: >- - The time period the limit applies to. - - See - [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) - for possible values - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionTriggerLimitInterval: - enum: - - ALL_TIME - - DAY - docs: >- - Indicates the time period that the [trigger - limit](entity:LoyaltyPromotionTriggerLimit) applies to, - - which is used to determine the number of times a buyer can earn points for - a [loyalty promotion](entity:LoyaltyPromotion). - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionUpdatedEvent: - docs: >- - Published when a [loyalty promotion](entity:LoyaltyPromotion) is updated. - This event is - - invoked only when a loyalty promotion is canceled. - properties: - merchant_id: - type: optional> - docs: The ID of the Square seller associated with the event. - type: - type: optional> - docs: >- - The type of event. For this event, the value is - `loyalty.promotion.updated`. - event_id: - type: optional> - docs: >- - The unique ID for the event, which is used for - - [idempotency - support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionUpdatedEventData: - docs: The data associated with a `loyalty.promotion.updated` event. - properties: - type: - type: optional> - docs: >- - The type of object affected by the event. For this event, the value is - `loyalty_promotion`. - id: - type: optional - docs: The ID of the affected loyalty promotion. - object: - type: optional - docs: An object that contains the loyalty promotion that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyPromotionUpdatedEventObject: - docs: >- - An object that contains the loyalty promotion associated with a - `loyalty.promotion.updated` event. - properties: - loyalty_promotion: - type: optional - docs: The loyalty promotion that was updated. - source: - openapi: ../default/openapi/openapi.json - LoyaltyReward: - docs: >- - Represents a contract to redeem loyalty points for a [reward - tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in - an ISSUED, REDEEMED, or DELETED state. - - For more information, see [Manage loyalty - rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards). - properties: - id: - type: optional - docs: The Square-assigned ID of the loyalty reward. - validation: - maxLength: 36 - access: read-only - status: - type: optional - docs: >- - The status of a loyalty reward. - - See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible - values - loyalty_account_id: - type: string - docs: >- - The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) - to which the reward belongs. - validation: - minLength: 1 - maxLength: 36 - reward_tier_id: - type: string - docs: >- - The Square-assigned ID of the [reward - tier](entity:LoyaltyProgramRewardTier) used to create the reward. - validation: - minLength: 1 - maxLength: 36 - points: - type: optional - docs: The number of loyalty points used for the reward. - validation: - min: 1 - access: read-only - order_id: - type: optional> - docs: >- - The Square-assigned ID of the [order](entity:Order) to which the - reward is attached. - created_at: - type: optional - docs: The timestamp when the reward was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the reward was last updated, in RFC 3339 format. - access: read-only - redeemed_at: - type: optional - docs: The timestamp when the reward was redeemed, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - LoyaltyRewardStatus: - enum: - - ISSUED - - REDEEMED - - DELETED - docs: The status of the loyalty reward. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnit: - docs: >- - Represents a unit of measurement to use with a quantity, such as ounces - - or inches. Exactly one of the following fields are required: - `custom_unit`, - - `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. - properties: - custom_unit: - type: optional - docs: >- - A custom unit of measurement defined by the seller using the Point of - Sale - - app or ad-hoc as an order line item. - area_unit: - type: optional - docs: >- - Represents a standard area unit. - - See [MeasurementUnitArea](#type-measurementunitarea) for possible - values - length_unit: - type: optional - docs: >- - Represents a standard length unit. - - See [MeasurementUnitLength](#type-measurementunitlength) for possible - values - volume_unit: - type: optional - docs: >- - Represents a standard volume unit. - - See [MeasurementUnitVolume](#type-measurementunitvolume) for possible - values - weight_unit: - type: optional - docs: >- - Represents a standard unit of weight or mass. - - See [MeasurementUnitWeight](#type-measurementunitweight) for possible - values - generic_unit: - type: optional - docs: >- - Reserved for API integrations that lack the ability to specify a real - measurement unit - - See [MeasurementUnitGeneric](#type-measurementunitgeneric) for - possible values - time_unit: - type: optional - docs: >- - Represents a standard unit of time. - - See [MeasurementUnitTime](#type-measurementunittime) for possible - values - type: - type: optional - docs: >- - Represents the type of the measurement unit. - - See [MeasurementUnitUnitType](#type-measurementunitunittype) for - possible values - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitArea: - enum: - - IMPERIAL_ACRE - - IMPERIAL_SQUARE_INCH - - IMPERIAL_SQUARE_FOOT - - IMPERIAL_SQUARE_YARD - - IMPERIAL_SQUARE_MILE - - METRIC_SQUARE_CENTIMETER - - METRIC_SQUARE_METER - - METRIC_SQUARE_KILOMETER - docs: Unit of area used to measure a quantity. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitCustom: - docs: The information needed to define a custom unit, provided by the seller. - properties: - name: - type: string - docs: The name of the custom unit, for example "bushel". - abbreviation: - type: string - docs: >- - The abbreviation of the custom unit, such as "bsh" (bushel). This - appears - - in the cart for the Point of Sale app, and in reports. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitGeneric: literal<"UNIT"> - MeasurementUnitLength: - enum: - - IMPERIAL_INCH - - IMPERIAL_FOOT - - IMPERIAL_YARD - - IMPERIAL_MILE - - METRIC_MILLIMETER - - METRIC_CENTIMETER - - METRIC_METER - - METRIC_KILOMETER - docs: The unit of length used to measure a quantity. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitTime: - enum: - - GENERIC_MILLISECOND - - GENERIC_SECOND - - GENERIC_MINUTE - - GENERIC_HOUR - - GENERIC_DAY - docs: Unit of time used to measure a quantity (a duration). - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitUnitType: - enum: - - TYPE_CUSTOM - - TYPE_AREA - - TYPE_LENGTH - - TYPE_VOLUME - - TYPE_WEIGHT - - TYPE_GENERIC - docs: >- - Describes the type of this unit and indicates which field contains the - unit information. This is an ‘open’ enum. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitVolume: - enum: - - GENERIC_FLUID_OUNCE - - GENERIC_SHOT - - GENERIC_CUP - - GENERIC_PINT - - GENERIC_QUART - - GENERIC_GALLON - - IMPERIAL_CUBIC_INCH - - IMPERIAL_CUBIC_FOOT - - IMPERIAL_CUBIC_YARD - - METRIC_MILLILITER - - METRIC_LITER - docs: The unit of volume used to measure a quantity. - source: - openapi: ../default/openapi/openapi.json - MeasurementUnitWeight: - enum: - - IMPERIAL_WEIGHT_OUNCE - - IMPERIAL_POUND - - IMPERIAL_STONE - - METRIC_MILLIGRAM - - METRIC_GRAM - - METRIC_KILOGRAM - docs: Unit of weight used to measure a quantity. - source: - openapi: ../default/openapi/openapi.json - Merchant: - docs: Represents a business that sells with Square. - properties: - id: - type: optional - docs: The Square-issued ID of the merchant. - business_name: - type: optional> - docs: The name of the merchant's overall business. - country: - type: Country - docs: >- - The country code associated with the merchant, in the two-letter - format of ISO 3166. For example, `US` or `JP`. - - See [Country](#type-country) for possible values - language_code: - type: optional> - docs: >- - The code indicating the [language - preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) - of the merchant, in [BCP 47 - format](https://tools.ietf.org/html/bcp47#appendix-A). For example, - `en-US` or `fr-CA`. - currency: - type: optional - docs: >- - The currency associated with the merchant, in ISO 4217 format. For - example, the currency code for US dollars is `USD`. - - See [Currency](#type-currency) for possible values - status: - type: optional - docs: |- - The merchant's status. - See [MerchantStatus](#type-merchantstatus) for possible values - main_location_id: - type: optional> - docs: >- - The ID of the [main - `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) - for this merchant. - created_at: - type: optional - docs: |- - The time when the merchant was created, in RFC 3339 format. - For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - access: read-only - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionOwnedCreatedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - is created by the subscribing application. Subscribe to this event to be - notified - - when your application creates a merchant custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.owned.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionOwnedDeletedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - is deleted by the subscribing application. Subscribe to this event to be - notified - - when your application deletes a merchant custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionOwnedUpdatedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - is updated by the subscribing application. Subscribe to this event to be - notified - - when your application updates a merchant custom attribute definition. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionVisibleCreatedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is created. A notification - is sent when your application - - creates a custom attribute definition or another application creates a - custom attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.visible.created"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionVisibleDeletedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is deleted. A notification - is sent when your application - - deletes a custom attribute definition or another application deletes a - custom attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeDefinitionVisibleUpdatedEvent: - docs: >- - Published when a merchant [custom attribute - definition](entity:CustomAttributeDefinition) - - that is visible to the subscribing application is updated. A notification - is sent when your application - - updates a custom attribute definition or another application updates a - custom attribute definition whose - - `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute_definition.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeOwnedDeletedEvent: - docs: >- - Published when a merchant [custom attribute](entity:CustomAttribute) - - associated with a [custom attribute - definition](entity:CustomAttributeDefinition) that is - - owned by the subscribing application is deleted. Subscribe to this event - to be notified - - when your application deletes a merchant custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeOwnedUpdatedEvent: - docs: >- - Published when a merchant [custom attribute](entity:CustomAttribute) - - associated with a [custom attribute - definition](entity:CustomAttributeDefinition) that is - - owned by the subscribing application is updated. Subscribe to this event - to be notified - - when your application updates a merchant custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeVisibleDeletedEvent: - docs: >- - Published when a merchant [custom attribute](entity:CustomAttribute) with - - the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is deleted. - - An application that subscribes to this event is notified when a merchant - custom attribute is deleted - - by any application for which the subscribing application has read access - to the merchant custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantCustomAttributeVisibleUpdatedEvent: - docs: >- - Published when a merchant [custom attribute](entity:CustomAttribute) with - - the `visibility` field set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES` is updated. - - An application that subscribes to this event is notified when a merchant - custom attribute is updated - - by any application for which the subscribing application has read access - to the merchant custom attribute. - properties: - merchant_id: - type: optional> - docs: >- - The ID of the seller associated with the event that triggered the - event notification. - type: - type: optional> - docs: >- - The type of this event. The value is - `"merchant.custom_attribute.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event notification. - created_at: - type: optional - docs: >- - The timestamp that indicates when the event notification was created, - in RFC 3339 format. - access: read-only - data: - type: optional - docs: >- - The data associated with the event that triggered the event - notification. - source: - openapi: ../default/openapi/openapi.json - MerchantSettingsUpdatedEvent: - docs: Published when online checkout merchant settings are updated - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: >- - The type of event this represents, - `"online_checkout.merchant_settings.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - MerchantSettingsUpdatedEventData: - properties: - type: - type: optional> - docs: >- - Name of the updated object’s type, - `"online_checkout.merchant_settings"`. - id: - type: optional - docs: ID of the updated merchant settings. - object: - type: optional - docs: An object containing the updated merchant settings. - source: - openapi: ../default/openapi/openapi.json - MerchantSettingsUpdatedEventObject: - properties: - merchant_settings: - type: optional - docs: The updated merchant settings. - source: - openapi: ../default/openapi/openapi.json - MerchantStatus: - enum: - - ACTIVE - - INACTIVE - source: - openapi: ../default/openapi/openapi.json - ModifierLocationOverrides: - docs: >- - Location-specific overrides for specified properties of a - `CatalogModifier` object. - properties: - location_id: - type: optional> - docs: >- - The ID of the `Location` object representing the location. This can - include a deactivated location. - price_money: - type: optional - docs: >- - The overridden price at the specified location. If this is - unspecified, the modifier price is not overridden. - - The modifier becomes free of charge at the specified location, when - this `price_money` field is set to 0. - sold_out: - type: optional - docs: >- - Indicates whether the modifier is sold out at the specified location - or not. As an example, for cheese (modifier) burger (item), when the - modifier is sold out, it is the cheese, but not the burger, that is - sold out. - - The seller can manually set this sold out status. Attempts by an - application to set this attribute are ignored. - access: read-only - source: - openapi: ../default/openapi/openapi.json - Money: - docs: >- - Represents an amount of money. `Money` fields can be signed or unsigned. - - Fields that do not explicitly define whether they are signed or unsigned - are - - considered unsigned and can only hold positive amounts. For signed fields, - the - - sign of the value indicates the purpose of the money transfer. See - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) - - for more information. - properties: - amount: - type: optional> - docs: >- - The amount of money, in the smallest denomination of the currency - - indicated by `currency`. For example, when `currency` is `USD`, - `amount` is - - in cents. Monetary amounts can be positive or negative. See the - specific - - field description to determine the meaning of the sign in a particular - case. - currency: - type: optional - docs: >- - The type of currency, in __ISO 4217 format__. For example, the - currency - - code for US dollars is `USD`. - - - See [Currency](entity:Currency) for possible values. - - See [Currency](#type-currency) for possible values - source: - openapi: ../default/openapi/openapi.json - OauthAuthorizationRevokedEvent: - docs: >- - Published when a merchant/application revokes all access tokens and - refresh tokens granted to an application. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"oauth.authorization.revoked"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OauthAuthorizationRevokedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"revocation"`. - id: - type: optional - docs: Not applicable, revocation is not an object - object: - type: optional - docs: An object containing information about revocation event. - source: - openapi: ../default/openapi/openapi.json - OauthAuthorizationRevokedEventObject: - properties: - revocation: - type: optional - docs: The revocation event. - source: - openapi: ../default/openapi/openapi.json - OauthAuthorizationRevokedEventRevocationObject: - properties: - revoked_at: - type: optional> - docs: Timestamp of when the revocation event occurred, in RFC 3339 format. - revoker_type: - type: optional - docs: >- - Type of client that performed the revocation, either APPLICATION, - MERCHANT, or SQUARE. - - See - [OauthAuthorizationRevokedEventRevokerType](#type-oauthauthorizationrevokedeventrevokertype) - for possible values - source: - openapi: ../default/openapi/openapi.json - OauthAuthorizationRevokedEventRevokerType: - enum: - - APPLICATION - - MERCHANT - - SQUARE - docs: Defines the possible types for the revoking client. - source: - openapi: ../default/openapi/openapi.json - ObtainTokenResponse: - docs: Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response. - properties: - access_token: - type: optional - docs: >- - An OAuth access token used to authorize Square API requests on behalf - of the seller. - - Include this token as a bearer token in the `Authorization` header of - your API requests. - - - OAuth access tokens expire in 30 days (except `short_lived` access - tokens). You should call - - `ObtainToken` and provide the returned `refresh_token` to get a new - access token well before - - the current one expires. For more information, see [OAuth API: - Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough). - validation: - minLength: 2 - maxLength: 1024 - token_type: - type: optional - docs: The type of access token. This value is always `bearer`. - validation: - minLength: 2 - maxLength: 10 - expires_at: - type: optional - docs: >- - The timestamp of when the `access_token` expires, in [ISO - 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. - validation: - minLength: 20 - maxLength: 48 - merchant_id: - type: optional - docs: >- - The ID of the authorizing [merchant](entity:Merchant) (seller), which - represents a business. - validation: - minLength: 8 - maxLength: 191 - subscription_id: - type: optional - docs: >- - __LEGACY__ The ID of merchant's subscription. - - The ID is only present if the merchant signed up for a subscription - plan during authorization. - plan_id: - type: optional - docs: >- - __LEGACY__ The ID of the subscription plan the merchant signed - - up for. The ID is only present if the merchant signed up for a - subscription plan during - - authorization. - id_token: - type: optional - docs: >- - The OpenID token that belongs to this person. This token is only - present if the - - `OPENID` scope is included in the authorization request. - - - Deprecated at version 2021-09-15. Square doesn't support OpenID or - other single sign-on (SSO) - - protocols on top of OAuth. - refresh_token: - type: optional - docs: >- - A refresh token that can be used in an `ObtainToken` request to - generate a new access token. - - - With the code flow: - - - For the `authorization_code` grant type, the refresh token is - multi-use and never expires. - - - For the `refresh_token` grant type, the response returns the same - refresh token. - - - With the PKCE flow: - - - For the `authorization_code` grant type, the refresh token is - single-use and expires in 90 days. - - - For the `refresh_token` grant type, the refresh token is a new - single-use refresh token that expires in 90 days. - - - For more information, see [Refresh, Revoke, and Limit the Scope of - OAuth - Tokens](https://developer.squareup.com/docs/oauth-api/refresh-revoke-limit-scope). - validation: - minLength: 2 - maxLength: 1024 - short_lived: - type: optional - docs: >- - Indicates whether the access_token is short lived. If `true`, the - access token expires - - in 24 hours. If `false`, the access token expires in 30 days. - errors: - type: optional> - docs: Any errors that occurred during the request. - refresh_token_expires_at: - type: optional - docs: >- - The timestamp of when the `refresh_token` expires, in [ISO - 8601](http://www.iso.org/iso/home/standards/iso8601.htm) - - format. - - - This field is only returned for the PKCE flow. - validation: - minLength: 20 - maxLength: 48 - source: - openapi: ../default/openapi/openapi.json - OfflinePaymentDetails: - docs: Details specific to offline payments. - properties: - client_created_at: - type: optional - docs: >- - The client-side timestamp of when the offline payment was created, in - RFC 3339 format. - validation: - maxLength: 32 - access: read-only - source: - openapi: ../default/openapi/openapi.json - Order: - docs: >- - Contains all information related to a single order to process with Square, - - including line items that specify the products to purchase. `Order` - objects also - - include information about any associated tenders, refunds, and returns. - - - All Connect V2 Transactions have all been converted to Orders including - all associated - - itemization data. - properties: - id: - type: optional - docs: The order's unique ID. - access: read-only - location_id: - type: string - docs: The ID of the seller location that this order is associated with. - validation: - minLength: 1 - reference_id: - type: optional> - docs: |- - A client-specified ID to associate an entity in another system - with this order. - validation: - maxLength: 40 - source: - type: optional - docs: The origination details of the order. - customer_id: - type: optional> - docs: >- - The ID of the [customer](entity:Customer) associated with the order. - - - You should specify a `customer_id` on the order (or the payment) to - ensure that transactions - - are reliably linked to customers. Omitting this field might result in - the creation of new - - [instant - profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). - validation: - maxLength: 191 - line_items: - type: optional>> - docs: The line items included in the order. - taxes: - type: optional>> - docs: >- - The list of all taxes associated with the order. - - - Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with - `LINE_ITEM` scope, an - - `OrderLineItemAppliedTax` must be added to each line item that the tax - applies to. For taxes - - with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` - for every line item. - - - On reads, each tax in the list includes the total amount of that tax - applied to the order. - - - __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, - using the deprecated - - `line_items.taxes` field results in an error. Use - `line_items.applied_taxes` - - instead. - discounts: - type: optional>> - docs: >- - The list of all discounts associated with the order. - - - Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For - discounts scoped to `LINE_ITEM`, - - an `OrderLineItemAppliedDiscount` must be added to each line item that - the discount applies to. - - For discounts with `ORDER` scope, the server generates an - `OrderLineItemAppliedDiscount` - - for every line item. - - - __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this - field, using the deprecated - - `line_items.discounts` field results in an error. Use - `line_items.applied_discounts` - - instead. - service_charges: - type: optional>> - docs: A list of service charges applied to the order. - fulfillments: - type: optional>> - docs: >- - Details about order fulfillment. - - - Orders can only be created with at most one fulfillment. However, - orders returned - - by the API might contain multiple fulfillments. - returns: - type: optional> - docs: >- - A collection of items from sale orders being returned in this one. - Normally part of an - - itemized return or exchange. There is exactly one `Return` object per - sale `Order` being - - referenced. - access: read-only - return_amounts: - type: optional - docs: The rollup of the returned money amounts. - net_amounts: - type: optional - docs: The net money amounts (sale money - return money). - rounding_adjustment: - type: optional - docs: >- - A positive rounding adjustment to the total of the order. This - adjustment is commonly - - used to apply cash rounding when the minimum unit of account is - smaller than the lowest physical - - denomination of the currency. - tenders: - type: optional> - docs: The tenders that were used to pay for the order. - access: read-only - refunds: - type: optional> - docs: The refunds that are part of this order. - access: read-only - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this order. Metadata fields are - intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - created_at: - type: optional - docs: >- - The timestamp for when the order was created, at server side, in RFC - 3339 format (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - updated_at: - type: optional - docs: >- - The timestamp for when the order was last updated, at server side, in - RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - closed_at: - type: optional - docs: >- - The timestamp for when the order reached a terminal - [state](entity:OrderState), in RFC 3339 format (for example - "2016-09-04T23:59:33.123Z"). - access: read-only - state: - type: optional - docs: |- - The current state of the order. - See [OrderState](#type-orderstate) for possible values - version: - type: optional - docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders not created through the API do not include a version number and - - therefore cannot be updated. - - - [Read more about working with - versions](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders). - total_money: - type: optional - docs: The total amount of money to collect for the order. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the order. - total_discount_money: - type: optional - docs: The total amount of discount money to collect for the order. - total_tip_money: - type: optional - docs: The total amount of tip money to collect for the order. - total_service_charge_money: - type: optional - docs: >- - 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` only includes - inclusive tax amounts, - - not additive tax amounts. - ticket_name: - type: optional> - docs: |- - A short-term identifier for the order (such as a customer first name, - table number, or auto-generated order number that resets daily). - validation: - maxLength: 30 - pricing_options: - type: optional - docs: >- - Pricing options for an order. The options affect how the order's price - is calculated. - - They can be used, for example, to apply automatic price adjustments - that are based on - - preconfigured [pricing rules](entity:CatalogPricingRule). - rewards: - type: optional> - docs: A set-like list of Rewards that have been added to the Order. - access: read-only - net_amount_due_money: - type: optional - docs: The net amount of money due on the order. - source: - openapi: ../default/openapi/openapi.json - OrderCreated: - properties: - order_id: - type: optional> - docs: The order's unique ID. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders that were not created through the API do not include a version - number and - - therefore cannot be updated. - - - [Read more about working with - versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) - location_id: - type: optional> - docs: The ID of the seller location that this order is associated with. - state: - type: optional - docs: |- - The state of the order. - See [OrderState](#type-orderstate) for possible values - created_at: - type: optional - docs: The timestamp for when the order was created, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - OrderCreatedEvent: - docs: "Published when an [Order](entity:Order) is created. This event is\ntriggered only by the [CreateOrder](api-endpoint:Orders-CreateOrder) endpoint call.\n\nCreating an order in the Point of Sale\_app will **not** publish this event." - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"order.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"order_created"`. - id: - type: optional - docs: ID of the affected order. - object: - type: optional - docs: An object containing information about the created Order. - source: - openapi: ../default/openapi/openapi.json - OrderCreatedObject: - properties: - order_created: - type: optional - docs: Information about the created order. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionOwnedCreatedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is owned by the - subscribing app is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.owned.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionOwnedDeletedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is owned by the - subscribing app is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionOwnedUpdatedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is owned by the - subscribing app is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionVisibleCreatedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is visible to the - subscribing app is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.visible.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionVisibleDeletedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is visible to the - subscribing app is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeDefinitionVisibleUpdatedEvent: - docs: >- - Published when an order [custom attribute - definition](entity:CustomAttributeDefinition) that is visible to the - subscribing app is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute_definition.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeOwnedDeletedEvent: - docs: >- - Published when an order [custom attribute](entity:CustomAttribute) - associated with a [custom attribute - definition](entity:CustomAttributeDefinition) that is owned by the - subscribing app is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute.owned.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeOwnedUpdatedEvent: - docs: >- - Published when an order [custom attribute](entity:CustomAttribute) - associated with a [custom attribute - definition](entity:CustomAttributeDefinition) that is owned by the - subscribing app is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute.owned.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeVisibleDeletedEvent: - docs: >- - Published when an order [custom attribute](entity:CustomAttribute) that is - visible to the subscribing app is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute.visible.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderCustomAttributeVisibleUpdatedEvent: - docs: >- - Published when an order [custom attribute](entity:CustomAttribute) that is - visible to the subscribing app is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target seller associated with the event. - type: - type: optional> - docs: >- - The type of this event. The value is - `"order.custom_attribute.visible.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderEntry: - docs: >- - A lightweight description of an [order](entity:Order) that is returned - when - - `returned_entries` is `true` on a - [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). - properties: - order_id: - type: optional> - docs: The ID of the order. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders that were not created through the API do not include a version - number and - - therefore cannot be updated. - - - [Read more about working with - versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) - access: read-only - location_id: - type: optional> - docs: The location ID the order belongs to. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentDeliveryDetailsScheduleType: - enum: - - SCHEDULED - - ASAP - docs: The schedule type of the delivery fulfillment. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentFulfillmentLineItemApplication: - enum: - - ALL - - ENTRY_LIST - docs: >- - The `line_item_application` describes what order line items this - fulfillment applies - - to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentPickupDetailsScheduleType: - enum: - - SCHEDULED - - ASAP - docs: The schedule type of the pickup fulfillment. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentState: - enum: - - PROPOSED - - RESERVED - - PREPARED - - COMPLETED - - CANCELED - - FAILED - docs: The current state of this fulfillment. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentType: - enum: - - PICKUP - - SHIPMENT - - DELIVERY - docs: The type of fulfillment. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentUpdated: - properties: - order_id: - type: optional> - docs: The order's unique ID. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders that were not created through the API do not include a version - number and - - therefore cannot be updated. - - - [Read more about working with - versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) - location_id: - type: optional> - docs: The ID of the seller location that this order is associated with. - state: - type: optional - docs: |- - The state of the order. - See [OrderState](#type-orderstate) for possible values - created_at: - type: optional - docs: The timestamp for when the order was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp for when the order was last updated, in RFC 3339 format. - access: read-only - fulfillment_update: - type: optional>> - docs: The fulfillments that were updated with this version change. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentUpdatedEvent: - docs: |- - Published when an [OrderFulfillment](entity:OrderFulfillment) - is created or updated. This event is triggered only by the - [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint call. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"order.fulfillment.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"order_fulfillment_updated"`. - id: - type: optional - docs: ID of the affected order. - object: - type: optional - docs: An object containing information about the updated Order. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentUpdatedObject: - properties: - order_fulfillment_updated: - type: optional - docs: Information about the updated order fulfillment. - source: - openapi: ../default/openapi/openapi.json - OrderFulfillmentUpdatedUpdate: - docs: Information about fulfillment updates. - properties: - fulfillment_uid: - type: optional> - docs: A unique ID that identifies the fulfillment only within this order. - old_state: - type: optional - docs: >- - The state of the fulfillment before the change. - - The state is not populated if the fulfillment is created with this new - `Order` version. - new_state: - type: optional - docs: >- - The state of the fulfillment after the change. The state might be - equal to `old_state` if a non-state - - field was changed on the fulfillment (such as the tracking number). - source: - openapi: ../default/openapi/openapi.json - OrderLineItem: - docs: |- - Represents a line item in an order. Each line item describes a different - product to purchase, with its own quantity and price details. - properties: - uid: - type: optional> - docs: A unique ID that identifies the line item only within this order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the line item. - validation: - maxLength: 512 - quantity: - type: string - docs: >- - The count, or measurement, of a line item being purchased: - - - If `quantity` is a whole number, and `quantity_unit` is not specified, - then `quantity` denotes an item count. For example: `3` apples. - - - If `quantity` is a whole or decimal number, and `quantity_unit` is - also specified, then `quantity` denotes a measurement. For example: - `2.25` pounds of broccoli. - - - For more information, see [Specify item quantity and measurement - unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit). - - - Line items with a quantity of `0` are automatically removed - - when paying for or otherwise completing the order. - validation: - minLength: 1 - maxLength: 12 - quantity_unit: - type: optional - docs: >- - The measurement unit and decimal precision that this line item's - quantity is measured in. - note: - type: optional> - docs: An optional note associated with the line item. - validation: - maxLength: 2000 - catalog_object_id: - type: optional> - docs: >- - The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to - this line item. - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this line item references. - variation_name: - type: optional> - docs: The name of the variation applied to this line item. - validation: - maxLength: 400 - item_type: - type: optional - docs: >- - The type of line item: an itemized sale, a non-itemized sale (custom - amount), or the - - activation or reloading of a gift card. - - See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible - values - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this line item. Metadata fields - are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - modifiers: - type: optional>> - docs: >- - The [CatalogModifier](entity:CatalogModifier)s applied to this line - item. - applied_taxes: - type: optional>> - docs: >- - The list of references to taxes applied to this line item. Each - - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a - - top-level `OrderLineItemTax` applied to the line item. On reads, the - - amount applied is populated. - - - An `OrderLineItemAppliedTax` is automatically created on every line - - item for all `ORDER` scoped taxes added to the order. - `OrderLineItemAppliedTax` - - records for `LINE_ITEM` scoped taxes must be added in requests for the - tax - - to apply to any line items. - - - To change the amount of a tax, modify the referenced top-level tax. - applied_discounts: - type: optional>> - docs: >- - The list of references to discounts applied to this line item. Each - - `OrderLineItemAppliedDiscount` has a `discount_uid` that references - the `uid` of a top-level - - `OrderLineItemDiscounts` applied to the line item. On reads, the - amount - - applied is populated. - - - An `OrderLineItemAppliedDiscount` is automatically created on every - line item for all - - `ORDER` scoped discounts that are added to the order. - `OrderLineItemAppliedDiscount` records - - for `LINE_ITEM` scoped discounts must be added in requests for the - discount to apply to any - - line items. - - - To change the amount of a discount, modify the referenced top-level - discount. - applied_service_charges: - type: optional>> - docs: >- - The list of references to service charges applied to this line item. - Each - - `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that - references the `uid` of a - - top-level `OrderServiceCharge` applied to the line item. On reads, the - amount applied is - - populated. - - - To change the amount of a service charge, modify the referenced - top-level service charge. - base_price_money: - type: optional - docs: The base price for a single unit of the line item. - variation_total_price_money: - type: optional - docs: >- - The total price of all item variations sold in this line item. - - The price is calculated as `base_price_money` multiplied by - `quantity`. - - It does not include modifiers. - gross_sales_money: - type: optional - docs: >- - The amount of money made in gross sales for this line item. - - The amount is calculated as the sum of the variation's total price and - each modifier's total price. - - For inclusive tax items in the US, Canada, and Japan, tax is deducted - from `gross_sales_money`. For Europe and - - Australia, inclusive tax remains as part of the gross sale - calculation. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the line item. - total_discount_money: - type: optional - docs: The total amount of discount money to collect for the line item. - total_money: - type: optional - docs: The total amount of money to collect for this line item. - pricing_blocklists: - type: optional - docs: >- - Describes pricing adjustments that are blocked from automatic - - application to a line item. For more information, see - - [Apply Taxes and - Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). - total_service_charge_money: - type: optional - docs: >- - The total amount of apportioned service charge money to collect for - the line item. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemAppliedDiscount: - docs: >- - Represents an applied portion of a discount to a line item in an order. - - - Order scoped discounts have automatically applied discounts present for - each line item. - - Line-item scoped discounts must have applied discounts added manually for - any applicable line - - items. The corresponding applied money is automatically computed based on - participating - - line items. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the applied discount only within this - order. - validation: - maxLength: 60 - discount_uid: - type: string - docs: >- - The `uid` of the discount that the applied discount represents. It - must - - reference a discount present in the `order.discounts` field. - - - This field is immutable. To change which discounts apply to a line - item, - - you must delete the discount and re-add it as a new - `OrderLineItemAppliedDiscount`. - validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the discount to the line item. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemAppliedServiceCharge: - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the applied service charge only within - this order. - validation: - maxLength: 60 - service_charge_uid: - type: string - docs: >- - The `uid` of the service charge that the applied service charge - represents. It must - - reference a service charge present in the `order.service_charges` - field. - - - This field is immutable. To change which service charges apply to a - line item, - - delete and add a new `OrderLineItemAppliedServiceCharge`. - validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the service charge to the line item. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemAppliedTax: - docs: >- - Represents an applied portion of a tax to a line item in an order. - - - Order-scoped taxes automatically include the applied taxes in each line - item. - - Line item taxes must be referenced from any applicable line items. - - The corresponding applied money is automatically computed, based on the - - set of participating line items. - properties: - uid: - type: optional> - docs: A unique ID that identifies the applied tax only within this order. - validation: - maxLength: 60 - tax_uid: - type: string - docs: >- - The `uid` of the tax for which this applied tax represents. It must - reference - - a tax present in the `order.taxes` field. - - - This field is immutable. To change which taxes apply to a line item, - delete and add a new - - `OrderLineItemAppliedTax`. - validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the tax to the line item. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemDiscount: - docs: >- - Represents a discount that applies to one or more line items in an - - order. - - - Fixed-amount, order-scoped discounts are distributed across all non-zero - line item totals. - - The amount distributed to each line item is relative to the - - amount contributed by the item to the order subtotal. - properties: - uid: - type: optional> - docs: A unique ID that identifies the discount only within this order. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogDiscount](entity:CatalogDiscount). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this discount references. - name: - type: optional> - docs: The discount's name. - validation: - maxLength: 255 - type: - type: optional - docs: >- - The type of the discount. - - - Discounts that do not reference a catalog object ID must have a type - of - - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for - possible values - percentage: - type: optional> - docs: >- - The percentage of the discount, as a string representation of a - decimal number. - - A value of `7.25` corresponds to a percentage of 7.25%. - - - `percentage` is not set for amount-based discounts. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The total declared monetary amount of the discount. - - `amount_money` is not set for percentage-based discounts. - applied_money: - type: optional - docs: >- - The amount of discount actually applied to the line item. - - - The amount 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 than `amount_money` because the total - - amount of the discount is distributed across all line items. - metadata: - type: optional>>>> - docs: >- - 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 (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - scope: - type: optional - docs: >- - 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 - reward_ids: - type: optional> - docs: >- - The reward IDs 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. - access: read-only - pricing_rule_id: - type: optional - docs: >- - The object ID of a [pricing rule](entity:CatalogPricingRule) to be - applied - - automatically to this discount. The specification and application of - the discounts, to - - which a `pricing_rule_id` is assigned, are completely controlled by - the corresponding - - pricing rule. - access: read-only - source: - openapi: ../default/openapi/openapi.json - OrderLineItemDiscountScope: - enum: - - OTHER_DISCOUNT_SCOPE - - LINE_ITEM - - ORDER - docs: Indicates whether this is a line-item or order-level discount. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemDiscountType: - enum: - - UNKNOWN_DISCOUNT - - FIXED_PERCENTAGE - - FIXED_AMOUNT - - VARIABLE_PERCENTAGE - - VARIABLE_AMOUNT - docs: >- - Indicates how the discount is applied to the associated line item or - order. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemItemType: - enum: - - ITEM - - CUSTOM_AMOUNT - - GIFT_CARD - docs: Represents the line item type. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemModifier: - docs: A [CatalogModifier](entity:CatalogModifier). - properties: - uid: - type: optional> - docs: A unique ID that identifies the modifier only within this order. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogModifier](entity:CatalogModifier). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this modifier references. - name: - type: optional> - docs: The name of the item modifier. - validation: - maxLength: 255 - quantity: - type: optional> - docs: >- - The quantity of the line item modifier. The modifier quantity can be 0 - or more. - - For example, suppose a restaurant offers a cheeseburger on the menu. - When a buyer orders - - this item, the restaurant records the purchase by creating an `Order` - object with a line item - - for a burger. The line item includes a line item modifier: the name is - cheese and the quantity - - is 1. The buyer has the option to order extra cheese (or no cheese). - If the buyer chooses - - the extra cheese option, the modifier quantity increases to 2. If the - buyer does not want - - any cheese, the modifier quantity is set to 0. - base_price_money: - type: optional - docs: >- - The base price for the modifier. - - - `base_price_money` is required for ad hoc modifiers. - - If both `catalog_object_id` and `base_price_money` are set, - `base_price_money` will - - override the predefined [CatalogModifier](entity:CatalogModifier) - price. - total_price_money: - type: optional - docs: >- - The total price of the item modifier for its line item. - - This is the modifier's `base_price_money` multiplied by the line - item's quantity. - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this order. Metadata fields are - intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - source: - openapi: ../default/openapi/openapi.json - OrderLineItemPricingBlocklists: - docs: >- - Describes pricing adjustments that are blocked from automatic - - application to a line item. For more information, see - - [Apply Taxes and - Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). - properties: - blocked_discounts: - type: >- - optional>> - docs: >- - A list of discounts blocked from applying to the line item. - - Discounts can be blocked by the `discount_uid` (for ad hoc discounts) - or - - the `discount_catalog_object_id` (for catalog discounts). - blocked_taxes: - type: optional>> - docs: |- - A list of taxes blocked from applying to the line item. - Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or - the `tax_catalog_object_id` (for catalog taxes). - source: - openapi: ../default/openapi/openapi.json - OrderLineItemPricingBlocklistsBlockedDiscount: - docs: >- - A discount to block from applying to a line item. The discount must be - - identified by either `discount_uid` or `discount_catalog_object_id`, but - not both. - properties: - uid: - type: optional> - docs: A unique ID of the `BlockedDiscount` within the order. - validation: - maxLength: 60 - discount_uid: - type: optional> - docs: >- - The `uid` of the discount that should be blocked. Use this field to - block - - ad hoc discounts. For catalog discounts, use the - `discount_catalog_object_id` field. - validation: - maxLength: 60 - discount_catalog_object_id: - type: optional> - docs: >- - The `catalog_object_id` of the discount that should be blocked. - - Use this field to block catalog discounts. For ad hoc discounts, use - the - - `discount_uid` field. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - OrderLineItemPricingBlocklistsBlockedTax: - docs: |- - A tax to block from applying to a line item. The tax must be - identified by either `tax_uid` or `tax_catalog_object_id`, but not both. - properties: - uid: - type: optional> - docs: A unique ID of the `BlockedTax` within the order. - validation: - maxLength: 60 - tax_uid: - type: optional> - docs: >- - The `uid` of the tax that should be blocked. Use this field to block - - ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` - field. - validation: - maxLength: 60 - tax_catalog_object_id: - type: optional> - docs: |- - The `catalog_object_id` of the tax that should be blocked. - Use this field to block catalog taxes. For ad hoc taxes, use the - `tax_uid` field. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - OrderLineItemTax: - docs: >- - Represents a tax that applies to one or more line item in the order. - - - Fixed-amount, order-scoped taxes are distributed across all non-zero line - item totals. - - The amount distributed to each line item is relative to the amount the - item - - contributes to the order subtotal. - properties: - uid: - type: optional> - docs: A unique ID that identifies the tax only within this order. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this tax references. - name: - type: optional> - docs: The tax's name. - validation: - maxLength: 255 - type: - type: optional - docs: >- - Indicates the calculation method used to apply the tax. - - See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible - values - percentage: - type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - - number. For example, a value of `"7.25"` corresponds to a percentage - of - - 7.25%. - validation: - maxLength: 10 - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this tax. Metadata fields are - intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - applied_money: - type: optional - docs: |- - The amount of money applied to the order by the tax. - - - For percentage-based taxes, `applied_money` is the money - calculated using the percentage. - scope: - type: optional - docs: >- - Indicates the level at which the tax applies. For `ORDER` scoped - taxes, - - Square generates references in `applied_taxes` on all order line items - that do - - not have them. For `LINE_ITEM` scoped taxes, the tax only applies to - line items - - with references in their `applied_taxes` field. - - - This field is immutable. To change the scope, you must delete the tax - and - - re-add it as a new tax. - - See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible - values - auto_applied: - type: optional - docs: >- - Determines whether the tax was automatically applied to the order - based on - - the catalog configuration. For an example, see - - [Automatically Apply Taxes to an - Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes). - access: read-only - source: - openapi: ../default/openapi/openapi.json - OrderLineItemTaxScope: - enum: - - OTHER_TAX_SCOPE - - LINE_ITEM - - ORDER - docs: Indicates whether this is a line-item or order-level tax. - source: - openapi: ../default/openapi/openapi.json - OrderLineItemTaxType: - enum: - - UNKNOWN_TAX - - ADDITIVE - - INCLUSIVE - docs: Indicates how the tax is applied to the associated line item or order. - source: - openapi: ../default/openapi/openapi.json - OrderMoneyAmounts: - docs: A collection of various money amounts. - properties: - total_money: - type: optional - docs: The total money. - tax_money: - type: optional - docs: The money associated with taxes. - discount_money: - type: optional - docs: The money associated with discounts. - tip_money: - type: optional - docs: The money associated with tips. - service_charge_money: - type: optional - docs: The money associated with service charges. - source: - openapi: ../default/openapi/openapi.json - OrderPricingOptions: - docs: >- - Pricing options for an order. The options affect how the order's price is - calculated. - - They can be used, for example, to apply automatic price adjustments that - are based on preconfigured - - [pricing rules](entity:CatalogPricingRule). - properties: - auto_apply_discounts: - type: optional> - docs: |- - The option to determine whether pricing rule-based - discounts are automatically applied to an order. - auto_apply_taxes: - type: optional> - docs: >- - The option to determine whether rule-based taxes are automatically - - applied to an order when the criteria of the corresponding rules are - met. - source: - openapi: ../default/openapi/openapi.json - OrderQuantityUnit: - docs: >- - Contains the measurement unit for a quantity and a precision that - - specifies the number of digits after the decimal point for decimal - quantities. - properties: - measurement_unit: - type: optional - docs: |- - A [MeasurementUnit](entity:MeasurementUnit) that represents the - unit of measure for the quantity. - precision: - type: optional> - docs: >- - For non-integer quantities, represents the number of digits after the - decimal point that are - - recorded for this quantity. - - - For example, a precision of 1 allows quantities such as `"1.0"` and - `"1.1"`, but not `"1.01"`. - - - Min: 0. Max: 5. - catalog_object_id: - type: optional> - docs: |- - The catalog object ID referencing the - [CatalogMeasurementUnit](entity:CatalogMeasurementUnit). - - This field is set when this is a catalog-backed measurement unit. - catalog_version: - type: optional> - docs: >- - The version of the catalog object that this measurement unit - references. - - - This field is set when this is a catalog-backed measurement unit. - source: - openapi: ../default/openapi/openapi.json - OrderReturn: - docs: >- - The set of line items, service charges, taxes, discounts, tips, and other - items being returned in an order. - properties: - uid: - type: optional> - docs: A unique ID that identifies the return only within this order. - validation: - maxLength: 60 - source_order_id: - type: optional> - docs: >- - An order that contains the original sale of these return line items. - This is unset - - for unlinked returns. - return_line_items: - type: optional>> - docs: A collection of line items that are being returned. - return_service_charges: - type: optional>> - docs: A collection of service charges that are being returned. - return_taxes: - type: optional> - docs: >- - A collection of references to taxes being returned for an order, - including the total - - applied tax amount to be returned. The taxes must reference a - top-level tax ID from the source - - order. - access: read-only - return_discounts: - type: optional> - docs: >- - A collection of references to discounts being returned for an order, - including the total - - applied discount amount to be returned. The discounts must reference a - top-level discount ID - - from the source order. - access: read-only - return_tips: - type: optional>> - docs: A collection of references to tips being returned for an order. - rounding_adjustment: - type: optional - docs: >- - A positive or negative rounding adjustment to the total value being - returned. Adjustments are commonly - - used to apply cash rounding when the minimum unit of the account is - smaller than the lowest - - physical denomination of the currency. - return_amounts: - type: optional - docs: An aggregate monetary value being returned by this return entry. - source: - openapi: ../default/openapi/openapi.json - OrderReturnDiscount: - docs: >- - Represents a discount being returned that applies to one or more return - line items in an - - order. - - - Fixed-amount, order-scoped discounts are distributed across all non-zero - return line item totals. - - The amount distributed to each return line item is relative to that item’s - contribution to the - - order subtotal. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the returned discount only within this - order. - validation: - maxLength: 60 - source_discount_uid: - type: optional> - docs: >- - The discount `uid` from the order that contains the original - application of this discount. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogDiscount](entity:CatalogDiscount). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this discount references. - name: - type: optional> - docs: The discount's name. - validation: - maxLength: 255 - type: - type: optional - docs: >- - The type of the discount. If it is created by the API, it is - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - - Discounts that do not reference a catalog object ID must have a type - of - - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for - possible values - percentage: - type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - number. - - A value of `"7.25"` corresponds to a percentage of 7.25%. - - - `percentage` is not set for amount-based discounts. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The total declared monetary amount of the discount. - - `amount_money` is not set for percentage-based discounts. - applied_money: - type: optional - docs: >- - The amount of discount actually applied to this line item. When an - amount-based - - discount is at the order level, this value is different from - `amount_money` because the discount - - is distributed across the line items. - scope: - type: optional - docs: >- - Indicates the level at which the `OrderReturnDiscount` applies. For - `ORDER` scoped - - discounts, the server generates references in `applied_discounts` on - all - - `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount - is only applied to - - `OrderReturnLineItem`s with references in their `applied_discounts` - field. - - See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for - possible values - source: - openapi: ../default/openapi/openapi.json - OrderReturnLineItem: - docs: The line item being returned in an order. - properties: - uid: - type: optional> - docs: A unique ID for this return line-item entry. - validation: - maxLength: 60 - source_line_item_uid: - type: optional> - docs: The `uid` of the line item in the original sale order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the line item. - validation: - maxLength: 512 - quantity: - type: string - docs: |- - The quantity returned, formatted as a decimal number. - For example, `"3"`. - - Line items with a `quantity_unit` can have non-integer quantities. - For example, `"1.70000"`. - validation: - minLength: 1 - maxLength: 12 - quantity_unit: - type: optional - docs: >- - The unit and precision that this return line item's quantity is - measured in. - note: - type: optional> - docs: The note of the return line item. - validation: - maxLength: 2000 - catalog_object_id: - type: optional> - docs: >- - The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to - this return line item. - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this line item references. - variation_name: - type: optional> - docs: The name of the variation applied to this return line item. - validation: - maxLength: 400 - item_type: - type: optional - docs: >- - The type of line item: an itemized return, a non-itemized return - (custom amount), - - or the return of an unactivated gift card sale. - - See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible - values - return_modifiers: - type: optional>> - docs: >- - The [CatalogModifier](entity:CatalogModifier)s applied to this line - item. - applied_taxes: - type: optional>> - docs: >- - The list of references to `OrderReturnTax` entities applied to the - return line item. Each - - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a top-level - - `OrderReturnTax` applied to the return line item. On reads, the - applied amount - - is populated. - applied_discounts: - type: optional>> - docs: >- - The list of references to `OrderReturnDiscount` entities applied to - the return line item. Each - - `OrderLineItemAppliedDiscount` has a `discount_uid` that references - the `uid` of a top-level - - `OrderReturnDiscount` applied to the return line item. On reads, the - applied amount - - is populated. - base_price_money: - type: optional - docs: The base price for a single unit of the line item. - variation_total_price_money: - type: optional - docs: >- - The total price of all item variations returned in this line item. - - The price is calculated as `base_price_money` multiplied by `quantity` - and - - does not include modifiers. - gross_return_money: - type: optional - docs: >- - The gross return amount of money calculated as (item base price + - modifiers price) * quantity. - total_tax_money: - type: optional - docs: The total amount of tax money to return for the line item. - total_discount_money: - type: optional - docs: The total amount of discount money to return for the line item. - total_money: - type: optional - docs: The total amount of money to return for this line item. - applied_service_charges: - type: optional>> - docs: >- - The list of references to `OrderReturnServiceCharge` entities applied - to the return - - line item. Each `OrderLineItemAppliedServiceCharge` has a - `service_charge_uid` that - - references the `uid` of a top-level `OrderReturnServiceCharge` applied - to the return line - - item. On reads, the applied amount is populated. - total_service_charge_money: - type: optional - docs: >- - The total amount of apportioned service charge money to return for the - line item. - source: - openapi: ../default/openapi/openapi.json - OrderReturnLineItemModifier: - docs: A line item modifier being returned. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the return modifier only within this - order. - validation: - maxLength: 60 - source_modifier_uid: - type: optional> - docs: |- - The modifier `uid` from the order's line item that contains the - original sale of this line item modifier. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogModifier](entity:CatalogModifier). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: >- - The version of the catalog object that this line item modifier - references. - name: - type: optional> - docs: The name of the item modifier. - validation: - maxLength: 255 - base_price_money: - type: optional - docs: >- - The base price for the modifier. - - - `base_price_money` is required for ad hoc modifiers. - - If both `catalog_object_id` and `base_price_money` are set, - `base_price_money` overrides the predefined - [CatalogModifier](entity:CatalogModifier) price. - total_price_money: - type: optional - docs: >- - The total price of the item modifier for its line item. - - This is the modifier's `base_price_money` multiplied by the line - item's quantity. - quantity: - type: optional> - docs: >- - The quantity of the line item modifier. The modifier quantity can be 0 - or more. - - For example, suppose a restaurant offers a cheeseburger on the menu. - When a buyer orders - - this item, the restaurant records the purchase by creating an `Order` - object with a line item - - for a burger. The line item includes a line item modifier: the name is - cheese and the quantity - - is 1. The buyer has the option to order extra cheese (or no cheese). - If the buyer chooses - - the extra cheese option, the modifier quantity increases to 2. If the - buyer does not want - - any cheese, the modifier quantity is set to 0. - source: - openapi: ../default/openapi/openapi.json - OrderReturnServiceCharge: - docs: Represents the service charge applied to the original order. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the return service charge only within this - order. - validation: - maxLength: 60 - source_service_charge_uid: - type: optional> - docs: |- - The service charge `uid` from the order containing the original - service charge. `source_service_charge_uid` is `null` for - unlinked returns. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the service charge. - validation: - maxLength: 255 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID of the associated - [OrderServiceCharge](entity:OrderServiceCharge). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this service charge references. - percentage: - type: optional> - docs: |- - The percentage of the service charge, as a string representation of - a decimal number. For example, a value of `"7.25"` corresponds to a - percentage of 7.25%. - - Either `percentage` or `amount_money` should be set, but not both. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The amount of a non-percentage-based service charge. - - Either `percentage` or `amount_money` should be set, but not both. - applied_money: - type: optional - docs: >- - The amount of money applied to the order by the service charge, - including - - any inclusive tax amounts, as calculated by Square. - - - - For fixed-amount service charges, `applied_money` is equal to - `amount_money`. - - - For percentage-based service charges, `applied_money` is the money - calculated using the percentage. - total_money: - type: optional - docs: >- - The total amount of money to collect for the service charge. - - - __NOTE__: If an inclusive tax is applied to the service charge, - `total_money` - - does not equal `applied_money` plus `total_tax_money` because the - inclusive - - tax amount is already included in both `applied_money` and - `total_tax_money`. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the service charge. - calculation_phase: - type: optional - docs: >- - The calculation phase after which to apply the service charge. - - See - [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) - for possible values - taxable: - type: optional> - docs: |- - Indicates whether the surcharge can be taxed. Service charges - calculated in the `TOTAL_PHASE` cannot be marked as taxable. - applied_taxes: - type: optional>> - docs: >- - The list of references to `OrderReturnTax` entities applied to the - - `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a - `tax_uid` - - that references the `uid` of a top-level `OrderReturnTax` that is - being - - applied to the `OrderReturnServiceCharge`. On reads, the applied - amount is - - populated. - treatment_type: - type: optional - docs: >- - The treatment type of the service charge. - - See - [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) - for possible values - scope: - type: optional - docs: >- - Indicates the level at which the apportioned service charge applies. - For `ORDER` - - scoped service charges, Square generates references in - `applied_service_charges` on - - all order line items that do not have them. For `LINE_ITEM` scoped - service charges, - - the service charge only applies to line items with a service charge - reference in their - - `applied_service_charges` field. - - - This field is immutable. To change the scope of an apportioned service - charge, you must delete - - the apportioned service charge and re-add it as a new apportioned - service charge. - - See [OrderServiceChargeScope](#type-orderservicechargescope) for - possible values - source: - openapi: ../default/openapi/openapi.json - OrderReturnTax: - docs: >- - Represents a tax being returned that applies to one or more return line - items in an order. - - - Fixed-amount, order-scoped taxes are distributed across all non-zero - return line item totals. - - The amount distributed to each return line item is relative to that item’s - contribution to the - - order subtotal. - properties: - uid: - type: optional> - docs: A unique ID that identifies the returned tax only within this order. - validation: - maxLength: 60 - source_tax_uid: - type: optional> - docs: The tax `uid` from the order that contains the original tax charge. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this tax references. - name: - type: optional> - docs: The tax's name. - validation: - maxLength: 255 - type: - type: optional - docs: >- - Indicates the calculation method used to apply the tax. - - See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible - values - percentage: - type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - number. - - For example, a value of `"7.25"` corresponds to a percentage of 7.25%. - validation: - maxLength: 10 - applied_money: - type: optional - docs: The amount of money applied by the tax in an order. - scope: - type: optional - docs: >- - Indicates the level at which the `OrderReturnTax` applies. For `ORDER` - scoped - - taxes, Square generates references in `applied_taxes` on all - - `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax is only - applied to - - `OrderReturnLineItem`s with references in their `applied_discounts` - field. - - See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible - values - source: - openapi: ../default/openapi/openapi.json - OrderReturnTip: - docs: A tip being returned. - properties: - uid: - type: optional> - docs: A unique ID that identifies the tip only within this order. - validation: - maxLength: 60 - applied_money: - type: optional - docs: |- - The amount of tip being returned - -- - source_tender_uid: - type: optional> - docs: >- - The tender `uid` from the order that contains the original application - of this tip. - validation: - maxLength: 192 - source_tender_id: - type: optional> - docs: >- - The tender `id` from the order that contains the original application - of this tip. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - OrderReward: - docs: |- - Represents a reward that can be applied to an order if the necessary - reward tier criteria are met. Rewards are created through the Loyalty API. - properties: - id: - type: string - docs: The identifier of the reward. - validation: - minLength: 1 - reward_tier_id: - type: string - docs: The identifier of the reward tier corresponding to this reward. - validation: - minLength: 1 - source: - openapi: ../default/openapi/openapi.json - OrderRoundingAdjustment: - docs: >- - A rounding adjustment of the money being returned. Commonly used to apply - cash rounding - - when the minimum unit of the account is smaller than the lowest physical - denomination of the currency. - properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the rounding adjustment only within this - order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the rounding adjustment from the original sale order. - amount_money: - type: optional - docs: The actual rounding adjustment amount. - source: - openapi: ../default/openapi/openapi.json - OrderServiceCharge: - docs: Represents a service charge applied to an order. - properties: - uid: - type: optional> - docs: A unique ID that identifies the service charge only within this order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the service charge. - validation: - maxLength: 512 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing the service charge - [CatalogObject](entity:CatalogObject). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this service charge references. - percentage: - type: optional> - docs: >- - The service charge percentage as a string representation of a - - decimal number. For example, `"7.25"` indicates a service charge of - 7.25%. - - - Exactly 1 of `percentage` or `amount_money` should be set. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The amount of a non-percentage-based service charge. - - Exactly one of `percentage` or `amount_money` should be set. - applied_money: - type: optional - docs: >- - The amount of money applied to the order by the service charge, - - including any inclusive tax amounts, as calculated by Square. - - - - For fixed-amount service charges, `applied_money` is equal to - `amount_money`. - - - For percentage-based service charges, `applied_money` is the money - - calculated using the percentage. - total_money: - type: optional - docs: |- - The total amount of money to collect for the service charge. - - __Note__: If an inclusive tax is applied to the service charge, - `total_money` does not equal `applied_money` plus `total_tax_money` - because the inclusive tax amount is already included in both - `applied_money` and `total_tax_money`. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the service charge. - calculation_phase: - type: optional - docs: >- - The calculation phase at which to apply the service charge. - - See - [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) - for possible values - taxable: - type: optional> - docs: >- - Indicates whether the service charge can be taxed. If set to `true`, - - order-level taxes automatically apply to the service charge. Note that - - service charges calculated in the `TOTAL_PHASE` cannot be marked as - taxable. - applied_taxes: - type: optional>> - docs: >- - The list of references to the taxes applied to this service charge. - Each - - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a top-level - - `OrderLineItemTax` that is being applied to this service charge. On - reads, the amount applied - - is populated. - - - An `OrderLineItemAppliedTax` is automatically created on every taxable - service charge - - for all `ORDER` scoped taxes that are added to the order. - `OrderLineItemAppliedTax` records - - for `LINE_ITEM` scoped taxes must be added in requests for the tax to - apply to any taxable - - service charge. Taxable service charges have the `taxable` field set - to `true` and calculated - - in the `SUBTOTAL_PHASE`. - - - To change the amount of a tax, modify the referenced top-level tax. - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this service charge. Metadata - fields are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can 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. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - type: - type: optional - docs: >- - The type of the service charge. - - See [OrderServiceChargeType](#type-orderservicechargetype) for - possible values - treatment_type: - type: optional - docs: >- - The treatment type of the service charge. - - See - [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) - for possible values - scope: - type: optional - docs: >- - Indicates the level at which the apportioned service charge applies. - For `ORDER` - - scoped service charges, Square generates references in - `applied_service_charges` on - - all order line items that do not have them. For `LINE_ITEM` scoped - service charges, - - the service charge only applies to line items with a service charge - reference in their - - `applied_service_charges` field. - - - This field is immutable. To change the scope of an apportioned service - charge, you must delete - - the apportioned service charge and re-add it as a new apportioned - service charge. - - See [OrderServiceChargeScope](#type-orderservicechargescope) for - possible values - source: - openapi: ../default/openapi/openapi.json - OrderServiceChargeCalculationPhase: - enum: - - SUBTOTAL_PHASE - - TOTAL_PHASE - - APPORTIONED_PERCENTAGE_PHASE - - APPORTIONED_AMOUNT_PHASE - docs: >- - Represents a phase in the process of calculating order totals. - - Service charges are applied after the indicated phase. - - - [Read more about how order totals are - calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated) - source: - openapi: ../default/openapi/openapi.json - OrderServiceChargeScope: - enum: - - OTHER_SERVICE_CHARGE_SCOPE - - LINE_ITEM - - ORDER - docs: |- - Indicates whether this is a line-item or order-level apportioned - service charge. - source: - openapi: ../default/openapi/openapi.json - OrderServiceChargeTreatmentType: - enum: - - LINE_ITEM_TREATMENT - - APPORTIONED_TREATMENT - docs: >- - Indicates whether the service charge will be treated as a value-holding - line item or - - apportioned toward a line item. - source: - openapi: ../default/openapi/openapi.json - OrderServiceChargeType: - enum: - - AUTO_GRATUITY - - CUSTOM - source: - openapi: ../default/openapi/openapi.json - OrderSource: - docs: Represents the origination details of an order. - properties: - name: - type: optional> - docs: >- - The name used to identify the place (physical or digital) that an - order originates. - - If unset, the name defaults to the name of the application that - created the order. - source: - openapi: ../default/openapi/openapi.json - OrderState: - enum: - - OPEN - - COMPLETED - - CANCELED - - DRAFT - docs: The state of the order. - source: - openapi: ../default/openapi/openapi.json - OrderUpdated: - properties: - order_id: - type: optional> - docs: The order's unique ID. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders that were not created through the API do not include a version - number and - - therefore cannot be updated. - - - [Read more about working with - versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) - location_id: - type: optional> - docs: The ID of the seller location that this order is associated with. - state: - type: optional - docs: |- - The state of the order. - See [OrderState](#type-orderstate) for possible values - created_at: - type: optional - docs: The timestamp for when the order was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp for when the order was last updated, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - OrderUpdatedEvent: - docs: |- - Published when an [Order](entity:Order) is updated. This - event is triggered by the [UpdateOrder](api-endpoint:Orders-UpdateOrder) - endpoint call, Order Manager, or the Square Dashboard. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"order.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - OrderUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"order_updated"`. - id: - type: optional - docs: ID of the affected order. - object: - type: optional - docs: An object containing information about the updated Order. - source: - openapi: ../default/openapi/openapi.json - OrderUpdatedObject: - properties: - order_updated: - type: optional - docs: Information about the updated order. - source: - openapi: ../default/openapi/openapi.json - PauseSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription to be paused by the scheduled `PAUSE` action. - actions: - type: optional> - docs: >- - The list of a `PAUSE` action and a possible `RESUME` action created by - the request. - source: - openapi: ../default/openapi/openapi.json - PayOrderResponse: - docs: >- - Defines the fields that are included in the response body of a request to - the - - [PayOrder](api-endpoint:Orders-PayOrder) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - order: - type: optional - docs: The paid, updated [order](entity:Order). - source: - openapi: ../default/openapi/openapi.json - Payment: - docs: Represents a payment processed by the Square API. - properties: - id: - type: optional - docs: A unique ID for the payment. - validation: - maxLength: 192 - access: read-only - created_at: - type: optional - docs: The timestamp of when the payment was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the payment was last updated, in RFC 3339 - format. - validation: - maxLength: 32 - access: read-only - amount_money: - type: optional - docs: >- - The amount processed for this payment, not including `tip_money`. - - - The amount is specified in the smallest denomination of the applicable - currency (for example, - - US dollar amounts are specified in cents). For more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - tip_money: - type: optional - docs: >- - The amount designated as a tip for the seller's staff. - - - Tips for external vendors such as a 3rd party delivery courier must be - recorded using Order.service_charges. - - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). For more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - total_money: - type: optional - docs: >- - The total amount for the payment, including `amount_money` and - `tip_money`. - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). For more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - app_fee_money: - type: optional - docs: >- - The amount the developer is taking as a fee for facilitating the - payment on behalf - - of the seller. This amount is specified in the smallest denomination - of the applicable currency - - (for example, US dollar amounts are specified in cents). For more - information, - - see [Take Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - - - The amount cannot be more than 90% of the `total_money` value. - - - To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission is required. - - For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - approved_money: - type: optional - docs: >- - The amount of money approved for this payment. This value may change - if Square chooses to - - obtain reauthorization as part of a call to - [UpdatePayment](api-endpoint:Payments-UpdatePayment). - processing_fee: - type: optional> - docs: >- - The processing fees and fee adjustments assessed by Square for this - payment. - access: read-only - refunded_money: - type: optional - docs: >- - The total amount of the payment refunded to date. - - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). - status: - type: optional - docs: >- - Indicates whether the payment is APPROVED, PENDING, COMPLETED, - CANCELED, or FAILED. - validation: - maxLength: 50 - access: read-only - delay_duration: - type: optional - docs: >- - 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 - - do not 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. - access: read-only - delay_action: - type: optional> - docs: >- - The action to be applied to the payment when the `delay_duration` has - elapsed. - - - Current values include `CANCEL` and `COMPLETE`. - delayed_until: - type: optional - docs: >- - The read-only timestamp of when the `delay_action` is automatically - 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 might not - exactly match the - - time on your local machine. - access: read-only - source_type: - type: optional - docs: >- - The source type for this payment. - - - Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, - `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`, - - `CASH` and `EXTERNAL`. For information about these payment source - types, - - see [Take - Payments](https://developer.squareup.com/docs/payments-api/take-payments). - validation: - maxLength: 50 - access: read-only - card_details: - type: optional - docs: >- - Details about a card payment. These details are only populated if the - source_type is `CARD`. - cash_details: - type: optional - docs: >- - Details about a cash payment. These details are only populated if the - source_type is `CASH`. - bank_account_details: - type: optional - docs: >- - Details about a bank account payment. These details are only populated - if the source_type is `BANK_ACCOUNT`. - external_details: - type: optional - docs: |- - Details about an external payment. The details are only populated - if the `source_type` is `EXTERNAL`. - wallet_details: - type: optional - docs: |- - Details about an wallet payment. The details are only populated - if the `source_type` is `WALLET`. - buy_now_pay_later_details: - type: optional - docs: >- - Details about a Buy Now Pay Later payment. The details are only - populated - - if the `source_type` is `BUY_NOW_PAY_LATER`. For more information, - see - - [Afterpay - Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments). - square_account_details: - type: optional - docs: |- - Details about a Square Account payment. The details are only populated - if the `source_type` is `SQUARE_ACCOUNT`. - location_id: - type: optional - docs: The ID of the location associated with the payment. - validation: - maxLength: 50 - access: read-only - order_id: - type: optional - docs: The ID of the order associated with the payment. - validation: - maxLength: 192 - access: read-only - reference_id: - type: optional - docs: |- - An optional ID that associates the payment with an entity in - another system. - validation: - maxLength: 40 - access: read-only - customer_id: - type: optional - docs: >- - The ID of the customer associated with the payment. If the ID is - - not provided in the `CreatePayment` request that was used to create - the `Payment`, - - Square may use information in the request - - (such as the billing and shipping address, email address, and payment - source) - - to identify a matching customer profile in the Customer Directory. - - If found, the profile ID is used. If a profile is not found, the - - API attempts to create an - - [instant - profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). - - If the API cannot create an - - instant profile (either because the seller has disabled it or the - - seller's region prevents creating it), this field remains unset. Note - that - - this process is asynchronous and it may take some time before a - - customer ID is added to the payment. - validation: - maxLength: 191 - access: read-only - employee_id: - type: optional - docs: |- - __Deprecated__: Use `Payment.team_member_id` instead. - - An optional ID of the employee associated with taking the payment. - validation: - maxLength: 192 - access: read-only - team_member_id: - type: optional> - docs: >- - An optional ID of the [TeamMember](entity:TeamMember) associated with - taking the payment. - validation: - maxLength: 192 - refund_ids: - type: optional> - docs: A list of `refund_id`s identifying refunds for the payment. - access: read-only - risk_evaluation: - type: optional - docs: >- - Provides information about the risk associated with the payment, as - determined by Square. - - This field is present for payments to sellers that have opted in to - receive risk - - evaluations. - terminal_checkout_id: - type: optional - docs: >- - An optional ID for a Terminal checkout that is associated with the - payment. - access: read-only - buyer_email_address: - type: optional - docs: The buyer's email address. - validation: - maxLength: 255 - access: read-only - billing_address: - type: optional
- docs: The buyer's billing address. - shipping_address: - type: optional
- docs: The buyer's shipping address. - note: - type: optional - docs: An optional note to include when creating a payment. - validation: - maxLength: 500 - access: read-only - statement_description_identifier: - type: optional - docs: >- - Additional payment information that gets added to the customer's card - statement - - as part of the statement description. - - - Note that the `statement_description_identifier` might get truncated - on the statement description - - to fit the required information including the Square identifier (SQ *) - and the name of the - - seller taking the payment. - access: read-only - capabilities: - type: optional> - docs: |- - Actions that can be performed on this payment: - - `EDIT_AMOUNT_UP` - The payment amount can be edited up. - - `EDIT_AMOUNT_DOWN` - The payment amount can be edited down. - - `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up. - - `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down. - - `EDIT_DELAY_ACTION` - The delay_action can be edited. - access: read-only - receipt_number: - type: optional - docs: |- - The payment's receipt number. - The field is missing if a payment is canceled. - validation: - maxLength: 4 - access: read-only - receipt_url: - type: optional - docs: |- - The URL for the payment's receipt. - The field is only populated for COMPLETED payments. - validation: - maxLength: 255 - access: read-only - device_details: - type: optional - docs: Details about the device that took the payment. - application_details: - type: optional - docs: Details about the application that took the payment. - is_offline_payment: - type: optional - docs: Whether or not this payment was taken offline. - access: read-only - offline_payment_details: - type: optional - docs: Additional information about the payment if it was taken offline. - version_token: - type: optional> - docs: >- - Used for optimistic concurrency. This opaque token identifies a - specific version of the - - `Payment` object. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityAppFeeRefundDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The ID of the refund associated with this activity. - location_id: - type: optional> - docs: >- - The ID of the location of the merchant associated with the payment - refund activity - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityAppFeeRevenueDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - location_id: - type: optional> - docs: >- - The ID of the location of the merchant associated with the payment - activity - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityAutomaticSavingsDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - payout_id: - type: optional> - docs: The ID of the payout associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityAutomaticSavingsReversedDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - payout_id: - type: optional> - docs: The ID of the payout associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityChargeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityDepositFeeDetail: - properties: - payout_id: - type: optional> - docs: The ID of the payout that triggered this deposit fee activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityDepositFeeReversedDetail: - properties: - payout_id: - type: optional> - docs: The ID of the payout that triggered this deposit fee activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityDisputeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - dispute_id: - type: optional> - docs: The ID of the dispute associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityFeeDetail: - properties: - payment_id: - type: optional> - docs: >- - The ID of the payment associated with this activity - - This will only be populated when a principal LedgerEntryToken is also - populated. - - If the fee is independent (there is no principal LedgerEntryToken) - then this will likely not - - be populated. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityFreeProcessingDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityHoldAdjustmentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityOpenDisputeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - dispute_id: - type: optional> - docs: The ID of the dispute associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityOtherAdjustmentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityOtherDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityRefundDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The ID of the refund associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityReleaseAdjustmentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityReserveHoldDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityReserveReleaseDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivitySquareCapitalPaymentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivitySquareCapitalReversedPaymentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivitySquarePayrollTransferDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivitySquarePayrollTransferReversedDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityTaxOnFeeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - tax_rate_description: - type: optional> - docs: >- - The description of the tax rate being applied. For example: "GST", - "HST". - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityThirdPartyFeeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentBalanceActivityThirdPartyFeeRefundDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The public refund id associated with this activity. - source: - openapi: ../default/openapi/openapi.json - PaymentCreatedEvent: - docs: Published when a [Payment](entity:Payment) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"payment.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - PaymentCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"payment"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected payment. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the created payment. - source: - openapi: ../default/openapi/openapi.json - PaymentCreatedEventObject: - properties: - payment: - type: optional - docs: The created payment. - source: - openapi: ../default/openapi/openapi.json - PaymentLink: - properties: - id: - type: optional - docs: The Square-assigned ID of the payment link. - access: read-only - version: - type: integer - docs: >- - The Square-assigned version number, which is incremented each time an - update is committed to the payment link. - validation: - max: 65535 - description: - type: optional> - docs: |- - The optional description of the `payment_link` object. - It is primarily for use by your application and is not used anywhere. - validation: - maxLength: 4096 - order_id: - type: optional - docs: The ID of the order associated with the payment link. - validation: - maxLength: 192 - access: read-only - checkout_options: - type: optional - docs: >- - The checkout options configured for the payment link. - - For more information, see [Optional Checkout - Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). - pre_populated_data: - type: optional - docs: |- - Describes buyer data to prepopulate - on the checkout page. - url: - type: optional - docs: The shortened URL of the payment link. - validation: - maxLength: 255 - access: read-only - long_url: - type: optional - docs: The long URL of the payment link. - validation: - maxLength: 255 - access: read-only - created_at: - type: optional - docs: The timestamp when the payment link was created, in RFC 3339 format. - updated_at: - type: optional - docs: >- - The timestamp when the payment link was last updated, in RFC 3339 - format. - payment_note: - type: optional> - docs: >- - An optional note. After Square processes the payment, this note is - added to the - - resulting `Payment`. - validation: - maxLength: 500 - source: - openapi: ../default/openapi/openapi.json - PaymentLinkRelatedResources: - properties: - orders: - type: optional>> - docs: The order associated with the payment link. - subscription_plans: - type: optional>> - docs: The subscription plan associated with the payment link. - source: - openapi: ../default/openapi/openapi.json - PaymentOptions: - properties: - autocomplete: - type: optional> - docs: >- - Indicates whether the `Payment` objects created from this - `TerminalCheckout` are - - automatically `COMPLETED` or left in an `APPROVED` state for later - modification. - - - Default: true - delay_duration: - type: optional> - docs: >- - The duration of time after the payment's creation when Square - automatically resolves the - - payment. This automatic resolution applies only to payments that do - not reach a terminal state - - (`COMPLETED` or `CANCELED`) 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 and a maximum value of 36 hours. This feature is only - supported for card payments, - - and all payments will be considered card-present. - - - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). For more - - information, see [Delayed - Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - - - Default: "PT36H" (36 hours) from the creation time - accept_partial_authorization: - type: optional> - docs: >- - If set to `true` and charging a Square Gift Card, a payment might be - returned with - - `amount_money` equal to less than what was requested. For example, a - request for $20 when charging - - a Square Gift Card with a balance of $5 results in an APPROVED payment - of $5. You might choose - - to prompt the buyer for an additional payment to cover the remainder - or cancel the Gift Card - - payment. - - - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). - - - For more information, see [Take Partial - Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards). - - - Default: false - delay_action: - type: optional - docs: >- - The action to be applied to the `Payment` when the delay_duration has - elapsed. - - The action must be CANCEL or COMPLETE. - - - The action cannot be set to COMPLETE if an `order_id` is present on - the TerminalCheckout. - - - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). For more - - information, see [Delayed - Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - - - Default: CANCEL - - See [DelayAction](#type-delayaction) for possible values - source: - openapi: ../default/openapi/openapi.json - PaymentOptionsDelayAction: - enum: - - CANCEL - - COMPLETE - docs: >- - Describes the action to be applied to a delayed capture payment when the - delay_duration - - has elapsed. - source: - openapi: ../default/openapi/openapi.json - PaymentRefund: - docs: >- - Represents a refund of a payment made using Square. Contains information - about - - the original payment and the amount of money refunded. - properties: - id: - type: string - docs: The unique ID for this refund, generated by Square. - validation: - minLength: 1 - maxLength: 255 - status: - type: optional> - docs: |- - The refund's status: - - `PENDING` - Awaiting approval. - - `COMPLETED` - Successfully completed. - - `REJECTED` - The refund was rejected. - - `FAILED` - An error occurred. - validation: - maxLength: 50 - location_id: - type: optional> - docs: >- - The location ID associated with the payment this refund is attached - to. - validation: - maxLength: 50 - unlinked: - type: optional - docs: >- - Flag indicating whether or not the refund is linked to an existing - payment in Square. - access: read-only - destination_type: - type: optional> - docs: >- - The destination type for this refund. - - - Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, - `BUY_NOW_PAY_LATER`, `CASH`, - - `EXTERNAL`, and `SQUARE_ACCOUNT`. - validation: - maxLength: 50 - destination_details: - type: optional - docs: >- - Contains information about the refund destination. This field is - populated only if - - `destination_id` is defined in the `RefundPayment` request. - amount_money: - type: Money - docs: >- - The amount of money refunded. This amount is specified in the smallest - denomination - - of the applicable currency (for example, US dollar amounts are - specified in cents). - app_fee_money: - type: optional - docs: >- - The amount of money the application developer contributed to help - cover the refunded amount. - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). For more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - processing_fee: - type: optional>> - docs: >- - Processing fees and fee adjustments assessed by Square for this - refund. - payment_id: - type: optional> - docs: The ID of the payment associated with this refund. - validation: - maxLength: 192 - order_id: - type: optional> - docs: The ID of the order associated with the refund. - validation: - maxLength: 192 - reason: - type: optional> - docs: The reason for the refund. - validation: - maxLength: 192 - created_at: - type: optional - docs: The timestamp of when the refund was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - updated_at: - type: optional - docs: The timestamp of when the refund was last updated, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - team_member_id: - type: optional - docs: An optional ID of the team member associated with taking the payment. - validation: - maxLength: 192 - access: read-only - terminal_refund_id: - type: optional - docs: An optional ID for a Terminal refund. - access: read-only - source: - openapi: ../default/openapi/openapi.json - PaymentUpdatedEvent: - docs: >- - Published when a [Payment](entity:Payment) is updated. - - Typically the `payment.status`, or `card_details.status` fields are - updated - - as a payment is canceled, authorized, or completed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"payment.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - PaymentUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"payment"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected payment. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the updated payment. - source: - openapi: ../default/openapi/openapi.json - PaymentUpdatedEventObject: - properties: - payment: - type: optional - docs: The updated payment. - source: - openapi: ../default/openapi/openapi.json - Payout: - docs: >- - An accounting of the amount owed the seller and record of the actual - transfer to their - - external bank account or to the Square balance. - properties: - id: - type: string - docs: A unique ID for the payout. - validation: - minLength: 1 - status: - type: optional - docs: |- - Indicates the payout status. - See [PayoutStatus](#type-payoutstatus) for possible values - location_id: - type: string - docs: The ID of the location associated with the payout. - validation: - minLength: 1 - created_at: - type: optional - docs: >- - The timestamp of when the payout was created and submitted for deposit - to the seller's banking destination, in RFC 3339 format. - updated_at: - type: optional - docs: The timestamp of when the payout was last updated, in RFC 3339 format. - amount_money: - type: optional - docs: >- - The amount of money involved in the payout. A positive amount - indicates a deposit, and a negative amount indicates a withdrawal. - This amount is never zero. - destination: - type: optional - docs: >- - Information about the banking destination (such as a bank account, - Square checking account, or debit card) - - against which the payout was made. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is made - to this payout record. - - The version number helps developers receive event notifications or - feeds out of order. - type: - type: optional - docs: |- - Indicates the payout type. - See [PayoutType](#type-payouttype) for possible values - payout_fee: - type: optional>> - docs: >- - A list of transfer fees and any taxes on the fees assessed by Square - for this payout. - arrival_date: - type: optional> - docs: >- - The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is - due to arrive in the seller’s banking destination. - end_to_end_id: - type: optional> - docs: >- - A unique ID for each `Payout` object that might also appear on the - seller’s bank statement. You can use this ID to automate the process - of reconciling each payout with the corresponding line item on the - bank statement. - source: - openapi: ../default/openapi/openapi.json - PayoutEntry: - docs: >- - One or more PayoutEntries that make up a Payout. Each one has a date, - amount, and type of activity. - - The total amount of the payout will equal the sum of the payout entries - for a batch payout - properties: - id: - type: string - docs: A unique ID for the payout entry. - validation: - minLength: 1 - payout_id: - type: string - docs: The ID of the payout entries’ associated payout. - validation: - minLength: 1 - effective_at: - type: optional> - docs: >- - The timestamp of when the payout entry affected the balance, in RFC - 3339 format. - type: - type: optional - docs: |- - The type of activity associated with this payout entry. - See [ActivityType](#type-activitytype) for possible values - gross_amount_money: - type: optional - docs: The amount of money involved in this payout entry. - fee_amount_money: - type: optional - docs: The amount of Square fees associated with this payout entry. - net_amount_money: - type: optional - docs: The net proceeds from this transaction after any fees. - type_app_fee_revenue_details: - type: optional - docs: Details of any developer app fee revenue generated on a payment. - type_app_fee_refund_details: - type: optional - docs: Details of a refund for an app fee on a payment. - type_automatic_savings_details: - type: optional - docs: >- - Details of any automatic transfer from the payment processing balance - to the Square Savings account. These are, generally, proportional to - the merchant's sales. - type_automatic_savings_reversed_details: - type: optional - docs: >- - Details of any automatic transfer from the Square Savings account back - to the processing balance. These are, generally, proportional to the - merchant's refunds. - type_charge_details: - type: optional - docs: Details of credit card payment captures. - type_deposit_fee_details: - type: optional - docs: >- - Details of any fees involved with deposits such as for instant - deposits. - type_deposit_fee_reversed_details: - type: optional - docs: >- - Details of any reversal or refund of fees involved with deposits such - as for instant deposits. - type_dispute_details: - type: optional - docs: Details of any balance change due to a dispute event. - type_fee_details: - type: optional - docs: Details of adjustments due to the Square processing fee. - type_free_processing_details: - type: optional - docs: >- - Square offers Free Payments Processing for a variety of business - scenarios including seller referral or when Square wants to apologize - for a bug, customer service, repricing complication, and so on. This - entry represents details of any credit to the merchant for the - purposes of Free Processing. - type_hold_adjustment_details: - type: optional - docs: >- - Details of any adjustment made by Square related to the holding or - releasing of a payment. - type_open_dispute_details: - type: optional - docs: Details of any open disputes. - type_other_details: - type: optional - docs: >- - Details of any other type that does not belong in the rest of the - types. - type_other_adjustment_details: - type: optional - docs: >- - Details of any other type of adjustments that don't fall under - existing types. - type_refund_details: - type: optional - docs: Details of a refund for an existing card payment. - type_release_adjustment_details: - type: optional - docs: Details of fees released for adjustments. - type_reserve_hold_details: - type: optional - docs: Details of fees paid for funding risk reserve. - type_reserve_release_details: - type: optional - docs: Details of fees released from risk reserve. - type_square_capital_payment_details: - type: optional - docs: >- - Details of capital merchant cash advance (MCA) assessments. These are, - generally, proportional to the merchant's sales but may be issued for - other reasons related to the MCA. - type_square_capital_reversed_payment_details: - type: optional - docs: >- - Details of capital merchant cash advance (MCA) assessment refunds. - These are, generally, proportional to the merchant's refunds but may - be issued for other reasons related to the MCA. - type_tax_on_fee_details: - type: optional - docs: Details of tax paid on fee amounts. - type_third_party_fee_details: - type: optional - docs: Details of fees collected by a 3rd party platform. - type_third_party_fee_refund_details: - type: optional - docs: Details of refunded fees from a 3rd party platform. - type_square_payroll_transfer_details: - type: optional - docs: >- - Details of a payroll payment that was transferred to a team member’s - bank account. - type_square_payroll_transfer_reversed_details: - type: optional - docs: >- - Details of a payroll payment to a team member’s bank account that was - deposited back to the seller’s account by Square. - source: - openapi: ../default/openapi/openapi.json - PayoutFailedEvent: - docs: Published when a [Payout](entity:Payout) has failed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event that this represents, `payout.failed`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: The timestamp of when the event was verified, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - PayoutFailedEventData: - properties: - type: - type: optional> - docs: The name of the affected object's type, `payout`. - id: - type: optional - docs: The ID of the failed payout. - object: - type: optional - docs: An object containing the failed payout. - source: - openapi: ../default/openapi/openapi.json - PayoutFailedEventObject: - properties: - payout: - type: optional - docs: The payout that failed. - source: - openapi: ../default/openapi/openapi.json - PayoutFee: - docs: Represents a payout fee that can incur as part of a payout. - properties: - amount_money: - type: optional - docs: The money amount of the payout fee. - effective_at: - type: optional> - docs: The timestamp of when the fee takes effect, in RFC 3339 format. - type: - type: optional - docs: |- - The type of fee assessed as part of the payout. - See [PayoutFeeType](#type-payoutfeetype) for possible values - source: - openapi: ../default/openapi/openapi.json - PayoutFeeType: - enum: - - TRANSFER_FEE - - TAX_ON_TRANSFER_FEE - docs: Represents the type of payout fee that can incur as part of a payout. - source: - openapi: ../default/openapi/openapi.json - PayoutPaidEvent: - docs: Published when a [Payout](entity:Payout) is complete. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"payout.paid"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was verified, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - PayoutPaidEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"payout"`. - id: - type: optional - docs: ID of the completed payout. - object: - type: optional - docs: An object containing the completed payout. - source: - openapi: ../default/openapi/openapi.json - PayoutPaidEventObject: - properties: - payout: - type: optional - docs: The payout that has completed. - source: - openapi: ../default/openapi/openapi.json - PayoutSentEvent: - docs: Published when a [Payout](entity:Payout) is sent. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents, `"payout.sent"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was verified, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - PayoutSentEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"payout"`. - id: - type: optional - docs: ID of the sent payout. - object: - type: optional - docs: An object containing the sent payout. - source: - openapi: ../default/openapi/openapi.json - PayoutSentEventObject: - properties: - payout: - type: optional - docs: The payout that was sent. - source: - openapi: ../default/openapi/openapi.json - PayoutStatus: - enum: - - SENT - - FAILED - - PAID - docs: Payout status types - source: - openapi: ../default/openapi/openapi.json - PayoutType: - enum: - - BATCH - - SIMPLE - docs: >- - The type of payout: “BATCH” or “SIMPLE”. - - BATCH payouts include a list of payout entries that can be considered - settled. - - SIMPLE payouts do not have any payout entries associated with them - - and will show up as one of the payout entries in a future BATCH payout. - source: - openapi: ../default/openapi/openapi.json - Phase: - docs: >- - Represents a phase, which can override subscription phases as defined by - plan_id - properties: - uid: - type: optional> - docs: id of subscription phase - ordinal: - type: optional> - docs: index of phase in total subscription plan - order_template_id: - type: optional> - docs: id of order to be used in billing - plan_phase_uid: - type: optional> - docs: the uid from the plan's phase in catalog - source: - openapi: ../default/openapi/openapi.json - PhaseInput: - docs: Represents the arguments used to construct a new phase. - properties: - ordinal: - type: long - docs: index of phase in total subscription plan - order_template_id: - type: optional> - docs: id of order to be used in billing - source: - openapi: ../default/openapi/openapi.json - PrePopulatedData: - docs: >- - Describes buyer data to prepopulate in the payment form. - - For more information, - - see [Optional Checkout - Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). - properties: - buyer_email: - type: optional> - docs: The buyer email to prepopulate in the payment form. - validation: - maxLength: 256 - buyer_phone_number: - type: optional> - docs: The buyer phone number to prepopulate in the payment form. - validation: - maxLength: 17 - buyer_address: - type: optional
- docs: The buyer address to prepopulate in the payment form. - source: - openapi: ../default/openapi/openapi.json - ProcessingFee: - docs: Represents the Square processing fee. - properties: - effective_at: - type: optional> - docs: The timestamp of when the fee takes effect, in RFC 3339 format. - type: - type: optional> - docs: >- - The type of fee assessed or adjusted. The fee type can be `INITIAL` or - `ADJUSTMENT`. - amount_money: - type: optional - docs: >- - The fee amount, which might be negative, that is assessed or adjusted - by Square. - - - Positive values represent funds being assessed, while negative values - represent - - funds being returned. - source: - openapi: ../default/openapi/openapi.json - Product: - enum: - - SQUARE_POS - - EXTERNAL_API - - BILLING - - APPOINTMENTS - - INVOICES - - ONLINE_STORE - - PAYROLL - - DASHBOARD - - ITEM_LIBRARY_IMPORT - - OTHER - docs: Indicates the Square product used to generate a change. - source: - openapi: ../default/openapi/openapi.json - ProductType: literal<"TERMINAL_API"> - PublishInvoiceResponse: - docs: Describes a `PublishInvoice` response. - properties: - invoice: - type: optional - docs: The published invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - PublishScheduledShiftResponse: - docs: >- - Represents a - [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) - response. - - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional - docs: The published scheduled shift. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - QrCodeOptions: - docs: Fields to describe the action that displays QR-Codes. - properties: - title: - type: string - docs: The title text to display in the QR code flow on the Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: The body text to display in the QR code flow on the Terminal. - validation: - minLength: 1 - maxLength: 10000 - barcode_contents: - type: string - docs: |- - The text representation of the data to show in the QR code - as UTF8-encoded data. - validation: - minLength: 1 - maxLength: 1024 - source: - openapi: ../default/openapi/openapi.json - QuickPay: - docs: >- - Describes an ad hoc item and price to generate a quick pay checkout link. - - For more information, - - see [Quick Pay - Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout). - properties: - name: - type: string - docs: >- - The ad hoc item name. In the resulting `Order`, this name appears as - the line item name. - validation: - minLength: 1 - maxLength: 255 - price_money: - type: Money - docs: The price of the item. - location_id: - type: string - docs: The ID of the business location the checkout is associated with. - source: - openapi: ../default/openapi/openapi.json - Range: - docs: The range of a number value between the specified lower and upper bounds. - properties: - min: - type: optional> - docs: >- - The lower bound of the number range. At least one of `min` or `max` - must be specified. - - If unspecified, the results will have no minimum value. - max: - type: optional> - docs: >- - The upper bound of the number range. At least one of `min` or `max` - must be specified. - - If unspecified, the results will have no maximum value. - source: - openapi: ../default/openapi/openapi.json - ReceiptOptions: - docs: Describes receipt action fields. - properties: - payment_id: - type: string - docs: The reference to the Square payment ID for the receipt. - print_only: - type: optional> - docs: >- - Instructs the device to print the receipt without displaying the - receipt selection screen. - - Requires `printer_enabled` set to true. - - Defaults to false. - is_duplicate: - type: optional> - docs: |- - Identify the receipt as a reprint rather than an original receipt. - Defaults to false. - source: - openapi: ../default/openapi/openapi.json - ReceiveTransferOrderResponse: - docs: Response for receiving items for a transfer order - properties: - transfer_order: - type: optional - docs: The updated transfer order - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - RedeemLoyaltyRewardResponse: - docs: >- - A response that includes the `LoyaltyEvent` published for redeeming the - reward. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - event: - type: optional - docs: The `LoyaltyEvent` for redeeming the reward. - source: - openapi: ../default/openapi/openapi.json - Reference: - properties: - type: - type: optional - docs: |- - The type of entity a channel is associated with. - See [Type](#type-type) for possible values - id: - type: optional - docs: The id of the entity a channel is associated with. - source: - openapi: ../default/openapi/openapi.json - ReferenceType: - enum: - - UNKNOWN_TYPE - - LOCATION - - FIRST_PARTY_INTEGRATION - - OAUTH_APPLICATION - - ONLINE_SITE - - ONLINE_CHECKOUT - - INVOICE - - GIFT_CARD - - GIFT_CARD_MARKETPLACE - - RECURRING_SUBSCRIPTION - - ONLINE_BOOKING_FLOW - - SQUARE_ASSISTANT - - CASH_LOCAL - - POINT_OF_SALE - - KIOSK - docs: The type of platform concept a channel can represent. - source: - openapi: ../default/openapi/openapi.json - Refund: - docs: Represents a refund processed for a Square transaction. - properties: - id: - type: string - docs: The refund's unique ID. - validation: - maxLength: 255 - location_id: - type: string - docs: The ID of the refund's associated location. - validation: - maxLength: 50 - transaction_id: - type: optional> - docs: The ID of the transaction that the refunded tender is part of. - validation: - maxLength: 192 - tender_id: - type: optional> - docs: The ID of the refunded tender. - validation: - maxLength: 192 - created_at: - type: optional - docs: The timestamp for when the refund was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - reason: - type: string - docs: The reason for the refund being issued. - validation: - maxLength: 192 - amount_money: - type: Money - docs: The amount of money refunded to the buyer. - status: - type: RefundStatus - docs: |- - The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`, - or `FAILED`). - See [RefundStatus](#type-refundstatus) for possible values - processing_fee_money: - type: optional - docs: The amount of Square processing fee money refunded to the *merchant*. - additional_recipients: - type: optional>> - docs: >- - Additional recipients (other than the merchant) receiving a portion of - this refund. - - For example, fees assessed on a refund of a purchase by a third party - integration. - source: - openapi: ../default/openapi/openapi.json - RefundCreatedEvent: - docs: Published when a [Refund](entity:PaymentRefund) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"refund.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - RefundCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"refund"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected refund. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the created refund. - source: - openapi: ../default/openapi/openapi.json - RefundCreatedEventObject: - properties: - refund: - type: optional - docs: The created refund. - source: - openapi: ../default/openapi/openapi.json - RefundPaymentResponse: - docs: >- - Defines the response returned by - - [RefundPayment](api-endpoint:Refunds-RefundPayment). - - - If there are errors processing the request, the `refund` field might not - be - - present, or it might be present with a status of `FAILED`. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The successfully created `PaymentRefund`. - source: - openapi: ../default/openapi/openapi.json - RefundStatus: - enum: - - PENDING - - APPROVED - - REJECTED - - FAILED - docs: Indicates a refund's current status. - source: - openapi: ../default/openapi/openapi.json - RefundUpdatedEvent: - docs: |- - Published when a [Refund](entity:PaymentRefund) is updated. - Typically the `refund.status` changes when a refund is completed. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"refund.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - RefundUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"refund"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected refund. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the updated refund. - source: - openapi: ../default/openapi/openapi.json - RefundUpdatedEventObject: - properties: - refund: - type: optional - docs: The updated refund. - source: - openapi: ../default/openapi/openapi.json - RegisterDomainResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) - endpoint. - - - Either `errors` or `status` are present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - status: - type: optional - docs: >- - The status of the domain registration. - - - See - [RegisterDomainResponseStatus](entity:RegisterDomainResponseStatus) - for possible values. - - See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) - for possible values - source: - openapi: ../default/openapi/openapi.json - RegisterDomainResponseStatus: - enum: - - PENDING - - VERIFIED - docs: The status of the domain registration. - source: - openapi: ../default/openapi/openapi.json - RemoveGroupFromCustomerResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer) - - endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - ResumeSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The resumed subscription. - actions: - type: optional> - docs: >- - A list of `RESUME` actions created by the request and scheduled for - the subscription. - source: - openapi: ../default/openapi/openapi.json - RetrieveBookingCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveBookingCustomAttributeResponse: - docs: >- - Represents a - [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetBookingResponse: - properties: - booking: - type: optional - docs: The booking that was requested. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetBusinessBookingProfileResponse: - properties: - business_booking_profile: - type: optional - docs: The seller's booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetCardResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint. - - - Note: if there are errors processing the request, the card field will not - be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - card: - type: optional - docs: The retrieved card. - source: - openapi: ../default/openapi/openapi.json - GetCashDrawerShiftResponse: - properties: - cash_drawer_shift: - type: optional - docs: The cash drawer shift queried for. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetCatalogObjectResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - object: - type: optional - docs: The `CatalogObject`s returned. - related_objects: - type: optional> - docs: >- - A list of `CatalogObject`s referenced by the object in the `object` - field. - source: - openapi: ../default/openapi/openapi.json - RetrieveChannelResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - channel: - type: optional - docs: The requested Channel. - source: - openapi: ../default/openapi/openapi.json - GetCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetCustomerCustomAttributeResponse: - docs: >- - Represents a - [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetCustomerGroupResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) - endpoint. - - - Either `errors` or `group` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - group: - type: optional - docs: The retrieved customer group. - source: - openapi: ../default/openapi/openapi.json - GetCustomerResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `RetrieveCustomer` endpoint. - - Either `errors` or `customer` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customer: - type: optional - docs: The requested customer. - source: - openapi: ../default/openapi/openapi.json - GetCustomerSegmentResponse: - docs: >- - Defines the fields that are included in the response body for requests to - the `RetrieveCustomerSegment` endpoint. - - - Either `errors` or `segment` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - segment: - type: optional - docs: The retrieved customer segment. - source: - openapi: ../default/openapi/openapi.json - GetDisputeEvidenceResponse: - docs: Defines the fields in a `RetrieveDisputeEvidence` response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - evidence: - type: optional - docs: Metadata about the dispute evidence file. - source: - openapi: ../default/openapi/openapi.json - GetDisputeResponse: - docs: Defines fields in a `RetrieveDispute` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - dispute: - type: optional - docs: Details about the requested `Dispute`. - source: - openapi: ../default/openapi/openapi.json - GetEmployeeResponse: - properties: - employee: optional - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetGiftCardFromGANResponse: - docs: >- - A response that contains a `GiftCard`. This response might contain a set - of `Error` objects - - if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: >- - A gift card that was fetched, if present. It returns empty if an error - occurred. - source: - openapi: ../default/openapi/openapi.json - GetGiftCardFromNonceResponse: - docs: >- - A response that contains a `GiftCard` object. If the request resulted in - errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: The retrieved gift card. - source: - openapi: ../default/openapi/openapi.json - GetGiftCardResponse: - docs: >- - A response that contains a `GiftCard`. The response might contain a set of - `Error` objects - - if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: The gift card retrieved. - source: - openapi: ../default/openapi/openapi.json - GetInventoryAdjustmentResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - adjustment: - type: optional - docs: The requested [InventoryAdjustment](entity:InventoryAdjustment). - source: - openapi: ../default/openapi/openapi.json - GetInventoryChangesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - changes: - type: optional> - docs: The set of inventory changes for the requested object and locations. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - source: - openapi: ../default/openapi/openapi.json - GetInventoryCountResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - counts: - type: optional> - docs: |- - The current calculated inventory counts for the requested object and - locations. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - source: - openapi: ../default/openapi/openapi.json - GetInventoryPhysicalCountResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - count: - type: optional - docs: The requested [InventoryPhysicalCount](entity:InventoryPhysicalCount). - source: - openapi: ../default/openapi/openapi.json - GetInventoryTransferResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transfer: - type: optional - docs: The requested [InventoryTransfer](entity:InventoryTransfer). - source: - openapi: ../default/openapi/openapi.json - RetrieveJobResponse: - docs: >- - Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) response. Either - `job` or `errors` - - is present in the response. - properties: - job: - type: optional - docs: The retrieved job. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveLocationBookingProfileResponse: - properties: - location_booking_profile: - type: optional - docs: The requested location booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveLocationCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveLocationCustomAttributeResponse: - docs: >- - Represents a - [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetLocationResponse: - docs: >- - Defines the fields that the - [RetrieveLocation](api-endpoint:Locations-RetrieveLocation) - - endpoint returns in a response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - location: - type: optional - docs: The requested location. - source: - openapi: ../default/openapi/openapi.json - RetrieveLocationSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - location_settings: - type: optional - docs: The location settings. - source: - openapi: ../default/openapi/openapi.json - GetLoyaltyAccountResponse: - docs: A response that includes the loyalty account. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_account: - type: optional - docs: The loyalty account. - source: - openapi: ../default/openapi/openapi.json - GetLoyaltyProgramResponse: - docs: A response that contains the loyalty program. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - program: - type: optional - docs: The loyalty program that was requested. - source: - openapi: ../default/openapi/openapi.json - GetLoyaltyPromotionResponse: - docs: >- - Represents a - [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) - response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotion: - type: optional - docs: The retrieved loyalty promotion. - source: - openapi: ../default/openapi/openapi.json - GetLoyaltyRewardResponse: - docs: A response that includes the loyalty reward. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - reward: - type: optional - docs: The loyalty reward retrieved. - source: - openapi: ../default/openapi/openapi.json - RetrieveMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveMerchantCustomAttributeResponse: - docs: >- - Represents a - [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetMerchantResponse: - docs: >- - The response object returned by the - [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - merchant: - type: optional - docs: The requested `Merchant` object. - source: - openapi: ../default/openapi/openapi.json - RetrieveMerchantSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - merchant_settings: - type: optional - docs: The merchant settings. - source: - openapi: ../default/openapi/openapi.json - RetrieveOrderCustomAttributeDefinitionResponse: - docs: Represents a response from getting an order custom attribute definition. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveOrderCustomAttributeResponse: - docs: Represents a response from getting an order custom attribute. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, the custom attribute definition is returned in the - `definition field. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetOrderResponse: - properties: - order: - type: optional - docs: The requested order. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetPaymentLinkResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - payment_link: - type: optional - docs: The payment link that is retrieved. - source: - openapi: ../default/openapi/openapi.json - RetrieveScheduledShiftResponse: - docs: >- - Represents a - [RetrieveScheduledShift](api-endpoint:Labor-RetrieveScheduledShift) - response. - - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional - docs: The requested scheduled shift. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetSnippetResponse: - docs: >- - Represents a `RetrieveSnippet` response. The response can include either - `snippet` or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - snippet: - type: optional - docs: The retrieved snippet. - source: - openapi: ../default/openapi/openapi.json - GetSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription retrieved. - source: - openapi: ../default/openapi/openapi.json - GetTeamMemberBookingProfileResponse: - properties: - team_member_booking_profile: - type: optional - docs: The returned team member booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetTeamMemberResponse: - docs: >- - Represents a response from a retrieve request containing a `TeamMember` - object or error messages. - properties: - team_member: - type: optional - docs: The successfully retrieved `TeamMember` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveTimecardResponse: - docs: >- - A response to a request to get a `Timecard`. The response contains - - the requested `Timecard` object and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - timecard: - type: optional - docs: The requested `Timecard`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RetrieveTokenStatusResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `RetrieveTokenStatus` endpoint. - properties: - scopes: - type: optional> - docs: The list of scopes associated with an access token. - expires_at: - type: optional - docs: "The date and time when the\_`access_token`\_expires, in RFC 3339 format. Empty if the token never expires." - client_id: - type: optional - docs: >- - The Square-issued application ID associated with the access token. - This is the same application ID used to obtain the token. - validation: - maxLength: 191 - merchant_id: - type: optional - docs: The ID of the authorizing merchant's business. - validation: - minLength: 8 - maxLength: 191 - errors: - type: optional> - docs: ' Any errors that occurred during the request.' - source: - openapi: ../default/openapi/openapi.json - GetTransactionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveTransaction](api-endpoint:Transactions-RetrieveTransaction) - endpoint. - - - One of `errors` or `transaction` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transaction: - type: optional - docs: The requested transaction. - source: - openapi: ../default/openapi/openapi.json - RetrieveTransferOrderResponse: - docs: Response containing the requested transfer order - properties: - transfer_order: - type: optional - docs: The requested transfer order - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - GetVendorResponse: - docs: >- - Represents an output from a call to - [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor). - properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - vendor: - type: optional - docs: The successfully retrieved [Vendor](entity:Vendor) object. - source: - openapi: ../default/openapi/openapi.json - GetWageSettingResponse: - docs: >- - Represents a response from a retrieve request containing the specified - `WageSetting` object or error messages. - properties: - wage_setting: - type: optional - docs: The successfully retrieved `WageSetting` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - GetWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveWebhookSubscription](api-endpoint:WebhookSubscriptions-RetrieveWebhookSubscription) - endpoint. - - - Note: if there are errors processing the request, the - [Subscription](entity:WebhookSubscription) will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription: - type: optional - docs: The requested [Subscription](entity:WebhookSubscription). - source: - openapi: ../default/openapi/openapi.json - RevokeTokenResponse: - properties: - success: - type: optional - docs: If the request is successful, this is `true`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - RiskEvaluation: - docs: >- - Represents fraud risk information for the associated payment. - - - When you take a payment through Square's Payments API (using the - `CreatePayment` - - endpoint), Square evaluates it and assigns a risk level to the payment. - Sellers - - can use this information to determine the course of action (for example, - - provide the goods/services or refund the payment). - properties: - created_at: - type: optional - docs: The timestamp when payment risk was evaluated, in RFC 3339 format. - access: read-only - risk_level: - type: optional - docs: >- - The risk level associated with the payment - - See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for - possible values - source: - openapi: ../default/openapi/openapi.json - RiskEvaluationRiskLevel: - enum: - - PENDING - - NORMAL - - MODERATE - - HIGH - source: - openapi: ../default/openapi/openapi.json - SaveCardOptions: - docs: Describes save-card action fields. - properties: - customer_id: - type: string - docs: The square-assigned ID of the customer linked to the saved card. - card_id: - type: optional - docs: The id of the created card-on-file. - validation: - maxLength: 64 - access: read-only - reference_id: - type: optional> - docs: >- - An optional user-defined reference ID that can be used to associate - - this `Card` to another entity in an external system. For example, a - customer - - ID generated by a third-party system. - validation: - maxLength: 128 - source: - openapi: ../default/openapi/openapi.json - ScheduledShift: - docs: >- - Represents a specific time slot in a work schedule. This object is used to - manage the - - lifecycle of a scheduled shift from the draft to published state. A - scheduled shift contains - - the latest draft shift details and current published shift details. - properties: - id: - type: optional - docs: '**Read only** The Square-issued ID of the scheduled shift.' - validation: - maxLength: 255 - draft_shift_details: - type: optional - docs: >- - The latest draft shift details for the scheduled shift. Draft shift - details are used to - - stage and manage shifts before publishing. This field is always - present. - published_shift_details: - type: optional - docs: >- - The current published (public) shift details for the scheduled shift. - This field is - - present only if the shift was published. - version: - type: optional - docs: >- - **Read only** The current version of the scheduled shift, which is - incremented with each update. - - This field is used for [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control to ensure that requests don't overwrite data from another - request. - created_at: - type: optional - docs: >- - The timestamp of when the scheduled shift was created, in RFC 3339 - format presented as UTC. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the scheduled shift was last updated, in RFC - 3339 format presented as UTC. - access: read-only - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftDetails: - docs: >- - Represents shift details for draft and published versions of a [scheduled - shift](entity:ScheduledShift), - - such as job ID, team member assignment, and start and end times. - properties: - team_member_id: - type: optional> - docs: >- - The ID of the [team member](entity:TeamMember) scheduled for the - shift. - validation: - maxLength: 255 - location_id: - type: optional> - docs: The ID of the [location](entity:Location) the shift is scheduled for. - validation: - maxLength: 255 - job_id: - type: optional> - docs: The ID of the [job](entity:Job) the shift is scheduled for. - start_at: - type: optional> - docs: >- - The start time of the shift, in RFC 3339 format in the time zone - + - - offset of the shift location specified in `location_id`. Precision up - to the minute - - is respected; seconds are truncated. - end_at: - type: optional> - docs: >- - The end time for the shift, in RFC 3339 format in the time zone + - - offset of the shift location specified in `location_id`. Precision up - to the minute - - is respected; seconds are truncated. - notes: - type: optional> - docs: Optional notes for the shift. - validation: - maxLength: 1000 - is_deleted: - type: optional> - docs: >- - Indicates whether the draft shift version is deleted. If set to `true` - when the shift - - is published, the entire scheduled shift (including the published - shift) is deleted and - - cannot be accessed using any endpoint. - timezone: - type: optional - docs: >- - The time zone of the shift location, calculated based on the - `location_id`. This field - - is provided for convenience. - access: read-only - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftFilter: - docs: >- - Defines filter criteria for a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - - request. Multiple filters in a query are combined as an `AND` operation. - properties: - location_ids: - type: optional>> - docs: >- - Return shifts for the specified locations. When omitted, shifts for - all - - locations are returned. If needed, call - [ListLocations](api-endpoint:Locations-ListLocations) - - to get location IDs. - start: - type: optional - docs: |- - Return shifts whose `start_at` time is within the specified - time range (inclusive). - end: - type: optional - docs: |- - Return shifts whose `end_at` time is within the specified - time range (inclusive). - workday: - type: optional - docs: Return shifts based on a workday date range. - team_member_ids: - type: optional>> - docs: >- - Return shifts assigned to specified team members. If needed, call - - [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) to get team - member IDs. - - - To return only the shifts assigned to the specified team members, - include the - - `assignment_status` filter in the query. Otherwise, all unassigned - shifts are - - returned along with shifts assigned to the specified team members. - assignment_status: - type: optional - docs: >- - Return shifts based on whether a team member is assigned. A shift is - - assigned if the `team_member_id` field is populated in the - `draft_shift_details` - - or `published_shift details` field of the shift. - - - To return only draft or published shifts, include the - `scheduled_shift_statuses` - - filter in the query. - - See - [ScheduledShiftFilterAssignmentStatus](#type-scheduledshiftfilterassignmentstatus) - for possible values - scheduled_shift_statuses: - type: optional>> - docs: >- - Return shifts based on the draft or published status of the shift. - - A shift is published if the `published_shift_details` field is - present. - - - Note that shifts with `draft_shift_details.is_deleted` set to `true` - are ignored - - with the `DRAFT` filter. - - See - [ScheduledShiftFilterScheduledShiftStatus](#type-scheduledshiftfilterscheduledshiftstatus) - for possible values - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftFilterAssignmentStatus: - enum: - - ASSIGNED - - UNASSIGNED - docs: |- - Defines valid values for the `assignment_status` filter in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - Assignment status is based on the `draft_shift_details.team_member_id` and - `published_shift_details.team_member_id` fields of the scheduled shift. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftFilterScheduledShiftStatus: - enum: - - DRAFT - - PUBLISHED - docs: |- - Defines valid values for the `scheduled_shift_statuses` filter in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftNotificationAudience: - enum: - - ALL - - AFFECTED - - NONE - docs: >- - Indicates whether Square sends an email notification to team members - - when a scheduled shift is published and which team members receive the - notification. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftQuery: - docs: |- - Represents filter and sort criteria for the `query` field in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - properties: - filter: - type: optional - docs: Filtering options for the query. - sort: - type: optional - docs: Sorting options for the query. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftSort: - docs: >- - Defines sort criteria for a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - - request. - properties: - field: - type: optional - docs: >- - The field to sort on. The default value is `START_AT`. - - See [ScheduledShiftSortField](#type-scheduledshiftsortfield) for - possible values - order: - type: optional - docs: |- - The order in which results are returned. The default value is `ASC`. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftSortField: - enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT - docs: |- - Defines valid values for the `field` sort setting in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftWorkday: - docs: >- - A `ScheduledShift` search query filter parameter that sets a range of days - that - - a `Shift` must start or end in before passing the filter condition. - properties: - date_range: - type: optional - docs: Dates for fetching the scheduled shifts. - match_scheduled_shifts_by: - type: optional - docs: >- - The strategy on which the dates are applied. - - See [ScheduledShiftWorkdayMatcher](#type-scheduledshiftworkdaymatcher) - for possible values - default_timezone: - type: optional> - docs: >- - Location-specific timezones convert workdays to datetime filters. - - Every location included in the query must have a timezone or this - field - - must be provided as a fallback. Format: the IANA timezone database - - identifier for the relevant timezone. - source: - openapi: ../default/openapi/openapi.json - ScheduledShiftWorkdayMatcher: - enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. - source: - openapi: ../default/openapi/openapi.json - SearchAvailabilityFilter: - docs: A query filter to search for buyer-accessible availabilities by. - properties: - start_at_range: - type: TimeRange - docs: >- - The query expression to search for buy-accessible availabilities with - their starting times falling within the specified time range. - - The time range must be at least 24 hours and at most 32 days long. - - For waitlist availabilities, the time range can be 0 or more up to 367 - days long. - location_id: - type: optional> - docs: >- - The query expression to search for buyer-accessible availabilities - with their location IDs matching the specified location ID. - - This query expression cannot be set if `booking_id` is set. - validation: - maxLength: 32 - segment_filters: - type: optional>> - docs: >- - The query expression to search for buyer-accessible availabilities - matching the specified list of segment filters. - - If the size of the `segment_filters` list is `n`, the search returns - availabilities with `n` segments per availability. - - - This query expression cannot be set if `booking_id` is set. - booking_id: - type: optional> - docs: >- - The query expression to search for buyer-accessible availabilities for - an existing booking by matching the specified `booking_id` value. - - This is commonly used to reschedule an appointment. - - If this expression is set, the `location_id` and `segment_filters` - expressions cannot be set. - validation: - maxLength: 36 - source: - openapi: ../default/openapi/openapi.json - SearchAvailabilityQuery: - docs: The query used to search for buyer-accessible availabilities of bookings. - properties: - filter: - type: SearchAvailabilityFilter - docs: >- - The query filter to search for buyer-accessible availabilities of - existing bookings. - source: - openapi: ../default/openapi/openapi.json - SearchAvailabilityResponse: - properties: - availabilities: - type: optional> - docs: List of appointment slots available for booking. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - SearchCatalogItemsRequestStockLevel: - enum: - - OUT - - LOW - docs: Defines supported stock levels of the item inventory. - source: - openapi: ../default/openapi/openapi.json - SearchCatalogItemsResponse: - docs: >- - Defines the response body returned from the - [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - items: - type: optional> - docs: Returned items matching the specified query expressions. - cursor: - type: optional - docs: >- - Pagination token used in the next request to return more of the search - result. - matched_variation_ids: - type: optional> - docs: >- - Ids of returned item variations matching the specified query - expression. - source: - openapi: ../default/openapi/openapi.json - SearchCatalogObjectsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - objects: - type: optional> - docs: The CatalogObjects returned. - related_objects: - type: optional> - docs: >- - A list of CatalogObjects referenced by the objects in the `objects` - field. - latest_time: - type: optional - docs: >- - When the associated product catalog was last updated. Will - - match the value for `end_time` or `cursor` if either field is included - in the `SearchCatalog` request. - source: - openapi: ../default/openapi/openapi.json - SearchCustomersResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the `SearchCustomers` endpoint. - - - Either `errors` or `customers` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customers: - type: optional> - docs: >- - The customer profiles that match the search query. If any search - condition is not met, the result is an empty object (`{}`). - - Only customer profiles with public information (`given_name`, - `family_name`, `company_name`, `email_address`, or `phone_number`) - - are included in the response. - cursor: - type: optional - docs: >- - A pagination cursor that can be used during subsequent calls - - to `SearchCustomers` to retrieve the next set of results associated - - with the original query. Pagination cursors are only present when - - a request succeeds and additional results are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - count: - type: optional - docs: >- - The total count of customers associated with the Square account that - match the search query. Only customer profiles with - - public information (`given_name`, `family_name`, `company_name`, - `email_address`, or `phone_number`) are counted. This field is - - present only if `count` is set to `true` in the request. - source: - openapi: ../default/openapi/openapi.json - SearchEventsFilter: - docs: Criteria to filter events by. - properties: - event_types: - type: optional>> - docs: Filter events by event types. - merchant_ids: - type: optional>> - docs: Filter events by merchant. - location_ids: - type: optional>> - docs: Filter events by location. - created_at: - type: optional - docs: Filter events by when they were created. - source: - openapi: ../default/openapi/openapi.json - SearchEventsQuery: - docs: Contains query criteria for the search. - properties: - filter: - type: optional - docs: Criteria to filter events by. - sort: - type: optional - docs: Criteria to sort events by. - source: - openapi: ../default/openapi/openapi.json - SearchEventsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [SearchEvents](api-endpoint:Events-SearchEvents) - endpoint. - - - Note: if there are errors processing the request, the events field will - not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - events: - type: optional> - docs: The list of [Event](entity:Event)s returned by the search. - metadata: - type: optional> - docs: >- - Contains the metadata of an event. For more information, see - [Event](entity:Event). - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a subsequent request to fetch the next set of events. If empty, this - is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - SearchEventsSort: - docs: Criteria to sort events by. - properties: - field: - type: optional - docs: >- - Sort events by event types. - - See [SearchEventsSortField](#type-searcheventssortfield) for possible - values - order: - type: optional - docs: |- - The order to use for sorting the events. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - SearchEventsSortField: - type: literal<"DEFAULT"> - docs: Specifies the sort key for events returned from a search. - SearchInvoicesResponse: - docs: Describes a `SearchInvoices` response. - properties: - invoices: - type: optional> - docs: The list of invoices returned by the search. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to fetch the next set of invoices. If empty, this - is the final - - response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - SearchLoyaltyAccountsRequestLoyaltyAccountQuery: - docs: The search criteria for the loyalty accounts. - properties: - mappings: - type: optional>> - docs: |- - The set of mappings to use in the loyalty account search. - - This cannot be combined with `customer_ids`. - - Max: 30 mappings - customer_ids: - type: optional>> - docs: |- - The set of customer IDs to use in the loyalty account search. - - This cannot be combined with `mappings`. - - Max: 30 customer IDs - source: - openapi: ../default/openapi/openapi.json - SearchLoyaltyAccountsResponse: - docs: >- - A response that includes loyalty accounts that satisfy the search - criteria. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_accounts: - type: optional> - docs: |- - The loyalty accounts that met the search criteria, - in order of creation date. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - SearchLoyaltyEventsResponse: - docs: |- - A response that contains loyalty events that satisfy the search - criteria, in order by the `created_at` date. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - events: - type: optional> - docs: The loyalty events that satisfy the search criteria. - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - SearchLoyaltyRewardsRequestLoyaltyRewardQuery: - docs: The set of search requirements. - properties: - loyalty_account_id: - type: string - docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) to which the - loyalty reward belongs. - validation: - minLength: 1 - status: - type: optional - docs: >- - The status of the loyalty reward. - - See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible - values - source: - openapi: ../default/openapi/openapi.json - SearchLoyaltyRewardsResponse: - docs: >- - A response that includes the loyalty rewards satisfying the search - criteria. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - rewards: - type: optional> - docs: |- - The loyalty rewards that satisfy the search criteria. - These are returned in descending order by `updated_at`. - cursor: - type: optional - docs: |- - The pagination cursor to be used in a subsequent - request. If empty, this is the final response. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersCustomerFilter: - docs: |- - A filter based on the order `customer_id` and any tender `customer_id` - associated with the order. It does not filter based on the - [FulfillmentRecipient](entity:FulfillmentRecipient) `customer_id`. - properties: - customer_ids: - type: optional>> - docs: |- - A list of customer IDs to filter by. - - Max: 10 customer ids. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersDateTimeFilter: - docs: >- - Filter for `Order` objects based on whether their `CREATED_AT`, - - `CLOSED_AT`, or `UPDATED_AT` timestamps fall within a specified time - range. - - You can specify the time range and which timestamp to filter for. You can - filter - - for only one time range at a time. - - - For each time range, the start time and end time are inclusive. If the end - time - - is absent, it defaults to the time of the first request for the cursor. - - - __Important:__ If you use the `DateTimeFilter` in a `SearchOrders` query, - - you must set the `sort_field` in [OrdersSort](entity:SearchOrdersSort) - - to the same field you filter for. For example, if you set the `CLOSED_AT` - field - - in `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` - to - - `CLOSED_AT`. Otherwise, `SearchOrders` throws an error. - - [Learn more about filtering orders by time - range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) - properties: - created_at: - type: optional - docs: >- - The time range for filtering on the `created_at` timestamp. If you use - this - - value, you must set the `sort_field` in the `OrdersSearchSort` object - to - - `CREATED_AT`. - updated_at: - type: optional - docs: >- - The time range for filtering on the `updated_at` timestamp. If you use - this - - value, you must set the `sort_field` in the `OrdersSearchSort` object - to - - `UPDATED_AT`. - closed_at: - type: optional - docs: >- - The time range for filtering on the `closed_at` timestamp. If you use - this - - value, you must set the `sort_field` in the `OrdersSearchSort` object - to - - `CLOSED_AT`. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersFilter: - docs: |- - Filtering criteria to use for a `SearchOrders` request. Multiple filters - are ANDed together. - properties: - state_filter: - type: optional - docs: Filter by [OrderState](entity:OrderState). - date_time_filter: - type: optional - docs: >- - Filter for results within a time range. - - - __Important:__ If you filter for orders by time range, you must set - `SearchOrdersSort` - - to sort by the same field. - - [Learn more about filtering orders by time - range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) - fulfillment_filter: - type: optional - docs: Filter by the fulfillment type or state. - source_filter: - type: optional - docs: Filter by the source of the order. - customer_filter: - type: optional - docs: Filter by customers associated with the order. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersFulfillmentFilter: - docs: Filter based on [order fulfillment](entity:Fulfillment) information. - properties: - fulfillment_types: - type: optional>> - docs: >- - A list of [fulfillment types](entity:FulfillmentType) to filter - - for. The list returns orders if any of its fulfillments match any of - the fulfillment types - - listed in this field. - - See [FulfillmentType](#type-fulfillmenttype) for possible values - fulfillment_states: - type: optional>> - docs: >- - A list of [fulfillment states](entity:FulfillmentState) to filter - - for. The list returns orders if any of its fulfillments match any of - the - - fulfillment states listed in this field. - - See [FulfillmentState](#type-fulfillmentstate) for possible values - source: - openapi: ../default/openapi/openapi.json - SearchOrdersQuery: - docs: Contains query criteria for the search. - properties: - filter: - type: optional - docs: Criteria to filter results by. - sort: - type: optional - docs: Criteria to sort results by. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersResponse: - docs: >- - Either the `order_entries` or `orders` field is set, depending on whether - - `return_entries` is set on the - [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). - properties: - order_entries: - type: optional> - docs: >- - A list of [OrderEntries](entity:OrderEntry) that fit the query - - conditions. The list is populated only if `return_entries` is set to - `true` in the request. - orders: - type: optional> - docs: >- - A list of - - [Order](entity:Order) objects that match the query conditions. The - list is populated only if - - `return_entries` is set to `false` in the request. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: '[Errors](entity:Error) encountered during the search.' - source: - openapi: ../default/openapi/openapi.json - SearchOrdersSort: - docs: |- - Sorting criteria for a `SearchOrders` request. Results can only be sorted - by a timestamp field. - properties: - sort_field: - type: SearchOrdersSortField - docs: >- - The field to sort by. - - - __Important:__ When using a - [DateTimeFilter](entity:SearchOrdersFilter), - - `sort_field` must match the timestamp field that the `DateTimeFilter` - uses to - - filter. For example, if you set your `sort_field` to `CLOSED_AT` and - you use a - - `DateTimeFilter`, your `DateTimeFilter` must filter for orders by - their `CLOSED_AT` date. - - If this field does not match the timestamp field in `DateTimeFilter`, - - `SearchOrders` returns an error. - - - Default: `CREATED_AT`. - - See [SearchOrdersSortField](#type-searchorderssortfield) for possible - values - sort_order: - type: optional - docs: >- - The chronological order in which results are returned. Defaults to - `DESC`. - - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - SearchOrdersSortField: - enum: - - CREATED_AT - - UPDATED_AT - - CLOSED_AT - docs: Specifies which timestamp to use to sort `SearchOrder` results. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersSourceFilter: - docs: A filter based on order `source` information. - properties: - source_names: - type: optional>> - docs: >- - Filters by the [Source](entity:OrderSource) `name`. The filter returns - any orders - - with a `source.name` that matches any of the listed source names. - - - Max: 10 source names. - source: - openapi: ../default/openapi/openapi.json - SearchOrdersStateFilter: - docs: Filter by the current order `state`. - properties: - states: - docs: |- - States to filter for. - See [OrderState](#type-orderstate) for possible values - type: list - source: - openapi: ../default/openapi/openapi.json - SearchScheduledShiftsResponse: - docs: >- - Represents a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - response. - - Either `scheduled_shifts` or `errors` is present in the response. - properties: - scheduled_shifts: - type: optional> - docs: A paginated list of scheduled shifts that match the query conditions. - cursor: - type: optional - docs: >- - The pagination cursor used to retrieve the next page of results. This - field is present - - only if additional results are available. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - SearchShiftsResponse: - docs: >- - The response to a request for `Shift` objects. The response contains - - the requested `Shift` objects and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - shifts: - type: optional> - docs: Shifts. - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - SearchSubscriptionsFilter: - docs: >- - Represents a set of query expressions (filters) to narrow the scope of - targeted subscriptions returned by - - the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - endpoint. - properties: - customer_ids: - type: optional>> - docs: >- - A filter to select subscriptions based on the subscribing customer - IDs. - location_ids: - type: optional>> - docs: A filter to select subscriptions based on the location. - source_names: - type: optional>> - docs: A filter to select subscriptions based on the source application. - source: - openapi: ../default/openapi/openapi.json - SearchSubscriptionsQuery: - docs: >- - Represents a query, consisting of specified query expressions, used to - search for subscriptions. - properties: - filter: - type: optional - docs: A list of query expressions. - source: - openapi: ../default/openapi/openapi.json - SearchSubscriptionsResponse: - docs: >- - Defines output parameters in a response from the - - [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscriptions: - type: optional> - docs: The subscriptions matching the specified query expressions. - cursor: - type: optional - docs: >- - When the total number of resulting subscription exceeds the limit of a - paged response, - - the response includes a cursor for you to use in a subsequent request - to fetch the next set of results. - - If the cursor is unset, the response contains the last page of the - results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: ../default/openapi/openapi.json - SearchTeamMembersFilter: - docs: >- - Represents a filter used in a search for `TeamMember` objects. `AND` logic - is applied - - between the individual fields, and `OR` logic is applied within list-based - fields. - - For example, setting this filter value: - - ``` - - filter = (locations_ids = ["A", "B"], status = ACTIVE) - - ``` - - returns only active team members assigned to either location "A" or "B". - properties: - location_ids: - type: optional>> - docs: >- - When present, filters by team members assigned to the specified - locations. - - When empty, includes team members assigned to any location. - status: - type: optional - docs: |- - When present, filters by team members who match the given status. - When empty, includes team members of all statuses. - See [TeamMemberStatus](#type-teammemberstatus) for possible values - is_owner: - type: optional> - docs: >- - When present and set to true, returns the team member who is the owner - of the Square account. - source: - openapi: ../default/openapi/openapi.json - SearchTeamMembersQuery: - docs: Represents the parameters in a search for `TeamMember` objects. - properties: - filter: - type: optional - docs: The options to filter by. - source: - openapi: ../default/openapi/openapi.json - SearchTeamMembersResponse: - docs: >- - Represents a response from a search request containing a filtered list of - `TeamMember` objects. - properties: - team_members: - type: optional> - docs: The filtered list of `TeamMember` objects. - cursor: - type: optional - docs: >- - The opaque cursor for fetching the next page. For more information, - see - - [pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - SearchTerminalActionsResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional> - docs: The requested search result of `TerminalAction`s. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more - - information. - source: - openapi: ../default/openapi/openapi.json - SearchTerminalCheckoutsResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkouts: - type: optional> - docs: The requested search result of `TerminalCheckout` objects. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - SearchTerminalRefundsResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refunds: - type: optional> - docs: The requested search result of `TerminalRefund` objects. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - source: - openapi: ../default/openapi/openapi.json - SearchTimecardsResponse: - docs: >- - The response to a request for `Timecard` objects. The response contains - - the requested `Timecard` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - timecards: - type: optional> - docs: Timecards. - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - SearchTransferOrdersResponse: - docs: Response for searching transfer orders - properties: - transfer_orders: - type: optional> - docs: List of transfer orders matching the search criteria - cursor: - type: optional - docs: Pagination cursor for fetching the next page of results - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - SearchVendorsRequestFilter: - docs: Defines supported query expressions to search for vendors by. - properties: - name: - type: optional>> - docs: The names of the [Vendor](entity:Vendor) objects to retrieve. - status: - type: optional>> - docs: |- - The statuses of the [Vendor](entity:Vendor) objects to retrieve. - See [VendorStatus](#type-vendorstatus) for possible values - source: - openapi: ../default/openapi/openapi.json - SearchVendorsRequestSort: - docs: >- - Defines a sorter used to sort results from - [SearchVendors](api-endpoint:Vendors-SearchVendors). - properties: - field: - type: optional - docs: |- - Specifies the sort key to sort the returned vendors. - See [Field](#type-field) for possible values - order: - type: optional - docs: |- - Specifies the sort order for the returned vendors. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - SearchVendorsRequestSortField: - enum: - - NAME - - CREATED_AT - docs: The field to sort the returned [Vendor](entity:Vendor) objects by. - source: - openapi: ../default/openapi/openapi.json - SearchVendorsResponse: - docs: >- - Represents an output from a call to - [SearchVendors](api-endpoint:Vendors-SearchVendors). - properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - vendors: - type: optional> - docs: >- - The [Vendor](entity:Vendor) objects matching the specified search - filter. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - source: - openapi: ../default/openapi/openapi.json - SegmentFilter: - docs: A query filter to search for buyer-accessible appointment segments by. - properties: - service_variation_id: - type: string - docs: >- - The ID of the [CatalogItemVariation](entity:CatalogItemVariation) - object representing the service booked in this segment. - validation: - minLength: 1 - maxLength: 36 - team_member_id_filter: - type: optional - docs: >- - A query filter to search for buyer-accessible appointment segments - with service-providing team members matching the specified list of - team member IDs. Supported query expressions are - - - `ANY`: return the appointment segments with team members whose IDs - match any member in this list. - - - `NONE`: return the appointment segments with team members whose IDs - are not in this list. - - - `ALL`: not supported. - - - When no expression is specified, any service-providing team member is - eligible to fulfill the Booking. - source: - openapi: ../default/openapi/openapi.json - SelectOption: - properties: - reference_id: - type: string - docs: The reference id for the option. - validation: - minLength: 1 - maxLength: 40 - title: - type: string - docs: The title text that displays in the select option button. - validation: - minLength: 1 - maxLength: 250 - source: - openapi: ../default/openapi/openapi.json - SelectOptions: - properties: - title: - type: string - docs: The title text to display in the select flow on the Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: The body text to display in the select flow on the Terminal. - validation: - minLength: 1 - maxLength: 10000 - options: - docs: >- - Represents the buttons/options that should be displayed in the select - flow on the Terminal. - type: list - selected_option: - type: optional - docs: The buyer’s selected option. - source: - openapi: ../default/openapi/openapi.json - Shift: - docs: >- - A record of the hourly rate, start, and end times for a single work shift - - for an employee. This might include a record of the start and end times - for breaks - - taken during the shift. - - - Deprecated at Square API version 2025-05-21. Replaced by - [Timecard](entity:Timecard). - - See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - id: - type: optional - docs: The UUID for this object. - validation: - maxLength: 255 - employee_id: - type: optional> - docs: >- - The ID of the employee this shift belongs to. DEPRECATED at version - 2020-08-26. Use `team_member_id` instead. - location_id: - type: string - docs: >- - The ID of the location this shift occurred at. The location should be - based on - - where the employee clocked in. - validation: - minLength: 1 - timezone: - type: optional> - docs: >- - The read-only convenience value that is calculated from the location - based - - on the `location_id`. Format: the IANA timezone database identifier - for the - - location timezone. - start_at: - type: string - docs: >- - RFC 3339; shifted to the location timezone + offset. Precision up to - the - - minute is respected; seconds are truncated. - validation: - minLength: 1 - end_at: - type: optional> - docs: >- - RFC 3339; shifted to the timezone + offset. Precision up to the minute - is - - respected; seconds are truncated. - wage: - type: optional - docs: >- - Job and pay related information. If the wage is not set on create, it - defaults to a wage - - of zero. If the title is not set on create, it defaults to the name of - the role the employee - - is assigned to, if any. - breaks: - type: optional>> - docs: >- - A list of all the paid or unpaid breaks that were taken during this - shift. - status: - type: optional - docs: |- - Describes the working state of the current `Shift`. - See [ShiftStatus](#type-shiftstatus) for possible values - version: - type: optional - docs: >- - Used for resolving concurrency issues. The request fails if the - version - - provided does not match the server version at the time of the request. - If not provided, - - Square executes a blind write; potentially overwriting data from - another - - write. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - updated_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - team_member_id: - type: optional> - docs: >- - The ID of the team member this shift belongs to. Replaced - `employee_id` at version "2020-08-26". - declared_cash_tip_money: - type: optional - docs: The tips declared by the team member for the shift. - source: - openapi: ../default/openapi/openapi.json - ShiftFilter: - docs: >- - Defines a filter used in a search for `Shift` records. `AND` logic is - - used by Square's servers to apply each filter property specified. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - location_ids: - type: optional>> - docs: Fetch shifts for the specified location. - employee_ids: - type: optional>> - docs: >- - Fetch shifts for the specified employees. DEPRECATED at version - 2020-08-26. Use `team_member_ids` instead. - status: - type: optional - docs: |- - Fetch a `Shift` instance by `Shift.status`. - See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values - start: - type: optional - docs: Fetch `Shift` instances that start in the time range - Inclusive. - end: - type: optional - docs: Fetch the `Shift` instances that end in the time range - Inclusive. - workday: - type: optional - docs: Fetch the `Shift` instances based on the workday date range. - team_member_ids: - type: optional>> - docs: >- - Fetch shifts for the specified team members. Replaced `employee_ids` - at version "2020-08-26". - source: - openapi: ../default/openapi/openapi.json - ShiftFilterStatus: - enum: - - OPEN - - CLOSED - docs: >- - Specifies the `status` of `Shift` records to be returned. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - source: - openapi: ../default/openapi/openapi.json - ShiftQuery: - docs: >- - The parameters of a `Shift` search query, which includes filter and sort - options. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - filter: - type: optional - docs: Query filter options. - sort: - type: optional - docs: Sort order details. - source: - openapi: ../default/openapi/openapi.json - ShiftSort: - docs: >- - Sets the sort order of search results. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - field: - type: optional - docs: |- - The field to sort on. - See [ShiftSortField](#type-shiftsortfield) for possible values - order: - type: optional - docs: |- - The order in which results are returned. Defaults to DESC. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - ShiftSortField: - enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT - docs: >- - Enumerates the `Shift` fields to sort on. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - source: - openapi: ../default/openapi/openapi.json - ShiftStatus: - enum: - - OPEN - - CLOSED - docs: >- - Enumerates the possible status of a `Shift`. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - source: - openapi: ../default/openapi/openapi.json - ShiftWage: - docs: >- - The hourly wage rate used to compensate an employee for this shift. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - title: - type: optional> - docs: The name of the job performed during this shift. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: - type: optional - docs: |- - The id of the job performed during this shift. Square - labor-reporting UIs might group shifts together by id. - access: read-only - tip_eligible: - type: optional> - docs: Whether team members are eligible for tips when working this job. - source: - openapi: ../default/openapi/openapi.json - ShiftWorkday: - docs: >- - A `Shift` search query filter parameter that sets a range of days that - - a `Shift` must start or end in before passing the filter condition. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). - properties: - date_range: - type: optional - docs: Dates for fetching the shifts. - match_shifts_by: - type: optional - docs: >- - The strategy on which the dates are applied. - - See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible - values - default_timezone: - type: optional> - docs: >- - Location-specific timezones convert workdays to datetime filters. - - Every location included in the query must have a timezone or this - field - - must be provided as a fallback. Format: the IANA timezone database - - identifier for the relevant timezone. - source: - openapi: ../default/openapi/openapi.json - ShiftWorkdayMatcher: - enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. - source: - openapi: ../default/openapi/openapi.json - ShippingFee: - properties: - name: - type: optional> - docs: The name for the shipping fee. - charge: - type: Money - docs: The amount and currency for the shipping fee. - source: - openapi: ../default/openapi/openapi.json - SignatureImage: - properties: - image_type: - type: optional - docs: |- - The mime/type of the image data. - Use `image/png;base64` for png. - access: read-only - data: - type: optional - docs: The base64 representation of the image. - access: read-only - source: - openapi: ../default/openapi/openapi.json - SignatureOptions: - properties: - title: - type: string - docs: >- - The title text to display in the signature capture flow on the - Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: >- - The body text to display in the signature capture flow on the - Terminal. - validation: - minLength: 1 - maxLength: 10000 - signature: - type: optional> - docs: An image representation of the collected signature. - access: read-only - source: - openapi: ../default/openapi/openapi.json - Site: - docs: >- - Represents a Square Online site, which is an online store for a Square - seller. - properties: - id: - type: optional - docs: The Square-assigned ID of the site. - validation: - maxLength: 32 - access: read-only - site_title: - type: optional> - docs: The title of the site. - domain: - type: optional> - docs: >- - The domain of the site (without the protocol). For example, - `mysite1.square.site`. - is_published: - type: optional> - docs: Indicates whether the site is published. - created_at: - type: optional - docs: The timestamp of when the site was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp of when the site was last updated, in RFC 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - Snippet: - docs: >- - Represents the snippet that is added to a Square Online site. The snippet - code is injected into the `head` element of all pages on the site, except - for checkout pages. - properties: - id: - type: optional - docs: The Square-assigned ID for the snippet. - validation: - maxLength: 48 - access: read-only - site_id: - type: optional - docs: The ID of the site that contains the snippet. - access: read-only - content: - type: string - docs: The snippet code, which can contain valid HTML, JavaScript, or both. - validation: - minLength: 1 - maxLength: 65535 - created_at: - type: optional - docs: >- - The timestamp of when the snippet was initially added to the site, in - RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the snippet was last updated on the site, in RFC - 3339 format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - SortOrder: - enum: - - DESC - - ASC - docs: >- - The order (e.g., chronological or alphabetical) in which results from a - request are returned. - source: - openapi: ../default/openapi/openapi.json - SourceApplication: - docs: Represents information about the application used to generate a change. - properties: - product: - type: optional - docs: |- - __Read only__ The [product](entity:Product) type of the application. - See [Product](#type-product) for possible values - application_id: - type: optional> - docs: >- - __Read only__ The Square-assigned ID of the application. This field is - used only if the - - [product](entity:Product) type is `EXTERNAL_API`. - name: - type: optional> - docs: >- - __Read only__ The display name of the application - - (for example, `"Custom Application"` or `"Square POS 4.74 for - Android"`). - source: - openapi: ../default/openapi/openapi.json - SquareAccountDetails: - docs: Additional details about Square Account payments. - properties: - payment_source_token: - type: optional> - docs: Unique identifier for the payment source used for this payment. - validation: - maxLength: 255 - errors: - type: optional>> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - StandardUnitDescription: - docs: Contains the name and abbreviation for standard measurement unit. - properties: - unit: - type: optional - docs: Identifies the measurement unit being described. - name: - type: optional> - docs: UI display name of the measurement unit. For example, 'Pound'. - abbreviation: - type: optional> - docs: UI display abbreviation for the measurement unit. For example, 'lb'. - source: - openapi: ../default/openapi/openapi.json - StandardUnitDescriptionGroup: - docs: Group of standard measurement units. - properties: - standard_unit_descriptions: - type: optional>> - docs: >- - List of standard (non-custom) measurement units in this description - group. - language_code: - type: optional> - docs: IETF language tag. - source: - openapi: ../default/openapi/openapi.json - StartTransferOrderResponse: - docs: Response for starting a transfer order. - properties: - transfer_order: - type: optional - docs: The updated transfer order with status changed to STARTED - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - SubmitEvidenceResponse: - docs: Defines the fields in a `SubmitEvidence` response. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - dispute: - type: optional - docs: The `Dispute` for which evidence was submitted. - source: - openapi: ../default/openapi/openapi.json - Subscription: - docs: >- - Represents a subscription purchased by a customer. - - - For more information, see - - [Manage - Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions). - properties: - id: - type: optional - docs: The Square-assigned ID of the subscription. - validation: - maxLength: 255 - access: read-only - location_id: - type: optional - docs: The ID of the location associated with the subscription. - access: read-only - plan_variation_id: - type: optional - docs: >- - The ID of the subscribed-to [subscription plan - variation](entity:CatalogSubscriptionPlanVariation). - access: read-only - customer_id: - type: optional - docs: The ID of the subscribing [customer](entity:Customer) profile. - access: read-only - start_date: - type: optional - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the - subscription. - access: read-only - canceled_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel - the subscription, - - when the subscription status changes to `CANCELED` and the - subscription billing stops. - - - If this field is not set, the subscription ends according its - subscription plan. - - - This field cannot be updated, other than being cleared. - charged_through_date: - type: optional - docs: >- - The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced - for the - - subscription. - - - After the invoice is sent for a given billing period, - - this date will be the last day of the billing period. - - For example, - - suppose for the month of May a subscriber gets an invoice - - (or charged the card) on May 1. For the monthly billing scenario, - - this date is then set to May 31. - access: read-only - status: - type: optional - docs: |- - The current status of the subscription. - See [SubscriptionStatus](#type-subscriptionstatus) for possible values - tax_percentage: - type: optional> - docs: |- - The tax amount applied when billing the subscription. The - percentage is expressed in decimal form, using a `'.'` as the decimal - separator and without a `'%'` sign. For example, a value of `7.5` - corresponds to 7.5%. - invoice_ids: - type: optional> - docs: |- - The IDs of the [invoices](entity:Invoice) created for the - subscription, listed in order when the invoices were created - (newest invoices appear first). - access: read-only - price_override_money: - type: optional - docs: >- - A custom price which overrides the cost of a subscription plan - variation with `STATIC` pricing. - - This field does not affect itemized subscriptions with `RELATIVE` - pricing. Instead, - - you should edit the Subscription's [order - template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates). - version: - type: optional - docs: >- - The version of the object. When updating an object, the version - - supplied must match the version in the database, otherwise the write - will - - be rejected as conflicting. - created_at: - type: optional - docs: The timestamp when the subscription was created, in RFC 3339 format. - access: read-only - card_id: - type: optional> - docs: |- - The ID of the [subscriber's](entity:Customer) [card](entity:Card) - used to charge for the subscription. - timezone: - type: optional - docs: >- - Timezone that will be used in date calculations for the subscription. - - Defaults to the timezone of the location based on `location_id`. - - Format: the IANA Timezone Database identifier for the location - timezone (for example, `America/Los_Angeles`). - access: read-only - source: - type: optional - docs: The origination details of the subscription. - actions: - type: optional>> - docs: >- - The list of scheduled actions on this subscription. It is set only in - the response from - - [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) - with the query parameter - - of `include=actions` or from - - [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - with the input parameter - - of `include:["actions"]`. - monthly_billing_anchor_date: - type: optional - docs: >- - The day of the month on which the subscription will issue invoices and - publish orders. - access: read-only - phases: - type: optional> - docs: array of phases for this subscription - access: read-only - completed_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the subscription enters a - terminal state. - source: - openapi: ../default/openapi/openapi.json - SubscriptionAction: - docs: Represents an action as a pending change to a subscription. - properties: - id: - type: optional - docs: The ID of an action scoped to a subscription. - type: - type: optional - docs: >- - The type of the action. - - See [SubscriptionActionType](#type-subscriptionactiontype) for - possible values - effective_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the action occurs on the - subscription. - monthly_billing_anchor_date: - type: optional> - docs: >- - The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` - action. - phases: - type: optional>> - docs: A list of Phases, to pass phase-specific information used in the swap. - new_plan_variation_id: - type: optional> - docs: >- - The target subscription plan variation that a subscription switches - to, for a `SWAP_PLAN` action. - source: - openapi: ../default/openapi/openapi.json - SubscriptionActionType: - enum: - - CANCEL - - PAUSE - - RESUME - - SWAP_PLAN - - CHANGE_BILLING_ANCHOR_DATE - - COMPLETE - docs: Supported types of an action as a pending change to a subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionCadence: - enum: - - DAILY - - WEEKLY - - EVERY_TWO_WEEKS - - THIRTY_DAYS - - SIXTY_DAYS - - NINETY_DAYS - - MONTHLY - - EVERY_TWO_MONTHS - - QUARTERLY - - EVERY_FOUR_MONTHS - - EVERY_SIX_MONTHS - - ANNUAL - - EVERY_TWO_YEARS - docs: Determines the billing cadence of a [Subscription](entity:Subscription) - source: - openapi: ../default/openapi/openapi.json - SubscriptionCreatedEvent: - docs: Published when a [Subscription](entity:Subscription) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"subscription.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - SubscriptionCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"subscription"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected subscription. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the created subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionCreatedEventObject: - properties: - subscription: - type: optional - docs: The created subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionEvent: - docs: Describes changes to a subscription and the subscription status. - properties: - id: - type: string - docs: The ID of the subscription event. - subscription_event_type: - type: SubscriptionEventSubscriptionEventType - docs: >- - Type of the subscription event. - - See - [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) - for possible values - effective_date: - type: string - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the - subscription event occurred. - monthly_billing_anchor_date: - type: optional - docs: >- - The day-of-the-month the billing anchor date was changed to, if - applicable. - access: read-only - info: - type: optional - docs: Additional information about the subscription event. - phases: - type: optional>> - docs: A list of Phases, to pass phase-specific information used in the swap. - plan_variation_id: - type: string - docs: >- - The ID of the subscription plan variation associated with the - subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionEventInfo: - docs: Provides information about the subscription event. - properties: - detail: - type: optional> - docs: A human-readable explanation for the event. - code: - type: optional - docs: |- - An info code indicating the subscription event that occurred. - See [InfoCode](#type-infocode) for possible values - source: - openapi: ../default/openapi/openapi.json - SubscriptionEventInfoCode: - enum: - - LOCATION_NOT_ACTIVE - - LOCATION_CANNOT_ACCEPT_PAYMENT - - CUSTOMER_DELETED - - CUSTOMER_NO_EMAIL - - CUSTOMER_NO_NAME - - USER_PROVIDED - docs: Supported info codes of a subscription event. - source: - openapi: ../default/openapi/openapi.json - SubscriptionEventSubscriptionEventType: - enum: - - START_SUBSCRIPTION - - PLAN_CHANGE - - STOP_SUBSCRIPTION - - DEACTIVATE_SUBSCRIPTION - - RESUME_SUBSCRIPTION - - PAUSE_SUBSCRIPTION - - BILLING_ANCHOR_DATE_CHANGED - docs: Supported types of an event occurred to a subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionPhase: - docs: >- - Describes a phase in a subscription plan variation. For more information, - see [Subscription Plans and - Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations). - properties: - uid: - type: optional> - docs: >- - The Square-assigned ID of the subscription phase. This field cannot be - changed after a `SubscriptionPhase` is created. - cadence: - type: SubscriptionCadence - docs: >- - The billing cadence of the phase. For example, weekly or monthly. This - field cannot be changed after a `SubscriptionPhase` is created. - - See [SubscriptionCadence](#type-subscriptioncadence) for possible - values - periods: - type: optional> - docs: >- - The number of `cadence`s the phase lasts. If not set, the phase never - ends. Only the last phase can be indefinite. This field cannot be - changed after a `SubscriptionPhase` is created. - recurring_price_money: - type: optional - docs: >- - The amount to bill for each `cadence`. Failure to specify this field - results in a `MISSING_REQUIRED_PARAMETER` error at runtime. - ordinal: - type: optional> - docs: >- - The position this phase appears in the sequence of phases defined for - the plan, indexed from 0. This field cannot be changed after a - `SubscriptionPhase` is created. - pricing: - type: optional - docs: The subscription pricing. - source: - openapi: ../default/openapi/openapi.json - SubscriptionPricing: - docs: Describes the pricing for the subscription. - properties: - type: - type: optional - docs: >- - RELATIVE or STATIC - - See [SubscriptionPricingType](#type-subscriptionpricingtype) for - possible values - discount_ids: - type: optional>> - docs: The ids of the discount catalog objects - price_money: - type: optional - docs: The price of the subscription, if STATIC - source: - openapi: ../default/openapi/openapi.json - SubscriptionPricingType: - enum: - - STATIC - - RELATIVE - docs: Determines the pricing of a [Subscription](entity:Subscription) - source: - openapi: ../default/openapi/openapi.json - SubscriptionSource: - docs: The origination details of the subscription. - properties: - name: - type: optional> - docs: |- - The name used to identify the place (physical or digital) that - a subscription originates. If unset, the name defaults to the name - of the application that created the subscription. - validation: - maxLength: 255 - source: - openapi: ../default/openapi/openapi.json - SubscriptionStatus: - enum: - - PENDING - - ACTIVE - - CANCELED - - DEACTIVATED - - PAUSED - - COMPLETED - docs: Supported subscription statuses. - source: - openapi: ../default/openapi/openapi.json - SubscriptionTestResult: - docs: >- - Represents the details of a webhook subscription, including notification - URL, - - event types, and signature key. - properties: - id: - type: optional - docs: A Square-generated unique ID for the subscription test result. - validation: - maxLength: 64 - access: read-only - status_code: - type: optional> - docs: The status code returned by the subscription notification URL. - payload: - type: optional> - docs: >- - An object containing the payload of the test event. For example, a - `payment.created` event. - created_at: - type: optional - docs: >- - The timestamp of when the subscription was created, in RFC 3339 - format. - - For example, "2016-09-04T23:59:33.123Z". - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the subscription was updated, in RFC 3339 - format. For example, "2016-09-04T23:59:33.123Z". - - Because a subscription test result is unique, this field is the same - as the `created_at` field. - access: read-only - source: - openapi: ../default/openapi/openapi.json - SubscriptionUpdatedEvent: - docs: >- - Published when a [Subscription](entity:Subscription) is updated. - - Typically the `subscription.status` is updated as subscriptions become - active - - or cancelled. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"subscription.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - SubscriptionUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"subscription"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected subscription. - validation: - maxLength: 255 - object: - type: optional - docs: An object containing the updated subscription. - source: - openapi: ../default/openapi/openapi.json - SubscriptionUpdatedEventObject: - properties: - subscription: - type: optional - docs: The updated subscription. - source: - openapi: ../default/openapi/openapi.json - SwapPlanResponse: - docs: |- - Defines output parameters in a response of the - [SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription with the updated subscription plan. - actions: - type: optional> - docs: A list of a `SWAP_PLAN` action created by the request. - source: - openapi: ../default/openapi/openapi.json - TaxCalculationPhase: - enum: - - TAX_SUBTOTAL_PHASE - - TAX_TOTAL_PHASE - docs: When to calculate the taxes due on a cart. - source: - openapi: ../default/openapi/openapi.json - TaxIds: - docs: Identifiers for the location used by various governments for tax purposes. - properties: - eu_vat: - type: optional - docs: |- - The EU VAT number for this location. For example, `IE3426675K`. - If the EU VAT number is present, it is well-formed and has been - validated with VIES, the VAT Information Exchange System. - access: read-only - fr_siret: - type: optional - docs: >- - The SIRET (Système d'Identification du Répertoire des Entreprises et - de leurs Etablissements) - - number is a 14-digit code issued by the French INSEE. For example, - `39922799000021`. - access: read-only - fr_naf: - type: optional - docs: >- - The French government uses the NAF (Nomenclature des Activités - Françaises) to display and - - track economic statistical data. This is also called the APE (Activite - Principale de l’Entreprise) code. - - For example, `6910Z`. - access: read-only - es_nif: - type: optional - docs: >- - The NIF (Numero de Identificacion Fiscal) number is a nine-character - tax identifier used in Spain. - - If it is present, it has been validated. For example, `73628495A`. - access: read-only - jp_qii: - type: optional - docs: >- - The QII (Qualified Invoice Issuer) number is a 14-character tax - identifier used in Japan. - - For example, `T1234567890123`. - access: read-only - source: - openapi: ../default/openapi/openapi.json - TaxInclusionType: - enum: - - ADDITIVE - - INCLUSIVE - docs: >- - Whether to the tax amount should be additional to or included in the - CatalogItem price. - source: - openapi: ../default/openapi/openapi.json - TeamMember: - docs: A record representing an individual team member for a business. - properties: - id: - type: optional - docs: The unique ID for the team member. - access: read-only - reference_id: - type: optional> - docs: >- - A second ID used to associate the team member with an entity in - another system. - is_owner: - type: optional - docs: Whether the team member is the owner of the Square account. - access: read-only - status: - type: optional - docs: |- - Describes the status of the team member. - See [TeamMemberStatus](#type-teammemberstatus) for possible values - given_name: - type: optional> - docs: >- - The given name (that is, the first name) associated with the team - member. - family_name: - type: optional> - docs: >- - The family name (that is, the last name) associated with the team - member. - email_address: - type: optional> - docs: >- - The email address associated with the team member. After accepting the - invitation - - from Square, only the team member can change this value. - phone_number: - type: optional> - docs: |- - The team member's phone number, in E.164 format. For example: - +14155552671 - the country code is 1 for US - +551155256325 - the country code is 55 for BR - created_at: - type: optional - docs: The timestamp when the team member was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the team member was last updated, in RFC 3339 - format. - access: read-only - assigned_locations: - type: optional - docs: Describes the team member's assigned locations. - wage_setting: - type: optional - docs: >- - Information about the team member's overtime exemption status, job - assignments, and compensation. - source: - openapi: ../default/openapi/openapi.json - TeamMemberAssignedLocations: - docs: An object that represents a team member's assignment to locations. - properties: - assignment_type: - type: optional - docs: >- - The current assignment type of the team member. - - See - [TeamMemberAssignedLocationsAssignmentType](#type-teammemberassignedlocationsassignmenttype) - for possible values - location_ids: - type: optional>> - docs: The explicit locations that the team member is assigned to. - source: - openapi: ../default/openapi/openapi.json - TeamMemberAssignedLocationsAssignmentType: - enum: - - ALL_CURRENT_AND_FUTURE_LOCATIONS - - EXPLICIT_LOCATIONS - docs: Enumerates the possible assignment types that the team member can have. - source: - openapi: ../default/openapi/openapi.json - TeamMemberBookingProfile: - docs: >- - The booking profile of a seller's team member, including the team member's - ID, display name, description and whether the team member can be booked as - a service provider. - properties: - team_member_id: - type: optional - docs: >- - The ID of the [TeamMember](entity:TeamMember) object for the team - member associated with the booking profile. - validation: - maxLength: 32 - access: read-only - description: - type: optional - docs: The description of the team member. - validation: - maxLength: 65536 - access: read-only - display_name: - type: optional - docs: The display name of the team member. - validation: - maxLength: 512 - access: read-only - is_bookable: - type: optional> - docs: >- - Indicates whether the team member can be booked through the Bookings - API or the seller's online booking channel or site (`true`) or not - (`false`). - profile_image_url: - type: optional - docs: The URL of the team member's image for the bookings profile. - validation: - maxLength: 2048 - access: read-only - source: - openapi: ../default/openapi/openapi.json - TeamMemberCreatedEvent: - docs: Published when a Team Member is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"team_member.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TeamMemberCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"team_member"`. - id: - type: optional - docs: ID of the created team member. - object: - type: optional - docs: An object containing the created team member. - source: - openapi: ../default/openapi/openapi.json - TeamMemberCreatedEventObject: - properties: - team_member: - type: optional - docs: The created team member. - source: - openapi: ../default/openapi/openapi.json - TeamMemberInvitationStatus: - enum: - - UNINVITED - - PENDING - - ACCEPTED - docs: >- - Enumerates the possible invitation statuses the team member can have - within a business. - source: - openapi: ../default/openapi/openapi.json - TeamMemberStatus: - enum: - - ACTIVE - - INACTIVE - docs: >- - Enumerates the possible statuses the team member can have within a - business. - source: - openapi: ../default/openapi/openapi.json - TeamMemberUpdatedEvent: - docs: Published when a Team Member is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"team_member.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TeamMemberUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"team_member"`. - id: - type: optional - docs: ID of the affected team member. - object: - type: optional - docs: An object containing the updated team member. - source: - openapi: ../default/openapi/openapi.json - TeamMemberUpdatedEventObject: - properties: - team_member: - type: optional - docs: The updated team member. - source: - openapi: ../default/openapi/openapi.json - TeamMemberWage: - docs: |- - Job and wage information for a [team member](entity:TeamMember). - This convenience object provides details needed to specify the `wage` - field for a [timecard](entity:Timecard). - properties: - id: - type: optional - docs: The UUID for this object. - team_member_id: - type: optional> - docs: The `TeamMember` that this wage is assigned to. - title: - type: optional> - docs: The job title that this wage relates to. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: - type: optional> - docs: An identifier for the [job](entity:Job) that this wage relates to. - tip_eligible: - type: optional> - docs: Whether team members are eligible for tips when working this job. - source: - openapi: ../default/openapi/openapi.json - TeamMemberWageSettingUpdatedEvent: - docs: Published when a Wage Setting is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: >- - The type of event this represents, - `"team_member.wage_setting.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TeamMemberWageSettingUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"wage_setting"`. - id: - type: optional - docs: ID of the updated team member wage setting. - object: - type: optional - docs: An object containing the updated team member wage setting. - source: - openapi: ../default/openapi/openapi.json - TeamMemberWageSettingUpdatedEventObject: - properties: - wage_setting: - type: optional - docs: The updated team member wage setting. - source: - openapi: ../default/openapi/openapi.json - Tender: - docs: >- - Represents a tender (i.e., a method of payment) used in a Square - transaction. - properties: - id: - type: optional - docs: The tender's unique ID. It is the associated payment ID. - validation: - maxLength: 192 - location_id: - type: optional> - docs: The ID of the transaction's associated location. - validation: - maxLength: 50 - transaction_id: - type: optional> - docs: The ID of the tender's associated transaction. - validation: - maxLength: 192 - created_at: - type: optional - docs: The timestamp for when the tender was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - note: - type: optional> - docs: An optional note associated with the tender at the time of payment. - validation: - maxLength: 500 - amount_money: - type: optional - docs: >- - The total amount of the tender, including `tip_money`. If the tender - has a `payment_id`, - - the `total_money` of the corresponding [Payment](entity:Payment) will - be equal to the - - `amount_money` of the tender. - tip_money: - type: optional - docs: The tip's amount of the tender. - processing_fee_money: - type: optional - docs: >- - The amount of any Square processing fees applied to the tender. - - - This field is not immediately populated when a new transaction is - created. - - It is usually available after about ten seconds. - customer_id: - type: optional> - docs: >- - If the tender is associated with a customer or represents a customer's - card on file, - - this is the ID of the associated customer. - validation: - maxLength: 191 - type: - type: TenderType - docs: |- - The type of tender, such as `CARD` or `CASH`. - See [TenderType](#type-tendertype) for possible values - card_details: - type: optional - docs: |- - The details of the card tender. - - This value is present only if the value of `type` is `CARD`. - cash_details: - type: optional - docs: |- - The details of the cash tender. - - This value is present only if the value of `type` is `CASH`. - bank_account_details: - type: optional - docs: |- - The details of the bank account tender. - - This value is present only if the value of `type` is `BANK_ACCOUNT`. - buy_now_pay_later_details: - type: optional - docs: >- - The details of a Buy Now Pay Later tender. - - - This value is present only if the value of `type` is - `BUY_NOW_PAY_LATER`. - square_account_details: - type: optional - docs: |- - The details of a Square Account tender. - - This value is present only if the value of `type` is `SQUARE_ACCOUNT`. - additional_recipients: - type: optional>> - docs: >- - Additional recipients (other than the merchant) receiving a portion of - this tender. - - For example, fees assessed on the purchase by a third party - integration. - payment_id: - type: optional> - docs: >- - The ID of the [Payment](entity:Payment) that corresponds to this - tender. - - This value is only present for payments created with the v2 Payments - API. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - TenderBankAccountDetails: - docs: |- - Represents the details of a tender with `type` `BANK_ACCOUNT`. - - See [BankAccountPaymentDetails](entity:BankAccountPaymentDetails) - for more exposed details of a bank account payment. - properties: - status: - type: optional - docs: >- - The bank account payment's current state. - - - See - [TenderBankAccountPaymentDetailsStatus](entity:TenderBankAccountDetailsStatus) - for possible values. - - See - [TenderBankAccountDetailsStatus](#type-tenderbankaccountdetailsstatus) - for possible values - source: - openapi: ../default/openapi/openapi.json - TenderBankAccountDetailsStatus: - enum: - - PENDING - - COMPLETED - - FAILED - docs: Indicates the bank account payment's current status. - source: - openapi: ../default/openapi/openapi.json - TenderBuyNowPayLaterDetails: - docs: Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. - properties: - buy_now_pay_later_brand: - type: optional - docs: |- - The Buy Now Pay Later brand. - See [Brand](#type-brand) for possible values - status: - type: optional - docs: >- - The buy now pay later payment's current state (such as `AUTHORIZED` or - - `CAPTURED`). See - [TenderBuyNowPayLaterDetailsStatus](entity:TenderBuyNowPayLaterDetailsStatus) - - for possible values. - - See [Status](#type-status) for possible values - source: - openapi: ../default/openapi/openapi.json - TenderBuyNowPayLaterDetailsBrand: - enum: - - OTHER_BRAND - - AFTERPAY - source: - openapi: ../default/openapi/openapi.json - TenderBuyNowPayLaterDetailsStatus: - enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED - source: - openapi: ../default/openapi/openapi.json - TenderCardDetails: - docs: >- - Represents additional details of a tender with `type` `CARD` or - `SQUARE_GIFT_CARD` - properties: - status: - type: optional - docs: >- - The credit card payment's current state (such as `AUTHORIZED` or - - `CAPTURED`). See - [TenderCardDetailsStatus](entity:TenderCardDetailsStatus) - - for possible values. - - See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for - possible values - card: - type: optional - docs: The credit card's non-confidential details. - entry_method: - type: optional - docs: >- - The method used to enter the card's details for the transaction. - - See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) - for possible values - source: - openapi: ../default/openapi/openapi.json - TenderCardDetailsEntryMethod: - enum: - - SWIPED - - KEYED - - EMV - - ON_FILE - - CONTACTLESS - docs: Indicates the method used to enter the card's details. - source: - openapi: ../default/openapi/openapi.json - TenderCardDetailsStatus: - enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED - docs: Indicates the card transaction's current status. - source: - openapi: ../default/openapi/openapi.json - TenderCashDetails: - docs: Represents the details of a tender with `type` `CASH`. - properties: - buyer_tendered_money: - type: optional - docs: >- - The total amount of cash provided by the buyer, before change is - given. - change_back_money: - type: optional - docs: The amount of change returned to the buyer. - source: - openapi: ../default/openapi/openapi.json - TenderSquareAccountDetails: - docs: Represents the details of a tender with `type` `SQUARE_ACCOUNT`. - properties: - status: - type: optional - docs: >- - The Square Account payment's current state (such as `AUTHORIZED` or - - `CAPTURED`). See - [TenderSquareAccountDetailsStatus](entity:TenderSquareAccountDetailsStatus) - - for possible values. - - See [Status](#type-status) for possible values - source: - openapi: ../default/openapi/openapi.json - TenderSquareAccountDetailsStatus: - enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED - source: - openapi: ../default/openapi/openapi.json - TenderType: - enum: - - CARD - - CASH - - THIRD_PARTY_CARD - - SQUARE_GIFT_CARD - - NO_SALE - - BANK_ACCOUNT - - WALLET - - BUY_NOW_PAY_LATER - - SQUARE_ACCOUNT - - OTHER - docs: Indicates a tender's type. - source: - openapi: ../default/openapi/openapi.json - TerminalAction: - docs: Represents an action processed by the Square Terminal. - properties: - id: - type: optional - docs: A unique ID for this `TerminalAction`. - validation: - minLength: 10 - maxLength: 255 - access: read-only - device_id: - type: optional> - docs: |- - The unique Id of the device intended for this `TerminalAction`. - The Id can be retrieved from /v2/devices api. - deadline_duration: - type: optional> - docs: >- - The duration as an RFC 3339 duration, after which the action will be - automatically canceled. - - TerminalActions that are `PENDING` will be automatically `CANCELED` - and have a cancellation reason - - of `TIMED_OUT` - - - Default: 5 minutes from creation - - - Maximum: 5 minutes - status: - type: optional - docs: >- - The status of the `TerminalAction`. - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - access: read-only - cancel_reason: - type: optional - docs: >- - The reason why `TerminalAction` is canceled. Present if the status is - `CANCELED`. - - See [ActionCancelReason](#type-actioncancelreason) for possible values - created_at: - type: optional - docs: >- - The time when the `TerminalAction` was created as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional - docs: >- - The time when the `TerminalAction` was last updated as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the action. - access: read-only - location_id: - type: optional - docs: The location id the action is attached to, if a link can be made. - validation: - maxLength: 64 - access: read-only - type: - type: optional - docs: |- - Represents the type of the action. - See [ActionType](#type-actiontype) for possible values - qr_code_options: - type: optional - docs: >- - Describes configuration for the QR code action. Requires `QR_CODE` - type. - save_card_options: - type: optional - docs: >- - Describes configuration for the save-card action. Requires `SAVE_CARD` - type. - signature_options: - type: optional - docs: >- - Describes configuration for the signature capture action. Requires - `SIGNATURE` type. - confirmation_options: - type: optional - docs: >- - Describes configuration for the confirmation action. Requires - `CONFIRMATION` type. - receipt_options: - type: optional - docs: >- - Describes configuration for the receipt action. Requires `RECEIPT` - type. - data_collection_options: - type: optional - docs: >- - Describes configuration for the data collection action. Requires - `DATA_COLLECTION` type. - select_options: - type: optional - docs: Describes configuration for the select action. Requires `SELECT` type. - device_metadata: - type: optional - docs: >- - Details about the Terminal that received the action request (such as - battery level, - - operating system version, and network connection settings). - - - Only available for `PING` action type. - await_next_action: - type: optional> - docs: >- - Indicates the action will be linked to another action and requires a - waiting dialog to be - - displayed instead of returning to the idle screen on completion of the - action. - - - Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT - types. - await_next_action_duration: - type: optional> - docs: >- - The timeout duration of the waiting dialog as an RFC 3339 duration, - after which the - - waiting dialog will no longer be displayed and the Terminal will - return to the idle screen. - - - Default: 5 minutes from when the waiting dialog is displayed - - - Maximum: 5 minutes - source: - openapi: ../default/openapi/openapi.json - TerminalActionActionType: - enum: - - QR_CODE - - PING - - SAVE_CARD - - SIGNATURE - - CONFIRMATION - - RECEIPT - - DATA_COLLECTION - - SELECT - docs: >- - Describes the type of this unit and indicates which field contains the - unit information. This is an ‘open’ enum. - source: - openapi: ../default/openapi/openapi.json - TerminalActionCreatedEvent: - docs: Published when a TerminalAction is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.action.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalActionCreatedEventData: - properties: - type: - type: optional> - docs: Name of the created object’s type, `"action"`. - id: - type: optional - docs: ID of the created terminal action. - object: - type: optional - docs: An object containing the created terminal action. - source: - openapi: ../default/openapi/openapi.json - TerminalActionCreatedEventObject: - properties: - action: - type: optional - docs: The created terminal action. - source: - openapi: ../default/openapi/openapi.json - TerminalActionQuery: - properties: - filter: - type: optional - docs: Options for filtering returned `TerminalAction`s - sort: - type: optional - docs: Option for sorting returned `TerminalAction` objects. - source: - openapi: ../default/openapi/openapi.json - TerminalActionQueryFilter: - properties: - device_id: - type: optional> - docs: >- - `TerminalAction`s associated with a specific device. If no device is - specified then all - - `TerminalAction`s for the merchant will be displayed. - created_at: - type: optional - docs: |- - Time range for the beginning of the reporting period. Inclusive. - Default value: The current time minus one day. - Note that `TerminalAction`s are available for 30 days after creation. - status: - type: optional> - docs: >- - Filter results with the desired status of the `TerminalAction` - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - type: - type: optional - docs: >- - Filter results with the requested ActionType. - - See [TerminalActionActionType](#type-terminalactionactiontype) for - possible values - source: - openapi: ../default/openapi/openapi.json - TerminalActionQuerySort: - properties: - sort_order: - type: optional - docs: |- - The order in which results are listed. - - `ASC` - Oldest to newest. - - `DESC` - Newest to oldest (default). - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - TerminalActionUpdatedEvent: - docs: Published when a TerminalAction is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.action.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalActionUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the updated object’s type, `"action"`. - id: - type: optional - docs: ID of the updated terminal action. - object: - type: optional - docs: An object containing the updated terminal action. - source: - openapi: ../default/openapi/openapi.json - TerminalActionUpdatedEventObject: - properties: - action: - type: optional - docs: The updated terminal action. - source: - openapi: ../default/openapi/openapi.json - TerminalCheckout: - docs: Represents a checkout processed by the Square Terminal. - properties: - id: - type: optional - docs: A unique ID for this `TerminalCheckout`. - validation: - minLength: 10 - maxLength: 255 - access: read-only - amount_money: - type: Money - docs: >- - The amount of money (including the tax amount) that the Square - Terminal device should try to collect. - reference_id: - type: optional> - docs: >- - An optional user-defined reference ID that can be used to associate - - this `TerminalCheckout` to another entity in an external system. For - example, an order - - ID generated by a third-party shopping cart. The ID is also associated - with any payments - - used to complete the checkout. - validation: - maxLength: 40 - note: - type: optional> - docs: >- - An optional note to associate with the checkout, as well as with any - payments used to complete the checkout. - - Note: maximum 500 characters - validation: - maxLength: 500 - order_id: - type: optional> - docs: The reference to the Square order ID for the checkout request. - payment_options: - type: optional - docs: Payment-specific options for the checkout request. - device_options: - type: DeviceCheckoutOptions - docs: >- - Options to control the display and behavior of the Square Terminal - device. - deadline_duration: - type: optional> - docs: >- - An RFC 3339 duration, after which the checkout is automatically - canceled. - - A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and - has a cancellation reason - - of `TIMED_OUT`. - - - Default: 5 minutes from creation - - - Maximum: 5 minutes - status: - type: optional - docs: >- - The status of the `TerminalCheckout`. - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - access: read-only - cancel_reason: - type: optional - docs: >- - The reason why `TerminalCheckout` is canceled. Present if the status - is `CANCELED`. - - See [ActionCancelReason](#type-actioncancelreason) for possible values - payment_ids: - type: optional> - docs: A list of IDs for payments created by this `TerminalCheckout`. - access: read-only - created_at: - type: optional - docs: >- - The time when the `TerminalCheckout` was created, as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional - docs: >- - The time when the `TerminalCheckout` was last updated, as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the checkout. - access: read-only - location_id: - type: optional - docs: The location of the device where the `TerminalCheckout` was directed. - validation: - maxLength: 64 - access: read-only - payment_type: - type: optional - docs: >- - The type of payment the terminal should attempt to capture from. - Defaults to `CARD_PRESENT`. - - See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for - possible values - team_member_id: - type: optional> - docs: >- - An optional ID of the team member associated with creating the - checkout. - customer_id: - type: optional> - docs: An optional ID of the customer associated with the checkout. - app_fee_money: - type: optional - docs: >- - The amount the developer is taking as a fee for facilitating the - payment on behalf - - of the seller. - - - The amount cannot be more than 90% of the total amount of the payment. - - - The amount must be specified in the smallest denomination of the - applicable currency (for example, US dollar amounts are specified in - cents). For more information, see [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - - - The fee currency code must match the currency associated with the - seller that is accepting the payment. The application must be from a - developer account in the same country and using the same currency code - as the seller. - - - For more information about the application fee scenario, see [Take - Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - - - To set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth - permission is required. For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - statement_description_identifier: - type: optional> - docs: >- - Optional additional payment information to include on the customer's - card statement as - - part of the statement description. This can be, for example, an - invoice number, ticket number, - - or short description that uniquely identifies the purchase. - validation: - maxLength: 20 - tip_money: - type: optional - docs: >- - The amount designated as a tip, in addition to `amount_money`. This - may only be set for a - - checkout that has tipping disabled (`tip_settings.allow_tipping` is - `false`). - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutCreatedEvent: - docs: Published when a [TerminalCheckout](entity:TerminalCheckout) is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.checkout.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutCreatedEventData: - properties: - type: - type: optional> - docs: Name of the created object’s type, `"checkout"`. - id: - type: optional - docs: ID of the created terminal checkout. - validation: - minLength: 10 - maxLength: 255 - object: - type: optional - docs: An object containing the created terminal checkout - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutCreatedEventObject: - properties: - checkout: - type: optional - docs: The created terminal checkout - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutQuery: - properties: - filter: - type: optional - docs: Options for filtering returned `TerminalCheckout` objects. - sort: - type: optional - docs: Option for sorting returned `TerminalCheckout` objects. - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutQueryFilter: - properties: - device_id: - type: optional> - docs: >- - The `TerminalCheckout` objects associated with a specific device. If - no device is specified, then all - - `TerminalCheckout` objects for the merchant are displayed. - created_at: - type: optional - docs: >- - The time range for the beginning of the reporting period, which is - inclusive. - - Default value: The current time minus one day. - - Note that `TerminalCheckout`s are available for 30 days after - creation. - status: - type: optional> - docs: >- - Filtered results with the desired status of the `TerminalCheckout`. - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutQuerySort: - properties: - sort_order: - type: optional - docs: |- - The order in which results are listed. - Default: `DESC` - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutUpdatedEvent: - docs: Published when a [TerminalCheckout](entity:TerminalCheckout) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.checkout.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the updated object’s type, `"checkout"`. - id: - type: optional - docs: ID of the updated terminal checkout. - validation: - minLength: 10 - maxLength: 255 - object: - type: optional - docs: An object containing the updated terminal checkout - source: - openapi: ../default/openapi/openapi.json - TerminalCheckoutUpdatedEventObject: - properties: - checkout: - type: optional - docs: The updated terminal checkout - source: - openapi: ../default/openapi/openapi.json - TerminalRefund: - docs: >- - Represents a payment refund processed by the Square Terminal. Only - supports Interac (Canadian debit network) payment refunds. - properties: - id: - type: optional - docs: A unique ID for this `TerminalRefund`. - validation: - minLength: 10 - maxLength: 255 - access: read-only - refund_id: - type: optional - docs: >- - The reference to the payment refund created by completing this - `TerminalRefund`. - access: read-only - payment_id: - type: string - docs: The unique ID of the payment being refunded. - validation: - minLength: 1 - order_id: - type: optional - docs: >- - The reference to the Square order ID for the payment identified by the - `payment_id`. - access: read-only - amount_money: - type: Money - docs: >- - The amount of money, inclusive of `tax_money`, that the - `TerminalRefund` should return. - - This value is limited to the amount taken in the original payment - minus any completed or - - pending refunds. - reason: - type: string - docs: A description of the reason for the refund. - validation: - maxLength: 192 - device_id: - type: string - docs: |- - The unique ID of the device intended for this `TerminalRefund`. - The Id can be retrieved from /v2/devices api. - deadline_duration: - type: optional> - docs: >- - The RFC 3339 duration, after which the refund is automatically - canceled. - - A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and - has a cancellation reason - - of `TIMED_OUT`. - - - Default: 5 minutes from creation. - - - Maximum: 5 minutes - status: - type: optional - docs: >- - The status of the `TerminalRefund`. - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or - `COMPLETED`. - access: read-only - cancel_reason: - type: optional - docs: |- - Present if the status is `CANCELED`. - See [ActionCancelReason](#type-actioncancelreason) for possible values - created_at: - type: optional - docs: >- - The time when the `TerminalRefund` was created, as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional - docs: >- - The time when the `TerminalRefund` was last updated, as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the refund. - access: read-only - location_id: - type: optional - docs: The location of the device where the `TerminalRefund` was directed. - validation: - maxLength: 64 - access: read-only - source: - openapi: ../default/openapi/openapi.json - TerminalRefundCreatedEvent: - docs: Published when a Terminal API refund is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.refund.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundCreatedEventData: - properties: - type: - type: optional> - docs: Name of the created object’s type, `"refund"`. - id: - type: optional - docs: ID of the created terminal refund. - object: - type: optional - docs: An object containing the created terminal refund. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundCreatedEventObject: - properties: - refund: - type: optional - docs: The created terminal refund. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundQuery: - properties: - filter: - type: optional - docs: The filter for the Terminal refund query. - sort: - type: optional - docs: The sort order for the Terminal refund query. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundQueryFilter: - properties: - device_id: - type: optional> - docs: >- - `TerminalRefund` objects associated with a specific device. If no - device is specified, then all - - `TerminalRefund` objects for the signed-in account are displayed. - created_at: - type: optional - docs: >- - The timestamp for the beginning of the reporting period, in RFC 3339 - format. Inclusive. - - Default value: The current time minus one day. - - Note that `TerminalRefund`s are available for 30 days after creation. - status: - type: optional> - docs: >- - Filtered results with the desired status of the `TerminalRefund`. - - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or - `COMPLETED`. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundQuerySort: - properties: - sort_order: - type: optional> - docs: |- - The order in which results are listed. - - `ASC` - Oldest to newest. - - `DESC` - Newest to oldest (default). - source: - openapi: ../default/openapi/openapi.json - TerminalRefundUpdatedEvent: - docs: Published when a Terminal API refund is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"terminal.refund.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: RFC 3339 timestamp of when the event was created. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the updated object’s type, `"refund"`. - id: - type: optional - docs: ID of the updated terminal refund. - object: - type: optional - docs: An object containing the updated terminal refund. - source: - openapi: ../default/openapi/openapi.json - TerminalRefundUpdatedEventObject: - properties: - refund: - type: optional - docs: The updated terminal refund. - source: - openapi: ../default/openapi/openapi.json - TestWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [TestWebhookSubscription](api-endpoint:WebhookSubscriptions-TestWebhookSubscription) - endpoint. - - - Note: If there are errors processing the request, the - [SubscriptionTestResult](entity:SubscriptionTestResult) field is not - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription_test_result: - type: optional - docs: The [SubscriptionTestResult](entity:SubscriptionTestResult). - source: - openapi: ../default/openapi/openapi.json - TimeRange: - docs: |- - Represents a generic time range. The start and end values are - represented in RFC 3339 format. Time ranges are customized to be - inclusive or exclusive based on the needs of a particular endpoint. - Refer to the relevant endpoint-specific documentation to determine - how time ranges are handled. - properties: - start_at: - type: optional> - docs: |- - A datetime value in RFC 3339 format indicating when the time range - starts. - end_at: - type: optional> - docs: |- - A datetime value in RFC 3339 format indicating when the time range - ends. - source: - openapi: ../default/openapi/openapi.json - Timecard: - docs: >- - A record of the hourly rate, start time, and end time of a single timecard - (shift) - - for a team member. This might include a record of the start and end times - of breaks - - taken during the shift. - properties: - id: - type: optional - docs: '**Read only** The Square-issued UUID for this object.' - validation: - maxLength: 255 - location_id: - type: string - docs: >- - The ID of the [location](entity:Location) for this timecard. The - location should be based on - - where the team member clocked in. - validation: - minLength: 1 - timezone: - type: optional> - docs: >- - **Read only** The time zone calculated from the location based on the - `location_id`, - - provided as a convenience value. Format: the IANA time zone database - identifier for the - - location time zone. - start_at: - type: string - docs: >- - The start time of the timecard, in RFC 3339 format and shifted to the - location - - timezone + offset. Precision up to the minute is respected; seconds - are truncated. - validation: - minLength: 1 - end_at: - type: optional> - docs: >- - The end time of the timecard, in RFC 3339 format and shifted to the - location - - timezone + offset. Precision up to the minute is respected; seconds - are truncated. - wage: - type: optional - docs: >- - Job and pay related information. If the wage is not set on create, it - defaults to a wage - - of zero. If the title is not set on create, it defaults to the name of - the role the team member - - is assigned to, if any. - breaks: - type: optional>> - docs: >- - A list of all the paid or unpaid breaks that were taken during this - timecard. - status: - type: optional - docs: |- - Describes the working state of the timecard. - See [TimecardStatus](#type-timecardstatus) for possible values - version: - type: optional - docs: >- - **Read only** The current version of the timecard, which is - incremented with each update. - - This field is used for [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control to ensure that requests don't overwrite data from another - request. - created_at: - type: optional - docs: >- - The timestamp of when the timecard was created, in RFC 3339 format - presented as UTC. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the timecard was last updated, in RFC 3339 - format presented as UTC. - access: read-only - team_member_id: - type: string - docs: >- - The ID of the [team member](entity:TeamMember) this timecard belongs - to. - validation: - minLength: 1 - declared_cash_tip_money: - type: optional - docs: The cash tips declared by the team member for this timecard. - source: - openapi: ../default/openapi/openapi.json - TimecardFilter: - docs: |- - Defines a filter used in a search for `Timecard` records. `AND` logic is - used by Square's servers to apply each filter property specified. - properties: - location_ids: - type: optional>> - docs: Fetch timecards for the specified location. - status: - type: optional - docs: >- - Fetch a `Timecard` instance by `Timecard.status`. - - See [TimecardFilterStatus](#type-timecardfilterstatus) for possible - values - start: - type: optional - docs: Fetch `Timecard` instances that start in the time range - Inclusive. - end: - type: optional - docs: Fetch the `Timecard` instances that end in the time range - Inclusive. - workday: - type: optional - docs: Fetch the `Timecard` instances based on the workday date range. - team_member_ids: - type: optional>> - docs: Fetch timecards for the specified team members. - source: - openapi: ../default/openapi/openapi.json - TimecardFilterStatus: - enum: - - OPEN - - CLOSED - docs: Specifies the `status` of `Timecard` records to be returned. - source: - openapi: ../default/openapi/openapi.json - TimecardQuery: - docs: >- - The parameters of a `Timecard` search query, which includes filter and - sort options. - properties: - filter: - type: optional - docs: Query filter options. - sort: - type: optional - docs: Sort order details. - source: - openapi: ../default/openapi/openapi.json - TimecardSort: - docs: Sets the sort order of search results. - properties: - field: - type: optional - docs: |- - The field to sort on. - See [TimecardSortField](#type-timecardsortfield) for possible values - order: - type: optional - docs: |- - The order in which results are returned. Defaults to DESC. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - TimecardSortField: - enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT - docs: Enumerates the `Timecard` fields to sort on. - source: - openapi: ../default/openapi/openapi.json - TimecardStatus: - enum: - - OPEN - - CLOSED - docs: >- - **Read only** Enumerates the possible status of a - [timecard](entity:Timecard). - source: - openapi: ../default/openapi/openapi.json - TimecardWage: - docs: >- - The hourly wage rate used to compensate a team member for a - [timecard](entity:Timecard). - properties: - title: - type: optional> - docs: The name of the job performed during this timecard. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: - type: optional - docs: |- - The ID of the [job](entity:Job) performed for this timecard. Square - labor-reporting UIs might group timecards together by ID. - access: read-only - tip_eligible: - type: optional> - docs: Whether team members are eligible for tips when working this job. - source: - openapi: ../default/openapi/openapi.json - TimecardWorkday: - docs: |- - A `Timecard` search query filter parameter that sets a range of days that - a `Timecard` must start or end in before passing the filter condition. - properties: - date_range: - type: optional - docs: Dates for fetching the timecards. - match_timecards_by: - type: optional - docs: >- - The strategy on which the dates are applied. - - See [TimecardWorkdayMatcher](#type-timecardworkdaymatcher) for - possible values - default_timezone: - type: optional> - docs: >- - Location-specific timezones convert workdays to datetime filters. - - Every location included in the query must have a timezone or this - field - - must be provided as a fallback. Format: the IANA timezone database - - identifier for the relevant timezone. - source: - openapi: ../default/openapi/openapi.json - TimecardWorkdayMatcher: - enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. - source: - openapi: ../default/openapi/openapi.json - TipSettings: - properties: - allow_tipping: - type: optional> - docs: >- - Indicates whether tipping is enabled for this checkout. Defaults to - false. - separate_tip_screen: - type: optional> - docs: >- - Indicates whether tip options should be presented on the screen before - presenting - - the signature screen during card payment. Defaults to false. - custom_tip_field: - type: optional> - docs: >- - Indicates whether custom tip amounts are allowed during the checkout - flow. Defaults to false. - tip_percentages: - type: optional>> - docs: >- - A list of tip percentages that should be presented during the checkout - flow, specified as - - up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to - 15, 20, and 25. - smart_tipping: - type: optional> - docs: >- - Enables the "Smart Tip Amounts" behavior. - - Exact tipping options depend on the region in which the Square seller - is active. - - - For payments under 10.00, in the Australia, Canada, Ireland, United - Kingdom, and United States, tipping options are presented as no tip, - .50, 1.00 or 2.00. - - - For payment amounts of 10.00 or greater, tipping options are presented - as the following percentages: 0%, 5%, 10%, 15%. - - - If set to true, the `tip_percentages` settings is ignored. - - Defaults to false. - - - To learn more about smart tipping, see [Accept Tips with the Square - App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app). - source: - openapi: ../default/openapi/openapi.json - Transaction: - docs: >- - Represents a transaction processed with Square, either with the - - Connect API or with Square Point of Sale. - - - The `tenders` field of this object lists all methods of payment used to - pay in - - the transaction. - properties: - id: - type: optional - docs: The transaction's unique ID, issued by Square payments servers. - validation: - maxLength: 192 - location_id: - type: optional> - docs: The ID of the transaction's associated location. - validation: - maxLength: 50 - created_at: - type: optional - docs: >- - The timestamp for when the transaction was created, in RFC 3339 - format. - validation: - maxLength: 32 - tenders: - type: optional>> - docs: The tenders used to pay in the transaction. - refunds: - type: optional>> - docs: Refunds that have been applied to any tender in the transaction. - reference_id: - type: optional> - docs: >- - If the transaction was created with the - [Charge](api-endpoint:Transactions-Charge) - - endpoint, this value is the same as the value provided for the - `reference_id` - - parameter in the request to that endpoint. Otherwise, it is not set. - validation: - maxLength: 40 - product: - type: optional - docs: |- - The Square product that processed the transaction. - See [TransactionProduct](#type-transactionproduct) for possible values - client_id: - type: optional> - docs: >- - If the transaction was created in the Square Point of Sale app, this - value - - is the ID generated for the transaction by Square Point of Sale. - - - This ID has no relationship to the transaction's canonical `id`, which - is - - generated by Square's backend servers. This value is generated for - bookkeeping - - purposes, in case the transaction cannot immediately be completed (for - example, - - if the transaction is processed in offline mode). - - - It is not currently possible with the Connect API to perform a - transaction - - lookup by this value. - validation: - maxLength: 192 - shipping_address: - type: optional
- docs: The shipping address provided in the request, if any. - order_id: - type: optional> - docs: >- - The order_id is an identifier for the order associated with this - transaction, if any. - validation: - maxLength: 192 - source: - openapi: ../default/openapi/openapi.json - TransactionProduct: - enum: - - REGISTER - - EXTERNAL_API - - BILLING - - APPOINTMENTS - - INVOICES - - ONLINE_STORE - - PAYROLL - - OTHER - docs: Indicates the Square product used to process a transaction. - source: - openapi: ../default/openapi/openapi.json - TransactionType: - enum: - - DEBIT - - CREDIT - docs: The transaction type used in the disputed payment. - source: - openapi: ../default/openapi/openapi.json - TransferOrder: - docs: >- - Represents a transfer order for moving - [CatalogItemVariation](entity:CatalogItemVariation)s - - between [Location](entity:Location)s. Transfer orders track the entire - lifecycle of an inventory - - transfer, including: - - - What items and quantities are being moved - - - Source and destination locations - - - Current [TransferOrderStatus](entity:TransferOrderStatus) - - - Shipping information and tracking - - - Which [TeamMember](entity:TeamMember) initiated the transfer - - - This object is commonly used to: - - - Track [CatalogItemVariation](entity:CatalogItemVariation) movements - between [Location](entity:Location)s - - - Reconcile expected vs received quantities - - - Monitor transfer progress and shipping status - - - Audit inventory movement history - properties: - id: - type: optional - docs: >- - Unique system-generated identifier for this transfer order. Use this - ID for: - - - Retrieving transfer order details - - - Tracking status changes via webhooks - - - Linking transfers in external systems - access: read-only - source_location_id: - type: optional> - docs: >- - The source [Location](entity:Location) sending the - [CatalogItemVariation](entity:CatalogItemVariation)s. - - This location must: - - - Be active in your Square organization - - - Have sufficient inventory for the items being transferred - - - Not be the same as the destination location - - - This field is not updatable. - destination_location_id: - type: optional> - docs: >- - The destination [Location](entity:Location) receiving the - [CatalogItemVariation](entity:CatalogItemVariation)s. - - This location must: - - - Be active in your Square organization - - - Not be the same as the source location - - - This field is not updatable. - status: - type: optional - docs: >- - Current [TransferOrderStatus](entity:TransferOrderStatus) indicating - where the order is in its lifecycle. - - Status transitions follow this progression: - - 1. [DRAFT](entity:TransferOrderStatus) -> - [STARTED](entity:TransferOrderStatus) via - [StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder) - - 2. [STARTED](entity:TransferOrderStatus) -> - [PARTIALLY_RECEIVED](entity:TransferOrderStatus) via - [ReceiveTransferOrder](api-endpoint:TransferOrders-ReceiveTransferOrder) - - 3. [PARTIALLY_RECEIVED](entity:TransferOrderStatus) -> - [COMPLETED](entity:TransferOrderStatus) after all items received - - - Orders can be [CANCELED](entity:TransferOrderStatus) from - [STARTED](entity:TransferOrderStatus) or - - [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. - - - This field is read-only and reflects the current state of the transfer - order, and cannot be updated directly. Use the appropriate - - endpoints (e.g. - [StartPurchaseOrder](api-endpoint:TransferOrders-StartTransferOrder), - to change the status. - - See [TransferOrderStatus](#type-transferorderstatus) for possible - values - created_at: - type: optional - docs: |- - Timestamp when the transfer order was created, in RFC 3339 format. - Used for: - - Auditing transfer history - - Tracking order age - - Reporting and analytics - access: read-only - updated_at: - type: optional - docs: >- - Timestamp when the transfer order was last updated, in RFC 3339 - format. - - Updated when: - - - Order status changes - - - Items are received - - - Notes or metadata are modified - access: read-only - expected_at: - type: optional> - docs: |- - Expected transfer completion date, in RFC 3339 format. - Used for: - - Planning inventory availability - - Scheduling receiving staff - - Monitoring transfer timeliness - completed_at: - type: optional - docs: >- - Timestamp when the transfer order was completed or canceled, in RFC - 3339 format (e.g. "2023-10-01T12:00:00Z"). - access: read-only - notes: - type: optional> - docs: Optional notes about the transfer. - tracking_number: - type: optional> - docs: Shipment tracking number for monitoring transfer progress. - created_by_team_member_id: - type: optional - docs: >- - ID of the [TeamMember](entity:TeamMember) who created this transfer - order. This field is not writeable by the Connect V2 API. - access: read-only - line_items: - type: optional>> - docs: >- - List of [CatalogItemVariation](entity:CatalogItemVariation)s being - transferred. - version: - type: optional - docs: >- - Version for optimistic concurrency control. This is a monotonically - increasing integer - - that changes whenever the transfer order is modified. Use this when - calling - - [UpdateTransferOrder](api-endpoint:TransferOrders-UpdateTransferOrder) - and other endpoints to ensure you're - - not overwriting concurrent changes. - source: - openapi: ../default/openapi/openapi.json - TransferOrderCreatedEvent: - docs: Published when a transfer_order is created. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"transfer_order.created"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TransferOrderCreatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"transfer_order"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected transfer_order. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the created transfer_order. - source: - openapi: ../default/openapi/openapi.json - TransferOrderCreatedEventObject: - properties: - transfer_order: - type: optional - docs: The created transfer_order. - source: - openapi: ../default/openapi/openapi.json - TransferOrderDeletedEvent: - docs: Published when a transfer_order is deleted. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"transfer_order.deleted"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TransferOrderDeletedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"transfer_order"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected transfer_order. - validation: - maxLength: 192 - deleted: - type: optional> - docs: Is true if the affected object was deleted. Otherwise absent. - source: - openapi: ../default/openapi/openapi.json - TransferOrderFilter: - docs: Filter criteria for searching transfer orders - properties: - source_location_ids: - type: optional>> - docs: Filter by source location IDs - destination_location_ids: - type: optional>> - docs: Filter by destination location IDs - statuses: - type: optional>> - docs: >- - Filter by order statuses - - See [TransferOrderStatus](#type-transferorderstatus) for possible - values - source: - openapi: ../default/openapi/openapi.json - TransferOrderGoodsReceipt: - docs: >- - The goods receipt details for a transfer order. This object represents a - single receipt - - of goods against a transfer order, tracking: - - - - Which [CatalogItemVariation](entity:CatalogItemVariation)s were received - - - Quantities received in good condition - - - Quantities damaged during transit/handling - - - Quantities canceled during receipt - - - Multiple goods receipts can be created for a single transfer order to - handle: - - - Partial deliveries - - - Multiple shipments - - - Split receipts across different dates - - - Cancellations of specific quantities - - - Each receipt automatically: - - - Updates the transfer order status - - - Adjusts received quantities - - - Updates inventory levels at both source and destination - [Location](entity:Location)s - properties: - line_items: - type: optional>> - docs: >- - Line items being received. Each line item specifies: - - - The item being received - - - Quantity received in good condition - - - Quantity received damaged - - - Quantity canceled - - - Constraints: - - - Must include at least one line item - - - Maximum of 1000 line items per receipt - - - Each line item must reference a valid item from the transfer order - - - Total of received, damaged, and canceled quantities cannot exceed - ordered quantity - source: - openapi: ../default/openapi/openapi.json - TransferOrderGoodsReceiptLineItem: - docs: A simplified line item for goods receipts in transfer orders - properties: - transfer_order_line_uid: - type: string - docs: The unique identifier of the Transfer Order line being received - validation: - maxLength: 64 - quantity_received: - type: optional> - docs: >- - The quantity received for this line item as a decimal string (e.g. - "10.5"). - - These items will be added to the destination - [Location](entity:Location)'s inventory with - [InventoryState](entity:InventoryState) of IN_STOCK. - validation: - pattern: ^(0|[1-9]\d*)(\.\d{1,4})?$ - minLength: 1 - maxLength: 16 - quantity_damaged: - type: optional> - docs: >- - The quantity that was damaged during shipping/handling as a decimal - string (e.g. "1.5"). - - These items will be added to the destination - [Location](entity:Location)'s inventory with - [InventoryState](entity:InventoryState) of WASTE. - validation: - pattern: ^(0|[1-9]\d*)(\.\d{1,4})?$ - minLength: 1 - maxLength: 16 - quantity_canceled: - type: optional> - docs: >- - The quantity that was canceled during shipping/handling as a decimal - string (e.g. "1.5"). These will be immediately added to inventory in - the source location. - validation: - pattern: ^(0|[1-9]\d*)(\.\d{1,4})?$ - minLength: 1 - maxLength: 16 - source: - openapi: ../default/openapi/openapi.json - TransferOrderLine: - docs: >- - Represents a line item in a transfer order. Each line item tracks a - specific - - [CatalogItemVariation](entity:CatalogItemVariation) being transferred, - including ordered quantities - - and receipt status. - properties: - uid: - type: optional - docs: >- - Unique system-generated identifier for the line item. Provide when - updating/removing a line via - [UpdateTransferOrder](api-endpoint:TransferOrders-UpdateTransferOrder). - access: read-only - item_variation_id: - type: string - docs: >- - The required identifier of the - [CatalogItemVariation](entity:CatalogItemVariation) being transferred. - Must reference - - a valid catalog item variation that exists in the - [Catalog](api:Catalog). - validation: - pattern: ^[a-zA-Z0-9_:\-]+$ - minLength: 1 - maxLength: 64 - quantity_ordered: - type: string - docs: >- - Total quantity ordered, formatted as a decimal string (e.g. "10 or - 10.0000"). Required to be a positive number. - - - To remove a line item, set `remove` to `true` in - [UpdateTransferOrder](api-endpoint:TransferOrders-UpdateTransferOrder). - validation: - pattern: ^\d*\.?\d*$ - minLength: 1 - quantity_pending: - type: optional - docs: >- - Calculated quantity of this line item's yet to be received stock. This - is the difference between the total quantity ordered and the sum of - quantities received, canceled, and damaged. - access: read-only - quantity_received: - type: optional - docs: >- - Quantity received at destination. These items are added to the - destination - - [Location](entity:Location)'s inventory with - [InventoryState](entity:InventoryState) of IN_STOCK. - - - This field cannot be updated directly in Create/Update operations, - instead use - [ReceiveTransferOrder](api-endpoint:TransferOrders-ReceiveTransferOrder). - access: read-only - quantity_damaged: - type: optional - docs: >- - Quantity received in damaged condition. These items are added to the - destination - - [Location](entity:Location)'s inventory with - [InventoryState](entity:InventoryState) of WASTE. - - - This field cannot be updated directly in Create/Update operations, - instead use - [ReceiveTransferOrder](api-endpoint:TransferOrders-ReceiveTransferOrder). - access: read-only - quantity_canceled: - type: optional - docs: >- - Quantity that was canceled. These items will be immediately added to - inventory in the source location. - - - This field cannot be updated directly in Create/Update operations, - instead use - [ReceiveTransferOrder](api-endpoint:TransferOrders-ReceiveTransferOrder) - or - [CancelTransferOrder](api-endpoint:TransferOrders-CancelTransferOrder). - access: read-only - source: - openapi: ../default/openapi/openapi.json - TransferOrderQuery: - docs: Query parameters for searching transfer orders - properties: - filter: - type: optional - docs: Filter criteria - sort: - type: optional - docs: Sort configuration - source: - openapi: ../default/openapi/openapi.json - TransferOrderSort: - docs: Sort configuration for search results - properties: - field: - type: optional - docs: >- - Field to sort by - - See [TransferOrderSortField](#type-transferordersortfield) for - possible values - order: - type: optional - docs: |- - Sort order direction - See [SortOrder](#type-sortorder) for possible values - source: - openapi: ../default/openapi/openapi.json - TransferOrderSortField: - enum: - - CREATED_AT - - UPDATED_AT - docs: >- - Fields that can be used for sorting [TransferOrder](entity:TransferOrder)s - in search results. - - Used with - [SearchTransferOrders](api-endpoint:TransferOrders-SearchTransferOrders) - to control - - the order of returned results. - source: - openapi: ../default/openapi/openapi.json - TransferOrderStatus: - enum: - - DRAFT - - STARTED - - PARTIALLY_RECEIVED - - COMPLETED - - CANCELED - docs: >- - Status values for transfer orders. Represents the current state of a - - [TransferOrder](entity:TransferOrder) in its lifecycle from creation to - completion. - - Each status determines what actions are available and how inventory is - affected. - source: - openapi: ../default/openapi/openapi.json - TransferOrderUpdatedEvent: - docs: Published when a transfer_order is updated. - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - type: - type: optional> - docs: The type of event this represents, `"transfer_order.updated"`. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: Data associated with the event. - source: - openapi: ../default/openapi/openapi.json - TransferOrderUpdatedEventData: - properties: - type: - type: optional> - docs: Name of the affected object’s type, `"transfer_order"`. - validation: - maxLength: 50 - id: - type: optional - docs: ID of the affected transfer_order. - validation: - maxLength: 192 - object: - type: optional - docs: An object containing the updated transfer_order. - source: - openapi: ../default/openapi/openapi.json - TransferOrderUpdatedEventObject: - properties: - transfer_order: - type: optional - docs: The updated transfer_order. - source: - openapi: ../default/openapi/openapi.json - UnlinkCustomerFromGiftCardResponse: - docs: >- - A response that contains the unlinked `GiftCard` object. If the request - resulted in errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: >- - The gift card with the ID of the unlinked customer removed from the - `customer_ids` field. - - If no other customers are linked, the `customer_ids` field is also - removed. - source: - openapi: ../default/openapi/openapi.json - UpdateBookingCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateBookingResponse: - properties: - booking: - type: optional - docs: The booking that was updated. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateBreakTypeResponse: - docs: >- - A response to a request to update a `BreakType`. The response contains - - the requested `BreakType` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - break_type: - type: optional - docs: The response object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateCatalogImageRequest: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this UpdateCatalogImage request. - - Keys can be any valid string but must be unique for every - UpdateCatalogImage request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - source: - openapi: ../default/openapi/openapi.json - UpdateCatalogImageResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - image: - type: optional - docs: |- - The newly updated `CatalogImage` including a Square-generated - URL for the encapsulated image file. - source: - openapi: ../default/openapi/openapi.json - UpdateCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-UpdateCustomerCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateCustomerGroupResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [UpdateCustomerGroup](api-endpoint:CustomerGroups-UpdateCustomerGroup) - endpoint. - - - Either `errors` or `group` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - group: - type: optional - docs: The successfully updated customer group. - source: - openapi: ../default/openapi/openapi.json - UpdateCustomerResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [UpdateCustomer](api-endpoint:Customers-UpdateCustomer) - or - - [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) - endpoint. - - - Either `errors` or `customer` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customer: - type: optional - docs: The updated customer. - source: - openapi: ../default/openapi/openapi.json - UpdateInvoiceResponse: - docs: Describes a `UpdateInvoice` response. - properties: - invoice: - type: optional - docs: The updated invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateItemModifierListsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - updated_at: - type: optional - docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) - of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. - source: - openapi: ../default/openapi/openapi.json - UpdateItemTaxesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - updated_at: - type: optional - docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. - source: - openapi: ../default/openapi/openapi.json - UpdateJobResponse: - docs: >- - Represents an [UpdateJob](api-endpoint:Team-UpdateJob) response. Either - `job` or `errors` - - is present in the response. - properties: - job: - type: optional - docs: The updated job. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateLocationCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-UpdateLocationCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateLocationResponse: - docs: >- - The response object returned by the - [UpdateLocation](api-endpoint:Locations-UpdateLocation) endpoint. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - location: - type: optional - docs: The updated `Location` object. - source: - openapi: ../default/openapi/openapi.json - UpdateLocationSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the location settings. - location_settings: - type: optional - docs: The updated location settings. - source: - openapi: ../default/openapi/openapi.json - UpdateMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-UpdateMerchantCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateMerchantSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the merchant settings. - merchant_settings: - type: optional - docs: The updated merchant settings. - source: - openapi: ../default/openapi/openapi.json - UpdateOrderCustomAttributeDefinitionResponse: - docs: Represents a response from updating an order custom attribute definition. - properties: - custom_attribute_definition: - type: optional - docs: The updated order custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateOrderResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint. - properties: - order: - type: optional - docs: The updated order. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdatePaymentLinkResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the payment link. - payment_link: - type: optional - docs: The updated payment link. - source: - openapi: ../default/openapi/openapi.json - UpdatePaymentResponse: - docs: |- - Defines the response returned by - [UpdatePayment](api-endpoint:Payments-UpdatePayment). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - payment: - type: optional - docs: The updated payment. - source: - openapi: ../default/openapi/openapi.json - UpdateScheduledShiftResponse: - docs: >- - Represents an - [UpdateScheduledShift](api-endpoint:Labor-UpdateScheduledShift) response. - - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional - docs: >- - The updated scheduled shift. To make the changes public, call - - [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) or - - [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateShiftResponse: - docs: |- - The response to a request to update a `Shift`. The response contains - the updated `Shift` object and might contain a set of `Error` objects if - the request resulted in errors. - properties: - shift: - type: optional - docs: The updated `Shift`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The updated subscription. - source: - openapi: ../default/openapi/openapi.json - UpdateTeamMemberRequest: - docs: Represents an update request for a `TeamMember` object. - properties: - team_member: - type: optional - docs: >- - The team member fields to add, change, or clear. Fields can be cleared - using a null value. To update - - `wage_setting.job_assignments`, you must provide the complete list of - job assignments. If needed, call - - [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` - values. - source: - openapi: ../default/openapi/openapi.json - UpdateTeamMemberResponse: - docs: >- - Represents a response from an update request containing the updated - `TeamMember` object or error messages. - properties: - team_member: - type: optional - docs: The successfully updated `TeamMember` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateTimecardResponse: - docs: >- - The response to a request to update a `Timecard`. The response contains - - the updated `Timecard` object and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - timecard: - type: optional - docs: The updated `Timecard`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateTransferOrderData: - docs: Data model for updating a transfer order. All fields are optional. - properties: - source_location_id: - type: optional> - docs: >- - The source [Location](entity:Location) that will send the items. Must - be an active location - - in your Square account with sufficient inventory of the requested - items. - validation: - minLength: 1 - maxLength: 64 - destination_location_id: - type: optional> - docs: >- - The destination [Location](entity:Location) that will receive the - items. Must be an active location - - in your Square account. - validation: - minLength: 1 - maxLength: 64 - expected_at: - type: optional> - docs: >- - Expected transfer date in RFC 3339 format (e.g. - "2023-10-01T12:00:00Z"). - notes: - type: optional> - docs: Optional notes about the transfer - validation: - maxLength: 4096 - tracking_number: - type: optional> - docs: Shipment tracking number - validation: - maxLength: 64 - line_items: - type: optional>> - docs: List of items being transferred - source: - openapi: ../default/openapi/openapi.json - UpdateTransferOrderLineData: - docs: Represents a line item update in a transfer order - properties: - uid: - type: optional> - docs: >- - Line item id being updated. Required for updating/removing existing - line items, but should not be set for new line items. - validation: - minLength: 1 - maxLength: 64 - item_variation_id: - type: optional> - docs: |- - Catalog item variation being transferred - - Required for new line items, but otherwise is not updatable. - validation: - minLength: 1 - maxLength: 64 - quantity_ordered: - type: optional> - docs: Total quantity ordered - validation: - pattern: ^(0|[1-9]\d*)(\.\d{1,4})?$ - minLength: 1 - maxLength: 16 - remove: - type: optional> - docs: >- - Flag to remove the line item during update. Must include `uid` in - removal request - source: - openapi: ../default/openapi/openapi.json - UpdateTransferOrderResponse: - docs: Response for updating a transfer order - properties: - transfer_order: - type: optional - docs: The updated transfer order - errors: - type: optional> - docs: Any errors that occurred during the request - source: - openapi: ../default/openapi/openapi.json - UpdateVendorRequest: - docs: >- - Represents an input to a call to - [UpdateVendor](api-endpoint:Vendors-UpdateVendor). - properties: - idempotency_key: - type: optional> - docs: >- - A client-supplied, universally unique identifier (UUID) for the - - request. - - - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - in the - - [API Development 101](https://developer.squareup.com/docs/buildbasics) - section for more - - information. - validation: - maxLength: 128 - vendor: - type: Vendor - docs: The specified [Vendor](entity:Vendor) to be updated. - source: - openapi: ../default/openapi/openapi.json - UpdateVendorResponse: - docs: >- - Represents an output from a call to - [UpdateVendor](api-endpoint:Vendors-UpdateVendor). - properties: - errors: - type: optional> - docs: Errors occurred when the request fails. - vendor: - type: optional - docs: The [Vendor](entity:Vendor) that has been updated. - source: - openapi: ../default/openapi/openapi.json - UpdateWageSettingResponse: - docs: >- - Represents a response from an update request containing the updated - `WageSetting` object - - or error messages. - properties: - wage_setting: - type: optional - docs: The successfully updated `WageSetting` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpdateWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [UpdateWebhookSubscription](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscription) - endpoint. - - - Note: If there are errors processing the request, the - [Subscription](entity:WebhookSubscription) is not - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription: - type: optional - docs: The updated [Subscription](entity:WebhookSubscription). - source: - openapi: ../default/openapi/openapi.json - UpdateWebhookSubscriptionSignatureKeyResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) - endpoint. - - - Note: If there are errors processing the request, the - [Subscription](entity:WebhookSubscription) is not - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - signature_key: - type: optional - docs: >- - The new Square-generated signature key used to validate the origin of - the webhook event. - access: read-only - source: - openapi: ../default/openapi/openapi.json - UpdateWorkweekConfigResponse: - docs: >- - The response to a request to update a `WorkweekConfig` object. The - response contains - - the updated `WorkweekConfig` object and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - workweek_config: - type: optional - docs: The response object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertBookingCustomAttributeResponse: - docs: >- - Represents an - [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertCatalogObjectResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - catalog_object: - type: optional - docs: The successfully created or updated CatalogObject. - id_mappings: - type: optional> - docs: The mapping between client and server IDs for this upsert. - source: - openapi: ../default/openapi/openapi.json - UpsertCustomerCustomAttributeResponse: - docs: >- - Represents an - [UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertLocationCustomAttributeResponse: - docs: >- - Represents an - [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertMerchantCustomAttributeResponse: - docs: >- - Represents an - [UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertOrderCustomAttributeResponse: - docs: Represents a response from upserting order custom attribute definitions. - properties: - custom_attribute: - type: optional - docs: The order custom attribute that was created or modified. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - UpsertSnippetResponse: - docs: >- - Represents an `UpsertSnippet` response. The response can include either - `snippet` or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - snippet: - type: optional - docs: The new or updated snippet. - source: - openapi: ../default/openapi/openapi.json - V1Money: - properties: - amount: - type: optional> - docs: >- - Amount in the lowest denominated value of this Currency. E.g. in USD - - these are cents, in JPY they are Yen (which do not have a 'cent' - concept). - currency_code: - type: optional - docs: |- - - See [Currency](#type-currency) for possible values - source: - openapi: ../default/openapi/openapi.json - V1Order: - docs: V1Order - properties: - errors: - type: optional>> - docs: Any errors that occurred during the request. - id: - type: optional - docs: The order's unique identifier. - buyer_email: - type: optional> - docs: The email address of the order's buyer. - recipient_name: - type: optional> - docs: The name of the order's buyer. - recipient_phone_number: - type: optional> - docs: The phone number to use for the order's delivery. - state: - type: optional - docs: |- - Whether the tax is an ADDITIVE tax or an INCLUSIVE tax. - See [V1OrderState](#type-v1orderstate) for possible values - shipping_address: - type: optional
- docs: The address to ship the order to. - subtotal_money: - type: optional - docs: >- - The amount of all items purchased in the order, before taxes and - shipping. - total_shipping_money: - type: optional - docs: The shipping cost for the order. - total_tax_money: - type: optional - docs: The total of all taxes applied to the order. - total_price_money: - type: optional - docs: The total cost of the order. - total_discount_money: - type: optional - docs: The total of all discounts applied to the order. - created_at: - type: optional - docs: The time when the order was created, in ISO 8601 format. - updated_at: - type: optional - docs: The time when the order was last modified, in ISO 8601 format. - expires_at: - type: optional> - docs: >- - The time when the order expires if no action is taken, in ISO 8601 - format. - payment_id: - type: optional> - docs: The unique identifier of the payment associated with the order. - buyer_note: - type: optional> - docs: A note provided by the buyer when the order was created, if any. - completed_note: - type: optional> - docs: >- - A note provided by the merchant when the order's state was set to - COMPLETED, if any - refunded_note: - type: optional> - docs: >- - A note provided by the merchant when the order's state was set to - REFUNDED, if any. - canceled_note: - type: optional> - docs: >- - A note provided by the merchant when the order's state was set to - CANCELED, if any. - tender: - type: optional - docs: The tender used to pay for the order. - order_history: - type: optional>> - docs: The history of actions associated with the order. - promo_code: - type: optional> - docs: The promo code provided by the buyer, if any. - btc_receive_address: - type: optional> - docs: For Bitcoin transactions, the address that the buyer sent Bitcoin to. - btc_price_satoshi: - type: optional> - docs: >- - For Bitcoin transactions, the price of the buyer's order in satoshi - (100 million satoshi equals 1 BTC). - source: - openapi: ../default/openapi/openapi.json - V1OrderHistoryEntry: - docs: V1OrderHistoryEntry - properties: - action: - type: optional - docs: >- - The type of action performed on the order. - - See [V1OrderHistoryEntryAction](#type-v1orderhistoryentryaction) for - possible values - created_at: - type: optional - docs: The time when the action was performed, in ISO 8601 format. - source: - openapi: ../default/openapi/openapi.json - V1OrderHistoryEntryAction: - enum: - - ORDER_PLACED - - DECLINED - - PAYMENT_RECEIVED - - CANCELED - - COMPLETED - - REFUNDED - - EXPIRED - source: - openapi: ../default/openapi/openapi.json - V1OrderState: - enum: - - PENDING - - OPEN - - COMPLETED - - CANCELED - - REFUNDED - - REJECTED - source: - openapi: ../default/openapi/openapi.json - V1Tender: - docs: >- - A tender represents a discrete monetary exchange. Square represents this - - exchange as a money object with a specific currency and amount, where the - - amount is given in the smallest denomination of the given currency. - - - Square POS can accept more than one form of tender for a single payment - (such - - as by splitting a bill between a credit card and a gift card). The - `tender` - - field of the Payment object lists all forms of tender used for the - payment. - - - Split tender payments behave slightly differently from single tender - payments: - - - The receipt_url for a split tender corresponds only to the first tender - listed - - in the tender field. To get the receipt URLs for the remaining tenders, - use - - the receipt_url fields of the corresponding Tender objects. - - - *A note on gift cards**: when a customer purchases a Square gift card from - a - - merchant, the merchant receives the full amount of the gift card in the - - associated payment. - - - When that gift card is used as a tender, the balance of the gift card is - - reduced and the merchant receives no funds. A `Tender` object with a type - of - - `SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the - - associated payment. - properties: - id: - type: optional - docs: The tender's unique ID. - type: - type: optional - docs: |- - The type of tender. - See [V1TenderType](#type-v1tendertype) for possible values - name: - type: optional> - docs: A human-readable description of the tender. - employee_id: - type: optional> - docs: The ID of the employee that processed the tender. - receipt_url: - type: optional> - docs: The URL of the receipt for the tender. - card_brand: - type: optional - docs: |- - The brand of credit card provided. - See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values - pan_suffix: - type: optional> - docs: The last four digits of the provided credit card's account number. - entry_method: - type: optional - docs: >- - The tender's unique ID. - - See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible - values - payment_note: - type: optional> - docs: >- - Notes entered by the merchant about the tender at the time of payment, - if any. Typically only present for tender with the type: OTHER. - total_money: - type: optional - docs: The total amount of money provided in this form of tender. - tendered_money: - type: optional - docs: The amount of total_money applied to the payment. - tendered_at: - type: optional> - docs: The time when the tender was created, in ISO 8601 format. - settled_at: - type: optional> - docs: The time when the tender was settled, in ISO 8601 format. - change_back_money: - type: optional - docs: The amount of total_money returned to the buyer as change. - refunded_money: - type: optional - docs: >- - The total of all refunds applied to this tender. This amount is always - negative or zero. - is_exchange: - type: optional> - docs: >- - Indicates whether or not the tender is associated with an exchange. If - is_exchange is true, the tender represents the value of goods returned - in an exchange not the actual money paid. The exchange value reduces - the tender amounts needed to pay for items purchased in the exchange. - source: - openapi: ../default/openapi/openapi.json - V1TenderCardBrand: - enum: - - OTHER_BRAND - - VISA - - MASTER_CARD - - AMERICAN_EXPRESS - - DISCOVER - - DISCOVER_DINERS - - JCB - - CHINA_UNIONPAY - - SQUARE_GIFT_CARD - docs: The brand of a credit card. - source: - openapi: ../default/openapi/openapi.json - V1TenderEntryMethod: - enum: - - MANUAL - - SCANNED - - SQUARE_CASH - - SQUARE_WALLET - - SWIPED - - WEB_FORM - - OTHER - source: - openapi: ../default/openapi/openapi.json - V1TenderType: - enum: - - CREDIT_CARD - - CASH - - THIRD_PARTY_CARD - - NO_SALE - - SQUARE_WALLET - - SQUARE_GIFT_CARD - - UNKNOWN - - OTHER - source: - openapi: ../default/openapi/openapi.json - V1UpdateOrderRequestAction: - enum: - - COMPLETE - - CANCEL - - REFUND - source: - openapi: ../default/openapi/openapi.json - Vendor: - docs: Represents a supplier to a seller. - properties: - id: - type: optional - docs: >- - A unique Square-generated ID for the [Vendor](entity:Vendor). - - This field is required when attempting to update a - [Vendor](entity:Vendor). - validation: - maxLength: 100 - created_at: - type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when the - [Vendor](entity:Vendor) was created. - validation: - maxLength: 34 - access: read-only - updated_at: - type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when the - [Vendor](entity:Vendor) was last updated. - validation: - maxLength: 34 - access: read-only - name: - type: optional> - docs: >- - The name of the [Vendor](entity:Vendor). - - This field is required when attempting to create or update a - [Vendor](entity:Vendor). - validation: - maxLength: 100 - address: - type: optional
- docs: The address of the [Vendor](entity:Vendor). - contacts: - type: optional>> - docs: The contacts of the [Vendor](entity:Vendor). - account_number: - type: optional> - docs: The account number of the [Vendor](entity:Vendor). - validation: - maxLength: 100 - note: - type: optional> - docs: A note detailing information about the [Vendor](entity:Vendor). - validation: - maxLength: 4096 - version: - type: optional - docs: The version of the [Vendor](entity:Vendor). - status: - type: optional - docs: |- - The status of the [Vendor](entity:Vendor). - See [Status](#type-status) for possible values - source: - openapi: ../default/openapi/openapi.json - VendorContact: - docs: Represents a contact of a [Vendor](entity:Vendor). - properties: - id: - type: optional - docs: >- - A unique Square-generated ID for the - [VendorContact](entity:VendorContact). - - This field is required when attempting to update a - [VendorContact](entity:VendorContact). - validation: - maxLength: 100 - name: - type: optional> - docs: >- - The name of the [VendorContact](entity:VendorContact). - - This field is required when attempting to create a - [Vendor](entity:Vendor). - validation: - maxLength: 255 - email_address: - type: optional> - docs: The email address of the [VendorContact](entity:VendorContact). - validation: - maxLength: 255 - phone_number: - type: optional> - docs: The phone number of the [VendorContact](entity:VendorContact). - validation: - maxLength: 255 - removed: - type: optional> - docs: The state of the [VendorContact](entity:VendorContact). - ordinal: - type: integer - docs: The ordinal of the [VendorContact](entity:VendorContact). - source: - openapi: ../default/openapi/openapi.json - VendorCreatedEvent: - docs: Published when a [Vendor](entity:Vendor) is created. - properties: - merchant_id: - type: optional> - docs: The ID of a seller associated with this event. - location_id: - type: optional> - docs: >- - The ID of a location associated with the event, if the event is - associated with the location of the seller. - type: - type: optional> - docs: The type of this event. The value is `"vendor.created".` - event_id: - type: optional> - docs: A unique ID for this event. - created_at: - type: optional - docs: >- - The RFC 3339-formatted time when the underlying event data object is - created. - access: read-only - data: - type: optional - docs: The data associated with this event. - source: - openapi: ../default/openapi/openapi.json - VendorCreatedEventData: - docs: Defines the `vendor.created` event data structure. - properties: - type: - type: optional> - docs: The type of the event data object. The value is `vendor` - id: - type: optional - docs: The ID of the event data object. - object: - type: optional - docs: An object containing the created vendor. - source: - openapi: ../default/openapi/openapi.json - VendorCreatedEventObject: - properties: - operation: - type: optional - docs: >- - The operation on the vendor that caused the event to be published. The - value is `CREATED`. - - See [Operation](#type-operation) for possible values - vendor: - type: optional - docs: The created vendor as the result of the specified operation. - source: - openapi: ../default/openapi/openapi.json - VendorCreatedEventObjectOperation: - type: literal<"CREATED"> - docs: >- - The operation that can be performed against a vendor to cause the event to - be published. - VendorStatus: - enum: - - ACTIVE - - INACTIVE - docs: |- - The status of the [Vendor](entity:Vendor), - whether a [Vendor](entity:Vendor) is active or inactive. - source: - openapi: ../default/openapi/openapi.json - VendorUpdatedEvent: - docs: Published when a [Vendor](entity:Vendor) is updated. - properties: - merchant_id: - type: optional> - docs: The ID of a seller associated with this event. - location_id: - type: optional> - docs: >- - The ID of a seller location associated with this event, if the event - is associated with the location. - type: - type: optional> - docs: The type of this event. The value is `"vendor.updated".` - event_id: - type: optional> - docs: A unique ID for this webhoook event. - created_at: - type: optional - docs: >- - The RFC 3339-formatted time when the underlying event data object is - created. - access: read-only - data: - type: optional - docs: The data associated with this event. - source: - openapi: ../default/openapi/openapi.json - VendorUpdatedEventData: - docs: Defines the `vendor.updated` event data structure. - properties: - type: - type: optional> - docs: The type of the event data object. The value is `vendor`. - id: - type: optional - docs: The ID of the event data object. - object: - type: optional - docs: An object containing updated vendor. - source: - openapi: ../default/openapi/openapi.json - VendorUpdatedEventObject: - properties: - operation: - type: optional - docs: >- - The operation on the vendor that caused the event to be published. The - value is `UPDATED`. - - See [Operation](#type-operation) for possible values - vendor: - type: optional - docs: The updated vendor as the result of the specified operation. - source: - openapi: ../default/openapi/openapi.json - VendorUpdatedEventObjectOperation: - type: literal<"UPDATED"> - docs: >- - The operation that can be performed against a vendor to cause the event to - be published. - VisibilityFilter: - enum: - - ALL - - READ - - READ_WRITE - docs: >- - Enumeration of visibility-filter values used to set the ability to view - custom attributes or custom attribute definitions. - source: - openapi: ../default/openapi/openapi.json - VoidTransactionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: ../default/openapi/openapi.json - WageSetting: - docs: >- - Represents information about the overtime exemption status, job - assignments, and compensation - - for a [team member](entity:TeamMember). - properties: - team_member_id: - type: optional> - docs: The ID of the team member associated with the wage setting. - job_assignments: - type: optional>> - docs: >- - **Required** The ordered list of jobs that the team member is assigned - to. - - The first job assignment is considered the team member's primary job. - is_overtime_exempt: - type: optional> - docs: >- - Whether the team member is exempt from the overtime rules of the - seller's country. - version: - type: optional - docs: >- - **Read only** Used for resolving concurrency issues. The request fails - if the version - - provided does not match the server version at the time of the request. - If not provided, - - Square executes a blind write, potentially overwriting data from - another write. For more information, - - see [optimistic - concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency). - created_at: - type: optional - docs: The timestamp when the wage setting was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the wage setting was last updated, in RFC 3339 - format. - access: read-only - source: - openapi: ../default/openapi/openapi.json - WebhookSubscription: - docs: >- - Represents the details of a webhook subscription, including notification - URL, - - event types, and signature key. - properties: - id: - type: optional - docs: A Square-generated unique ID for the subscription. - validation: - maxLength: 64 - access: read-only - name: - type: optional> - docs: The name of this subscription. - validation: - maxLength: 64 - enabled: - type: optional> - docs: >- - Indicates whether the subscription is enabled (`true`) or not - (`false`). - event_types: - type: optional>> - docs: The event types associated with this subscription. - notification_url: - type: optional> - docs: The URL to which webhooks are sent. - api_version: - type: optional> - docs: |- - The API version of the subscription. - This field is optional for `CreateWebhookSubscription`. - The value defaults to the API version used by the application. - signature_key: - type: optional - docs: >- - The Square-generated signature key used to validate the origin of the - webhook event. - access: read-only - created_at: - type: optional - docs: >- - The timestamp of when the subscription was created, in RFC 3339 - format. For example, "2016-09-04T23:59:33.123Z". - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the subscription was last updated, in RFC 3339 - format. - - For example, "2016-09-04T23:59:33.123Z". - access: read-only - source: - openapi: ../default/openapi/openapi.json - Weekday: - enum: - - MON - - TUE - - WED - - THU - - FRI - - SAT - - SUN - docs: The days of the week. - source: - openapi: ../default/openapi/openapi.json - WorkweekConfig: - docs: |- - Sets the day of the week and hour of the day that a business starts a - workweek. This is used to calculate overtime pay. - properties: - id: - type: optional - docs: The UUID for this object. - start_of_week: - type: Weekday - docs: |- - The day of the week on which a business week starts for - compensation purposes. - See [Weekday](#type-weekday) for possible values - start_of_day_local_time: - type: string - docs: |- - The local time at which a business week starts. Represented as a - string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are - truncated). - validation: - minLength: 1 - version: - type: optional - docs: >- - Used for resolving concurrency issues. The request fails if the - version - - provided does not match the server version at the time of the request. - If not provided, - - Square executes a blind write; potentially overwriting data from - another - - write. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - updated_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - source: - openapi: ../default/openapi/openapi.json - CatalogObjectItem: - properties: - item_data: - type: optional - docs: >- - Structured data for a `CatalogItem`, set for CatalogObjects of type - `ITEM`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectImage: - properties: - image_data: - type: optional - docs: >- - Structured data for a `CatalogImage`, set for CatalogObjects of type - `IMAGE`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectItemVariation: - properties: - item_variation_data: - type: optional - docs: >- - Structured data for a `CatalogItemVariation`, set for CatalogObjects - of type `ITEM_VARIATION`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectTax: - properties: - tax_data: - type: optional - docs: >- - Structured data for a `CatalogTax`, set for CatalogObjects of type - `TAX`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectDiscount: - properties: - discount_data: - type: optional - docs: >- - Structured data for a `CatalogDiscount`, set for CatalogObjects of - type `DISCOUNT`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectModifierList: - properties: - modifier_list_data: - type: optional - docs: >- - Structured data for a `CatalogModifierList`, set for CatalogObjects of - type `MODIFIER_LIST`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectModifier: - properties: - modifier_data: - type: optional - docs: >- - Structured data for a `CatalogModifier`, set for CatalogObjects of - type `MODIFIER`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectPricingRule: - properties: - pricing_rule_data: - type: optional - docs: >- - Structured data for a `CatalogPricingRule`, set for CatalogObjects of - type `PRICING_RULE`. - - A `CatalogPricingRule` object often works with a `CatalogProductSet` - object or a `CatalogTimePeriod` object. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectProductSet: - properties: - product_set_data: - type: optional - docs: >- - Structured data for a `CatalogProductSet`, set for CatalogObjects of - type `PRODUCT_SET`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectTimePeriod: - properties: - time_period_data: - type: optional - docs: >- - Structured data for a `CatalogTimePeriod`, set for CatalogObjects of - type `TIME_PERIOD`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectMeasurementUnit: - properties: - measurement_unit_data: - type: optional - docs: >- - Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects - of type `MEASUREMENT_UNIT`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectSubscriptionPlanVariation: - properties: - subscription_plan_variation_data: - type: optional - docs: >- - Structured data for a `CatalogSubscriptionPlanVariation`, set for - CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectItemOption: - properties: - item_option_data: - type: optional - docs: >- - Structured data for a `CatalogItemOption`, set for CatalogObjects of - type `ITEM_OPTION`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectItemOptionValue: - properties: - item_option_value_data: - type: optional - docs: >- - Structured data for a `CatalogItemOptionValue`, set for CatalogObjects - of type `ITEM_OPTION_VAL`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectCustomAttributeDefinition: - properties: - custom_attribute_definition_data: - type: optional - docs: >- - Structured data for a `CatalogCustomAttributeDefinition`, set for - CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectQuickAmountsSettings: - properties: - quick_amounts_settings_data: - type: optional - docs: >- - Structured data for a `CatalogQuickAmountsSettings`, set for - CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectSubscriptionPlan: - properties: - subscription_plan_data: - type: optional - docs: >- - Structured data for a `CatalogSubscriptionPlan`, set for - CatalogObjects of type `SUBSCRIPTION_PLAN`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - CatalogObjectAvailabilityPeriod: - properties: - availability_period_data: - type: optional - docs: >- - Structured data for a `CatalogAvailabilityPeriod`, set for - CatalogObjects of type `AVAILABILITY_PERIOD`. - extends: - - CatalogObjectBase - source: - openapi: ../default/openapi/openapi.json - GetLoyaltyAccountRequest: unknown - GetLoyaltyProgramRequest: unknown - GetLoyaltyPromotionRequest: unknown - GetLoyaltyRewardRequest: unknown - GetCardRequest: unknown - GetDisputeEvidenceRequest: unknown - GetDisputeRequest: unknown - V1GetPaymentRequest: unknown - V1GetSettlementRequest: unknown - GetCustomerGroupRequest: unknown - GetCustomerRequest: unknown - GetCustomerSegmentRequest: unknown - GetTransactionRequest: unknown - GetBookingRequest: unknown - GetBusinessBookingProfileRequest: unknown - GetTeamMemberBookingProfileRequest: unknown - GetSnippetRequest: unknown - GetInventoryAdjustmentRequest: unknown - GetInventoryPhysicalCountRequest: unknown - GetInventoryTransferRequest: unknown - GetVendorRequest: unknown - GetPaymentLinkRequest: unknown - GetGiftCardRequest: unknown - GetOrderRequest: unknown - GetEmployeeRequest: unknown - GetLocationRequest: unknown - GetMerchantRequest: unknown - GetTeamMemberRequest: unknown - GetWageSettingRequest: unknown - GetWebhookSubscriptionRequest: unknown -imports: - checkout: checkout.yml diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml deleted file mode 100644 index b1e07d59..00000000 --- a/.mock/definition/api.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: api -error-discrimination: - strategy: status-code -display-name: Square -environments: - Production: https://connect.squareup.com - Sandbox: https://connect.squareupsandbox.com -default-environment: Production -headers: - Square-Version: - name: version - env: VERSION - type: literal<"2025-10-16"> -auth-schemes: - Bearer: - scheme: bearer - token: - env: SQUARE_TOKEN -auth: Bearer diff --git a/.mock/definition/applePay.yml b/.mock/definition/applePay.yml deleted file mode 100644 index 65e4ec53..00000000 --- a/.mock/definition/applePay.yml +++ /dev/null @@ -1,81 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - RegisterDomain: - path: /v2/apple-pay/domains - method: POST - auth: - - oauth2: [] - docs: >- - Activates a domain for use with Apple Pay on the Web and Square. A - validation - - is performed on this domain by Apple to ensure that it is properly set - up as - - an Apple Pay enabled domain. - - - This endpoint provides an easy way for platform developers to bulk - activate - - Apple Pay on the Web with Square for merchants using their platform. - - - Note: You will need to host a valid domain verification file on your - domain to support Apple Pay. The - - current version of this file is always available at - https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merchantid-domain-association, - - and should be hosted at - `.well_known/apple-developer-merchantid-domain-association` on your - - domain. This file is subject to change; we strongly recommend checking - for updates regularly and avoiding - - long-lived caches that might not keep in sync with the correct file - version. - - - To learn more about the Web Payments SDK and how to add Apple Pay, see - [Take an Apple Pay - Payment](https://developer.squareup.com/docs/web-payments/apple-pay). - source: - openapi: ../default/openapi/openapi.json - display-name: RegisterDomain - request: - name: RegisterDomainRequest - body: - properties: - domain_name: - type: string - docs: >- - A domain name as described in RFC-1034 that will be registered - with ApplePay. - validation: - minLength: 1 - maxLength: 255 - content-type: application/json - response: - docs: Success - type: root.RegisterDomainResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - domain_name: example.com - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - status: VERIFIED - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bankAccounts.yml b/.mock/definition/bankAccounts.yml deleted file mode 100644 index 0cde77b6..00000000 --- a/.mock/definition/bankAccounts.yml +++ /dev/null @@ -1,222 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/bank-accounts - method: GET - auth: - - oauth2: - - BANK_ACCOUNTS_READ - docs: >- - Returns a list of [BankAccount](entity:BankAccount) objects linked to a - Square account. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.bank_accounts - source: - openapi: ../default/openapi/openapi.json - display-name: ListBankAccounts - request: - name: ListBankAccountsRequest - query-parameters: - cursor: - type: optional> - docs: >- - The pagination cursor returned by a previous call to this - endpoint. - - Use it in the next `ListBankAccounts` request to retrieve the next - set - - of results. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - limit: - type: optional> - docs: >- - Upper limit on the number of bank accounts to return in the - response. - - Currently, 1000 is the largest supported limit. You can specify a - limit - - of up to 1000 bank accounts. This is also the default limit. - location_id: - type: optional> - docs: >- - Location ID. You can specify this optional filter - - to retrieve only the linked bank accounts belonging to a specific - location. - response: - docs: Success - type: root.ListBankAccountsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - limit: 1 - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - bank_accounts: - - id: ao6iaQ9vhDiaQD7n3GB - account_number_suffix: '971' - country: US - currency: USD - account_type: CHECKING - holder_name: Jane Doe - primary_bank_identification_number: '112200303' - secondary_bank_identification_number: secondary_bank_identification_number - debit_mandate_reference_id: debit_mandate_reference_id - reference_id: reference_id - location_id: S8GWD5example - status: VERIFICATION_IN_PROGRESS - creditable: false - debitable: false - fingerprint: fingerprint - version: 5 - bank_name: Bank Name - - id: 4x7WXuaxrkQkVlka3GB - account_number_suffix: '972' - country: US - currency: USD - account_type: CHECKING - holder_name: Jane Doe - primary_bank_identification_number: '112200303' - secondary_bank_identification_number: secondary_bank_identification_number - debit_mandate_reference_id: debit_mandate_reference_id - reference_id: reference_id - location_id: S8GWD5example - status: VERIFICATION_IN_PROGRESS - creditable: false - debitable: false - fingerprint: fingerprint - version: 5 - bank_name: Bank Name - cursor: cursor - GetByV1Id: - path: /v2/bank-accounts/by-v1-id/{v1_bank_account_id} - method: GET - auth: - - oauth2: - - BANK_ACCOUNTS_READ - docs: >- - Returns details of a [BankAccount](entity:BankAccount) identified by V1 - bank account ID. - source: - openapi: ../default/openapi/openapi.json - display-name: GetBankAccountByV1Id - request: - name: GetByV1IdBankAccountsRequest - path-parameters: - v1_bank_account_id: - type: string - docs: >- - Connect V1 ID of the desired `BankAccount`. For more information, - see - - [Retrieve a bank account by using an ID issued by V1 Bank Accounts - API](https://developer.squareup.com/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). - response: - docs: Success - type: root.GetBankAccountByV1IdResponse - status-code: 200 - examples: - - path-parameters: - v1_bank_account_id: v1_bank_account_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - bank_account: - id: w3yRgCGYQnwmdl0R3GB - account_number_suffix: '971' - country: US - currency: USD - account_type: CHECKING - holder_name: Jane Doe - primary_bank_identification_number: '112200303' - secondary_bank_identification_number: secondary_bank_identification_number - debit_mandate_reference_id: debit_mandate_reference_id - reference_id: reference_id - location_id: S8GWD5example - status: VERIFICATION_IN_PROGRESS - creditable: false - debitable: false - fingerprint: fingerprint - version: 5 - bank_name: Bank Name - get: - path: /v2/bank-accounts/{bank_account_id} - method: GET - auth: - - oauth2: - - BANK_ACCOUNTS_READ - docs: |- - Returns details of a [BankAccount](entity:BankAccount) - linked to a Square account. - source: - openapi: ../default/openapi/openapi.json - display-name: GetBankAccount - request: - name: GetBankAccountsRequest - path-parameters: - bank_account_id: - type: string - docs: Square-issued ID of the desired `BankAccount`. - response: - docs: Success - type: root.GetBankAccountResponse - status-code: 200 - examples: - - path-parameters: - bank_account_id: bank_account_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - bank_account: - id: w3yRgCGYQnwmdl0R3GB - account_number_suffix: '971' - country: US - currency: USD - account_type: CHECKING - holder_name: Jane Doe - primary_bank_identification_number: '112200303' - secondary_bank_identification_number: secondary_bank_identification_number - debit_mandate_reference_id: debit_mandate_reference_id - reference_id: reference_id - location_id: S8GWD5example - status: VERIFICATION_IN_PROGRESS - creditable: false - debitable: false - fingerprint: fingerprint - version: 5 - bank_name: Bank Name - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bookings.yml b/.mock/definition/bookings.yml deleted file mode 100644 index b351549b..00000000 --- a/.mock/definition/bookings.yml +++ /dev/null @@ -1,909 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/bookings - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Retrieve a collection of bookings. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.bookings - source: - openapi: ../default/openapi/openapi.json - display-name: ListBookings - request: - name: ListBookingsRequest - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of results per page to return in a paged - response. - cursor: - type: optional> - docs: >- - The pagination cursor from the preceding response to return the - next page of the results. Do not set this when retrieving the - first page of the results. - customer_id: - type: optional> - docs: >- - The [customer](entity:Customer) for whom to retrieve bookings. If - this is not set, bookings for all customers are retrieved. - team_member_id: - type: optional> - docs: >- - The team member for whom to retrieve bookings. If this is not set, - bookings of all members are retrieved. - location_id: - type: optional> - docs: >- - The location for which to retrieve bookings. If this is not set, - all locations' bookings are retrieved. - start_at_min: - type: optional> - docs: >- - The RFC 3339 timestamp specifying the earliest of the start time. - If this is not set, the current time is used. - start_at_max: - type: optional> - docs: >- - The RFC 3339 timestamp specifying the latest of the start time. If - this is not set, the time of 31 days after `start_at_min` is used. - response: - docs: Success - type: root.ListBookingsResponse - status-code: 200 - examples: - - query-parameters: - limit: 1 - cursor: cursor - customer_id: customer_id - team_member_id: team_member_id - location_id: location_id - start_at_min: start_at_min - start_at_max: start_at_max - headers: - Square-Version: '2025-10-16' - response: - body: - bookings: - - id: zkras0xv0xwswx - version: 1 - status: ACCEPTED - created_at: '2020-10-28T15:47:41Z' - updated_at: '2020-10-28T15:49:25Z' - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - customer_id: EX2QSVGTZN4K1E5QE1CBFNVQ8M - customer_note: '' - seller_note: '' - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - transition_time_minutes: 1 - all_day: true - location_type: BUSINESS_LOCATION - source: FIRST_PARTY_MERCHANT - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/bookings - method: POST - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Creates a booking. - - - The required input must include the following: - - - `Booking.location_id` - - - `Booking.start_at` - - - `Booking.AppointmentSegment.team_member_id` - - - `Booking.AppointmentSegment.service_variation_id` - - - `Booking.AppointmentSegment.service_variation_version` - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateBooking - request: - name: CreateBookingRequest - body: - properties: - idempotency_key: - type: optional - docs: A unique key to make this request an idempotent operation. - validation: - maxLength: 255 - booking: - type: root.Booking - docs: The details of the booking to be created. - content-type: application/json - response: - docs: Success - type: root.CreateBookingResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - booking: {} - response: - body: - booking: - id: zkras0xv0xwswx - version: 0 - status: ACCEPTED - created_at: '2020-10-28T15:47:41Z' - updated_at: '2020-10-28T15:47:41Z' - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - customer_id: EX2QSVGTZN4K1E5QE1CBFNVQ8M - customer_note: '' - seller_note: '' - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - transition_time_minutes: 1 - all_day: true - location_type: BUSINESS_LOCATION - creator_details: - creator_type: TEAM_MEMBER - team_member_id: team_member_id - customer_id: customer_id - source: FIRST_PARTY_MERCHANT - address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - SearchAvailability: - path: /v2/bookings/availability/search - method: POST - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Searches for availabilities for booking. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchAvailability - request: - name: SearchAvailabilityRequest - body: - properties: - query: - type: root.SearchAvailabilityQuery - docs: >- - Query conditions used to filter buyer-accessible booking - availabilities. - content-type: application/json - response: - docs: Success - type: root.SearchAvailabilityResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - start_at_range: {} - response: - body: - availabilities: - - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-26T13:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-26T14:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-26T14:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-26T15:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-26T15:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-26T16:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-27T09:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T09:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-27T10:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T10:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T11:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T11:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-27T12:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-27T12:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - - start_at: '2020-11-27T13:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T13:30:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - - start_at: '2020-11-27T14:00:00Z' - location_id: LEQHH0YY8B42M - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMaJcbiRqPIGZuS9 - service_variation_version: 1599775456731 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkRetrieveBookings: - path: /v2/bookings/bulk-retrieve - method: POST - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Bulk-Retrieves a list of bookings by booking IDs. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkRetrieveBookings - request: - name: BulkRetrieveBookingsRequest - body: - properties: - booking_ids: - docs: >- - A non-empty list of [Booking](entity:Booking) IDs specifying - bookings to retrieve. - type: list - content-type: application/json - response: - docs: Success - type: root.BulkRetrieveBookingsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - booking_ids: - - booking_ids - response: - body: - bookings: - sc3p3m7dvctfr1: - booking: - id: sc3p3m7dvctfr1 - version: 0 - status: ACCEPTED - created_at: '2023-04-26T18:19:21Z' - updated_at: '2023-04-26T18:19:21Z' - start_at: '2023-05-01T14:00:00Z' - location_id: LY6WNBPVM6VGV - customer_id: 4TDWKN9E8165X8Z77MRS0VFMJM - appointment_segments: - - duration_minutes: 60 - service_variation_id: VG4FYBKK3UL6UITOEYQ6MFLS - team_member_id: TMjiqI3PxyLMKr4k - service_variation_version: 1641341724039 - any_team_member: false - all_day: false - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - tdegug1dvctdef: - errors: - - category: INVALID_REQUEST_ERROR - code: NOT_FOUND - detail: Specified booking was not found. - field: booking_id - tdegug1fqni3wh: - booking: - id: tdegug1fqni3wh - version: 0 - status: ACCEPTED - created_at: '2023-04-26T18:19:30Z' - updated_at: '2023-04-26T18:19:30Z' - start_at: '2023-05-02T14:00:00Z' - location_id: LY6WNBPVM6VGV - customer_id: 4TDWKN9E8165X8Z77MRS0VFMJM - appointment_segments: - - duration_minutes: 60 - service_variation_id: VG4FYBKK3UL6UITOEYQ6MFLS - team_member_id: TMjiqI3PxyLMKr4k - service_variation_version: 1641341724039 - any_team_member: false - all_day: false - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - getBusinessProfile: - path: /v2/bookings/business-booking-profile - method: GET - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Retrieves a seller's booking profile. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveBusinessBookingProfile - response: - docs: Success - type: root.GetBusinessBookingProfileResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - business_booking_profile: - seller_id: MLJQYZZRM0D3Y - created_at: '2020-09-10T21:40:38Z' - booking_enabled: true - customer_timezone_choice: CUSTOMER_CHOICE - booking_policy: ACCEPT_ALL - allow_user_cancel: true - business_appointment_settings: - location_types: - - BUSINESS_LOCATION - alignment_time: HALF_HOURLY - min_booking_lead_time_seconds: 0 - max_booking_lead_time_seconds: 31536000 - any_team_member_booking_enabled: true - multiple_service_booking_enabled: true - max_appointments_per_day_limit_type: PER_TEAM_MEMBER - max_appointments_per_day_limit: 1 - cancellation_window_seconds: 1 - cancellation_fee_money: - currency: USD - cancellation_policy: CUSTOM_POLICY - cancellation_policy_text: cancellation_policy_text - skip_booking_flow_staff_selection: false - support_seller_level_writes: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - RetrieveLocationBookingProfile: - path: /v2/bookings/location-booking-profiles/{location_id} - method: GET - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Retrieves a seller's location booking profile. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLocationBookingProfile - request: - name: RetrieveLocationBookingProfileRequest - path-parameters: - location_id: - type: string - docs: The ID of the location to retrieve the booking profile. - response: - docs: Success - type: root.RetrieveLocationBookingProfileResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - location_booking_profile: - location_id: L3HETDGYQ4A2C - booking_site_url: https://square.site/book/L3HETDGYQ4A2C/prod-business - online_booking_enabled: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkRetrieveTeamMemberBookingProfiles: - path: /v2/bookings/team-member-booking-profiles/bulk-retrieve - method: POST - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Retrieves one or more team members' booking profiles. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkRetrieveTeamMemberBookingProfiles - request: - name: BulkRetrieveTeamMemberBookingProfilesRequest - body: - properties: - team_member_ids: - docs: >- - A non-empty list of IDs of team members whose booking profiles - you want to retrieve. - type: list - content-type: application/json - response: - docs: Success - type: root.BulkRetrieveTeamMemberBookingProfilesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - team_member_ids: - - team_member_ids - response: - body: - team_member_booking_profiles: - TMXUrsBWWcHTt79t: - errors: - - category: INVALID_REQUEST_ERROR - code: NOT_FOUND - detail: Resource not found. - TMaJcbiRqPIGZuS9: - team_member_booking_profile: - team_member_id: TMaJcbiRqPIGZuS9 - display_name: Sandbox Staff 1 - is_bookable: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - TMtdegug1fqni3wh: - team_member_booking_profile: - team_member_id: TMtdegug1fqni3wh - display_name: Sandbox Staff 2 - is_bookable: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/bookings/{booking_id} - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Retrieves a booking. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveBooking - request: - name: GetBookingsRequest - path-parameters: - booking_id: - type: string - docs: >- - The ID of the [Booking](entity:Booking) object representing the - to-be-retrieved booking. - response: - docs: Success - type: root.GetBookingResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - headers: - Square-Version: '2025-10-16' - response: - body: - booking: - id: zkras0xv0xwswx - version: 1 - status: ACCEPTED - created_at: '2020-10-28T15:47:41Z' - updated_at: '2020-10-28T15:49:25Z' - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - customer_id: EX2QSVGTZN4K1E5QE1CBFNVQ8M - customer_note: '' - seller_note: '' - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - transition_time_minutes: 1 - all_day: true - location_type: BUSINESS_LOCATION - creator_details: - creator_type: TEAM_MEMBER - team_member_id: team_member_id - customer_id: customer_id - source: FIRST_PARTY_MERCHANT - address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/bookings/{booking_id} - method: PUT - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Updates a booking. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateBooking - request: - name: UpdateBookingRequest - path-parameters: - booking_id: - type: string - docs: >- - The ID of the [Booking](entity:Booking) object representing the - to-be-updated booking. - body: - properties: - idempotency_key: - type: optional> - docs: A unique key to make this request an idempotent operation. - validation: - maxLength: 255 - booking: - type: root.Booking - docs: >- - The booking to be updated. Individual attributes explicitly - specified here override the corresponding values of the existing - booking. - content-type: application/json - response: - docs: Success - type: root.UpdateBookingResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - headers: - Square-Version: '2025-10-16' - request: - booking: {} - response: - body: - booking: - id: zkras0xv0xwswx - version: 2 - status: ACCEPTED - created_at: '2020-10-28T15:47:41Z' - updated_at: '2020-10-28T15:49:25Z' - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - customer_id: EX2QSVGTZN4K1E5QE1CBFNVQ8M - customer_note: I would like to sit near the window please - seller_note: '' - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - transition_time_minutes: 1 - all_day: true - location_type: CUSTOMER_LOCATION - creator_details: - creator_type: TEAM_MEMBER - team_member_id: team_member_id - customer_id: customer_id - source: FIRST_PARTY_MERCHANT - address: - address_line_1: 1955 Broadway - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: Oakland - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: CA - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '94612' - country: ZZ - first_name: first_name - last_name: last_name - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cancel: - path: /v2/bookings/{booking_id}/cancel - method: POST - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Cancels an existing booking. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelBooking - request: - name: CancelBookingRequest - path-parameters: - booking_id: - type: string - docs: >- - The ID of the [Booking](entity:Booking) object representing the - to-be-cancelled booking. - body: - properties: - idempotency_key: - type: optional> - docs: A unique key to make this request an idempotent operation. - validation: - maxLength: 255 - booking_version: - type: optional> - docs: >- - The revision number for the booking used for optimistic - concurrency. - content-type: application/json - response: - docs: Success - type: root.CancelBookingResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - booking: - id: zkras0xv0xwswx - version: 1 - status: CANCELLED_BY_CUSTOMER - created_at: '2020-10-28T15:47:41Z' - updated_at: '2020-10-28T15:49:25Z' - start_at: '2020-11-26T13:00:00Z' - location_id: LEQHH0YY8B42M - customer_id: EX2QSVGTZN4K1E5QE1CBFNVQ8M - customer_note: '' - seller_note: '' - appointment_segments: - - duration_minutes: 60 - service_variation_id: RU3PBTZTK7DXZDQFCJHOK2MC - team_member_id: TMXUrsBWWcHTt79t - service_variation_version: 1599775456731 - transition_time_minutes: 1 - all_day: true - location_type: BUSINESS_LOCATION - creator_details: - creator_type: TEAM_MEMBER - team_member_id: team_member_id - customer_id: customer_id - source: FIRST_PARTY_MERCHANT - address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bookings/customAttributeDefinitions.yml b/.mock/definition/bookings/customAttributeDefinitions.yml deleted file mode 100644 index 0ca0c195..00000000 --- a/.mock/definition/bookings/customAttributeDefinitions.yml +++ /dev/null @@ -1,413 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/bookings/custom-attribute-definitions - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Get all bookings custom attribute definitions. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attribute_definitions - source: - openapi: ../default/openapi/openapi.json - display-name: ListBookingCustomAttributeDefinitions - request: - name: ListCustomAttributeDefinitionsRequest - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListBookingCustomAttributeDefinitionsResponse - status-code: 200 - examples: - - query-parameters: - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definitions: - - key: favoriteShampoo - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite shampoo - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 3 - updated_at: '2022-11-16T15:39:38Z' - created_at: '2022-11-16T15:27:30Z' - - key: partySize - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Party size - description: Number of people in the party for dine-in - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: '2022-11-16T15:49:05Z' - created_at: '2022-11-16T15:49:05Z' - cursor: >- - YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/bookings/custom-attribute-definitions - method: POST - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Creates a bookings custom attribute definition. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateBookingCustomAttributeDefinition - request: - name: CreateBookingCustomAttributeDefinitionRequest - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition to create, with the following - fields: - - - - `key` - - - - `name`. If provided, `name` must be unique (case-sensitive) - across all visible booking-related custom attribute - - definitions for the seller. - - - - `description` - - - - `visibility`. Note that all custom attributes are visible in - exported booking data, including those set to - - `VISIBILITY_HIDDEN`. - - - - `schema`. With the exception of the `Selection` data type, the - `schema` is specified as a - - simple URL to the JSON schema definition hosted on the Square - CDN. For more information, see - - [Specifying the - schema](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#specify-schema). - idempotency_key: - type: optional - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateBookingCustomAttributeDefinitionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: {} - response: - body: - custom_attribute_definition: - key: favoriteShampoo - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Shampoo - description: The favorite shampoo of the customer. - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: '2022-11-16T15:27:30Z' - created_at: '2022-11-16T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/bookings/custom-attribute-definitions/{key} - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Retrieves a bookings custom attribute definition. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveBookingCustomAttributeDefinition - request: - name: GetCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: >- - The key of the custom attribute definition to retrieve. If the - requesting application - - is not the definition owner, you must use the qualified key. - query-parameters: - version: - type: optional> - docs: >- - The current version of the custom attribute definition, which is - used for strongly consistent - - reads to guarantee that you receive the most up-to-date data. When - included in the request, - - Square returns the specified version or a higher version if one - exists. If the specified version - - is higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveBookingCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definition: - key: favoriteShampoo - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite shampoo - description: The favorite shampoo of the customer. - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-11-16T15:27:30Z' - created_at: '2022-11-16T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/bookings/custom-attribute-definitions/{key} - method: PUT - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Updates a bookings custom attribute definition. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateBookingCustomAttributeDefinition - request: - name: UpdateBookingCustomAttributeDefinitionRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to update. - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition that contains the fields to - update. Only the following fields can be updated: - - - `name` - - - `description` - - - `visibility` - - - `schema` for a `Selection` data type. Only changes to the - named options or the maximum number of allowed - - selections are supported. - - - For more information, see - - [Updatable definition - fields](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields). - - - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include the optional `version` field and specify the - current version of the custom attribute definition. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateBookingCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: {} - response: - body: - custom_attribute_definition: - key: favoriteShampoo - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite shampoo - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 2 - updated_at: '2022-11-16T15:39:38Z' - created_at: '2022-11-16T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/bookings/custom-attribute-definitions/{key} - method: DELETE - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Deletes a bookings custom attribute definition. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteBookingCustomAttributeDefinition - request: - name: DeleteCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to delete. - response: - docs: Success - type: root.DeleteBookingCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bookings/customAttributes.yml b/.mock/definition/bookings/customAttributes.yml deleted file mode 100644 index ed35cc1d..00000000 --- a/.mock/definition/bookings/customAttributes.yml +++ /dev/null @@ -1,565 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - batchDelete: - path: /v2/bookings/custom-attributes/bulk-delete - method: POST - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Bulk deletes bookings custom attributes. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkDeleteBookingCustomAttributes - request: - name: BulkDeleteBookingCustomAttributesRequest - body: - properties: - values: - type: map - docs: >- - A map containing 1 to 25 individual Delete requests. For each - request, provide an - - arbitrary ID that is unique for this - `BulkDeleteBookingCustomAttributes` request and the - - information needed to delete a custom attribute. - content-type: application/json - response: - docs: Success - type: root.BulkDeleteBookingCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - key: - booking_id: booking_id - key: key - response: - body: - values: - id1: - booking_id: N3NCVYY3WS27HF0HKANA3R9FP8 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - booking_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id3: - booking_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchUpsert: - path: /v2/bookings/custom-attributes/bulk-upsert - method: POST - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Bulk upserts bookings custom attributes. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpsertBookingCustomAttributes - request: - name: BulkUpsertBookingCustomAttributesRequest - body: - properties: - values: - type: map - docs: >- - A map containing 1 to 25 individual upsert requests. For each - request, provide an - - arbitrary ID that is unique for this - `BulkUpsertBookingCustomAttributes` request and the - - information needed to create or update a custom attribute. - content-type: application/json - response: - docs: Success - type: root.BulkUpsertBookingCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - key: - booking_id: booking_id - custom_attribute: {} - response: - body: - values: - id1: - booking_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: favoriteShampoo - value: Spring Fresh - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-16T00:16:23Z' - created_at: '2022-11-16T23:14:47Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - booking_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: hasShoes - value: false - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-16T00:16:23Z' - created_at: '2022-11-16T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id3: - booking_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: favoriteShampoo - value: Hydro-Cool - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-16T00:16:23Z' - created_at: '2022-11-16T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id4: - booking_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: partySize - value: 4 - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-16T00:16:23Z' - created_at: '2022-11-16T23:14:47Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id5: - booking_id: 70548QG1HN43B05G0KCZ4MMC1G - custom_attribute: - key: celebrating - value: birthday - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-16T00:16:23Z' - created_at: '2022-11-16T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - list: - path: /v2/bookings/{booking_id}/custom-attributes - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Lists a booking's custom attributes. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attributes - source: - openapi: ../default/openapi/openapi.json - display-name: ListBookingCustomAttributes - request: - name: ListCustomAttributesRequest - path-parameters: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. For more - - information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - with_definitions: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - response: - docs: Success - type: root.ListBookingCustomAttributesResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - query-parameters: - limit: 1 - cursor: cursor - with_definitions: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attributes: - - key: favoriteShampoo - value: Hydro-Cool - version: 1 - visibility: VISIBILITY_READ_ONLY - updated_at: '2022-11-16T15:50:27Z' - created_at: '2022-11-16T15:50:27Z' - - key: hasShoes - value: false - version: 1 - visibility: VISIBILITY_HIDDEN - updated_at: '2022-11-16T15:51:53Z' - created_at: '2022-11-16T15:51:53Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/bookings/{booking_id}/custom-attributes/{key} - method: GET - auth: - - oauth2: - - APPOINTMENTS_READ - docs: >- - Retrieves a bookings custom attribute. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_READ` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveBookingCustomAttribute - request: - name: GetCustomAttributesRequest - path-parameters: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - key: - type: string - docs: >- - The key of the custom attribute to retrieve. This key must match - the `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - query-parameters: - with_definition: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of - - the custom attribute. Set this parameter to `true` to get the name - and description of the custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - version: - type: optional> - docs: >- - The current version of the custom attribute, which is used for - strongly consistent reads to - - guarantee that you receive the most up-to-date data. When included - in the request, Square - - returns the specified version or a higher version if one exists. - If the specified version is - - higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveBookingCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - key: key - query-parameters: - with_definition: true - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute: - key: favoriteShampoo - value: Dune - version: 1 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-11-16T15:50:27Z' - created_at: '2022-11-16T15:50:27Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - upsert: - path: /v2/bookings/{booking_id}/custom-attributes/{key} - method: PUT - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Upserts a bookings custom attribute. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertBookingCustomAttribute - request: - name: UpsertBookingCustomAttributeRequest - path-parameters: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - key: - type: string - docs: >- - The key of the custom attribute to create or update. This key must - match the `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - body: - properties: - custom_attribute: - type: root.CustomAttribute - docs: >- - The custom attribute to create or update, with the following - fields: - - - - `value`. This value must conform to the `schema` specified by - the definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for an update operation, include this optional field and - specify the current version - - of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpsertBookingCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute: {} - response: - body: - custom_attribute: - key: favoriteShampoo - value: Spring Fresh - version: 1 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-11-16T15:50:27Z' - created_at: '2022-11-16T15:50:27Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/bookings/{booking_id}/custom-attributes/{key} - method: DELETE - auth: - - oauth2: - - APPOINTMENTS_WRITE - docs: >- - Deletes a bookings custom attribute. - - - To call this endpoint with buyer-level permissions, set - `APPOINTMENTS_WRITE` for the OAuth scope. - - To call this endpoint with seller-level permissions, set - `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - - - For calls to this endpoint with seller-level permissions to succeed, the - seller must have subscribed to *Appointments Plus* - - or *Appointments Premium*. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteBookingCustomAttribute - request: - name: DeleteCustomAttributesRequest - path-parameters: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - response: - docs: Success - type: root.DeleteBookingCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - booking_id: booking_id - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bookings/locationProfiles.yml b/.mock/definition/bookings/locationProfiles.yml deleted file mode 100644 index bc741e62..00000000 --- a/.mock/definition/bookings/locationProfiles.yml +++ /dev/null @@ -1,59 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/bookings/location-booking-profiles - method: GET - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Lists location booking profiles of a seller. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.location_booking_profiles - source: - openapi: ../default/openapi/openapi.json - display-name: ListLocationBookingProfiles - request: - name: ListLocationProfilesRequest - query-parameters: - limit: - type: optional> - docs: The maximum number of results to return in a paged response. - cursor: - type: optional> - docs: >- - The pagination cursor from the preceding response to return the - next page of the results. Do not set this when retrieving the - first page of the results. - response: - docs: Success - type: root.ListLocationBookingProfilesResponse - status-code: 200 - examples: - - query-parameters: - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - location_booking_profiles: - - location_id: LY6WNBPVM6VGV - booking_site_url: https://squareup.com/book/LY6WNBPVM6VGV/testbusiness - online_booking_enabled: true - - location_id: PYTRNBPVMJUPV - booking_site_url: booking_site_url - online_booking_enabled: false - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/bookings/teamMemberProfiles.yml b/.mock/definition/bookings/teamMemberProfiles.yml deleted file mode 100644 index b31bba07..00000000 --- a/.mock/definition/bookings/teamMemberProfiles.yml +++ /dev/null @@ -1,114 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/bookings/team-member-booking-profiles - method: GET - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Lists booking profiles for team members. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.team_member_booking_profiles - source: - openapi: ../default/openapi/openapi.json - display-name: ListTeamMemberBookingProfiles - request: - name: ListTeamMemberProfilesRequest - query-parameters: - bookable_only: - type: optional> - default: false - docs: >- - Indicates whether to include only bookable team members in the - returned result (`true`) or not (`false`). - limit: - type: optional> - docs: The maximum number of results to return in a paged response. - cursor: - type: optional> - docs: >- - The pagination cursor from the preceding response to return the - next page of the results. Do not set this when retrieving the - first page of the results. - location_id: - type: optional> - docs: >- - Indicates whether to include only team members enabled at the - given location in the returned result. - response: - docs: Success - type: root.ListTeamMemberBookingProfilesResponse - status-code: 200 - examples: - - query-parameters: - bookable_only: true - limit: 1 - cursor: cursor - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - team_member_booking_profiles: - - team_member_id: TMXUrsBWWcHTt79t - description: description - display_name: Sandbox Seller - is_bookable: true - profile_image_url: profile_image_url - - team_member_id: TMaJcbiRqPIGZuS9 - description: description - display_name: Sandbox Staff - is_bookable: true - profile_image_url: profile_image_url - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/bookings/team-member-booking-profiles/{team_member_id} - method: GET - auth: - - oauth2: - - APPOINTMENTS_BUSINESS_SETTINGS_READ - docs: Retrieves a team member's booking profile. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTeamMemberBookingProfile - request: - name: GetTeamMemberProfilesRequest - path-parameters: - team_member_id: - type: string - docs: The ID of the team member to retrieve. - response: - docs: Success - type: root.GetTeamMemberBookingProfileResponse - status-code: 200 - examples: - - path-parameters: - team_member_id: team_member_id - headers: - Square-Version: '2025-10-16' - response: - body: - team_member_booking_profile: - team_member_id: TMaJcbiRqPIGZuS9 - description: description - display_name: Sandbox Staff - is_bookable: true - profile_image_url: profile_image_url - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/cards.yml b/.mock/definition/cards.yml deleted file mode 100644 index ac532b89..00000000 --- a/.mock/definition/cards.yml +++ /dev/null @@ -1,365 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/cards - method: GET - auth: - - oauth2: [] - docs: |- - Retrieves a list of cards owned by the account making the request. - A max of 25 cards will be returned. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.cards - source: - openapi: ../default/openapi/openapi.json - display-name: ListCards - request: - name: ListCardsRequest - query-parameters: - cursor: - type: optional> - docs: >- - 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 - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - customer_id: - type: optional> - docs: |- - Limit results to cards associated with the customer supplied. - By default, all cards owned by the merchant are returned. - include_disabled: - type: optional> - default: false - docs: |- - Includes disabled cards. - By default, all enabled cards owned by the merchant are returned. - reference_id: - type: optional> - docs: Limit results to cards associated with the reference_id supplied. - sort_order: - type: optional> - docs: >- - Sorts the returned list by when the card was created with the - specified order. - - This field defaults to ASC. - response: - docs: Success - type: root.ListCardsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - customer_id: customer_id - include_disabled: true - reference_id: reference_id - sort_order: DESC - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cards: - - id: ccof:uIbfJXhXETSP197M3GB - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - fingerprint: >- - ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q - customer_id: VDKXEEKPJN48QDG3BGGFAK05P8 - merchant_id: 6SSW7HV8K2ST5 - reference_id: user-id-1 - enabled: true - card_type: CREDIT - prepaid_type: NOT_PREPAID - bin: '411111' - version: 1 - card_co_brand: UNKNOWN - issuer_alert: ISSUER_ALERT_CARD_CLOSED - issuer_alert_at: issuer_alert_at - hsa_fsa: false - cursor: cursor - create: - path: /v2/cards - method: POST - auth: - - oauth2: [] - docs: Adds a card on file to an existing merchant. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCard - request: - name: CreateCardRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this CreateCard request. Keys - can be - - any valid string and must be unique for every request. - - - Max: 45 characters - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - source_id: - type: string - docs: >- - The ID of the source which represents the card information to be - stored. This can be a card nonce or a payment id. - validation: - minLength: 1 - maxLength: 16384 - verification_token: - type: optional - docs: >- - An identifying token generated by - [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.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). - card: - type: root.Card - docs: Payment details associated with the card to be stored. - content-type: application/json - response: - docs: Success - type: root.CreateCardResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 4935a656-a929-4792-b97c-8848be85c27c - source_id: cnon:uIbfJXhXETSP197M3GB - card: - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - customer_id: VDKXEEKPJN48QDG3BGGFAK05P8 - reference_id: user-id-1 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - card: - id: ccof:uIbfJXhXETSP197M3GB - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - fingerprint: >- - ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q - customer_id: VDKXEEKPJN48QDG3BGGFAK05P8 - merchant_id: 6SSW7HV8K2ST5 - reference_id: user-id-1 - enabled: true - card_type: CREDIT - prepaid_type: NOT_PREPAID - bin: '411111' - version: 1 - card_co_brand: UNKNOWN - issuer_alert: ISSUER_ALERT_CARD_CLOSED - issuer_alert_at: issuer_alert_at - hsa_fsa: false - get: - path: /v2/cards/{card_id} - method: GET - auth: - - oauth2: [] - docs: Retrieves details for a specific Card. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCard - request: - name: GetCardsRequest - path-parameters: - card_id: - type: string - docs: Unique ID for the desired Card. - response: - docs: Success - type: root.GetCardResponse - status-code: 200 - examples: - - path-parameters: - card_id: card_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - card: - id: ccof:uIbfJXhXETSP197M3GB - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - fingerprint: >- - ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q - customer_id: VDKXEEKPJN48QDG3BGGFAK05P8 - merchant_id: 6SSW7HV8K2ST5 - reference_id: user-id-1 - enabled: true - card_type: CREDIT - prepaid_type: NOT_PREPAID - bin: '411111' - version: 1 - card_co_brand: UNKNOWN - issuer_alert: ISSUER_ALERT_CARD_CLOSED - issuer_alert_at: issuer_alert_at - hsa_fsa: false - disable: - path: /v2/cards/{card_id}/disable - method: POST - auth: - - oauth2: [] - docs: |- - Disables the card, preventing any further updates or charges. - Disabling an already disabled card is allowed but has no effect. - source: - openapi: ../default/openapi/openapi.json - display-name: DisableCard - request: - name: DisableCardsRequest - path-parameters: - card_id: - type: string - docs: Unique ID for the desired Card. - response: - docs: Success - type: root.DisableCardResponse - status-code: 200 - examples: - - path-parameters: - card_id: card_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - card: - id: ccof:uIbfJXhXETSP197M3GB - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - fingerprint: >- - ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q - customer_id: VDKXEEKPJN48QDG3BGGFAK05P8 - merchant_id: 6SSW7HV8K2ST5 - reference_id: user-id-1 - enabled: false - card_type: CREDIT - prepaid_type: NOT_PREPAID - bin: '411111' - version: 2 - card_co_brand: UNKNOWN - issuer_alert: ISSUER_ALERT_CARD_CLOSED - issuer_alert_at: issuer_alert_at - hsa_fsa: false - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/cashDrawers/shifts.yml b/.mock/definition/cashDrawers/shifts.yml deleted file mode 100644 index 4e559667..00000000 --- a/.mock/definition/cashDrawers/shifts.yml +++ /dev/null @@ -1,277 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/cash-drawers/shifts - method: GET - auth: - - oauth2: - - CASH_DRAWER_READ - docs: |- - Provides the details for all of the cash drawer shifts for a location - in a date range. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.cash_drawer_shifts - source: - openapi: ../default/openapi/openapi.json - display-name: ListCashDrawerShifts - request: - name: ListShiftsRequest - query-parameters: - location_id: - type: string - docs: The ID of the location to query for a list of cash drawer shifts. - sort_order: - type: optional> - docs: |- - The order in which cash drawer shifts are listed in the response, - based on their opened_at field. Default value: ASC - begin_time: - type: optional> - docs: >- - The inclusive start time of the query on opened_at, in ISO 8601 - format. - end_time: - type: optional> - docs: >- - The exclusive end date of the query on opened_at, in ISO 8601 - format. - limit: - type: optional> - docs: |- - Number of cash drawer shift events in a page of results (200 by - default, 1000 max). - cursor: - type: optional> - docs: Opaque cursor for fetching the next page of results. - response: - docs: Success - type: root.ListCashDrawerShiftsResponse - status-code: 200 - examples: - - query-parameters: - location_id: location_id - sort_order: DESC - begin_time: begin_time - end_time: end_time - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cash_drawer_shifts: - - id: DCC99978-09A6-4926-849F-300BE9C5793A - state: CLOSED - opened_at: '2019-11-22T00:42:54.000Z' - ended_at: '2019-11-22T00:44:49.000Z' - closed_at: '2019-11-22T00:44:49.000Z' - description: Misplaced some change - opened_cash_money: - amount: 10000 - currency: USD - expected_cash_money: - amount: 10000 - currency: USD - closed_cash_money: - amount: 9970 - currency: USD - created_at: created_at - updated_at: updated_at - location_id: location_id - get: - path: /v2/cash-drawers/shifts/{shift_id} - method: GET - auth: - - oauth2: - - CASH_DRAWER_READ - docs: >- - Provides the summary details for a single cash drawer shift. See - - [ListCashDrawerShiftEvents](api-endpoint:CashDrawers-ListCashDrawerShiftEvents) - for a list of cash drawer shift events. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCashDrawerShift - request: - name: GetShiftsRequest - path-parameters: - shift_id: - type: string - docs: The shift ID. - query-parameters: - location_id: - type: string - docs: The ID of the location to retrieve cash drawer shifts from. - response: - docs: Success - type: root.GetCashDrawerShiftResponse - status-code: 200 - examples: - - path-parameters: - shift_id: shift_id - query-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - cash_drawer_shift: - id: DCC99978-09A6-4926-849F-300BE9C5793A - state: CLOSED - opened_at: '2019-11-22T00:42:54.000Z' - ended_at: '2019-11-22T00:44:49.000Z' - closed_at: '2019-11-22T00:44:49.000Z' - description: Misplaced some change - opened_cash_money: - amount: 10000 - currency: USD - cash_payment_money: - amount: 100 - currency: USD - cash_refunds_money: - amount: -100 - currency: USD - cash_paid_in_money: - amount: 10000 - currency: USD - cash_paid_out_money: - amount: -10000 - currency: USD - expected_cash_money: - amount: 10000 - currency: USD - closed_cash_money: - amount: 9970 - currency: USD - device: - id: id - name: My iPad - created_at: created_at - updated_at: updated_at - location_id: location_id - team_member_ids: - - team_member_ids - opening_team_member_id: '' - ending_team_member_id: '' - closing_team_member_id: '' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - listEvents: - path: /v2/cash-drawers/shifts/{shift_id}/events - method: GET - auth: - - oauth2: - - CASH_DRAWER_READ - docs: Provides a paginated list of events for a single cash drawer shift. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.cash_drawer_shift_events - source: - openapi: ../default/openapi/openapi.json - display-name: ListCashDrawerShiftEvents - request: - name: ListEventsShiftsRequest - path-parameters: - shift_id: - type: string - docs: The shift ID. - query-parameters: - location_id: - type: string - docs: The ID of the location to list cash drawer shifts for. - limit: - type: optional> - docs: |- - Number of resources to be returned in a page of results (200 by - default, 1000 max). - cursor: - type: optional> - docs: Opaque cursor for fetching the next page of results. - response: - docs: Success - type: root.ListCashDrawerShiftEventsResponse - status-code: 200 - examples: - - path-parameters: - shift_id: shift_id - query-parameters: - location_id: location_id - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cash_drawer_shift_events: - - id: 9F07DB01-D85A-4B77-88C3-D5C64CEB5155 - event_type: CASH_TENDER_PAYMENT - event_money: - amount: 100 - currency: USD - created_at: '2019-11-22T00:43:02.000Z' - description: '' - team_member_id: '' - - id: B2854CEA-A781-49B3-8F31-C64558231F48 - event_type: CASH_TENDER_PAYMENT - event_money: - amount: 250 - currency: USD - created_at: '2019-11-22T00:43:12.000Z' - description: '' - team_member_id: '' - - id: B5FB7F72-95CD-44A3-974D-26C41064D042 - event_type: CASH_TENDER_CANCELLED_PAYMENT - event_money: - amount: 250 - currency: USD - created_at: '2019-11-22T00:43:23.000Z' - description: '' - team_member_id: '' - - id: 0B425480-8504-40B4-A867-37B23543931B - event_type: CASH_TENDER_REFUND - event_money: - amount: 100 - currency: USD - created_at: '2019-11-22T00:43:46.000Z' - description: '' - team_member_id: '' - - id: 8C66E60E-FDCF-4EEF-A98D-3B14B7ED5CBE - event_type: PAID_IN - event_money: - amount: 10000 - currency: USD - created_at: '2019-11-22T00:44:18.000Z' - description: Transfer from another drawer - team_member_id: '' - - id: D5ACA7FE-C64D-4ADA-8BC8-82118A2DAE4F - event_type: PAID_OUT - event_money: - amount: 10000 - currency: USD - created_at: '2019-11-22T00:44:29.000Z' - description: Transfer out to another drawer - team_member_id: '' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/catalog.yml b/.mock/definition/catalog.yml deleted file mode 100644 index 36556e05..00000000 --- a/.mock/definition/catalog.yml +++ /dev/null @@ -1,1226 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - batchDelete: - path: /v2/catalog/batch-delete - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Deletes a set of [CatalogItem](entity:CatalogItem)s based on the - - provided list of target IDs and returns a set of successfully deleted - IDs in - - the response. Deletion is a cascading event such that all children of - the - - targeted object are also deleted. For example, deleting a CatalogItem - will - - also delete all of its - [CatalogItemVariation](entity:CatalogItemVariation) - - children. - - - `BatchDeleteCatalogObjects` succeeds even if only a portion of the - targeted - - IDs can be deleted. The response will only include IDs that were - - actually deleted. - - - To ensure consistency, only one delete request is processed at a time - per seller account. - - While one (batch or non-batch) delete request is being processed, other - (batched and non-batched) - - delete requests are rejected with the `429` error code. - source: - openapi: ../default/openapi/openapi.json - display-name: BatchDeleteCatalogObjects - request: - name: BatchDeleteCatalogObjectsRequest - body: - properties: - object_ids: - docs: >- - The IDs of the CatalogObjects to be deleted. When an object is - deleted, other objects - - in the graph that depend on that object will be deleted as well - (for example, deleting a - - CatalogItem will delete its CatalogItemVariation. - type: list - content-type: application/json - response: - docs: Success - type: root.BatchDeleteCatalogObjectsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - - AA27W3M2GGTF3H6AVPNB77CK - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - deleted_object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - - AA27W3M2GGTF3H6AVPNB77CK - deleted_at: '2016-11-16T22:25:24.878Z' - batchGet: - path: /v2/catalog/batch-retrieve - method: POST - auth: - - oauth2: - - ITEMS_READ - docs: >- - Returns a set of objects based on the provided ID. - - Each [CatalogItem](entity:CatalogItem) returned in the set includes all - of its - - child information including: all of its - - [CatalogItemVariation](entity:CatalogItemVariation) objects, references - to - - its [CatalogModifierList](entity:CatalogModifierList) objects, and the - ids of - - any [CatalogTax](entity:CatalogTax) objects that apply to it. - source: - openapi: ../default/openapi/openapi.json - display-name: BatchRetrieveCatalogObjects - request: - name: BatchGetCatalogObjectsRequest - body: - properties: - object_ids: - docs: The IDs of the CatalogObjects to be retrieved. - type: list - include_related_objects: - type: optional> - docs: >- - If `true`, the response will include additional objects that are - related to the - - requested objects. Related objects are defined as any objects - referenced by ID by the results in the `objects` field - - of the response. These objects are put in the `related_objects` - field. Setting this to `true` is - - helpful when the objects are needed for immediate display to a - user. - - This process only goes one level deep. Objects referenced by the - related objects will not be included. For example, - - - if the `objects` field of the response contains a CatalogItem, - its associated - - CatalogCategory objects, CatalogTax objects, CatalogImage - objects and - - CatalogModifierLists will be returned in the `related_objects` - field of the - - response. If the `objects` field of the response contains a - CatalogItemVariation, - - its parent CatalogItem will be returned in the `related_objects` - field of - - the response. - - - Default value: `false` - catalog_version: - type: optional> - docs: >- - The specific version of the catalog objects to be included in - the response. - - This allows you to retrieve historical versions of objects. The - specified version value is matched against - - the [CatalogObject](entity:CatalogObject)s' `version` attribute. - If not included, results will - - be from the current version of the catalog. - include_deleted_objects: - type: optional> - docs: >- - Indicates whether to include (`true`) or not (`false`) in the - response deleted objects, namely, those with the `is_deleted` - attribute set to `true`. - include_category_path_to_root: - type: optional> - docs: >- - Specifies whether or not to include the `path_to_root` list for - each returned category instance. The `path_to_root` list - consists - - of `CategoryPathToRootNode` objects and specifies the path that - starts with the immediate parent category of the returned - category - - and ends with its root category. If the returned category is a - top-level category, the `path_to_root` list is empty and is not - returned - - in the response payload. - content-type: application/json - response: - docs: Success - type: root.BatchGetCatalogObjectsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - - AA27W3M2GGTF3H6AVPNB77CK - include_related_objects: true - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - related_objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: TAX - batchUpsert: - path: /v2/catalog/batch-upsert - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Creates or updates up to 10,000 target objects based on the provided - - list of objects. The target objects are grouped into batches and each - batch is - - inserted/updated in an all-or-nothing manner. If an object within a - batch is - - malformed in some way, or violates a database constraint, the entire - batch - - containing that item will be disregarded. However, other batches in the - same - - request may still succeed. Each batch may contain up to 1,000 objects, - and - - batches will be processed in order as long as the total object count for - the - - request (items, variations, modifier lists, discounts, and taxes) is no - more - - than 10,000. - - - To ensure consistency, only one update request is processed at a time - per seller account. - - While one (batch or non-batch) update request is being processed, other - (batched and non-batched) - - update requests are rejected with the `429` error code. - source: - openapi: ../default/openapi/openapi.json - display-name: BatchUpsertCatalogObjects - request: - name: BatchUpsertCatalogObjectsRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A value you specify that uniquely identifies this - - request among all your requests. A common way to create - - a valid idempotency key is to use a Universally unique - - identifier (UUID). - - - If you're unsure whether a particular request was successful, - - you can reattempt it with the same idempotency key without - - worrying about creating duplicate objects. - - - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - batches: - docs: >- - A batch of CatalogObjects to be inserted/updated atomically. - - The objects within a batch will be inserted in an all-or-nothing - fashion, i.e., if an error occurs - - attempting to insert or update an object within a batch, the - entire batch will be rejected. However, an error - - in one batch will not affect other batches within the same - request. - - - For each object, its `updated_at` field is ignored and replaced - with a current - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), - and its - - `is_deleted` field must not be set to `true`. - - - To modify an existing object, supply its ID. To create a new - object, use an ID starting - - with `#`. These IDs may be used to create relationships between - an object and attributes of - - other objects that reference it. For example, you can create a - CatalogItem with - - ID `#ABC` and a CatalogItemVariation with its `item_id` - attribute set to - - `#ABC` in order to associate the CatalogItemVariation with its - parent - - CatalogItem. - - - Any `#`-prefixed IDs are valid only within a single atomic - batch, and will be replaced by server-generated IDs. - - - Each batch may contain up to 1,000 objects. The total number of - objects across all batches for a single request - - may not exceed 10,000. If either of these limits is violated, an - error will be returned and no objects will - - be inserted or updated. - type: list - content-type: application/json - response: - docs: Success - type: root.BatchUpsertCatalogObjectsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 789ff020-f723-43a9-b4b5-43b5dc1fa3dc - batches: - - objects: - - id: id - type: ITEM - - id: id - type: ITEM - - id: id - type: ITEM - - id: id - type: TAX - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: TAX - updated_at: updated_at - id_mappings: - - client_object_id: '#Tea' - object_id: 67GA7XA2FWMRYY2VCONTYZJR - - client_object_id: '#Coffee' - object_id: MQ4TZKOG3SR2EQI3TWEK4AH7 - - client_object_id: '#Beverages' - object_id: XCS4SCGN4WQYE2VU4U3TKXEH - - client_object_id: '#SalesTax' - object_id: HP5VNYPKZKTNCKZ2Z5NPUH6A - - client_object_id: '#Tea_Mug' - object_id: CAJBHUIQH7ONTSZI2KTVOUP6 - - client_object_id: '#Coffee_Regular' - object_id: GY2GXJTVVPQAPW43GFRR3NG6 - - client_object_id: '#Coffee_Large' - object_id: JE6VHPSRQL6IWSN26C36CJ7W - info: - path: /v2/catalog/info - method: GET - auth: - - oauth2: - - ITEMS_READ - docs: |- - Retrieves information about the Square Catalog API, such as batch size - limits that can be used by the `BatchUpsertCatalogObjects` endpoint. - source: - openapi: ../default/openapi/openapi.json - display-name: CatalogInfo - response: - docs: Success - type: root.CatalogInfoResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - limits: - batch_upsert_max_objects_per_batch: 1000 - batch_upsert_max_total_objects: 10000 - batch_retrieve_max_object_ids: 1000 - search_max_page_limit: 1000 - batch_delete_max_object_ids: 200 - update_item_taxes_max_item_ids: 1000 - update_item_taxes_max_taxes_to_enable: 1000 - update_item_taxes_max_taxes_to_disable: 1000 - update_item_modifier_lists_max_item_ids: 1000 - update_item_modifier_lists_max_modifier_lists_to_enable: 1000 - update_item_modifier_lists_max_modifier_lists_to_disable: 1000 - standard_unit_description_group: - standard_unit_descriptions: - - {} - language_code: language_code - list: - path: /v2/catalog/list - method: GET - auth: - - oauth2: - - ITEMS_READ - docs: >- - Returns a list of all [CatalogObject](entity:CatalogObject)s of the - specified types in the catalog. - - - The `types` parameter is specified as a comma-separated list of the - [CatalogObjectType](entity:CatalogObjectType) values, - - for example, "`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, - `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`". - - - __Important:__ ListCatalog does not return deleted catalog items. To - retrieve - - deleted catalog items, use - [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects) - - and set the `include_deleted_objects` attribute value to `true`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.objects - source: - openapi: ../default/openapi/openapi.json - display-name: ListCatalog - request: - name: ListCatalogRequest - query-parameters: - cursor: - type: optional> - docs: >- - The pagination cursor returned in the previous response. Leave - unset for an initial request. - - The page size is currently set to be 100. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - types: - type: optional> - docs: >- - An optional case-insensitive, comma-separated list of object types - to retrieve. - - - The valid values are defined in the - [CatalogObjectType](entity:CatalogObjectType) enum, for example, - - `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, - - `MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc. - - - If this is unspecified, the operation returns objects of all the - top level types at the version - - of the Square API used to make the request. Object types that are - nested onto other object types - - are not included in the defaults. - - - At the current API version the default object types are: - - ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, - - PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, - - SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, - QUICK_AMOUNT_SETTINGS. - catalog_version: - type: optional> - docs: >- - The specific version of the catalog objects to be included in the - response. - - This allows you to retrieve historical versions of objects. The - specified version value is matched against - - the [CatalogObject](entity:CatalogObject)s' `version` attribute. - If not included, results will be from the - - current version of the catalog. - response: - docs: Success - type: root.ListCatalogResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - types: types - catalog_version: 1000000 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cursor: cursor - objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: TAX - search: - path: /v2/catalog/search - method: POST - auth: - - oauth2: - - ITEMS_READ - docs: >- - Searches for [CatalogObject](entity:CatalogObject) of any type by - matching supported search attribute values, - - excluding custom attribute values on items or item variations, against - one or more of the specified query filters. - - - This (`SearchCatalogObjects`) endpoint differs from the - [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) - - endpoint in the following aspects: - - - - `SearchCatalogItems` can only search for items or item variations, - whereas `SearchCatalogObjects` can search for any type of catalog - objects. - - - `SearchCatalogItems` supports the custom attribute query filters to - return items or item variations that contain custom attribute values, - where `SearchCatalogObjects` does not. - - - `SearchCatalogItems` does not support the `include_deleted_objects` - filter to search for deleted items or item variations, whereas - `SearchCatalogObjects` does. - - - The both endpoints have different call conventions, including the - query filter formats. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchCatalogObjects - request: - name: SearchCatalogObjectsRequest - body: - properties: - cursor: - type: optional - docs: >- - The pagination cursor returned in the previous response. Leave - unset for an initial request. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - object_types: - type: optional> - docs: >- - The desired set of object types to appear in the search results. - - - If this is unspecified, the operation returns objects of all the - top level types at the version - - of the Square API used to make the request. Object types that - are nested onto other object types - - are not included in the defaults. - - - At the current API version the default object types are: - - ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, - - PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, - - SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, - QUICK_AMOUNT_SETTINGS. - - - Note that if you wish for the query to return objects belonging - to nested types (i.e., COMPONENT, IMAGE, - - ITEM_OPTION_VAL, ITEM_VARIATION, or MODIFIER), you must - explicitly include all the types of interest - - in this field. - include_deleted_objects: - type: optional - docs: >- - If `true`, deleted objects will be included in the results. - Defaults to `false`. Deleted objects will have their - `is_deleted` field set to `true`. If `include_deleted_objects` - is `true`, then the `include_category_path_to_root` request - parameter must be `false`. Both properties cannot be `true` at - the same time. - include_related_objects: - type: optional - docs: >- - If `true`, the response will include additional objects that are - related to the - - requested objects. Related objects are objects that are - referenced by object ID by the objects - - in the response. This is helpful if the objects are being - fetched for immediate display to a user. - - This process only goes one level deep. Objects referenced by the - related objects will not be included. - - For example: - - - If the `objects` field of the response contains a CatalogItem, - its associated - - CatalogCategory objects, CatalogTax objects, CatalogImage - objects and - - CatalogModifierLists will be returned in the `related_objects` - field of the - - response. If the `objects` field of the response contains a - CatalogItemVariation, - - its parent CatalogItem will be returned in the `related_objects` - field of - - the response. - - - Default value: `false` - begin_time: - type: optional - docs: >- - Return objects modified after this - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), - in RFC 3339 - - format, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is - exclusive - objects with a - - timestamp equal to `begin_time` will not be included in the - response. - query: - type: optional - docs: >- - A query to be used to filter or sort the results. If no query is - specified, the entire catalog will be returned. - limit: - type: optional - docs: >- - A limit on the number of results to be returned in a single - page. The limit is advisory - - - the implementation may return more or fewer results. If the - supplied limit is negative, zero, or - - is higher than the maximum limit of 1,000, it will be ignored. - include_category_path_to_root: - type: optional - docs: >- - Specifies whether or not to include the `path_to_root` list for - each returned category instance. The `path_to_root` list - consists of `CategoryPathToRootNode` objects and specifies the - path that starts with the immediate parent category of the - returned category and ends with its root category. If the - returned category is a top-level category, the `path_to_root` - list is empty and is not returned in the response payload. If - `include_category_path_to_root` is `true`, then the - `include_deleted_objects` request parameter must be `false`. - Both properties cannot be `true` at the same time. - content-type: application/json - response: - docs: Success - type: root.SearchCatalogObjectsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - object_types: - - ITEM - query: - prefix_query: - attribute_name: name - attribute_prefix: tea - limit: 100 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cursor: cursor - objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - related_objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - latest_time: latest_time - SearchItems: - path: /v2/catalog/search-catalog-items - method: POST - auth: - - oauth2: - - ITEMS_READ - docs: >- - Searches for catalog items or item variations by matching supported - search attribute values, including - - custom attribute values, against one or more of the specified query - filters. - - - This (`SearchCatalogItems`) endpoint differs from the - [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects) - - endpoint in the following aspects: - - - - `SearchCatalogItems` can only search for items or item variations, - whereas `SearchCatalogObjects` can search for any type of catalog - objects. - - - `SearchCatalogItems` supports the custom attribute query filters to - return items or item variations that contain custom attribute values, - where `SearchCatalogObjects` does not. - - - `SearchCatalogItems` does not support the `include_deleted_objects` - filter to search for deleted items or item variations, whereas - `SearchCatalogObjects` does. - - - The both endpoints use different call conventions, including the query - filter formats. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchCatalogItems - request: - name: SearchCatalogItemsRequest - body: - properties: - text_filter: - type: optional - docs: >- - The text filter expression to return items or item variations - containing specified text in - - the `name`, `description`, or `abbreviation` attribute value of - an item, or in - - the `name`, `sku`, or `upc` attribute value of an item - variation. - category_ids: - type: optional> - docs: >- - The category id query expression to return items containing the - specified category IDs. - stock_levels: - type: optional> - docs: >- - The stock-level query expression to return item variations with - the specified stock levels. - - See - [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) - for possible values - enabled_location_ids: - type: optional> - docs: >- - The enabled-location query expression to return items and item - variations having specified enabled locations. - cursor: - type: optional - docs: >- - The pagination token, returned in the previous response, used to - fetch the next batch of pending results. - limit: - type: optional - docs: >- - The maximum number of results to return per page. The default - value is 100. - validation: - max: 100 - sort_order: - type: optional - docs: >- - The order to sort the results by item names. The default sort - order is ascending (`ASC`). - - See [SortOrder](#type-sortorder) for possible values - product_types: - type: optional> - docs: >- - The product types query expression to return items or item - variations having the specified product types. - custom_attribute_filters: - type: optional> - docs: >- - The customer-attribute filter to return items or item variations - matching the specified - - custom attribute expressions. A maximum number of 10 custom - attribute expressions are supported in - - a single call to the - [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) - endpoint. - archived_state: - type: optional - docs: >- - The query filter to return not archived - (`ARCHIVED_STATE_NOT_ARCHIVED`), archived - (`ARCHIVED_STATE_ARCHIVED`), or either type - (`ARCHIVED_STATE_ALL`) of items. - content-type: application/json - response: - docs: Success - type: root.SearchCatalogItemsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - text_filter: red - category_ids: - - WINE_CATEGORY_ID - stock_levels: - - OUT - - LOW - enabled_location_ids: - - ATL_LOCATION_ID - limit: 100 - sort_order: ASC - product_types: - - REGULAR - custom_attribute_filters: - - custom_attribute_definition_id: VEGAN_DEFINITION_ID - bool_filter: true - - custom_attribute_definition_id: BRAND_DEFINITION_ID - string_filter: Dark Horse - - key: VINTAGE - number_filter: - min: min - max: max - - custom_attribute_definition_id: VARIETAL_DEFINITION_ID - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - items: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: ITEM - cursor: cursor - matched_variation_ids: - - VBJNPHCOKDFECR6VU25WRJUD - UpdateItemModifierLists: - path: /v2/catalog/update-item-modifier-lists - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Updates the [CatalogModifierList](entity:CatalogModifierList) objects - - that apply to the targeted [CatalogItem](entity:CatalogItem) without - having - - to perform an upsert on the entire item. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateItemModifierLists - request: - name: UpdateItemModifierListsRequest - body: - properties: - item_ids: - docs: >- - The IDs of the catalog items associated with the - CatalogModifierList objects being updated. - type: list - modifier_lists_to_enable: - type: optional>> - docs: >- - The IDs of the CatalogModifierList objects to enable for the - CatalogItem. - - At least one of `modifier_lists_to_enable` or - `modifier_lists_to_disable` must be specified. - modifier_lists_to_disable: - type: optional>> - docs: >- - The IDs of the CatalogModifierList objects to disable for the - CatalogItem. - - At least one of `modifier_lists_to_enable` or - `modifier_lists_to_disable` must be specified. - content-type: application/json - response: - docs: Success - type: root.UpdateItemModifierListsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - item_ids: - - H42BRLUJ5KTZTTMPVSLFAACQ - - 2JXOBJIHCWBQ4NZ3RIXQGJA6 - modifier_lists_to_enable: - - H42BRLUJ5KTZTTMPVSLFAACQ - - 2JXOBJIHCWBQ4NZ3RIXQGJA6 - modifier_lists_to_disable: - - 7WRC16CJZDVLSNDQ35PP6YAD - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - updated_at: '2016-11-16T22:25:24.878Z' - UpdateItemTaxes: - path: /v2/catalog/update-item-taxes - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: |- - Updates the [CatalogTax](entity:CatalogTax) objects that apply to the - targeted [CatalogItem](entity:CatalogItem) without having to perform an - upsert on the entire item. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateItemTaxes - request: - name: UpdateItemTaxesRequest - body: - properties: - item_ids: - docs: >- - IDs for the CatalogItems associated with the CatalogTax objects - being updated. - - No more than 1,000 IDs may be provided. - type: list - taxes_to_enable: - type: optional>> - docs: >- - IDs of the CatalogTax objects to enable. - - At least one of `taxes_to_enable` or `taxes_to_disable` must be - specified. - taxes_to_disable: - type: optional>> - docs: >- - IDs of the CatalogTax objects to disable. - - At least one of `taxes_to_enable` or `taxes_to_disable` must be - specified. - content-type: application/json - response: - docs: Success - type: root.UpdateItemTaxesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - item_ids: - - H42BRLUJ5KTZTTMPVSLFAACQ - - 2JXOBJIHCWBQ4NZ3RIXQGJA6 - taxes_to_enable: - - 4WRCNHCJZDVLSNDQ35PP6YAD - taxes_to_disable: - - AQCEGCEBBQONINDOHRGZISEX - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - updated_at: '2016-11-16T22:25:24.878Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/catalog/images.yml b/.mock/definition/catalog/images.yml deleted file mode 100644 index 02346150..00000000 --- a/.mock/definition/catalog/images.yml +++ /dev/null @@ -1,152 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/catalog/images - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Uploads an image file to be represented by a - [CatalogImage](entity:CatalogImage) object that can be linked to an - existing - - [CatalogObject](entity:CatalogObject) instance. The resulting - `CatalogImage` is unattached to any `CatalogObject` if the `object_id` - - is not specified. - - - This `CreateCatalogImage` endpoint accepts HTTP multipart/form-data - requests with a JSON part and an image file part in - - JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCatalogImage - request: - name: CreateImagesRequest - body: - properties: - request: - type: optional - content-type: application/json; charset=utf-8 - image_file: - type: optional - content-type: image/jpeg - content-type: multipart/form-data - response: - docs: Success - type: root.CreateCatalogImageResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - image: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - image_data: - name: name - url: url - caption: caption - photo_studio_order_id: photo_studio_order_id - type: IMAGE - update: - path: /v2/catalog/images/{image_id} - method: PUT - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Uploads a new image file to replace the existing one in the specified - [CatalogImage](entity:CatalogImage) object. - - - This `UpdateCatalogImage` endpoint accepts HTTP multipart/form-data - requests with a JSON part and an image file part in - - JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateCatalogImage - request: - name: UpdateImagesRequest - path-parameters: - image_id: - type: string - docs: >- - The ID of the `CatalogImage` object to update the encapsulated - image file. - body: - properties: - request: - type: optional - content-type: application/json; charset=utf-8 - image_file: - type: optional - content-type: image/jpeg - content-type: multipart/form-data - response: - docs: Success - type: root.UpdateCatalogImageResponse - status-code: 200 - examples: - - path-parameters: - image_id: image_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - image: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - image_data: - name: name - url: url - caption: caption - photo_studio_order_id: photo_studio_order_id - type: IMAGE - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/catalog/object.yml b/.mock/definition/catalog/object.yml deleted file mode 100644 index a8294858..00000000 --- a/.mock/definition/catalog/object.yml +++ /dev/null @@ -1,400 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - upsert: - path: /v2/catalog/object - method: POST - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Creates a new or updates the specified - [CatalogObject](entity:CatalogObject). - - - To ensure consistency, only one update request is processed at a time - per seller account. - - While one (batch or non-batch) update request is being processed, other - (batched and non-batched) - - update requests are rejected with the `429` error code. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertCatalogObject - request: - name: UpsertCatalogObjectRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A value you specify that uniquely identifies this - - request among all your requests. A common way to create - - a valid idempotency key is to use a Universally unique - - identifier (UUID). - - - If you're unsure whether a particular request was successful, - - you can reattempt it with the same idempotency key without - - worrying about creating duplicate objects. - - - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - object: - type: root.CatalogObject - docs: >- - A CatalogObject to be created or updated. - - - - For updates, the object must be active (the `is_deleted` field - is not `true`). - - - For creates, the object ID must start with `#`. The provided - ID is replaced with a server-generated ID. - content-type: application/json - response: - docs: Success - type: root.UpsertCatalogObjectResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: af3d1afc-7212-4300-b463-0bfc5314a5ae - object: - id: id - type: ITEM - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - catalog_object: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - item_data: - name: name - description: description - abbreviation: abbreviation - label_color: label_color - is_taxable: true - category_id: category_id - tax_ids: - - tax_ids - modifier_list_info: - - modifier_list_id: modifier_list_id - product_type: REGULAR - skip_modifier_screen: true - item_options: - - {} - ecom_uri: ecom_uri - ecom_image_uris: - - ecom_image_uris - image_ids: - - image_ids - sort_name: sort_name - description_html: description_html - description_plaintext: description_plaintext - channels: - - channels - is_archived: true - is_alcoholic: true - type: ITEM - id_mappings: - - client_object_id: '#Cocoa' - object_id: R2TA2FOBUGCJZNIWJSOSNAI4 - - client_object_id: '#Small' - object_id: QRT53UP4LITLWGOGBZCUWP63 - - client_object_id: '#Large' - object_id: NS77DKEIQ3AEQTCP727DSA7U - get: - path: /v2/catalog/object/{object_id} - method: GET - auth: - - oauth2: - - ITEMS_READ - docs: >- - Returns a single [CatalogItem](entity:CatalogItem) as a - - [CatalogObject](entity:CatalogObject) based on the provided ID. The - returned - - object includes all of the relevant [CatalogItem](entity:CatalogItem) - - information including: - [CatalogItemVariation](entity:CatalogItemVariation) - - children, references to its - - [CatalogModifierList](entity:CatalogModifierList) objects, and the ids - of - - any [CatalogTax](entity:CatalogTax) objects that apply to it. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCatalogObject - request: - name: GetObjectRequest - path-parameters: - object_id: - type: string - docs: The object ID of any type of catalog objects to be retrieved. - query-parameters: - include_related_objects: - type: optional> - default: false - docs: >- - If `true`, the response will include additional objects that are - related to the - - requested objects. Related objects are defined as any objects - referenced by ID by the results in the `objects` field - - of the response. These objects are put in the `related_objects` - field. Setting this to `true` is - - helpful when the objects are needed for immediate display to a - user. - - This process only goes one level deep. Objects referenced by the - related objects will not be included. For example, - - - if the `objects` field of the response contains a CatalogItem, its - associated - - CatalogCategory objects, CatalogTax objects, CatalogImage objects - and - - CatalogModifierLists will be returned in the `related_objects` - field of the - - response. If the `objects` field of the response contains a - CatalogItemVariation, - - its parent CatalogItem will be returned in the `related_objects` - field of - - the response. - - - Default value: `false` - catalog_version: - type: optional> - docs: >- - Requests objects as of a specific version of the catalog. This - allows you to retrieve historical - - versions of objects. The value to retrieve a specific version of - an object can be found - - in the version field of [CatalogObject](entity:CatalogObject)s. If - not included, results will - - be from the current version of the catalog. - include_category_path_to_root: - type: optional> - default: false - docs: >- - Specifies whether or not to include the `path_to_root` list for - each returned category instance. The `path_to_root` list consists - - of `CategoryPathToRootNode` objects and specifies the path that - starts with the immediate parent category of the returned category - - and ends with its root category. If the returned category is a - top-level category, the `path_to_root` list is empty and is not - returned - - in the response payload. - response: - docs: Success - type: root.GetCatalogObjectResponse - status-code: 200 - examples: - - path-parameters: - object_id: object_id - query-parameters: - include_related_objects: true - catalog_version: 1000000 - include_category_path_to_root: true - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - object: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - item_data: - name: name - description: description - abbreviation: abbreviation - label_color: label_color - is_taxable: true - category_id: category_id - tax_ids: - - tax_ids - modifier_list_info: - - modifier_list_id: modifier_list_id - product_type: REGULAR - skip_modifier_screen: true - item_options: - - {} - ecom_uri: ecom_uri - ecom_image_uris: - - ecom_image_uris - image_ids: - - image_ids - sort_name: sort_name - description_html: description_html - description_plaintext: description_plaintext - channels: - - channels - is_archived: true - is_alcoholic: true - type: ITEM - related_objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true - custom_attribute_values: - key: {} - catalog_v1_ids: - - {} - present_at_all_locations: true - present_at_location_ids: - - present_at_location_ids - absent_at_location_ids: - - absent_at_location_ids - image_id: image_id - type: TAX - delete: - path: /v2/catalog/object/{object_id} - method: DELETE - auth: - - oauth2: - - ITEMS_WRITE - docs: >- - Deletes a single [CatalogObject](entity:CatalogObject) based on the - - provided ID and returns the set of successfully deleted IDs in the - response. - - Deletion is a cascading event such that all children of the targeted - object - - are also deleted. For example, deleting a - [CatalogItem](entity:CatalogItem) - - will also delete all of its - - [CatalogItemVariation](entity:CatalogItemVariation) children. - - - To ensure consistency, only one delete request is processed at a time - per seller account. - - While one (batch or non-batch) delete request is being processed, other - (batched and non-batched) - - delete requests are rejected with the `429` error code. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCatalogObject - request: - name: DeleteObjectRequest - path-parameters: - object_id: - type: string - docs: >- - The ID of the catalog object to be deleted. When an object is - deleted, other - - objects in the graph that depend on that object will be deleted as - well (for example, deleting a - - catalog item will delete its catalog item variations). - response: - docs: Success - type: root.DeleteCatalogObjectResponse - status-code: 200 - examples: - - path-parameters: - object_id: object_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - deleted_object_ids: - - 7SB3ZQYJ5GDMVFL7JK46JCHT - - KQLFFHA6K6J3YQAQAWDQAL57 - deleted_at: '2016-11-16T22:25:24.878Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/channels.yml b/.mock/definition/channels.yml deleted file mode 100644 index c76ec24e..00000000 --- a/.mock/definition/channels.yml +++ /dev/null @@ -1,189 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/channels - method: GET - auth: - - oauth2: - - CHANNELS_READ - docs: '' - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.channels - source: - openapi: ../default/openapi/openapi.json - display-name: ListChannels - request: - name: ListChannelsRequest - query-parameters: - reference_type: - type: optional> - docs: Type of reference associated to channel - reference_id: - type: optional> - docs: id of reference associated to channel - status: - type: optional> - docs: Status of channel - cursor: - type: optional> - docs: Cursor to fetch the next result - limit: - type: optional> - docs: >- - Maximum number of results to return. - - When not provided the returned results will be cap at 100 - channels. - response: - docs: Success - type: root.ListChannelsResponse - status-code: 200 - examples: - - query-parameters: - reference_type: UNKNOWN_TYPE - reference_id: reference_id - status: ACTIVE - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - channels: - - id: CH_9C03D0B59 - merchant_id: ML64FACEA - name: Contoso Fulfillment Application - version: 1 - reference: - type: OAUTH_APPLICATION - id: OA_9C03D0444 - status: ACTIVE - created_at: '2022-10-25T16:27:00Z' - updated_at: '2022-10-25T16:48:00Z' - cursor: cursor - bulkRetrieve: - path: /v2/channels/bulk-retrieve - method: POST - auth: - - oauth2: - - CHANNELS_READ - docs: '' - source: - openapi: ../default/openapi/openapi.json - display-name: BulkRetrieveChannels - request: - name: BulkRetrieveChannelsRequest - body: - properties: - channel_ids: list - content-type: application/json - response: - docs: Success - type: root.BulkRetrieveChannelsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - channel_ids: - - CH_9C03D0B59 - - CH_6X139B5MN - - NOT_EXISTING - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - responses: - CH_6X139B5MN: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - channel: - id: CH_6X139B5MN - merchant_id: ML64FACEA - name: Contoso Fulfillment Application - version: 1 - reference: - type: OAUTH_APPLICATION - id: OA_9C03D0444 - status: ACTIVE - created_at: '2022-10-25T16:27:00Z' - updated_at: '2022-10-25T16:48:00Z' - CH_9C03D0B59: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - channel: - id: CH_9C03D0B59 - merchant_id: ML64FACEA - name: State Street Store - version: 1 - reference: - type: LOCATION - id: OA_9C03D0B59 - status: ACTIVE - created_at: '2022-10-25T16:27:00Z' - updated_at: '2022-10-25T16:48:00Z' - NOT_EXISTING: - errors: - - category: API_ERROR - code: NOT_FOUND - get: - path: /v2/channels/{channel_id} - method: GET - auth: - - oauth2: - - CHANNELS_READ - docs: '' - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveChannel - request: - name: GetChannelsRequest - path-parameters: - channel_id: - type: string - docs: A channel id - response: - docs: Success - type: root.RetrieveChannelResponse - status-code: 200 - examples: - - path-parameters: - channel_id: channel_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - channel: - id: CH_9C03D0B59 - merchant_id: ML64FACEA - name: Contoso Fulfillment Application - version: 1 - reference: - type: OAUTH_APPLICATION - id: OA_9C03D0444 - status: ACTIVE - created_at: '2022-10-25T16:27:00Z' - updated_at: '2022-10-25T16:48:00Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/checkout.yml b/.mock/definition/checkout.yml deleted file mode 100644 index e6849079..00000000 --- a/.mock/definition/checkout.yml +++ /dev/null @@ -1,341 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - RetrieveLocationSettings: - path: /v2/online-checkout/location-settings/{location_id} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: Retrieves the location-level settings for a Square-hosted checkout page. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLocationSettings - request: - name: RetrieveLocationSettingsRequest - path-parameters: - location_id: - type: string - docs: The ID of the location for which to retrieve settings. - response: - docs: Success - type: root.RetrieveLocationSettingsResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - location_settings: - location_id: LOCATION_ID_1 - customer_notes_enabled: true - policies: - - uid: POLICY_ID_1 - title: Return Policy - description: This is my Return Policy - branding: - header_type: FRAMED_LOGO - button_color: '#ffffff' - button_shape: ROUNDED - tipping: - percentages: - - 10 - - 15 - - 20 - smart_tipping_enabled: true - default_percent: 15 - smart_tips: - - {} - coupons: - enabled: true - updated_at: '2022-06-16T22:25:35Z' - UpdateLocationSettings: - path: /v2/online-checkout/location-settings/{location_id} - method: PUT - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - - MERCHANT_PROFILE_READ - docs: Updates the location-level settings for a Square-hosted checkout page. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateLocationSettings - request: - name: UpdateLocationSettingsRequest - path-parameters: - location_id: - type: string - docs: The ID of the location for which to retrieve settings. - body: - properties: - location_settings: - type: root.CheckoutLocationSettings - docs: >- - Describe your updates using the `location_settings` object. Make - sure it contains only the fields that have changed. - content-type: application/json - response: - docs: Success - type: root.UpdateLocationSettingsResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - request: - location_settings: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - location_settings: - location_id: LOCATION_ID_1 - customer_notes_enabled: false - policies: - - uid: POLICY_ID_1 - title: Return Policy - description: This is my Return Policy - - uid: POLICY_ID_2 - title: Return Policy - description: Items may be returned within 30 days of purchase. - branding: - header_type: FRAMED_LOGO - button_color: '#00b23b' - button_shape: ROUNDED - tipping: - percentages: - - 15 - - 20 - - 25 - smart_tipping_enabled: true - default_percent: 20 - smart_tips: - - {} - coupons: - enabled: true - updated_at: '2022-06-16T22:25:35Z' - RetrieveMerchantSettings: - path: /v2/online-checkout/merchant-settings - method: GET - auth: - - oauth2: - - PAYMENT_METHODS_READ - - MERCHANT_PROFILE_READ - docs: Retrieves the merchant-level settings for a Square-hosted checkout page. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveMerchantSettings - response: - docs: Success - type: root.RetrieveMerchantSettingsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - merchant_settings: - payment_methods: - apple_pay: - enabled: true - google_pay: - enabled: true - afterpay_clearpay: - order_eligibility_range: - min: - amount: 100 - currency: USD - max: - amount: 10000 - currency: USD - item_eligibility_range: - min: - amount: 100 - currency: USD - max: - amount: 10000 - currency: USD - enabled: true - updated_at: '2022-06-16T22:25:35Z' - UpdateMerchantSettings: - path: /v2/online-checkout/merchant-settings - method: PUT - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - - PAYMENT_METHODS_READ - - MERCHANT_PROFILE_READ - docs: Updates the merchant-level settings for a Square-hosted checkout page. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateMerchantSettings - request: - name: UpdateMerchantSettingsRequest - body: - properties: - merchant_settings: - type: root.CheckoutMerchantSettings - docs: >- - Describe your updates using the `merchant_settings` object. Make - sure it contains only the fields that have changed. - content-type: application/json - response: - docs: Success - type: root.UpdateMerchantSettingsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - merchant_settings: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - merchant_settings: - payment_methods: - apple_pay: - enabled: false - google_pay: - enabled: true - afterpay_clearpay: - order_eligibility_range: - min: - amount: 100 - currency: USD - max: - amount: 10000 - currency: USD - item_eligibility_range: - min: - amount: 100 - currency: USD - max: - amount: 10000 - currency: USD - enabled: true - updated_at: '2022-06-16T22:25:35Z' - source: - openapi: ../default/openapi/openapi.json -types: - Checkout: - docs: |- - Square Checkout lets merchants accept online payments for supported - payment types using a checkout workflow hosted on squareup.com. - properties: - id: - type: optional - docs: ID generated by Square Checkout when a new checkout is requested. - checkout_page_url: - type: optional> - docs: |- - The URL that the buyer's browser should be redirected to after the - checkout is completed. - ask_for_shipping_address: - type: optional> - docs: >- - If `true`, Square Checkout will collect shipping information on your - - behalf and store that information with the transaction information in - your - - Square Dashboard. - - - Default: `false`. - merchant_support_email: - type: optional> - docs: >- - The email address to display on the Square Checkout confirmation page - - and confirmation email that the buyer can use to contact the merchant. - - - If this value is not set, the confirmation page and email will display - the - - primary email address associated with the merchant's Square account. - - - Default: none; only exists if explicitly set. - pre_populate_buyer_email: - type: optional> - docs: |- - If provided, the buyer's email is pre-populated on the checkout page - as an editable text field. - - Default: none; only exists if explicitly set. - pre_populate_shipping_address: - type: optional - docs: |- - If provided, the buyer's shipping info is pre-populated on the - checkout page as editable text fields. - - Default: none; only exists if explicitly set. - redirect_url: - type: optional> - docs: >- - The URL to redirect to after checkout is completed with `checkoutId`, - - Square's `orderId`, `transactionId`, and `referenceId` appended as URL - - parameters. For example, if the provided redirect_url is - - `http://www.example.com/order-complete`, a successful transaction - redirects - - the customer to: - - -
http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx
- - - If you do not provide a redirect URL, Square Checkout will display an - order - - confirmation page on your behalf; however Square strongly recommends - that - - you provide a redirect URL so you can verify the transaction results - and - - finalize the order through your existing/normal confirmation workflow. - order: - type: optional - docs: Order to be checked out. - created_at: - type: optional - docs: The time when the checkout was created, in RFC 3339 format. - access: read-only - additional_recipients: - type: optional>> - docs: >- - Additional recipients (other than the merchant) receiving a portion of - this checkout. - - For example, fees assessed on the purchase by a third party - integration. - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/checkout/paymentLinks.yml b/.mock/definition/checkout/paymentLinks.yml deleted file mode 100644 index 04daf4d3..00000000 --- a/.mock/definition/checkout/paymentLinks.yml +++ /dev/null @@ -1,466 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/online-checkout/payment-links - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: Lists all payment links. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.payment_links - source: - openapi: ../default/openapi/openapi.json - display-name: ListPaymentLinks - request: - name: ListPaymentLinksRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - If a cursor is not provided, the endpoint returns the first page - of the results. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - A limit on the number of results to return per page. The limit is - advisory and - - the implementation might return more or less results. If the - supplied limit is negative, zero, or - - greater than the maximum limit of 1000, it is ignored. - - - Default value: `100` - response: - docs: Success - type: root.ListPaymentLinksResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment_links: - - id: TN4BWEDJ9AI5MBIV - version: 2 - description: description - order_id: Qqc6yppGvxVwc46Cch4zHTaJqc4F - checkout_options: - ask_for_shipping_address: true - url: https://square.link/u/EXAMPLE - long_url: long_url - created_at: '2022-04-26T00:15:15Z' - updated_at: '2022-04-26T00:18:24Z' - payment_note: test - - id: RY5UNCUMPJN5XKCT - version: 1 - description: '' - order_id: EmBmGt3zJD15QeO1dxzBTxMxtwfZY - url: https://square.link/u/EXAMPLE - long_url: long_url - created_at: '2022-04-11T23:14:59Z' - updated_at: updated_at - payment_note: payment_note - cursor: MTY1NQ== - create: - path: /v2/online-checkout/payment-links - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - - ORDERS_READ - - ORDERS_WRITE - docs: >- - Creates a Square-hosted checkout page. Applications can share the - resulting payment link with their buyer to pay for goods and services. - source: - openapi: ../default/openapi/openapi.json - display-name: CreatePaymentLink - request: - name: CreatePaymentLinkRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string that identifies this `CreatePaymentLinkRequest` - request. - - If you do not provide a unique string (or provide an empty - string as the value), - - the endpoint treats each request as independent. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - maxLength: 192 - description: - type: optional - docs: >- - A description of the payment link. You provide this optional - description that is useful in your - - application context. It is not used anywhere. - validation: - maxLength: 4096 - quick_pay: - type: optional - docs: >- - Describes an ad hoc item and price for which to generate a quick - pay checkout link. - - For more information, - - see [Quick Pay - Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout). - order: - type: optional - docs: >- - Describes the `Order` for which to create a checkout link. - - For more information, - - see [Square Order - Checkout](https://developer.squareup.com/docs/checkout-api/square-order-checkout). - checkout_options: - type: optional - docs: >- - Describes optional fields to add to the resulting checkout page. - - For more information, - - see [Optional Checkout - Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). - pre_populated_data: - type: optional - docs: >- - Describes fields to prepopulate in the resulting checkout page. - - For more information, see [Prepopulate the shipping - address](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#prepopulate-the-shipping-address). - payment_note: - type: optional - docs: >- - A note for the payment. After processing the payment, Square - adds this note to the resulting `Payment`. - validation: - maxLength: 500 - content-type: application/json - response: - docs: Success - type: root.CreatePaymentLinkResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: cd9e25dc-d9f2-4430-aedb-61605070e95f - quick_pay: - name: Auto Detailing - price_money: - amount: 10000 - currency: USD - location_id: A9Y43N9ABXZBP - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment_link: - id: PKVT6XGJZXYUP3NZ - version: 1 - description: description - order_id: o4b7saqp4HzhNttf5AJxC0Srjd4F - checkout_options: - allow_tipping: true - custom_fields: - - title: title - subscription_plan_id: subscription_plan_id - redirect_url: redirect_url - merchant_support_email: merchant_support_email - ask_for_shipping_address: true - shipping_fee: - charge: {} - enable_coupon: true - enable_loyalty: true - pre_populated_data: - buyer_email: buyer_email - buyer_phone_number: buyer_phone_number - url: https://square.link/u/EXAMPLE - long_url: https://checkout.square.site/EXAMPLE - created_at: '2022-04-25T23:58:01Z' - updated_at: updated_at - payment_note: payment_note - related_resources: - orders: - - id: o4b7saqp4HzhNttf5AJxC0Srjd4F - location_id: '{LOCATION_ID}' - source: - name: Test Online Checkout Application - line_items: - - uid: 8YX13D1U3jO7czP8JVrAR - name: Auto Detailing - quantity: '1' - item_type: ITEM - base_price_money: - amount: 12500 - currency: USD - variation_total_price_money: - amount: 12500 - currency: USD - gross_sales_money: - amount: 12500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_money: - amount: 12500 - currency: USD - fulfillments: - - uid: bBpNrxjdQxGQP16sTmdzi - type: PICKUP - state: PROPOSED - net_amounts: - total_money: - amount: 12500 - currency: USD - tax_money: - amount: 0 - currency: USD - discount_money: - amount: 0 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - created_at: '2022-03-03T00:53:15.829Z' - updated_at: '2022-03-03T00:53:15.829Z' - state: DRAFT - version: 1 - total_money: - amount: 12500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_tip_money: - amount: 0 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - subscription_plans: - - id: id - type: ITEM - get: - path: /v2/online-checkout/payment-links/{id} - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: Retrieves a payment link. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrievePaymentLink - request: - name: GetPaymentLinksRequest - path-parameters: - id: - type: string - docs: The ID of link to retrieve. - response: - docs: Success - type: root.GetPaymentLinkResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment_link: - id: LLO5Q3FRCFICDB4B - version: 1 - description: description - order_id: 4uKASDATqSd1QQ9jV86sPhMdVEbSJc4F - checkout_options: - allow_tipping: true - custom_fields: - - title: title - subscription_plan_id: subscription_plan_id - redirect_url: redirect_url - merchant_support_email: merchant_support_email - ask_for_shipping_address: true - shipping_fee: - charge: {} - enable_coupon: true - enable_loyalty: true - pre_populated_data: - buyer_email: buyer_email - buyer_phone_number: buyer_phone_number - url: https://square.link/u/EXAMPLE - long_url: https://checkout.square.site/EXAMPLE - created_at: '2022-04-26T00:10:29Z' - updated_at: updated_at - payment_note: payment_note - update: - path: /v2/online-checkout/payment-links/{id} - method: PUT - auth: - - oauth2: - - PAYMENTS_WRITE - - ORDERS_READ - - ORDERS_WRITE - docs: >- - Updates a payment link. You can update the `payment_link` fields such as - - `description`, `checkout_options`, and `pre_populated_data`. - - You cannot update other fields such as the `order_id`, `version`, `URL`, - or `timestamp` field. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdatePaymentLink - request: - name: UpdatePaymentLinkRequest - path-parameters: - id: - type: string - docs: The ID of the payment link to update. - body: - properties: - payment_link: - type: root.PaymentLink - docs: >- - The `payment_link` object describing the updates to apply. - - For more information, see [Update a payment - link](https://developer.squareup.com/docs/checkout-api/manage-checkout#update-a-payment-link). - content-type: application/json - response: - docs: Success - type: root.UpdatePaymentLinkResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - payment_link: - version: 1 - checkout_options: - ask_for_shipping_address: true - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment_link: - id: TY4BWEDJ6AI5MBIV - version: 2 - description: description - order_id: Qqc8ypQGvxVwc46Cch4zHTaJqc4F - checkout_options: - allow_tipping: true - custom_fields: - - title: title - subscription_plan_id: subscription_plan_id - redirect_url: redirect_url - merchant_support_email: merchant_support_email - ask_for_shipping_address: true - shipping_fee: - charge: {} - enable_coupon: true - enable_loyalty: true - pre_populated_data: - buyer_email: buyer_email - buyer_phone_number: buyer_phone_number - url: https://square.link/u/EXAMPLE - long_url: https://checkout.square.site/EXAMPLE - created_at: '2022-04-26T00:15:15Z' - updated_at: '2022-04-26T00:18:24Z' - payment_note: test - delete: - path: /v2/online-checkout/payment-links/{id} - method: DELETE - auth: - - oauth2: - - ORDERS_READ - - ORDERS_WRITE - docs: Deletes a payment link. - source: - openapi: ../default/openapi/openapi.json - display-name: DeletePaymentLink - request: - name: DeletePaymentLinksRequest - path-parameters: - id: - type: string - docs: The ID of the payment link to delete. - response: - docs: Success - type: root.DeletePaymentLinkResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - id: MQASNYL6QB6DFCJ3 - cancelled_order_id: asx8LgZ6MRzD0fObfkJ6obBmSh4F - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers.yml b/.mock/definition/customers.yml deleted file mode 100644 index aec16add..00000000 --- a/.mock/definition/customers.yml +++ /dev/null @@ -1,1180 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/customers - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Lists customer profiles associated with a Square account. - - - Under normal operating conditions, newly created or updated customer - profiles become available - - for the listing operation in well under 30 seconds. Occasionally, - propagation of the new or updated - - profiles can take closer to one minute or longer, especially during - network incidents and outages. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.customers - source: - openapi: ../default/openapi/openapi.json - display-name: ListCustomers - request: - name: ListCustomersRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for your - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single page. This - limit is advisory. The response might contain more or fewer - results. - - If the specified limit is less than 1 or greater than 100, Square - returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The - default value is 100. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - sort_field: - type: optional> - docs: |- - Indicates how customers should be sorted. - - The default value is `DEFAULT`. - sort_order: - type: optional> - docs: >- - Indicates whether customers should be sorted in ascending (`ASC`) - or - - descending (`DESC`) order. - - - The default value is `ASC`. - count: - type: optional> - default: false - docs: >- - Indicates whether to return the total count of customers in the - `count` field of the response. - - - The default value is `false`. - response: - docs: Success - type: root.ListCustomersResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - limit: 1 - sort_field: DEFAULT - sort_order: DESC - count: true - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - customers: - - id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2016-03-23T20:21:54.859Z' - updated_at: '2016-03-23T20:21:55Z' - given_name: Amelia - family_name: Earhart - nickname: nickname - company_name: company_name - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-4240 - birthday: birthday - reference_id: YOUR_REFERENCE_ID - note: a customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - group_ids: - - 545AXB44B4XXWMVQ4W8SBT3HHF - segment_ids: - - 1KB9JE5EGJXCW.REACHABLE - version: 1 - cursor: cursor - count: 1000000 - create: - path: /v2/customers - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Creates a new customer for a business. - - - You must provide at least one of the following values in your request to - this - - endpoint: - - - - `given_name` - - - `family_name` - - - `company_name` - - - `email_address` - - - `phone_number` - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCustomer - request: - name: CreateCustomerRequest - body: - properties: - idempotency_key: - type: optional - docs: "The idempotency key for the request.\tFor more information, see\n[Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." - given_name: - type: optional - docs: >- - The given name (that is, the first name) associated with the - customer profile. - - - The maximum length for this value is 300 characters. - family_name: - type: optional - docs: >- - The family name (that is, the last name) associated with the - customer profile. - - - The maximum length for this value is 300 characters. - company_name: - type: optional - docs: |- - A business name associated with the customer profile. - - The maximum length for this value is 500 characters. - nickname: - type: optional - docs: |- - A nickname for the customer profile. - - The maximum length for this value is 100 characters. - email_address: - type: optional - docs: |- - The email address associated with the customer profile. - - The maximum length for this value is 254 characters. - address: - type: optional - docs: >- - The physical address associated with the customer profile. For - maximum length constraints, see - - [Customer - addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address). - - The `first_name` and `last_name` fields are ignored if they are - present in the request. - phone_number: - type: optional - docs: >- - The phone number associated with the customer profile. The phone - number must be valid and can contain - - 9–16 digits, with an optional `+` prefix and country code. For - more information, see - - [Customer phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). - reference_id: - type: optional - docs: >- - An optional second ID used to associate the customer profile - with an - - entity in another system. - - - The maximum length for this value is 100 characters. - note: - type: optional - docs: A custom note associated with the customer profile. - birthday: - type: optional - docs: >- - The birthday associated with the customer profile, in - `YYYY-MM-DD` or `MM-DD` format. For example, - - specify `1998-09-21` for September 21, 1998, or `09-21` for - September 21. Birthdays are returned in `YYYY-MM-DD` - - format, where `YYYY` is the specified birth year or `0000` if a - birth year is not specified. - tax_ids: - type: optional - docs: >- - The tax ID associated with the customer profile. This field is - available only for customers of sellers - - in EU countries or the United Kingdom. For more information, - - see [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - content-type: application/json - response: - docs: Success - type: root.CreateCustomerResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-4240 - reference_id: YOUR_REFERENCE_ID - note: a customer - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - customer: - id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2016-03-23T20:21:54.859Z' - updated_at: '2016-03-23T20:21:54.859Z' - given_name: Amelia - family_name: Earhart - nickname: nickname - company_name: company_name - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - phone_number: +1-212-555-4240 - birthday: birthday - reference_id: YOUR_REFERENCE_ID - note: a customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - group_ids: - - group_ids - segment_ids: - - segment_ids - version: 0 - tax_ids: - eu_vat: eu_vat - batchCreate: - path: /v2/customers/bulk-create - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Creates multiple [customer profiles](entity:Customer) for a business. - - - This endpoint takes a map of individual create requests and returns a - map of responses. - - - You must provide at least one of the following values in each create - request: - - - - `given_name` - - - `family_name` - - - `company_name` - - - `email_address` - - - `phone_number` - source: - openapi: ../default/openapi/openapi.json - display-name: BulkCreateCustomers - request: - name: BulkCreateCustomersRequest - body: - properties: - customers: - type: map - docs: >- - A map of 1 to 100 individual create requests, represented by - `idempotency key: { customer data }` - - key-value pairs. - - - Each key is an [idempotency - key](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - - that uniquely identifies the create request. Each value contains - the customer data used to create the - - customer profile. - content-type: application/json - response: - docs: Success - type: root.BulkCreateCustomersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - customers: - 8bb76c4f-e35d-4c5b-90de-1194cd9179f0: - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-4240 - reference_id: YOUR_REFERENCE_ID - note: a customer - d1689f23-b25d-4932-b2f0-aed00f5e2029: - given_name: Marie - family_name: Curie - email_address: Marie.Curie@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 601 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-444-4240 - reference_id: YOUR_REFERENCE_ID - note: another customer - response: - body: - responses: - 8bb76c4f-e35d-4c5b-90de-1194cd9179f4: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: 8DDA5NZVBZFGAX0V3HPF81HHE0 - created_at: '2024-03-23T20:21:54.859Z' - updated_at: '2024-03-23T20:21:54.859Z' - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-4240 - reference_id: YOUR_REFERENCE_ID - note: a customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 0 - d1689f23-b25d-4932-b2f0-aed00f5e2029: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: N18CPRVXR5214XPBBA6BZQWF3C - created_at: '2024-03-23T20:21:54.859Z' - updated_at: '2024-03-23T20:21:54.859Z' - given_name: Marie - family_name: Curie - email_address: Marie.Curie@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 601 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-444-4240 - reference_id: YOUR_REFERENCE_ID - note: another customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 0 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkDeleteCustomers: - path: /v2/customers/bulk-delete - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Deletes multiple customer profiles. - - - The endpoint takes a list of customer IDs and returns a map of - responses. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkDeleteCustomers - request: - name: BulkDeleteCustomersRequest - body: - properties: - customer_ids: - docs: The IDs of the [customer profiles](entity:Customer) to delete. - type: list - content-type: application/json - response: - docs: Success - type: root.BulkDeleteCustomersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - customer_ids: - - 8DDA5NZVBZFGAX0V3HPF81HHE0 - - N18CPRVXR5214XPBBA6BZQWF3C - - 2GYD7WNXF7BJZW1PMGNXZ3Y8M8 - response: - body: - responses: - 2GYD7WNXF7BJZW1PMGNXZ3Y8M8: - errors: - - category: INVALID_REQUEST_ERROR - code: NOT_FOUND - detail: Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found. - 8DDA5NZVBZFGAX0V3HPF81HHE0: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - N18CPRVXR5214XPBBA6BZQWF3C: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkRetrieveCustomers: - path: /v2/customers/bulk-retrieve - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Retrieves multiple customer profiles. - - - This endpoint takes a list of customer IDs and returns a map of - responses. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkRetrieveCustomers - request: - name: BulkRetrieveCustomersRequest - body: - properties: - customer_ids: - docs: The IDs of the [customer profiles](entity:Customer) to retrieve. - type: list - content-type: application/json - response: - docs: Success - type: root.BulkRetrieveCustomersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - customer_ids: - - 8DDA5NZVBZFGAX0V3HPF81HHE0 - - N18CPRVXR5214XPBBA6BZQWF3C - - 2GYD7WNXF7BJZW1PMGNXZ3Y8M8 - response: - body: - responses: - 2GYD7WNXF7BJZW1PMGNXZ3Y8M8: - errors: - - category: INVALID_REQUEST_ERROR - code: NOT_FOUND - detail: Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found. - 8DDA5NZVBZFGAX0V3HPF81HHE0: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: 8DDA5NZVBZFGAX0V3HPF81HHE0 - created_at: '2024-01-19T00:27:54.59Z' - updated_at: '2024-01-19T00:38:06Z' - given_name: Amelia - family_name: Earhart - email_address: New.Amelia.Earhart@example.com - birthday: '1897-07-24' - note: updated customer note - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 3 - N18CPRVXR5214XPBBA6BZQWF3C: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: N18CPRVXR5214XPBBA6BZQWF3C - created_at: '2024-01-19T00:27:54.59Z' - updated_at: '2024-01-19T00:38:06Z' - given_name: Marie - family_name: Curie - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 1 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkUpdateCustomers: - path: /v2/customers/bulk-update - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Updates multiple customer profiles. - - - This endpoint takes a map of individual update requests and returns a - map of responses. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpdateCustomers - request: - name: BulkUpdateCustomersRequest - body: - properties: - customers: - type: map - docs: >- - A map of 1 to 100 individual update requests, represented by - `customer ID: { customer data }` - - key-value pairs. - - - Each key is the ID of the [customer profile](entity:Customer) to - update. To update a customer profile - - that was created by merging existing profiles, provide the ID of - the newly created profile. - - - Each value contains the updated customer data. Only new or - changed fields are required. To add or - - update a field, specify the new value. To remove a field, - specify `null`. - content-type: application/json - response: - docs: Success - type: root.BulkUpdateCustomersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - customers: - 8DDA5NZVBZFGAX0V3HPF81HHE0: - email_address: New.Amelia.Earhart@example.com - note: updated customer note - version: 2 - N18CPRVXR5214XPBBA6BZQWF3C: - given_name: Marie - family_name: Curie - version: 0 - response: - body: - responses: - 8DDA5NZVBZFGAX0V3HPF81HHE0: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: 8DDA5NZVBZFGAX0V3HPF81HHE0 - created_at: '2024-01-19T00:27:54.59Z' - updated_at: '2024-01-19T00:38:06Z' - given_name: Amelia - family_name: Earhart - email_address: New.Amelia.Earhart@example.com - birthday: '1897-07-24' - note: updated customer note - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 3 - N18CPRVXR5214XPBBA6BZQWF3C: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - customer: - id: N18CPRVXR5214XPBBA6BZQWF3C - created_at: '2024-01-19T00:27:54.59Z' - updated_at: '2024-01-19T00:38:06Z' - given_name: Marie - family_name: Curie - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - version: 1 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/customers/search - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - 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, especially during - network incidents and outages. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchCustomers - request: - name: SearchCustomersRequest - body: - properties: - cursor: - type: optional - docs: >- - Include the pagination cursor in subsequent calls to this - endpoint to retrieve - - the next set of results associated with the original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional - docs: >- - The maximum number of results to return in a single page. This - limit is advisory. The response might contain more or fewer - results. - - If the specified limit is invalid, Square returns a `400 - VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value - is 100. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - query: - type: optional - docs: >- - The filtering and sorting criteria for the search request. If a - query is not specified, - - Square returns all customer profiles ordered alphabetically by - `given_name` and `family_name`. - count: - type: optional - docs: >- - Indicates whether to return the total count of matching - customers in the `count` field of the response. - - - The default value is `false`. - content-type: application/json - response: - docs: Success - type: root.SearchCustomersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - limit: 2 - query: - filter: - creation_source: - values: - - THIRD_PARTY - rule: INCLUDE - created_at: - start_at: '2018-01-01T00:00:00-00:00' - end_at: '2018-02-01T00:00:00-00:00' - email_address: - fuzzy: example.com - group_ids: - all: - - 545AXB44B4XXWMVQ4W8SBT3HHF - sort: - field: CREATED_AT - order: ASC - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - customers: - - id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2018-01-23T20:21:54.859Z' - updated_at: '2020-04-20T10:02:43.083Z' - given_name: James - family_name: Bond - nickname: nickname - company_name: company_name - email_address: james.bond@example.com - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-4250 - birthday: birthday - reference_id: YOUR_REFERENCE_ID_2 - note: note - preferences: - email_unsubscribed: false - creation_source: DIRECTORY - group_ids: - - 545AXB44B4XXWMVQ4W8SBT3HHF - segment_ids: - - 1KB9JE5EGJXCW.REACHABLE - version: 7 - - id: A9641GZW2H7Z56YYSD41Q12HDW - created_at: '2018-01-30T14:10:54.859Z' - updated_at: '2018-03-08T18:25:21.342Z' - given_name: Amelia - family_name: Earhart - nickname: nickname - company_name: company_name - email_address: amelia.earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - phone_number: +1-212-555-9238 - birthday: birthday - reference_id: YOUR_REFERENCE_ID_1 - note: a customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - group_ids: - - 545AXB44B4XXWMVQ4W8SBT3HHF - segment_ids: - - 1KB9JE5EGJXCW.REACHABLE - version: 1 - cursor: 9dpS093Uy12AzeE - count: 1000000 - get: - path: /v2/customers/{customer_id} - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: Returns details for a single customer. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCustomer - request: - name: GetCustomersRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer to retrieve. - response: - docs: Success - type: root.GetCustomerResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - customer: - id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2016-03-23T20:21:54.859Z' - updated_at: '2016-03-23T20:21:54.859Z' - given_name: Amelia - family_name: Earhart - nickname: nickname - company_name: company_name - email_address: Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - phone_number: +1-212-555-4240 - birthday: birthday - reference_id: YOUR_REFERENCE_ID - note: a customer - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - group_ids: - - 545AXB44B4XXWMVQ4W8SBT3HHF - segment_ids: - - 1KB9JE5EGJXCW.REACHABLE - version: 1 - tax_ids: - eu_vat: eu_vat - update: - path: /v2/customers/{customer_id} - method: PUT - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Updates a customer profile. This endpoint supports sparse updates, so - only new or changed fields are required in the request. - - To add or update a field, specify the new value. To remove a field, - specify `null`. - - - To update a customer profile that was created by merging existing - profiles, you must use the ID of the newly created profile. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateCustomer - request: - name: UpdateCustomerRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer to update. - body: - properties: - given_name: - type: optional> - docs: >- - The given name (that is, the first name) associated with the - customer profile. - - - The maximum length for this value is 300 characters. - family_name: - type: optional> - docs: >- - The family name (that is, the last name) associated with the - customer profile. - - - The maximum length for this value is 300 characters. - company_name: - type: optional> - docs: |- - A business name associated with the customer profile. - - The maximum length for this value is 500 characters. - nickname: - type: optional> - docs: |- - A nickname for the customer profile. - - The maximum length for this value is 100 characters. - email_address: - type: optional> - docs: |- - The email address associated with the customer profile. - - The maximum length for this value is 254 characters. - address: - type: optional - docs: >- - The physical address associated with the customer profile. Only - new or changed fields are required in the request. - - - For maximum length constraints, see [Customer - addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address). - - The `first_name` and `last_name` fields are ignored if they are - present in the request. - phone_number: - type: optional> - docs: >- - The phone number associated with the customer profile. The phone - number must be valid and can contain - - 9–16 digits, with an optional `+` prefix and country code. For - more information, see - - [Customer phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). - reference_id: - type: optional> - docs: >- - An optional second ID used to associate the customer profile - with an - - entity in another system. - - - The maximum length for this value is 100 characters. - note: - type: optional> - docs: A custom note associated with the customer profile. - birthday: - type: optional> - docs: >- - The birthday associated with the customer profile, in - `YYYY-MM-DD` or `MM-DD` format. For example, - - specify `1998-09-21` for September 21, 1998, or `09-21` for - September 21. Birthdays are returned in `YYYY-MM-DD` - - format, where `YYYY` is the specified birth year or `0000` if a - birth year is not specified. - version: - type: optional - docs: >- - The current version of the customer profile. - - - As a best practice, you should include this field to enable - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - control. For more information, see [Update a customer - profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#update-a-customer-profile). - tax_ids: - type: optional - docs: >- - The tax ID associated with the customer profile. This field is - available only for customers of sellers - - in EU countries or the United Kingdom. For more information, - - see [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). - content-type: application/json - response: - docs: Success - type: root.UpdateCustomerResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - headers: - Square-Version: '2025-10-16' - request: - email_address: New.Amelia.Earhart@example.com - note: updated customer note - version: 2 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - customer: - id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2016-03-23T20:21:54.859Z' - updated_at: '2016-05-15T20:21:55Z' - given_name: Amelia - family_name: Earhart - nickname: nickname - company_name: company_name - email_address: New.Amelia.Earhart@example.com - address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - phone_number: phone_number - birthday: birthday - reference_id: YOUR_REFERENCE_ID - note: updated customer note - preferences: - email_unsubscribed: false - creation_source: THIRD_PARTY - group_ids: - - group_ids - segment_ids: - - segment_ids - version: 3 - tax_ids: - eu_vat: eu_vat - delete: - path: /v2/customers/{customer_id} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Deletes a customer profile from a business. - - - To delete a customer profile that was created by merging existing - profiles, you must use the ID of the newly created profile. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCustomer - request: - name: DeleteCustomersRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer to delete. - query-parameters: - version: - type: optional> - docs: >- - The current version of the customer profile. - - - As a best practice, you should include this parameter to enable - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - control. For more information, see [Delete a customer - profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#delete-customer-profile). - response: - docs: Success - type: root.DeleteCustomerResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - query-parameters: - version: 1000000 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers/cards.yml b/.mock/definition/customers/cards.yml deleted file mode 100644 index 8c26bf02..00000000 --- a/.mock/definition/customers/cards.yml +++ /dev/null @@ -1,181 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/customers/{customer_id}/cards - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Adds a card on file to an existing customer. - - - As with charges, calls to `CreateCustomerCard` are idempotent. Multiple - - calls with the same card nonce return the same card record that was - created - - with the provided nonce during the _first_ call. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCustomerCard - request: - name: CreateCustomerCardRequest - path-parameters: - customer_id: - type: string - docs: The Square ID of the customer profile the card is linked to. - body: - properties: - card_nonce: - type: string - docs: >- - A card nonce representing the credit card to link to the - customer. - - - Card nonces are generated by the Square payment form when - customers enter - - their card information. For more information, see - - [Walkthrough: Integrate Square Payments in a - Website](https://developer.squareup.com/docs/web-payments/take-card-payment). - - - __NOTE:__ Card nonces generated by digital wallets (such as - Apple Pay) - - cannot be used to create a customer card. - billing_address: - type: optional - docs: >- - Address information for the card on file. - - - __NOTE:__ If a billing address is provided in the request, the - - `CreateCustomerCardRequest.billing_address.postal_code` must - match - - the postal code encoded in the card nonce. - cardholder_name: - type: optional - docs: The full name printed on the credit card. - verification_token: - type: optional - docs: >- - An identifying token generated by - [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer). - - Verification tokens encapsulate customer device information and - 3-D Secure - - challenge results to indicate that Square has verified the buyer - identity. - content-type: application/json - response: - docs: Success - type: root.CreateCustomerCardResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - customer_id: customer_id - headers: - Square-Version: '2025-10-16' - request: - card_nonce: YOUR_CARD_NONCE - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - cardholder_name: Amelia Earhart - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - card: - id: icard-card_id - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2018 - cardholder_name: Amelia Earhart - billing_address: - address_line_1: 500 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - fingerprint: fingerprint - customer_id: customer_id - merchant_id: merchant_id - reference_id: reference_id - enabled: true - card_type: UNKNOWN_CARD_TYPE - prepaid_type: UNKNOWN_PREPAID_TYPE - bin: bin - version: 1000000 - card_co_brand: UNKNOWN - issuer_alert: ISSUER_ALERT_CARD_CLOSED - issuer_alert_at: issuer_alert_at - hsa_fsa: true - delete: - path: /v2/customers/{customer_id}/cards/{card_id} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: Removes a card on file from a customer. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCustomerCard - request: - name: DeleteCardsRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer that the card on file belongs to. - card_id: - type: string - docs: The ID of the card on file to delete. - response: - docs: Success - type: root.DeleteCustomerCardResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - customer_id: customer_id - card_id: card_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers/customAttributeDefinitions.yml b/.mock/definition/customers/customAttributeDefinitions.yml deleted file mode 100644 index 28ad4ea8..00000000 --- a/.mock/definition/customers/customAttributeDefinitions.yml +++ /dev/null @@ -1,605 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/customers/custom-attribute-definitions - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Lists the customer-related [custom attribute - definitions](entity:CustomAttributeDefinition) that belong to a Square - seller account. - - - When all response pages are retrieved, the results include all custom - attribute definitions - - that are visible to the requesting application, including those that are - created by other - - applications and set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. Note that - - seller-defined custom attributes (also known as custom fields) are - always set to `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attribute_definitions - source: - openapi: ../default/openapi/openapi.json - display-name: ListCustomerCustomAttributeDefinitions - request: - name: ListCustomAttributeDefinitionsRequest - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListCustomerCustomAttributeDefinitionsResponse - status-code: 200 - examples: - - query-parameters: - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definitions: - - key: favoritemovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Movie - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 3 - updated_at: '2022-04-26T15:39:38Z' - created_at: '2022-04-26T15:27:30Z' - - key: ownsmovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean - name: Owns Movie - description: Customer owns movie. - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: '2022-04-26T15:49:05Z' - created_at: '2022-04-26T15:49:05Z' - cursor: >- - YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/customers/custom-attribute-definitions - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Creates a customer-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - Use this endpoint to define a custom attribute that can be associated - with customer profiles. - - - A custom attribute definition specifies the `key`, `visibility`, - `schema`, and other properties - - for a custom attribute. After the definition is created, you can call - - [UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) - or - - [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) - - to set the custom attribute for customer profiles in the seller's - Customer Directory. - - - Sellers can view all custom attributes in exported customer data, - including those set to - - `VISIBILITY_HIDDEN`. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCustomerCustomAttributeDefinition - request: - name: CreateCustomerCustomAttributeDefinitionRequest - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition to create. Note the following: - - - With the exception of the `Selection` data type, the `schema` - is specified as a simple URL to the JSON schema - - definition hosted on the Square CDN. For more information, - including supported values and constraints, see - - [Specifying the - schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema). - - - If provided, `name` must be unique (case-sensitive) across all - visible customer-related custom attribute definitions for the - seller. - - - All custom attributes are visible in exported customer data, - including those set to `VISIBILITY_HIDDEN`. - idempotency_key: - type: optional - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateCustomerCustomAttributeDefinitionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - key: favoritemovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Movie - description: The favorite movie of the customer. - visibility: VISIBILITY_HIDDEN - response: - body: - custom_attribute_definition: - key: favoritemovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Movie - description: The favorite movie of the customer. - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: '2022-04-26T15:27:30Z' - created_at: '2022-04-26T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/customers/custom-attribute-definitions/{key} - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Retrieves a customer-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - - To retrieve a custom attribute definition created by another - application, the `visibility` - - setting must be `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCustomerCustomAttributeDefinition - request: - name: GetCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: >- - The key of the custom attribute definition to retrieve. If the - requesting application - - is not the definition owner, you must use the qualified key. - query-parameters: - version: - type: optional> - docs: >- - The current version of the custom attribute definition, which is - used for strongly consistent - - reads to guarantee that you receive the most up-to-date data. When - included in the request, - - Square returns the specified version or a higher version if one - exists. If the specified version - - is higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.GetCustomerCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definition: - key: favoritemovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Movie - description: The favorite movie of the customer. - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-04-26T15:27:30Z' - created_at: '2022-04-26T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/customers/custom-attribute-definitions/{key} - method: PUT - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Updates a customer-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - - Use this endpoint to update the following fields: `name`, `description`, - `visibility`, or the - - `schema` for a `Selection` data type. - - - Only the definition owner can update a custom attribute definition. Note - that sellers can view - - all custom attributes in exported customer data, including those set to - `VISIBILITY_HIDDEN`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateCustomerCustomAttributeDefinition - request: - name: UpdateCustomerCustomAttributeDefinitionRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to update. - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition that contains the fields to - update. This endpoint - - supports sparse updates, so only new or changed fields need to - be included in the request. - - Only the following fields can be updated: - - - - `name` - - - `description` - - - `visibility` - - - `schema` for a `Selection` data type. Only changes to the - named options or the maximum number of allowed - - selections are supported. - - - For more information, see - - [Updatable definition - fields](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields). - - - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include the optional `version` field and specify the - current version of the custom attribute definition. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateCustomerCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - response: - body: - custom_attribute_definition: - key: favoritemovie - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Favorite Movie - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 2 - updated_at: '2022-04-26T15:39:38Z' - created_at: '2022-04-26T15:27:30Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/customers/custom-attribute-definitions/{key} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Deletes a customer-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - - Deleting a custom attribute definition also deletes the corresponding - custom attribute from - - all customer profiles in the seller's Customer Directory. - - - Only the definition owner can delete a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCustomerCustomAttributeDefinition - request: - name: DeleteCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to delete. - response: - docs: Success - type: root.DeleteCustomerCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchUpsert: - path: /v2/customers/custom-attributes/bulk-upsert - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Creates or updates [custom attributes](entity:CustomAttribute) for - customer profiles as a bulk operation. - - - Use this endpoint to set the value of one or more custom attributes for - one or more customer profiles. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which is - - created using the - [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) - endpoint. - - - This `BulkUpsertCustomerCustomAttributes` endpoint accepts a map of 1 to - 25 individual upsert - - requests and returns a map of individual upsert responses. Each upsert - request has a unique ID - - and provides a customer ID and custom attribute. Each upsert response is - returned with the ID - - of the corresponding request. - - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpsertCustomerCustomAttributes - request: - name: BatchUpsertCustomerCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - A map containing 1 to 25 individual upsert requests. For each - request, provide an - - arbitrary ID that is unique for this - `BulkUpsertCustomerCustomAttributes` request and the - - information needed to create or update a custom attribute. - content-type: application/json - response: - docs: Success - type: root.BatchUpsertCustomerCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - id1: - customer_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: favoritemovie - value: Dune - id2: - customer_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: ownsmovie - value: false - id3: - customer_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: favoritemovie - value: Star Wars - id4: - customer_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: square:a0f1505a-2aa1-490d-91a8-8d31ff181808 - value: '10.5' - id5: - customer_id: 70548QG1HN43B05G0KCZ4MMC1G - custom_attribute: - key: sq0ids-0evKIskIGaY45fCyNL66aw:backupemail - value: fake-email@squareup.com - response: - body: - values: - id1: - customer_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: favoritemovie - value: Dune - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2021-12-09T00:16:23Z' - created_at: '2021-12-08T23:14:47Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - customer_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: ownsmovie - value: false - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2021-12-09T00:16:23Z' - created_at: '2021-12-09T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id3: - customer_id: SY8EMWRNDN3TQDP2H4KS1QWMMM - custom_attribute: - key: favoritemovie - value: Star Wars - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2021-12-09T00:16:23Z' - created_at: '2021-12-09T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id4: - customer_id: N3NCVYY3WS27HF0HKANA3R9FP8 - custom_attribute: - key: square:a0f1505a-2aa1-490d-91a8-8d31ff181808 - value: '10.5' - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2021-12-09T00:16:23Z' - created_at: '2021-12-08T23:14:47Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id5: - customer_id: 70548QG1HN43B05G0KCZ4MMC1G - custom_attribute: - key: sq0ids-0evKIskIGaY45fCyNL66aw:backupemail - value: fake-email@squareup.com - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2021-12-09T00:16:23Z' - created_at: '2021-12-09T00:16:20Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers/customAttributes.yml b/.mock/definition/customers/customAttributes.yml deleted file mode 100644 index 2c4e12a6..00000000 --- a/.mock/definition/customers/customAttributes.yml +++ /dev/null @@ -1,399 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/customers/{customer_id}/custom-attributes - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Lists the [custom attributes](entity:CustomAttribute) associated with a - customer profile. - - - You can use the `with_definitions` query parameter to also retrieve - custom attribute definitions - - in the same call. - - - When all response pages are retrieved, the results include all custom - attributes that are - - visible to the requesting application, including those that are owned by - other applications - - and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attributes - source: - openapi: ../default/openapi/openapi.json - display-name: ListCustomerCustomAttributes - request: - name: ListCustomAttributesRequest - path-parameters: - customer_id: - type: string - docs: The ID of the target [customer profile](entity:Customer). - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. For more - - information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - with_definitions: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - response: - docs: Success - type: root.ListCustomerCustomAttributesResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - query-parameters: - limit: 1 - cursor: cursor - with_definitions: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attributes: - - key: favoritemovie - value: Dune - version: 1 - visibility: VISIBILITY_READ_ONLY - updated_at: '2022-04-26T15:50:27Z' - created_at: '2022-04-26T15:50:27Z' - - key: ownsmovie - value: false - version: 1 - visibility: VISIBILITY_HIDDEN - updated_at: '2022-04-26T15:51:53Z' - created_at: '2022-04-26T15:51:53Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/customers/{customer_id}/custom-attributes/{key} - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Retrieves a [custom attribute](entity:CustomAttribute) associated with a - customer profile. - - - You can use the `with_definition` query parameter to also retrieve the - custom attribute definition - - in the same call. - - - To retrieve a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that - seller-defined custom attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCustomerCustomAttribute - request: - name: GetCustomAttributesRequest - path-parameters: - customer_id: - type: string - docs: The ID of the target [customer profile](entity:Customer). - key: - type: string - docs: >- - The key of the custom attribute to retrieve. This key must match - the `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - query-parameters: - with_definition: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of - - the custom attribute. Set this parameter to `true` to get the name - and description of the custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - version: - type: optional> - docs: >- - The current version of the custom attribute, which is used for - strongly consistent reads to - - guarantee that you receive the most up-to-date data. When included - in the request, Square - - returns the specified version or a higher version if one exists. - If the specified version is - - higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.GetCustomerCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - key: key - query-parameters: - with_definition: true - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute: - key: favoritemovie - value: Dune - version: 1 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-04-26T15:50:27Z' - created_at: '2022-04-26T15:50:27Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - upsert: - path: /v2/customers/{customer_id}/custom-attributes/{key} - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Creates or updates a [custom attribute](entity:CustomAttribute) for a - customer profile. - - - Use this endpoint to set the value of a custom attribute for a specified - customer profile. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which - - is created using the - [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) - endpoint. - - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertCustomerCustomAttribute - request: - name: UpsertCustomerCustomAttributeRequest - path-parameters: - customer_id: - type: string - docs: The ID of the target [customer profile](entity:Customer). - key: - type: string - docs: >- - The key of the custom attribute to create or update. This key must - match the `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - body: - properties: - custom_attribute: - type: root.CustomAttribute - docs: >- - The custom attribute to create or update, with the following - fields: - - - - `value`. This value must conform to the `schema` specified by - the definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for an update operation, include this optional field and - specify the current version - - of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpsertCustomerCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute: - value: Dune - response: - body: - custom_attribute: - key: favoritemovie - value: Dune - version: 1 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-04-26T15:50:27Z' - created_at: '2022-04-26T15:50:27Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/customers/{customer_id}/custom-attributes/{key} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: >- - Deletes a [custom attribute](entity:CustomAttribute) associated with a - customer profile. - - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCustomerCustomAttribute - request: - name: DeleteCustomAttributesRequest - path-parameters: - customer_id: - type: string - docs: The ID of the target [customer profile](entity:Customer). - key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - response: - docs: Success - type: root.DeleteCustomerCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers/groups.yml b/.mock/definition/customers/groups.yml deleted file mode 100644 index e1462a3b..00000000 --- a/.mock/definition/customers/groups.yml +++ /dev/null @@ -1,324 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/customers/groups - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: Retrieves the list of customer groups of a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.groups - source: - openapi: ../default/openapi/openapi.json - display-name: ListCustomerGroups - request: - name: ListGroupsRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for your - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single page. This - limit is advisory. The response might contain more or fewer - results. - - If the limit is less than 1 or greater than 50, Square returns a - `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default - value is 50. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListCustomerGroupsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - groups: - - id: 2TAT3CMH4Q0A9M87XJZED0WMR3 - name: Loyal Customers - created_at: '2020-04-13T21:54:57.863Z' - updated_at: '2020-04-13T21:54:58Z' - - id: 4XMEHESXJBNE9S9JAKZD2FGB14 - name: Super Loyal Customers - created_at: '2020-04-13T21:55:18.795Z' - updated_at: '2020-04-13T21:55:19Z' - cursor: cursor - create: - path: /v2/customers/groups - method: POST - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: |- - Creates a new customer group for a business. - - The request must include the `name` value of the group. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCustomerGroup - request: - name: CreateCustomerGroupRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - The idempotency key for the request. For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - group: - type: root.CustomerGroup - docs: The customer group to create. - content-type: application/json - response: - docs: Success - type: root.CreateCustomerGroupResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - group: - name: Loyal Customers - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - group: - id: 2TAT3CMH4Q0A9M87XJZED0WMR3 - name: Loyal Customers - created_at: '2020-04-13T21:54:57.863Z' - updated_at: '2020-04-13T21:54:58Z' - get: - path: /v2/customers/groups/{group_id} - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Retrieves a specific customer group as identified by the `group_id` - value. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCustomerGroup - request: - name: GetGroupsRequest - path-parameters: - group_id: - type: string - docs: The ID of the customer group to retrieve. - response: - docs: Success - type: root.GetCustomerGroupResponse - status-code: 200 - examples: - - path-parameters: - group_id: group_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - group: - id: 2TAT3CMH4Q0A9M87XJZED0WMR3 - name: Loyal Customers - created_at: '2020-04-13T21:54:57.863Z' - updated_at: '2020-04-13T21:54:58Z' - update: - path: /v2/customers/groups/{group_id} - method: PUT - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: Updates a customer group as identified by the `group_id` value. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateCustomerGroup - request: - name: UpdateCustomerGroupRequest - path-parameters: - group_id: - type: string - docs: The ID of the customer group to update. - body: - properties: - group: - type: root.CustomerGroup - docs: >- - The `CustomerGroup` object including all the updates you want to - make. - content-type: application/json - response: - docs: Success - type: root.UpdateCustomerGroupResponse - status-code: 200 - examples: - - path-parameters: - group_id: group_id - headers: - Square-Version: '2025-10-16' - request: - group: - name: Loyal Customers - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - group: - id: 2TAT3CMH4Q0A9M87XJZED0WMR3 - name: Loyal Customers - created_at: '2020-04-13T21:54:57.863Z' - updated_at: '2020-04-13T21:54:58Z' - delete: - path: /v2/customers/groups/{group_id} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: Deletes a customer group as identified by the `group_id` value. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteCustomerGroup - request: - name: DeleteGroupsRequest - path-parameters: - group_id: - type: string - docs: The ID of the customer group to delete. - response: - docs: Success - type: root.DeleteCustomerGroupResponse - status-code: 200 - examples: - - path-parameters: - group_id: group_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - add: - path: /v2/customers/{customer_id}/groups/{group_id} - method: PUT - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: |- - Adds a group membership to a customer. - - The customer is identified by the `customer_id` value - and the customer group is identified by the `group_id` value. - source: - openapi: ../default/openapi/openapi.json - display-name: AddGroupToCustomer - request: - name: AddGroupsRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer to add to a group. - group_id: - type: string - docs: The ID of the customer group to add the customer to. - response: - docs: Success - type: root.AddGroupToCustomerResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - group_id: group_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - remove: - path: /v2/customers/{customer_id}/groups/{group_id} - method: DELETE - auth: - - oauth2: - - CUSTOMERS_WRITE - docs: |- - Removes a group membership from a customer. - - The customer is identified by the `customer_id` value - and the customer group is identified by the `group_id` value. - source: - openapi: ../default/openapi/openapi.json - display-name: RemoveGroupFromCustomer - request: - name: RemoveGroupsRequest - path-parameters: - customer_id: - type: string - docs: The ID of the customer to remove from the group. - group_id: - type: string - docs: The ID of the customer group to remove the customer from. - response: - docs: Success - type: root.RemoveGroupFromCustomerResponse - status-code: 200 - examples: - - path-parameters: - customer_id: customer_id - group_id: group_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/customers/segments.yml b/.mock/definition/customers/segments.yml deleted file mode 100644 index 6c1ebdce..00000000 --- a/.mock/definition/customers/segments.yml +++ /dev/null @@ -1,124 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/customers/segments - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: Retrieves the list of customer segments of a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.segments - source: - openapi: ../default/openapi/openapi.json - display-name: ListCustomerSegments - request: - name: ListSegmentsRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by previous calls to - `ListCustomerSegments`. - - This cursor is used to retrieve the next set of query results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single page. This - limit is advisory. The response might contain more or fewer - results. - - If the specified limit is less than 1 or greater than 50, Square - returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The - default value is 50. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListCustomerSegmentsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - segments: - - id: GMNXRZVEXNQDF.CHURN_RISK - name: Lapsed - created_at: '2020-01-09T19:33:24.469Z' - updated_at: '2020-04-13T21:47:04Z' - - id: GMNXRZVEXNQDF.LOYAL - name: Regulars - created_at: '2020-01-09T19:33:24.486Z' - updated_at: '2020-04-13T21:47:04Z' - - id: GMNXRZVEXNQDF.REACHABLE - name: Reachable - created_at: '2020-01-09T19:33:21.813Z' - updated_at: '2020-04-13T21:47:04Z' - - id: gv2:KF92J19VXN5FK30GX2E8HSGQ20 - name: Instant Profile - created_at: '2020-01-09T19:33:25Z' - updated_at: '2020-04-13T23:01:03Z' - cursor: cursor - get: - path: /v2/customers/segments/{segment_id} - method: GET - auth: - - oauth2: - - CUSTOMERS_READ - docs: >- - Retrieves a specific customer segment as identified by the `segment_id` - value. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveCustomerSegment - request: - name: GetSegmentsRequest - path-parameters: - segment_id: - type: string - docs: The Square-issued ID of the customer segment. - response: - docs: Success - type: root.GetCustomerSegmentResponse - status-code: 200 - examples: - - path-parameters: - segment_id: segment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - segment: - id: GMNXRZVEXNQDF.CHURN_RISK - name: Lapsed - created_at: '2020-01-09T19:33:24.469Z' - updated_at: '2020-04-13T23:01:13Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/devices.yml b/.mock/definition/devices.yml deleted file mode 100644 index b3b5d7cf..00000000 --- a/.mock/definition/devices.yml +++ /dev/null @@ -1,212 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/devices - method: GET - auth: - - oauth2: - - DEVICES_READ - docs: |- - List devices associated with the merchant. Currently, only Terminal API - devices are supported. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.devices - source: - openapi: ../default/openapi/openapi.json - display-name: ListDevices - request: - name: ListDevicesRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - sort_order: - type: optional> - docs: |- - The order in which results are listed. - - `ASC` - Oldest to newest. - - `DESC` - Newest to oldest (default). - limit: - type: optional> - docs: The number of results to return in a single page. - location_id: - type: optional> - docs: If present, only returns devices at the target location. - response: - docs: Success - type: root.ListDevicesResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - sort_order: DESC - limit: 1 - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - devices: - - id: device:995CS397A6475287 - attributes: - type: TERMINAL - manufacturer: Square - model: Square Terminal (1st Gen, v2) - name: Square Terminal 5287 - manufacturers_id: 995CS397A6475287 - updated_at: '2025-08-19T13:04:56.335762883Z' - version: 5.57.0067 - merchant_token: MLCHNZCBWFDZB - components: - - type: APPLICATION - application_details: - application_type: TERMINAL_API - version: '6.77' - session_location: LMN2K7S3RTOU3 - - type: CARD_READER - card_reader_details: - version: 4.1.51 - - type: BATTERY - battery_details: - visible_percent: 77 - external_power: AVAILABLE_CHARGING - - type: WIFI - wifi_details: - active: true - ssid: Staff Network - ip_address_v4: 10.0.0.7 - secure_connection: WPA/WPA2 PSK - signal_strength: - value: 2 - - type: ETHERNET - ethernet_details: - active: false - status: - category: AVAILABLE - - id: device:998WS21803L03559 - attributes: - type: HANDHELD - manufacturer: Square - model: Square Handheld (1st Gen, v1) - name: Square Terminal 3559 - manufacturers_id: 998WS21803L03559 - updated_at: '2025-08-19T12:39:56.335742073Z' - version: 7.21.0017 - merchant_token: MLCHXZCBWFGDW - components: - - type: APPLICATION - application_details: - application_type: TERMINAL_API - version: '6.77' - session_location: LMN2K7S3RTOU3 - - type: CARD_READER - card_reader_details: - version: 4.5.58 - - type: BATTERY - battery_details: - visible_percent: 22 - external_power: AVAILABLE_CHARGING - - type: WIFI - wifi_details: - active: true - ssid: Staff Network - ip_address_v4: 10.0.0.7 - secure_connection: WPA/WPA2 PSK - signal_strength: - value: 2 - - type: ETHERNET - ethernet_details: - active: false - status: - category: NEEDS_ATTENTION - cursor: GcXjlV2iaizH7R0fMT6wUDbw6l4otigjzx8XOOspUKHo9EPLRByM - get: - path: /v2/devices/{device_id} - method: GET - auth: - - oauth2: - - DEVICES_READ - docs: Retrieves Device with the associated `device_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetDevice - request: - name: GetDevicesRequest - path-parameters: - device_id: - type: string - docs: The unique ID for the desired `Device`. - response: - docs: Success - type: root.GetDeviceResponse - status-code: 200 - examples: - - path-parameters: - device_id: device_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - device: - id: device:995CS397A6475287 - attributes: - type: TERMINAL - manufacturer: Square - model: T2 - name: Square Terminal 995 - manufacturers_id: 995CS397A6475287 - updated_at: '2023-09-29T13:12:22.365049321Z' - version: 5.41.0085 - merchant_token: MLCHXZCBWFGDW - components: - - type: APPLICATION - application_details: - application_type: TERMINAL_API - version: '6.25' - session_location: LMN2K7S3RTOU3 - - type: CARD_READER - card_reader_details: - version: 3.53.70 - - type: BATTERY - battery_details: - visible_percent: 5 - external_power: AVAILABLE_CHARGING - - type: WIFI - wifi_details: - active: true - ssid: Staff Network - ip_address_v4: 10.0.0.7 - secure_connection: WPA/WPA2 PSK - signal_strength: - value: 2 - - type: ETHERNET - ethernet_details: - active: false - status: - category: AVAILABLE - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/devices/codes.yml b/.mock/definition/devices/codes.yml deleted file mode 100644 index bfd907e6..00000000 --- a/.mock/definition/devices/codes.yml +++ /dev/null @@ -1,211 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/devices/codes - method: GET - auth: - - oauth2: - - DEVICE_CREDENTIAL_MANAGEMENT - docs: Lists all DeviceCodes associated with the merchant. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.device_codes - source: - openapi: ../default/openapi/openapi.json - display-name: ListDeviceCodes - request: - name: ListCodesRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for your original - query. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - location_id: - type: optional> - docs: |- - If specified, only returns DeviceCodes of the specified location. - Returns DeviceCodes of all locations if empty. - product_type: - type: optional> - docs: >- - If specified, only returns DeviceCodes targeting the specified - product type. - - Returns DeviceCodes of all product types if empty. - status: - type: optional> - docs: |- - If specified, returns DeviceCodes with the specified statuses. - Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. - response: - docs: Success - type: root.ListDeviceCodesResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - location_id: location_id - product_type: TERMINAL_API - status: UNKNOWN - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - device_codes: - - id: B3Z6NAMYQSMTM - name: Counter 1 - code: EBCARJ - device_id: 907CS13101300122 - product_type: TERMINAL_API - location_id: B5E4484SHHNYH - status: PAIRED - pair_by: '2020-02-06T18:49:33.000Z' - created_at: '2020-02-06T18:44:33.000Z' - status_changed_at: '2020-02-06T18:47:28.000Z' - paired_at: paired_at - - id: YKGMJMYK8H4PQ - name: Unused device code - code: GVXNYN - device_id: device_id - product_type: TERMINAL_API - location_id: A6SYFRSV4WAFW - status: UNPAIRED - pair_by: '2020-02-07T20:00:04.000Z' - created_at: '2020-02-07T19:55:04.000Z' - status_changed_at: '2020-02-07T19:55:04.000Z' - paired_at: paired_at - cursor: cursor - create: - path: /v2/devices/codes - method: POST - auth: - - oauth2: - - DEVICE_CREDENTIAL_MANAGEMENT - docs: >- - Creates a DeviceCode that can be used to login to a Square Terminal - device to enter the connected - - terminal mode. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateDeviceCode - request: - name: CreateDeviceCodeRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this CreateDeviceCode request. - Keys can - - be any valid string but must be unique for every - CreateDeviceCode request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - device_code: - type: root.DeviceCode - docs: The device code to create. - content-type: application/json - response: - docs: Success - type: root.CreateDeviceCodeResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 01bb00a6-0c86-4770-94ed-f5fca973cd56 - device_code: - name: Counter 1 - product_type: TERMINAL_API - location_id: B5E4484SHHNYH - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - device_code: - id: B3Z6NAMYQSMTM - name: Counter 1 - code: EBCARJ - device_id: device_id - product_type: TERMINAL_API - location_id: B5E4484SHHNYH - status: UNPAIRED - pair_by: '2020-02-06T18:49:33.000Z' - created_at: '2020-02-06T18:44:33.000Z' - status_changed_at: '2020-02-06T18:44:33.000Z' - paired_at: paired_at - get: - path: /v2/devices/codes/{id} - method: GET - auth: - - oauth2: - - DEVICE_CREDENTIAL_MANAGEMENT - docs: Retrieves DeviceCode with the associated ID. - source: - openapi: ../default/openapi/openapi.json - display-name: GetDeviceCode - request: - name: GetCodesRequest - path-parameters: - id: - type: string - docs: The unique identifier for the device code. - response: - docs: Success - type: root.GetDeviceCodeResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - device_code: - id: B3Z6NAMYQSMTM - name: Counter 1 - code: EBCARJ - device_id: 907CS13101300122 - product_type: TERMINAL_API - location_id: B5E4484SHHNYH - status: PAIRED - pair_by: '2020-02-06T18:49:33.000Z' - created_at: '2020-02-06T18:44:33.000Z' - status_changed_at: '2020-02-06T18:47:28.000Z' - paired_at: paired_at - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/disputes.yml b/.mock/definition/disputes.yml deleted file mode 100644 index d78352de..00000000 --- a/.mock/definition/disputes.yml +++ /dev/null @@ -1,422 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/disputes - method: GET - auth: - - oauth2: - - DISPUTES_READ - docs: Returns a list of disputes associated with a particular account. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.disputes - source: - openapi: ../default/openapi/openapi.json - display-name: ListDisputes - request: - name: ListDisputesRequest - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - states: - type: optional> - docs: >- - The dispute states used to filter the result. If not specified, - the endpoint returns all disputes. - location_id: - type: optional> - docs: >- - The ID of the location for which to return a list of disputes. - - If not specified, the endpoint returns disputes associated with - all locations. - response: - docs: Success - type: root.ListDisputesResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - states: INQUIRY_EVIDENCE_REQUIRED - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - disputes: - - dispute_id: dispute_id - id: XDgyFu7yo1E2S5lQGGpYn - amount_money: - amount: 2500 - currency: USD - reason: NO_KNOWLEDGE - state: ACCEPTED - due_at: '2022-07-13T00:00:00.000Z' - disputed_payment: - payment_id: zhyh1ch64kRBrrlfVhwjCEjZWzNZY - evidence_ids: - - evidence_ids - card_brand: VISA - created_at: '2022-06-29T18:45:22.265Z' - updated_at: '2022-07-07T19:14:42.650Z' - brand_dispute_id: '100000809947' - reported_date: reported_date - reported_at: '2022-06-29T00:00:00.000Z' - version: 2 - location_id: L1HN3ZMQK64X9 - - dispute_id: dispute_id - id: jLGg7aXC7lvKPr9PISt0T - amount_money: - amount: 2209 - currency: USD - reason: NOT_AS_DESCRIBED - state: EVIDENCE_REQUIRED - due_at: '2022-05-13T00:00:00.000Z' - disputed_payment: - payment_id: zhyh1ch64kRBrrlfVhwjCEjZWzNZY - evidence_ids: - - evidence_ids - card_brand: VISA - created_at: '2022-04-29T18:45:22.265Z' - updated_at: '2022-04-29T18:45:22.265Z' - brand_dispute_id: r5Of6YaGT7AdeRaVoAGCJw - reported_date: reported_date - reported_at: '2022-04-29T00:00:00.000Z' - version: 1 - location_id: 18YC4JDH91E1H - cursor: G1aSTRm48CLjJsg6Sg3hQN1b1OMaoVuG - get: - path: /v2/disputes/{dispute_id} - method: GET - auth: - - oauth2: - - DISPUTES_READ - docs: Returns details about a specific dispute. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveDispute - request: - name: GetDisputesRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute you want more details about. - response: - docs: Success - type: root.GetDisputeResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - dispute: - dispute_id: dispute_id - id: XDgyFu7yo1E2S5lQGGpYn - amount_money: - amount: 2500 - currency: USD - reason: NO_KNOWLEDGE - state: ACCEPTED - due_at: '2022-07-13T00:00:00.000Z' - disputed_payment: - payment_id: zhyh1ch64kRBrrlfVhwjCEjZWzNZY - evidence_ids: - - evidence_ids - card_brand: VISA - created_at: '2022-06-29T18:45:22.265Z' - updated_at: '2022-07-07T19:14:42.650Z' - brand_dispute_id: '100000809947' - reported_date: reported_date - reported_at: '2022-06-29T00:00:00.000Z' - version: 2 - location_id: L1HN3ZMQK64X9 - accept: - path: /v2/disputes/{dispute_id}/accept - method: POST - auth: - - oauth2: - - DISPUTES_WRITE - docs: >- - Accepts the loss on a dispute. Square returns the disputed amount to the - cardholder and - - updates the dispute state to ACCEPTED. - - - Square debits the disputed amount from the seller’s Square account. If - the Square account - - does not have sufficient funds, Square debits the associated bank - account. - source: - openapi: ../default/openapi/openapi.json - display-name: AcceptDispute - request: - name: AcceptDisputesRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute you want to accept. - response: - docs: Success - type: root.AcceptDisputeResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - dispute: - dispute_id: dispute_id - id: XDgyFu7yo1E2S5lQGGpYn - amount_money: - amount: 2500 - currency: USD - reason: NO_KNOWLEDGE - state: ACCEPTED - due_at: '2022-07-13T00:00:00.000Z' - disputed_payment: - payment_id: zhyh1ch64kRBrrlfVhwjCEjZWzNZY - evidence_ids: - - evidence_ids - card_brand: VISA - created_at: '2022-06-29T18:45:22.265Z' - updated_at: '2022-07-07T19:14:42.650Z' - brand_dispute_id: '100000809947' - reported_date: reported_date - reported_at: '2022-06-29T00:00:00.000Z' - version: 2 - location_id: L1HN3ZMQK64X9 - CreateEvidenceFile: - path: /v2/disputes/{dispute_id}/evidence-files - method: POST - auth: - - oauth2: - - DISPUTES_WRITE - docs: >- - Uploads a file to use as evidence in a dispute challenge. The endpoint - accepts HTTP - - multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF - formats. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateDisputeEvidenceFile - request: - name: CreateEvidenceFileDisputesRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute for which you want to upload evidence. - body: - properties: - request: - type: optional - content-type: application/json; charset=utf-8 - image_file: - type: optional - content-type: image/jpeg - content-type: multipart/form-data - response: - docs: Success - type: root.CreateDisputeEvidenceFileResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - evidence: - evidence_id: evidence_id - id: TOomLInj6iWmP3N8qfCXrB - dispute_id: bVTprrwk0gygTLZ96VX1oB - evidence_file: - filename: customer-interaction.jpg - filetype: image/jpeg - evidence_text: evidence_text - uploaded_at: '2022-05-18T16:01:10.000Z' - evidence_type: GENERIC_EVIDENCE - CreateEvidenceText: - path: /v2/disputes/{dispute_id}/evidence-text - method: POST - auth: - - oauth2: - - DISPUTES_WRITE - docs: Uploads text to use as evidence for a dispute challenge. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateDisputeEvidenceText - request: - name: CreateDisputeEvidenceTextRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute for which you want to upload evidence. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique key identifying the request. For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - maxLength: 45 - evidence_type: - type: optional - docs: >- - The type of evidence you are uploading. - - See [DisputeEvidenceType](#type-disputeevidencetype) for - possible values - evidence_text: - type: string - docs: The evidence string. - validation: - minLength: 1 - maxLength: 500 - content-type: application/json - response: - docs: Success - type: root.CreateDisputeEvidenceTextResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: ed3ee3933d946f1514d505d173c82648 - evidence_type: TRACKING_NUMBER - evidence_text: 1Z8888888888888888 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - evidence: - evidence_id: evidence_id - id: TOomLInj6iWmP3N8qfCXrB - dispute_id: bVTprrwk0gygTLZ96VX1oB - evidence_file: - filename: filename - filetype: filetype - evidence_text: >- - The customer purchased the item twice, on April 11 and April - 28. - uploaded_at: '2022-05-18T16:01:10.000Z' - evidence_type: REBUTTAL_EXPLANATION - SubmitEvidence: - path: /v2/disputes/{dispute_id}/submit-evidence - method: POST - auth: - - oauth2: - - DISPUTES_WRITE - docs: >- - Submits evidence to the cardholder's bank. - - - The evidence submitted by this endpoint includes evidence uploaded - - using the - [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) - and - - [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText) - endpoints and - - evidence automatically provided by Square, when available. Evidence - cannot be removed from - - a dispute after submission. - source: - openapi: ../default/openapi/openapi.json - display-name: SubmitEvidence - request: - name: SubmitEvidenceDisputesRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute for which you want to submit evidence. - response: - docs: Success - type: root.SubmitEvidenceResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - dispute: - dispute_id: dispute_id - id: EAZoK70gX3fyvibecLwIGB - amount_money: - amount: 4350 - currency: USD - reason: CUSTOMER_REQUESTS_CREDIT - state: PROCESSING - due_at: '2022-06-01T00:00:00.000Z' - disputed_payment: - payment_id: 2yeBUWJzllJTpmnSqtMRAL19taB - evidence_ids: - - evidence_ids - card_brand: VISA - created_at: '2022-05-18T16:02:15.313Z' - updated_at: '2022-05-18T16:02:15.313Z' - brand_dispute_id: '100000399240' - reported_date: reported_date - reported_at: '2022-05-18T00:00:00.000Z' - version: 4 - location_id: LSY8XKGSMMX94 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/disputes/evidence.yml b/.mock/definition/disputes/evidence.yml deleted file mode 100644 index 331b22de..00000000 --- a/.mock/definition/disputes/evidence.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/disputes/{dispute_id}/evidence - method: GET - auth: - - oauth2: - - DISPUTES_READ - docs: Returns a list of evidence associated with a dispute. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.evidence - source: - openapi: ../default/openapi/openapi.json - display-name: ListDisputeEvidence - request: - name: ListEvidenceRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute. - query-parameters: - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListDisputeEvidenceResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - query-parameters: - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - evidence: - - evidence_id: evidence_id - id: CpfnkwGselCwS8QFvxN6 - dispute_id: bVTprrwk0gygTLZ96VX1oB - evidence_file: - filename: customer-interaction - filetype: JPG - evidence_text: evidence_text - uploaded_at: '2022-05-10T15:57:13.802Z' - evidence_type: CARDHOLDER_COMMUNICATION - - evidence_id: evidence_id - id: TOomLInj6iWmP3N8qfCXrB - dispute_id: bVTprrwk0gygTLZ96VX1oB - evidence_file: - filename: '' - filetype: '' - evidence_text: evidence_text - uploaded_at: '2022-05-18T16:01:10.000Z' - evidence_type: REBUTTAL_EXPLANATION - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cursor: cursor - get: - path: /v2/disputes/{dispute_id}/evidence/{evidence_id} - method: GET - auth: - - oauth2: - - DISPUTES_READ - docs: >- - Returns the metadata for the evidence specified in the request URL path. - - - You must maintain a copy of any evidence uploaded if you want to - reference it later. Evidence cannot be downloaded after you upload it. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveDisputeEvidence - request: - name: GetEvidenceRequest - path-parameters: - dispute_id: - type: string - docs: >- - The ID of the dispute from which you want to retrieve evidence - metadata. - evidence_id: - type: string - docs: The ID of the evidence to retrieve. - response: - docs: Success - type: root.GetDisputeEvidenceResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - evidence_id: evidence_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - evidence: - evidence_id: evidence_id - id: TOomLInj6iWmP3N8qfCXrB - dispute_id: bVTprrwk0gygTLZ96VX1oB - evidence_file: - filename: customer-interaction.jpg - filetype: image/jpeg - evidence_text: evidence_text - uploaded_at: '2022-05-18T16:01:10.000Z' - evidence_type: CARDHOLDER_COMMUNICATION - delete: - path: /v2/disputes/{dispute_id}/evidence/{evidence_id} - method: DELETE - auth: - - oauth2: - - DISPUTES_WRITE - docs: |- - Removes specified evidence from a dispute. - Square does not send the bank any evidence that is removed. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteDisputeEvidence - request: - name: DeleteEvidenceRequest - path-parameters: - dispute_id: - type: string - docs: The ID of the dispute from which you want to remove evidence. - evidence_id: - type: string - docs: The ID of the evidence you want to remove. - response: - docs: Success - type: root.DeleteDisputeEvidenceResponse - status-code: 200 - examples: - - path-parameters: - dispute_id: dispute_id - evidence_id: evidence_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/employees.yml b/.mock/definition/employees.yml deleted file mode 100644 index 4d0b376b..00000000 --- a/.mock/definition/employees.yml +++ /dev/null @@ -1,115 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/employees - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: '' - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.employees - source: - openapi: ../default/openapi/openapi.json - display-name: ListEmployees - request: - name: ListEmployeesRequest - query-parameters: - location_id: - type: optional> - docs: '' - status: - type: optional> - docs: Specifies the EmployeeStatus to filter the employee by. - limit: - type: optional> - docs: The number of employees to be returned on each page. - cursor: - type: optional> - docs: The token required to retrieve the specified page of results. - response: - docs: Success - type: root.ListEmployeesResponse - status-code: 200 - availability: deprecated - examples: - - query-parameters: - location_id: location_id - status: ACTIVE - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - employees: - - id: id - first_name: first_name - last_name: last_name - email: email - phone_number: phone_number - location_ids: - - location_ids - status: ACTIVE - is_owner: true - created_at: created_at - updated_at: updated_at - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/employees/{id} - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: '' - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveEmployee - request: - name: GetEmployeesRequest - path-parameters: - id: - type: string - docs: UUID for the employee that was requested. - response: - docs: Success - type: root.GetEmployeeResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - employee: - id: id - first_name: first_name - last_name: last_name - email: email - phone_number: phone_number - location_ids: - - location_ids - status: ACTIVE - is_owner: true - created_at: created_at - updated_at: updated_at - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/events.yml b/.mock/definition/events.yml deleted file mode 100644 index a4483094..00000000 --- a/.mock/definition/events.yml +++ /dev/null @@ -1,198 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - SearchEvents: - path: /v2/events - method: POST - auth: - - oauth2: [] - docs: Search for Square API events that occur within a 28-day timeframe. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchEvents - request: - name: SearchEventsRequest - body: - properties: - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. Provide this cursor to retrieve the next set of events - for your original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - validation: - maxLength: 256 - limit: - type: optional - docs: >- - The maximum number of events to return in a single page. The - response might contain fewer events. The default value is 100, - which is also the maximum allowed value. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - - - Default: 100 - validation: - min: 1 - max: 100 - query: - type: optional - docs: >- - The filtering and sorting criteria for the search request. To - retrieve additional pages using a cursor, you must use the - original query. - content-type: application/json - response: - docs: Success - type: root.SearchEventsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - events: - - merchant_id: 0HPGX5JYE6EE1 - location_id: VJDQQP3CG14EY - type: dispute.state.updated - event_id: 73ecd468-0aba-424f-b862-583d44efe7c8 - created_at: '2022-04-26T10:08:40.454726' - data: - type: dispute - id: ORSEVtZAJxb37RA1EiGw - object: - dispute: - amount_money: - amount: 8801 - currency: USD - brand_dispute_id: r9rKGSBBQbywBNnWWIiGFg - card_brand: VISA - created_at: '2020-02-19T21:24:53.258Z' - disputed_payment: - payment_id: fbmsaEOpoARDKxiSGH1fqPuqoqFZY - due_at: '2020-03-04T00:00:00.000Z' - id: ORSEVtZAJxb37RA1EiGw - location_id: VJDQQP3CG14EY - reason: AMOUNT_DIFFERS - reported_at: '2020-02-19T00:00:00.000Z' - state: WON - updated_at: '2020-02-19T21:34:41.851Z' - version: 6 - metadata: - - event_id: 73ecd468-0aba-424f-b862-583d44efe7c8 - api_version: '2022-12-13' - cursor: 6b571fc9773647f= - DisableEvents: - path: /v2/events/disable - method: PUT - auth: - - oauth2: [] - docs: >- - Disables events to prevent them from being searchable. - - All events are disabled by default. You must enable events to make them - searchable. - - Disabling events for a specific time period prevents them from being - searchable, even if you re-enable them later. - source: - openapi: ../default/openapi/openapi.json - display-name: DisableEvents - response: - docs: Success - type: root.DisableEventsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - EnableEvents: - path: /v2/events/enable - method: PUT - auth: - - oauth2: [] - docs: >- - Enables events to make them searchable. Only events that occur while in - the enabled state are searchable. - source: - openapi: ../default/openapi/openapi.json - display-name: EnableEvents - response: - docs: Success - type: root.EnableEventsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - ListEventTypes: - path: /v2/events/types - method: GET - auth: - - oauth2: [] - docs: >- - Lists all event types that you can subscribe to as webhooks or query - using the Events API. - source: - openapi: ../default/openapi/openapi.json - display-name: ListEventTypes - request: - name: ListEventTypesRequest - query-parameters: - api_version: - type: optional> - docs: >- - The API version for which to list event types. Setting this field - overrides the default version used by the application. - response: - docs: Success - type: root.ListEventTypesResponse - status-code: 200 - examples: - - query-parameters: - api_version: api_version - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - event_types: - - inventory.count.updated - metadata: - - event_type: inventory.count.updated - api_version_introduced: '2018-07-12' - release_status: PUBLIC - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/giftCards.yml b/.mock/definition/giftCards.yml deleted file mode 100644 index f10cba35..00000000 --- a/.mock/definition/giftCards.yml +++ /dev/null @@ -1,502 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/gift-cards - method: GET - auth: - - oauth2: - - GIFTCARDS_READ - docs: >- - Lists all gift cards. You can specify optional filters to retrieve - - a subset of the gift cards. Results are sorted by `created_at` in - ascending order. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.gift_cards - source: - openapi: ../default/openapi/openapi.json - display-name: ListGiftCards - request: - name: ListGiftCardsRequest - query-parameters: - type: - type: optional> - docs: >- - If a [type](entity:GiftCardType) is provided, the endpoint returns - gift cards of the specified type. - - Otherwise, the endpoint returns gift cards of all types. - state: - type: optional> - docs: >- - If a [state](entity:GiftCardStatus) is provided, the endpoint - returns the gift cards in the specified state. - - Otherwise, the endpoint returns the gift cards of all states. - limit: - type: optional> - docs: >- - If a limit is provided, the endpoint returns only the specified - number of results per page. - - The maximum value is 200. The default value is 30. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - If a cursor is not provided, the endpoint returns the first page - of the results. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - customer_id: - type: optional> - docs: >- - If a customer ID is provided, the endpoint returns only the gift - cards linked to the specified customer. - response: - docs: Success - type: root.ListGiftCardsResponse - status-code: 200 - examples: - - query-parameters: - type: type - state: state - limit: 1 - cursor: cursor - customer_id: customer_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_cards: - - id: gftc:00113070ba5745f0b2377c1b9570cb03 - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 3900 - currency: USD - gan: '7783320008524605' - created_at: '2021-06-09T22:26:54.000Z' - customer_ids: - - customer_ids - - id: gftc:00128a12725b41e58e0de1d20497a9dd - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 2000 - currency: USD - gan: '7783320002692465' - created_at: '2021-05-20T22:26:54.000Z' - customer_ids: - - customer_ids - cursor: JbFmyvUpaNKsfC1hoLSA4WlqkgkZXTWeKuStajR5BkP7OE0ETAbeWSi6U6u7sH - create: - path: /v2/gift-cards - method: POST - auth: - - oauth2: - - GIFTCARDS_WRITE - docs: >- - Creates a digital gift card or registers a physical (plastic) gift card. - The resulting gift card - - has a `PENDING` state. To activate a gift card so that it can be - redeemed for purchases, call - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - and create an `ACTIVATE` - - activity with the initial balance. Alternatively, you can use - [RefundPayment](api-endpoint:Refunds-RefundPayment) - - to refund a payment to the new gift card. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateGiftCard - request: - name: CreateGiftCardRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 128 - location_id: - type: string - docs: >- - The ID of the [location](entity:Location) where the gift card - should be registered for - - reporting purposes. Gift cards can be redeemed at any of the - seller's locations. - validation: - minLength: 1 - gift_card: - type: root.GiftCard - docs: >- - The gift card to create. The `type` field is required for this - request. The `gan_source` - - and `gan` fields are included as follows: - - - To direct Square to generate a 16-digit GAN, omit `gan_source` - and `gan`. - - - To provide a custom GAN, include `gan_source` and `gan`. - - - For `gan_source`, specify `OTHER`. - - - For `gan`, provide a custom GAN containing 8 to 20 - alphanumeric characters. The GAN must be - - unique for the seller and cannot start with the same bank - identification number (BIN) as major - - credit cards. Do not use GANs that are easy to guess (such as - 12345678) because they greatly - - increase the risk of fraud. It is the responsibility of the - developer to ensure the security - - of their custom GANs. For more information, see - - [Custom - GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans). - - - To register an unused, physical gift card that the seller - previously ordered from Square, - - include `gan` and provide the GAN that is printed on the gift - card. - content-type: application/json - response: - docs: Success - type: root.CreateGiftCardResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: NC9Tm69EjbjtConu - location_id: 81FN9BNFZTKS4 - gift_card: - type: DIGITAL - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:6cbacbb64cf54e2ca9f573d619038059 - type: DIGITAL - gan_source: SQUARE - state: PENDING - balance_money: - amount: 0 - currency: USD - gan: '7783320006753271' - created_at: '2021-05-20T22:26:54.000Z' - customer_ids: - - customer_ids - getFromGAN: - path: /v2/gift-cards/from-gan - method: POST - auth: - - oauth2: - - GIFTCARDS_READ - docs: Retrieves a gift card using the gift card account number (GAN). - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveGiftCardFromGAN - request: - name: GetGiftCardFromGANRequest - body: - properties: - gan: - type: string - docs: >- - The gift card account number (GAN) of the gift card to retrieve. - - The maximum length of a GAN is 255 digits to account for - third-party GANs that have been imported. - - Square-issued gift cards have 16-digit GANs. - validation: - minLength: 1 - maxLength: 255 - content-type: application/json - response: - docs: Success - type: root.GetGiftCardFromGANResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - gan: '7783320001001635' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:6944163553804e439d89adb47caf806a - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 5000 - currency: USD - gan: '7783320001001635' - created_at: '2021-05-20T22:26:54.000Z' - customer_ids: - - customer_ids - getFromNonce: - path: /v2/gift-cards/from-nonce - method: POST - auth: - - oauth2: - - GIFTCARDS_READ - docs: >- - Retrieves a gift card using a secure payment token that represents the - gift card. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveGiftCardFromNonce - request: - name: GetGiftCardFromNonceRequest - body: - properties: - nonce: - type: string - docs: >- - The payment token of the gift card to retrieve. Payment tokens - are generated by the - - Web Payments SDK or In-App Payments SDK. - validation: - minLength: 1 - content-type: application/json - response: - docs: Success - type: root.GetGiftCardFromNonceResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - nonce: cnon:7783322135245171 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:6944163553804e439d89adb47caf806a - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 5000 - currency: USD - gan: '7783320001001635' - created_at: '2021-05-20T22:26:54.000Z' - customer_ids: - - customer_ids - LinkCustomer: - path: /v2/gift-cards/{gift_card_id}/link-customer - method: POST - auth: - - oauth2: - - GIFTCARDS_WRITE - docs: >- - Links a customer to a gift card, which is also referred to as adding a - card on file. - source: - openapi: ../default/openapi/openapi.json - display-name: LinkCustomerToGiftCard - request: - name: LinkCustomerToGiftCardRequest - path-parameters: - gift_card_id: - type: string - docs: The ID of the gift card to be linked. - body: - properties: - customer_id: - type: string - docs: The ID of the customer to link to the gift card. - validation: - minLength: 1 - maxLength: 191 - content-type: application/json - response: - docs: Success - type: root.LinkCustomerToGiftCardResponse - status-code: 200 - examples: - - path-parameters: - gift_card_id: gift_card_id - headers: - Square-Version: '2025-10-16' - request: - customer_id: GKY0FZ3V717AH8Q2D821PNT2ZW - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:71ea002277a34f8a945e284b04822edb - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 2500 - currency: USD - gan: '7783320005440920' - created_at: '2021-03-25T05:13:01Z' - customer_ids: - - GKY0FZ3V717AH8Q2D821PNT2ZW - UnlinkCustomer: - path: /v2/gift-cards/{gift_card_id}/unlink-customer - method: POST - auth: - - oauth2: - - GIFTCARDS_WRITE - docs: >- - Unlinks a customer from a gift card, which is also referred to as - removing a card on file. - source: - openapi: ../default/openapi/openapi.json - display-name: UnlinkCustomerFromGiftCard - request: - name: UnlinkCustomerFromGiftCardRequest - path-parameters: - gift_card_id: - type: string - docs: The ID of the gift card to be unlinked. - body: - properties: - customer_id: - type: string - docs: The ID of the customer to unlink from the gift card. - validation: - minLength: 1 - maxLength: 191 - content-type: application/json - response: - docs: Success - type: root.UnlinkCustomerFromGiftCardResponse - status-code: 200 - examples: - - path-parameters: - gift_card_id: gift_card_id - headers: - Square-Version: '2025-10-16' - request: - customer_id: GKY0FZ3V717AH8Q2D821PNT2ZW - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:71ea002277a34f8a945e284b04822edb - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 2500 - currency: USD - gan: '7783320005440920' - created_at: '2021-03-25T05:13:01Z' - customer_ids: - - customer_ids - get: - path: /v2/gift-cards/{id} - method: GET - auth: - - oauth2: - - GIFTCARDS_READ - docs: Retrieves a gift card using the gift card ID. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveGiftCard - request: - name: GetGiftCardsRequest - path-parameters: - id: - type: string - docs: The ID of the gift card to retrieve. - response: - docs: Success - type: root.GetGiftCardResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card: - id: gftc:00113070ba5745f0b2377c1b9570cb03 - type: DIGITAL - gan_source: SQUARE - state: ACTIVE - balance_money: - amount: 1000 - currency: USD - gan: '7783320001001635' - created_at: '2021-05-20T22:26:54.000Z' - customer_ids: - - customer_ids - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/giftCards/activities.yml b/.mock/definition/giftCards/activities.yml deleted file mode 100644 index 66e675e8..00000000 --- a/.mock/definition/giftCards/activities.yml +++ /dev/null @@ -1,337 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/gift-cards/activities - method: GET - auth: - - oauth2: - - GIFTCARDS_READ - docs: >- - Lists gift card activities. By default, you get gift card activities for - all - - gift cards in the seller's account. You can optionally specify query - parameters to - - filter the list. For example, you can get a list of gift card activities - for a gift card, - - for all gift cards in a specific region, or for activities within a time - window. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.gift_card_activities - source: - openapi: ../default/openapi/openapi.json - display-name: ListGiftCardActivities - request: - name: ListActivitiesRequest - query-parameters: - gift_card_id: - type: optional> - docs: >- - If a gift card ID is provided, the endpoint returns activities - related - - to the specified gift card. Otherwise, the endpoint returns all - gift card activities for - - the seller. - type: - type: optional> - docs: >- - If a [type](entity:GiftCardActivityType) is provided, the endpoint - returns gift card activities of the specified type. - - Otherwise, the endpoint returns all types of gift card activities. - location_id: - type: optional> - docs: >- - If a location ID is provided, the endpoint returns gift card - activities for the specified location. - - Otherwise, the endpoint returns gift card activities for all - locations. - begin_time: - type: optional> - docs: >- - The timestamp for the beginning of the reporting period, in RFC - 3339 format. - - This start time is inclusive. The default value is the current - time minus one year. - end_time: - type: optional> - docs: >- - The timestamp for the end of the reporting period, in RFC 3339 - format. - - This end time is inclusive. The default value is the current time. - limit: - type: optional> - docs: >- - If a limit is provided, the endpoint returns the specified number - - of results (or fewer) per page. The maximum value is 100. The - default value is 50. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - If a cursor is not provided, the endpoint returns the first page - of the results. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - sort_order: - type: optional> - docs: >- - The order in which the endpoint returns the activities, based on - `created_at`. - - - `ASC` - Oldest to newest. - - - `DESC` - Newest to oldest (default). - response: - docs: Success - type: root.ListGiftCardActivitiesResponse - status-code: 200 - examples: - - query-parameters: - gift_card_id: gift_card_id - type: type - location_id: location_id - begin_time: begin_time - end_time: end_time - limit: 1 - cursor: cursor - sort_order: sort_order - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card_activities: - - id: gcact_897698f894b44b3db46c6147e26a0e19 - type: REDEEM - location_id: 81FN9BNFZTKS4 - created_at: '2021-06-02T22:26:38.000Z' - gift_card_id: gftc:6d55a72470d940c6ba09c0ab8ad08d20 - gift_card_gan: '7783320002929081' - gift_card_balance_money: - amount: 700 - currency: USD - redeem_activity_details: - amount_money: - amount: 300 - currency: USD - clear_balance_activity_details: - reason: SUSPICIOUS_ACTIVITY - deactivate_activity_details: - reason: SUSPICIOUS_ACTIVITY - adjust_increment_activity_details: - amount_money: {} - reason: COMPLIMENTARY - adjust_decrement_activity_details: - amount_money: {} - reason: SUSPICIOUS_ACTIVITY - unlinked_activity_refund_activity_details: - amount_money: {} - import_activity_details: - amount_money: {} - block_activity_details: - reason: CHARGEBACK_BLOCK - unblock_activity_details: - reason: CHARGEBACK_UNBLOCK - import_reversal_activity_details: - amount_money: {} - transfer_balance_to_activity_details: - transfer_from_gift_card_id: transfer_from_gift_card_id - amount_money: {} - transfer_balance_from_activity_details: - transfer_to_gift_card_id: transfer_to_gift_card_id - amount_money: {} - - id: gcact_b968ebfc7d46437b945be7b9e09123b4 - type: ACTIVATE - location_id: 81FN9BNFZTKS4 - created_at: '2021-05-20T22:26:54.000Z' - gift_card_id: gftc:6d55a72470d940c6ba09c0ab8ad08d20 - gift_card_gan: '7783320002929081' - gift_card_balance_money: - amount: 1000 - currency: USD - activate_activity_details: - amount_money: - amount: 1000 - currency: USD - order_id: jJNGHm4gLI6XkFbwtiSLqK72KkAZY - line_item_uid: eIWl7X0nMuO9Ewbh0ChIx - redeem_activity_details: - amount_money: {} - clear_balance_activity_details: - reason: SUSPICIOUS_ACTIVITY - deactivate_activity_details: - reason: SUSPICIOUS_ACTIVITY - adjust_increment_activity_details: - amount_money: {} - reason: COMPLIMENTARY - adjust_decrement_activity_details: - amount_money: {} - reason: SUSPICIOUS_ACTIVITY - unlinked_activity_refund_activity_details: - amount_money: {} - import_activity_details: - amount_money: {} - block_activity_details: - reason: CHARGEBACK_BLOCK - unblock_activity_details: - reason: CHARGEBACK_UNBLOCK - import_reversal_activity_details: - amount_money: {} - transfer_balance_to_activity_details: - transfer_from_gift_card_id: transfer_from_gift_card_id - amount_money: {} - transfer_balance_from_activity_details: - transfer_to_gift_card_id: transfer_to_gift_card_id - amount_money: {} - cursor: cursor - create: - path: /v2/gift-cards/activities - method: POST - auth: - - oauth2: - - GIFTCARDS_WRITE - docs: >- - Creates a gift card activity to manage the balance or state of a [gift - card](entity:GiftCard). - - For example, create an `ACTIVATE` activity to activate a gift card with - an initial balance before first use. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateGiftCardActivity - request: - name: CreateGiftCardActivityRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies the `CreateGiftCardActivity` - request. - validation: - minLength: 1 - maxLength: 128 - gift_card_activity: - type: root.GiftCardActivity - docs: >- - The activity to create for the gift card. This activity must - specify `gift_card_id` or `gift_card_gan` for the target - - gift card, the `location_id` where the activity occurred, and - the activity `type` along with the corresponding activity - details. - content-type: application/json - response: - docs: Success - type: root.CreateGiftCardActivityResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: U16kfr-kA70er-q4Rsym-7U7NnY - gift_card_activity: - type: ACTIVATE - location_id: 81FN9BNFZTKS4 - gift_card_id: gftc:6d55a72470d940c6ba09c0ab8ad08d20 - activate_activity_details: - order_id: jJNGHm4gLI6XkFbwtiSLqK72KkAZY - line_item_uid: eIWl7X0nMuO9Ewbh0ChIx - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - gift_card_activity: - id: gcact_c8f8cbf1f24b448d8ecf39ed03f97864 - type: ACTIVATE - location_id: 81FN9BNFZTKS4 - created_at: '2021-05-20T22:26:54.000Z' - gift_card_id: gftc:6d55a72470d940c6ba09c0ab8ad08d20 - gift_card_gan: '7783320002929081' - gift_card_balance_money: - amount: 1000 - currency: USD - load_activity_details: - order_id: order_id - line_item_uid: line_item_uid - reference_id: reference_id - buyer_payment_instrument_ids: - - buyer_payment_instrument_ids - activate_activity_details: - amount_money: - amount: 1000 - currency: USD - order_id: jJNGHm4gLI6XkFbwtiSLqK72KkAZY - line_item_uid: eIWl7X0nMuO9Ewbh0ChIx - reference_id: reference_id - buyer_payment_instrument_ids: - - buyer_payment_instrument_ids - redeem_activity_details: - amount_money: {} - payment_id: payment_id - reference_id: reference_id - status: PENDING - clear_balance_activity_details: - reason: SUSPICIOUS_ACTIVITY - deactivate_activity_details: - reason: SUSPICIOUS_ACTIVITY - adjust_increment_activity_details: - amount_money: {} - reason: COMPLIMENTARY - adjust_decrement_activity_details: - amount_money: {} - reason: SUSPICIOUS_ACTIVITY - refund_activity_details: - redeem_activity_id: redeem_activity_id - reference_id: reference_id - payment_id: payment_id - unlinked_activity_refund_activity_details: - amount_money: {} - reference_id: reference_id - payment_id: payment_id - import_activity_details: - amount_money: {} - block_activity_details: - reason: CHARGEBACK_BLOCK - unblock_activity_details: - reason: CHARGEBACK_UNBLOCK - import_reversal_activity_details: - amount_money: {} - transfer_balance_to_activity_details: - transfer_from_gift_card_id: transfer_from_gift_card_id - amount_money: {} - transfer_balance_from_activity_details: - transfer_to_gift_card_id: transfer_to_gift_card_id - amount_money: {} - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/inventory.yml b/.mock/definition/inventory.yml deleted file mode 100644 index 9c325676..00000000 --- a/.mock/definition/inventory.yml +++ /dev/null @@ -1,847 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - DeprecatedGetAdjustment: - path: /v2/inventory/adjustment/{adjustment_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Deprecated version of - [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) - after the endpoint URL - - is updated to conform to the standard convention. - source: - openapi: ../default/openapi/openapi.json - display-name: DeprecatedRetrieveInventoryAdjustment - request: - name: DeprecatedGetAdjustmentInventoryRequest - path-parameters: - adjustment_id: - type: string - docs: >- - ID of the [InventoryAdjustment](entity:InventoryAdjustment) to - retrieve. - response: - docs: Success - type: root.GetInventoryAdjustmentResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - adjustment_id: adjustment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - adjustment: - id: UDMOEO78BG6GYWA2XDRYX3KB - reference_id: 4a366069-4096-47a2-99a5-0084ac879509 - from_state: IN_STOCK - to_state: SOLD - location_id: C6W5YS5QM06F5 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - quantity: '7' - total_price_money: - amount: 4550 - currency: USD - occurred_at: '2016-11-16T25:44:22.837Z' - created_at: '2016-11-17T13:02:15.142Z' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - employee_id: employee_id - team_member_id: LRK57NSQ5X7PUD05 - transaction_id: transaction_id - refund_id: refund_id - purchase_order_id: purchase_order_id - goods_receipt_id: goods_receipt_id - adjustment_group: - id: id - root_adjustment_id: root_adjustment_id - from_state: CUSTOM - to_state: CUSTOM - getAdjustment: - path: /v2/inventory/adjustments/{adjustment_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: |- - Returns the [InventoryAdjustment](entity:InventoryAdjustment) object - with the provided `adjustment_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveInventoryAdjustment - request: - name: GetAdjustmentInventoryRequest - path-parameters: - adjustment_id: - type: string - docs: >- - ID of the [InventoryAdjustment](entity:InventoryAdjustment) to - retrieve. - response: - docs: Success - type: root.GetInventoryAdjustmentResponse - status-code: 200 - examples: - - path-parameters: - adjustment_id: adjustment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - adjustment: - id: UDMOEO78BG6GYWA2XDRYX3KB - reference_id: 4a366069-4096-47a2-99a5-0084ac879509 - from_state: IN_STOCK - to_state: SOLD - location_id: C6W5YS5QM06F5 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - quantity: '7' - total_price_money: - amount: 4550 - currency: USD - occurred_at: '2016-11-16T25:44:22.837Z' - created_at: '2016-11-17T13:02:15.142Z' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - employee_id: employee_id - team_member_id: LRK57NSQ5X7PUD05 - transaction_id: transaction_id - refund_id: refund_id - purchase_order_id: purchase_order_id - goods_receipt_id: goods_receipt_id - adjustment_group: - id: id - root_adjustment_id: root_adjustment_id - from_state: CUSTOM - to_state: CUSTOM - DeprecatedBatchChange: - path: /v2/inventory/batch-change - method: POST - auth: - - oauth2: - - INVENTORY_WRITE - docs: >- - Deprecated version of - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) - after the endpoint URL - - is updated to conform to the standard convention. - source: - openapi: ../default/openapi/openapi.json - display-name: DeprecatedBatchChangeInventory - request: - body: root.BatchChangeInventoryRequest - content-type: application/json - response: - docs: Success - type: root.BatchChangeInventoryResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe - changes: - - type: PHYSICAL_COUNT - physical_count: - reference_id: 1536bfbf-efed-48bf-b17d-a197141b2a92 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '53' - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:25:24.878Z' - ignore_unchanged_counts: true - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - counts: - - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '53' - calculated_at: '2016-11-16T22:28:01.223Z' - is_estimated: true - changes: - - type: PHYSICAL_COUNT - measurement_unit_id: measurement_unit_id - DeprecatedBatchGetChanges: - path: /v2/inventory/batch-retrieve-changes - method: POST - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Deprecated version of - [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) - after the endpoint URL - - is updated to conform to the standard convention. - source: - openapi: ../default/openapi/openapi.json - display-name: DeprecatedBatchRetrieveInventoryChanges - request: - body: root.BatchRetrieveInventoryChangesRequest - content-type: application/json - response: - docs: Success - type: root.BatchGetInventoryChangesResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - catalog_object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - location_ids: - - C6W5YS5QM06F5 - types: - - PHYSICAL_COUNT - states: - - IN_STOCK - updated_after: '2016-11-01T00:00:00.000Z' - updated_before: '2016-12-01T00:00:00.000Z' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - changes: - - type: PHYSICAL_COUNT - physical_count: - id: 46YDTW253DWGGK9HMAE6XCAO - reference_id: 22c07cf4-5626-4224-89f9-691112019399 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '86' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:24:49.028Z' - created_at: '2016-11-16T22:25:24.878Z' - measurement_unit_id: measurement_unit_id - cursor: cursor - DeprecatedBatchGetCounts: - path: /v2/inventory/batch-retrieve-counts - method: POST - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Deprecated version of - [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts) - after the endpoint URL - - is updated to conform to the standard convention. - source: - openapi: ../default/openapi/openapi.json - display-name: DeprecatedBatchRetrieveInventoryCounts - request: - body: root.BatchGetInventoryCountsRequest - content-type: application/json - response: - docs: Success - type: root.BatchGetInventoryCountsResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - catalog_object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - location_ids: - - 59TNP9SA8VGDA - updated_after: '2016-11-16T00:00:00.000Z' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - counts: - - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: 59TNP9SA8VGDA - quantity: '79' - calculated_at: '2016-11-16T22:28:01.223Z' - is_estimated: true - cursor: cursor - BatchCreateChanges: - path: /v2/inventory/changes/batch-create - method: POST - auth: - - oauth2: - - INVENTORY_WRITE - docs: |- - Applies adjustments and counts to the provided item quantities. - - On success: returns the current calculated counts for all objects - referenced in the request. - On failure: returns a list of related errors. - source: - openapi: ../default/openapi/openapi.json - display-name: BatchChangeInventory - request: - body: root.BatchChangeInventoryRequest - content-type: application/json - response: - docs: Success - type: root.BatchChangeInventoryResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe - changes: - - type: PHYSICAL_COUNT - physical_count: - reference_id: 1536bfbf-efed-48bf-b17d-a197141b2a92 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '53' - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:25:24.878Z' - ignore_unchanged_counts: true - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - counts: - - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '53' - calculated_at: '2016-11-16T22:28:01.223Z' - is_estimated: true - changes: - - type: PHYSICAL_COUNT - measurement_unit_id: measurement_unit_id - BatchGetChanges: - path: /v2/inventory/changes/batch-retrieve - method: POST - auth: - - oauth2: - - INVENTORY_READ - docs: |- - Returns historical physical counts and adjustments based on the - provided filter criteria. - - Results are paginated and sorted in ascending order according their - `occurred_at` timestamp (oldest first). - - BatchRetrieveInventoryChanges is a catch-all query endpoint for queries - that cannot be handled by other, simpler endpoints. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.changes - source: - openapi: ../default/openapi/openapi.json - display-name: BatchRetrieveInventoryChanges - request: - body: root.BatchRetrieveInventoryChangesRequest - content-type: application/json - response: - docs: Success - type: root.BatchGetInventoryChangesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - catalog_object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - location_ids: - - C6W5YS5QM06F5 - types: - - PHYSICAL_COUNT - states: - - IN_STOCK - updated_after: '2016-11-01T00:00:00.000Z' - updated_before: '2016-12-01T00:00:00.000Z' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - changes: - - type: PHYSICAL_COUNT - physical_count: - id: 46YDTW253DWGGK9HMAE6XCAO - reference_id: 22c07cf4-5626-4224-89f9-691112019399 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '86' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:24:49.028Z' - created_at: '2016-11-16T22:25:24.878Z' - measurement_unit_id: measurement_unit_id - cursor: cursor - BatchGetCounts: - path: /v2/inventory/counts/batch-retrieve - method: POST - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Returns current counts for the provided - - [CatalogObject](entity:CatalogObject)s at the requested - - [Location](entity:Location)s. - - - Results are paginated and sorted in descending order according to their - - `calculated_at` timestamp (newest first). - - - When `updated_after` is specified, only counts that have changed since - that - - time (based on the server timestamp for the most recent change) are - - returned. This allows clients to perform a "sync" operation, for example - - in response to receiving a Webhook notification. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.counts - source: - openapi: ../default/openapi/openapi.json - display-name: BatchRetrieveInventoryCounts - request: - body: root.BatchGetInventoryCountsRequest - content-type: application/json - response: - docs: Success - type: root.BatchGetInventoryCountsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - catalog_object_ids: - - W62UWFY35CWMYGVWK6TWJDNI - location_ids: - - 59TNP9SA8VGDA - updated_after: '2016-11-16T00:00:00.000Z' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - counts: - - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: 59TNP9SA8VGDA - quantity: '79' - calculated_at: '2016-11-16T22:28:01.223Z' - is_estimated: true - cursor: cursor - deprecatedGetPhysicalCount: - path: /v2/inventory/physical-count/{physical_count_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Deprecated version of - [RetrieveInventoryPhysicalCount](api-endpoint:Inventory-RetrieveInventoryPhysicalCount) - after the endpoint URL - - is updated to conform to the standard convention. - source: - openapi: ../default/openapi/openapi.json - display-name: DeprecatedRetrieveInventoryPhysicalCount - request: - name: DeprecatedGetPhysicalCountInventoryRequest - path-parameters: - physical_count_id: - type: string - docs: >- - ID of the - - [InventoryPhysicalCount](entity:InventoryPhysicalCount) to - retrieve. - response: - docs: Success - type: root.GetInventoryPhysicalCountResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - physical_count_id: physical_count_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - count: - id: ANZADNPLKADOJKJIUANKLMLQ - reference_id: f857ec37-f9a0-4458-8e23-5b5e0bea4e53 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '15' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - employee_id: employee_id - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:25:24.878Z' - created_at: '2016-11-16T22:25:24.878Z' - getPhysicalCount: - path: /v2/inventory/physical-counts/{physical_count_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: |- - Returns the [InventoryPhysicalCount](entity:InventoryPhysicalCount) - object with the provided `physical_count_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveInventoryPhysicalCount - request: - name: GetPhysicalCountInventoryRequest - path-parameters: - physical_count_id: - type: string - docs: >- - ID of the - - [InventoryPhysicalCount](entity:InventoryPhysicalCount) to - retrieve. - response: - docs: Success - type: root.GetInventoryPhysicalCountResponse - status-code: 200 - examples: - - path-parameters: - physical_count_id: physical_count_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - count: - id: ANZADNPLKADOJKJIUANKLMLQ - reference_id: f857ec37-f9a0-4458-8e23-5b5e0bea4e53 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '15' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - employee_id: employee_id - team_member_id: LRK57NSQ5X7PUD05 - occurred_at: '2016-11-16T22:25:24.878Z' - created_at: '2016-11-16T22:25:24.878Z' - getTransfer: - path: /v2/inventory/transfers/{transfer_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: |- - Returns the [InventoryTransfer](entity:InventoryTransfer) object - with the provided `transfer_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveInventoryTransfer - request: - name: GetTransferInventoryRequest - path-parameters: - transfer_id: - type: string - docs: >- - ID of the [InventoryTransfer](entity:InventoryTransfer) to - retrieve. - response: - docs: Success - type: root.GetInventoryTransferResponse - status-code: 200 - examples: - - path-parameters: - transfer_id: transfer_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - transfer: - id: UDMOEO78BG6GYWA2XDRYX3KB - reference_id: 4a366069-4096-47a2-99a5-0084ac879509 - state: IN_STOCK - from_location_id: C6W5YS5QM06F5 - to_location_id: 59TNP9SA8VGDA - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - quantity: '7' - occurred_at: '2016-11-16T25:44:22.837Z' - created_at: '2016-11-17T13:02:15.142Z' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - employee_id: employee_id - team_member_id: LRK57NSQ5X7PUD05 - get: - path: /v2/inventory/{catalog_object_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: |- - Retrieves the current calculated stock count for a given - [CatalogObject](entity:CatalogObject) at a given set of - [Location](entity:Location)s. Responses are paginated and unsorted. - For more sophisticated queries, use a batch endpoint. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.counts - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveInventoryCount - request: - name: GetInventoryRequest - path-parameters: - catalog_object_id: - type: string - docs: ID of the [CatalogObject](entity:CatalogObject) to retrieve. - query-parameters: - location_ids: - type: optional> - docs: >- - The [Location](entity:Location) IDs to look up as a - comma-separated - - list. An empty list queries all locations. - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for the original - query. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - response: - docs: Success - type: root.GetInventoryCountResponse - status-code: 200 - examples: - - path-parameters: - catalog_object_id: catalog_object_id - query-parameters: - location_ids: location_ids - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - counts: - - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - state: IN_STOCK - location_id: C6W5YS5QM06F5 - quantity: '22' - calculated_at: '2016-11-16T22:28:01.223Z' - is_estimated: true - cursor: cursor - changes: - path: /v2/inventory/{catalog_object_id}/changes - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Returns a set of physical counts and inventory adjustments for the - - provided [CatalogObject](entity:CatalogObject) at the requested - - [Location](entity:Location)s. - - - You can achieve the same result by calling - [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) - - and having the `catalog_object_ids` list contain a single element of the - `CatalogObject` ID. - - - Results are paginated and sorted in descending order according to their - - `occurred_at` timestamp (newest first). - - - There are no limits on how far back the caller can page. This endpoint - can be - - used to display recent changes for a specific item. For more - - sophisticated queries, use a batch endpoint. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.changes - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveInventoryChanges - request: - name: ChangesInventoryRequest - path-parameters: - catalog_object_id: - type: string - docs: ID of the [CatalogObject](entity:CatalogObject) to retrieve. - query-parameters: - location_ids: - type: optional> - docs: >- - The [Location](entity:Location) IDs to look up as a - comma-separated - - list. An empty list queries all locations. - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for the original - query. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - response: - docs: Success - type: root.GetInventoryChangesResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - catalog_object_id: catalog_object_id - query-parameters: - location_ids: location_ids - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - changes: - - type: ADJUSTMENT - adjustment: - id: OJKJIUANKLMLQANZADNPLKAD - reference_id: d8207693-168f-4b44-a2fd-a7ff533ddd26 - from_state: IN_STOCK - to_state: SOLD - location_id: C6W5YS5QM06F5 - catalog_object_id: W62UWFY35CWMYGVWK6TWJDNI - catalog_object_type: ITEM_VARIATION - quantity: '3' - total_price_money: - amount: 5000 - currency: USD - occurred_at: '2016-11-16T22:25:24.878Z' - created_at: '2016-11-16T22:25:24.878Z' - source: - product: SQUARE_POS - application_id: 416ff29c-86c4-4feb-b58c-9705f21f3ea0 - name: Square Point of Sale 4.37 - team_member_id: AV7YRCGI2H1J5NQ8E1XIZCNA - transaction_id: 5APV6JYK1SNCZD11AND2RX1Z - measurement_unit_id: measurement_unit_id - cursor: cursor - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/invoices.yml b/.mock/definition/invoices.yml deleted file mode 100644 index 644b4564..00000000 --- a/.mock/definition/invoices.yml +++ /dev/null @@ -1,1236 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/invoices - method: GET - auth: - - oauth2: - - INVOICES_READ - docs: >- - Returns a list of invoices for a given location. The response - - is paginated. If truncated, the response includes a `cursor` that - you - - use in a subsequent request to retrieve the next set of invoices. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.invoices - source: - openapi: ../default/openapi/openapi.json - display-name: ListInvoices - request: - name: ListInvoicesRequest - query-parameters: - location_id: - type: string - docs: The ID of the location for which to list invoices. - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for your - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - The maximum number of invoices to return (200 is the maximum - `limit`). - - If not provided, the server uses a default limit of 100 invoices. - response: - docs: Success - type: root.ListInvoicesResponse - status-code: 200 - examples: - - query-parameters: - location_id: location_id - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - invoices: - - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 1 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - status: DRAFT - timezone: America/Los_Angeles - created_at: '2030-01-13T17:45:13Z' - updated_at: '2030-01-13T21:24:10Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - id: inva:0-3bB9ZuDHiziThQhuC4fwWt - filename: file.jpg - description: Service contract - filesize: 102705 - hash: 273ee02cb6f5f8a3a8ca23604930dd53 - mime_type: image/jpeg - uploaded_at: '2030-01-13T21:24:10Z' - creator_team_member_id: creator_team_member_id - - id: inv:0-ChC366qAfskpGrBI_1bozs9mEA3 - version: 3 - location_id: ES0RJRZYEC39A - order_id: a65jnS8NXbfprvGJzY9F4fQTuaB - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - payment_requests: - - uid: 66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176 - request_type: DEPOSIT - due_date: '2021-01-23' - percentage_requested: '25' - tipping_enabled: false - automatic_payment_source: CARD_ON_FILE - card_id: ccof:IkWfpLj4tNHMyFii3GB - computed_amount_money: - amount: 1000 - currency: USD - total_completed_amount_money: - amount: 1000 - currency: USD - - uid: 120c5e18-4f80-4f6b-b159-774cb9bf8f99 - request_type: BALANCE - due_date: '2021-06-15' - tipping_enabled: false - automatic_payment_source: CARD_ON_FILE - card_id: ccof:IkWfpLj4tNHMyFii3GB - computed_amount_money: - amount: 3000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-455 - title: title - description: description - scheduled_at: scheduled_at - public_url: >- - https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9 - next_payment_amount_money: - amount: 3000 - currency: USD - status: PARTIALLY_PAID - timezone: America/Los_Angeles - created_at: '2021-01-23T15:29:12Z' - updated_at: '2021-01-23T15:29:56Z' - accepted_payment_methods: - card: true - square_gift_card: true - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - {} - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - cursor: ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/invoices - method: POST - auth: - - oauth2: - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Creates a draft [invoice](entity:Invoice) - - for an order created using the Orders API. - - - A draft invoice remains in your account and no action is taken. - - You must publish the invoice before Square can process it (send it to - the customer's email address or charge the customer’s card on file). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateInvoice - request: - name: CreateInvoiceRequest - body: - properties: - invoice: - type: root.Invoice - docs: The invoice to create. - idempotency_key: - type: optional - docs: >- - A unique string that identifies the `CreateInvoice` request. If - you do not - - provide `idempotency_key` (or provide an empty string as the - value), the endpoint - - treats each request as independent. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 128 - content-type: application/json - response: - docs: Success - type: root.CreateInvoiceResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - invoice: - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - payment_requests: - - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - sale_or_service_date: '2030-01-24' - store_payment_method_enabled: false - idempotency_key: ce3748f9-5fc1-4762-aa12-aae5e843f1f4 - response: - body: - invoice: - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 0 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - company_name: company_name - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - next_payment_amount_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: DRAFT - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T17:45:13Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/invoices/search - method: POST - auth: - - oauth2: - - INVOICES_READ - docs: >- - Searches for invoices from a location specified in - - the filter. You can optionally specify customers in the filter for whom - to - - retrieve invoices. In the current implementation, you can only specify - one location and - - optionally one customer. - - - The response is paginated. If truncated, the response includes a - `cursor` - - that you use in a subsequent request to retrieve the next set of - invoices. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchInvoices - request: - name: SearchInvoicesRequest - body: - properties: - query: - type: root.InvoiceQuery - docs: Describes the query criteria for searching invoices. - limit: - type: optional - docs: >- - The maximum number of invoices to return (200 is the maximum - `limit`). - - If not provided, the server uses a default limit of 100 - invoices. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this cursor to retrieve the next set of results for your - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchInvoicesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - location_ids: - - ES0RJRZYEC39A - customer_ids: - - JDKYHBWT1D4F8MFH63DBMEN8Y4 - sort: - field: INVOICE_SORT_DATE - order: DESC - limit: 100 - response: - body: - invoices: - - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 0 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - status: DRAFT - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T17:45:13Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - - id: inv:0-ChC366qAfskpGrBI_1bozs9mEA3 - version: 3 - location_id: ES0RJRZYEC39A - order_id: a65jnS8NXbfprvGJzY9F4fQTuaB - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - payment_requests: - - uid: 66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176 - request_type: DEPOSIT - due_date: '2021-01-23' - percentage_requested: '25' - tipping_enabled: false - automatic_payment_source: CARD_ON_FILE - card_id: ccof:IkWfpLj4tNHMyFii3GB - computed_amount_money: - amount: 1000 - currency: USD - total_completed_amount_money: - amount: 1000 - currency: USD - - uid: 120c5e18-4f80-4f6b-b159-774cb9bf8f99 - request_type: BALANCE - due_date: '2021-06-15' - tipping_enabled: false - automatic_payment_source: CARD_ON_FILE - card_id: ccof:IkWfpLj4tNHMyFii3GB - computed_amount_money: - amount: 3000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-455 - title: title - description: description - scheduled_at: scheduled_at - public_url: >- - https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9 - next_payment_amount_money: - amount: 3000 - currency: USD - status: PARTIALLY_PAID - timezone: America/Los_Angeles - created_at: '2021-01-23T15:29:12Z' - updated_at: '2021-01-23T15:29:56Z' - accepted_payment_methods: - card: true - square_gift_card: true - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - {} - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - cursor: ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/invoices/{invoice_id} - method: GET - auth: - - oauth2: - - INVOICES_READ - docs: Retrieves an invoice by invoice ID. - source: - openapi: ../default/openapi/openapi.json - display-name: GetInvoice - request: - name: GetInvoicesRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the invoice to retrieve. - response: - docs: Success - type: root.GetInvoiceResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - headers: - Square-Version: '2025-10-16' - response: - body: - invoice: - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 0 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - company_name: company_name - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - next_payment_amount_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: DRAFT - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T17:45:13Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/invoices/{invoice_id} - method: PUT - auth: - - oauth2: - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Updates an invoice. This endpoint supports sparse updates, so you only - need - - to specify the fields you want to change along with the required - `version` field. - - Some restrictions apply to updating invoices. For example, you cannot - change the - - `order_id` or `location_id` field. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateInvoice - request: - name: UpdateInvoiceRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the invoice to update. - body: - properties: - invoice: - type: root.Invoice - docs: >- - The invoice fields to add, change, or clear. Fields can be - cleared using - - null values or the `remove` field (for individual payment - requests or reminders). - - The current invoice `version` is also required. For more - information, including requirements, - - limitations, and more examples, see [Update an - Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). - idempotency_key: - type: optional> - docs: >- - A unique string that identifies the `UpdateInvoice` request. If - you do not - - provide `idempotency_key` (or provide an empty string as the - value), the endpoint - - treats each request as independent. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 128 - fields_to_clear: - type: optional>> - docs: >- - The list of fields to clear. Although this field is currently - supported, we - - recommend using null values or the `remove` field when possible. - For examples, see - - [Update an - Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). - content-type: application/json - response: - docs: Success - type: root.UpdateInvoiceResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - headers: - Square-Version: '2025-10-16' - request: - invoice: - version: 1 - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - tipping_enabled: false - idempotency_key: 4ee82288-0910-499e-ab4c-5d0071dad1be - response: - body: - invoice: - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 2 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - company_name: company_name - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: false - automatic_payment_source: NONE - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - next_payment_amount_money: - amount: 10000 - currency: USD - status: UNPAID - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T18:23:11Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/invoices/{invoice_id} - method: DELETE - auth: - - oauth2: - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Deletes the specified invoice. When an invoice is deleted, the - - associated order status changes to CANCELED. You can only delete a - draft - - invoice (you cannot delete a published invoice, including one that is - scheduled for processing). - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteInvoice - request: - name: DeleteInvoicesRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the invoice to delete. - query-parameters: - version: - type: optional> - docs: >- - The version of the [invoice](entity:Invoice) to delete. - - If you do not know the version, you can call - [GetInvoice](api-endpoint:Invoices-GetInvoice) or - - [ListInvoices](api-endpoint:Invoices-ListInvoices). - response: - docs: Success - type: root.DeleteInvoiceResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - CreateInvoiceAttachment: - path: /v2/invoices/{invoice_id}/attachments - method: POST - auth: - - oauth2: - - INVOICES_WRITE - docs: >- - Uploads a file and attaches it to an invoice. This endpoint accepts HTTP - multipart/form-data file uploads - - with a JSON `request` part and a `file` part. The `file` part must be a - `readable stream` that contains a file - - in a supported format: GIF, JPEG, PNG, TIFF, BMP, or PDF. - - - Invoices can have up to 10 attachments with a total file size of 25 MB. - Attachments can be added only to invoices - - in the `DRAFT`, `SCHEDULED`, `UNPAID`, or `PARTIALLY_PAID` state. - - - __NOTE:__ When testing in the Sandbox environment, the total file size - is limited to 1 KB. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateInvoiceAttachment - request: - name: CreateInvoiceAttachmentRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the [invoice](entity:Invoice) to attach the file to. - body: - properties: - request: - type: optional - content-type: application/json; charset=utf-8 - image_file: - type: optional - content-type: image/jpeg - content-type: multipart/form-data - response: - docs: Success - type: root.CreateInvoiceAttachmentResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - attachment: - id: inva:0-3bB9ZuDHiziThQhuC4fwWt - filename: file.jpg - description: Service contract - filesize: 102705 - hash: 273ee02cb6f5f8a3a8ca23604930dd53 - mime_type: image/jpeg - uploaded_at: '2023-02-03T20:28:14Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - DeleteInvoiceAttachment: - path: /v2/invoices/{invoice_id}/attachments/{attachment_id} - method: DELETE - auth: - - oauth2: - - INVOICES_WRITE - docs: >- - Removes an attachment from an invoice and permanently deletes the file. - Attachments can be removed only - - from invoices in the `DRAFT`, `SCHEDULED`, `UNPAID`, or `PARTIALLY_PAID` - state. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteInvoiceAttachment - request: - name: DeleteInvoiceAttachmentRequest - path-parameters: - invoice_id: - type: string - docs: >- - The ID of the [invoice](entity:Invoice) to delete the attachment - from. - attachment_id: - type: string - docs: The ID of the [attachment](entity:InvoiceAttachment) to delete. - response: - docs: Success - type: root.DeleteInvoiceAttachmentResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - attachment_id: attachment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cancel: - path: /v2/invoices/{invoice_id}/cancel - method: POST - auth: - - oauth2: - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Cancels an invoice. The seller cannot collect payments for - - the canceled invoice. - - - You cannot cancel an invoice in the `DRAFT` state or in a terminal - state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelInvoice - request: - name: CancelInvoiceRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the [invoice](entity:Invoice) to cancel. - body: - properties: - version: - type: integer - docs: >- - The version of the [invoice](entity:Invoice) to cancel. - - If you do not know the version, you can call - - [GetInvoice](api-endpoint:Invoices-GetInvoice) or - [ListInvoices](api-endpoint:Invoices-ListInvoices). - content-type: application/json - response: - docs: Success - type: root.CancelInvoiceResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - headers: - Square-Version: '2025-10-16' - request: - version: 0 - response: - body: - invoice: - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 1 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - company_name: company_name - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: public_url - next_payment_amount_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: CANCELED - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T18:23:11Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - publish: - path: /v2/invoices/{invoice_id}/publish - method: POST - auth: - - oauth2: - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Publishes the specified draft invoice. - - - After an invoice is published, Square - - follows up based on the invoice configuration. For example, Square - - sends the invoice to the customer's email address, charges the - customer's card on file, or does - - nothing. Square also makes the invoice available on a Square-hosted - invoice page. - - - The invoice `status` also changes from `DRAFT` to a status - - based on the invoice configuration. For example, the status changes to - `UNPAID` if - - Square emails the invoice or `PARTIALLY_PAID` if Square charges a card - on file for a portion of the - - invoice amount. - - - In addition to the required `ORDERS_WRITE` and `INVOICES_WRITE` - permissions, `CUSTOMERS_READ` - - and `PAYMENTS_WRITE` are required when publishing invoices configured - for card-on-file payments. - source: - openapi: ../default/openapi/openapi.json - display-name: PublishInvoice - request: - name: PublishInvoiceRequest - path-parameters: - invoice_id: - type: string - docs: The ID of the invoice to publish. - body: - properties: - version: - type: integer - docs: >- - The version of the [invoice](entity:Invoice) to publish. - - This must match the current version of the invoice; otherwise, - the request is rejected. - idempotency_key: - type: optional> - docs: >- - A unique string that identifies the `PublishInvoice` request. If - you do not - - provide `idempotency_key` (or provide an empty string as the - value), the endpoint - - treats each request as independent. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 128 - content-type: application/json - response: - docs: Success - type: root.PublishInvoiceResponse - status-code: 200 - examples: - - path-parameters: - invoice_id: invoice_id - headers: - Square-Version: '2025-10-16' - request: - version: 1 - idempotency_key: 32da42d0-1997-41b0-826b-f09464fc2c2e - response: - body: - invoice: - id: inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - version: 1 - location_id: ES0RJRZYEC39A - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - primary_recipient: - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - given_name: Amelia - family_name: Earhart - email_address: Amelia.Earhart@example.com - phone_number: 1-212-555-4240 - company_name: company_name - payment_requests: - - uid: 2da7964f-f3d2-4f43-81e8-5aa220bf3355 - request_type: BALANCE - due_date: '2030-01-24' - tipping_enabled: true - automatic_payment_source: NONE - reminders: - - uid: beebd363-e47f-4075-8785-c235aaa7df11 - relative_scheduled_days: -1 - message: Your invoice is due tomorrow - status: PENDING - computed_amount_money: - amount: 10000 - currency: USD - total_completed_amount_money: - amount: 0 - currency: USD - delivery_method: EMAIL - invoice_number: inv-100 - title: Event Planning Services - description: We appreciate your business! - scheduled_at: '2030-01-13T10:00:00Z' - public_url: >- - https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9 - next_payment_amount_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: SCHEDULED - timezone: America/Los_Angeles - created_at: '2020-06-18T17:45:13Z' - updated_at: '2020-06-18T18:23:11Z' - accepted_payment_methods: - card: true - square_gift_card: false - bank_account: false - buy_now_pay_later: false - cash_app_pay: false - custom_fields: - - label: Event Reference Number - value: 'Ref. #1234' - placement: ABOVE_LINE_ITEMS - - label: Terms of Service - value: The terms of service are... - placement: BELOW_LINE_ITEMS - subscription_id: subscription_id - sale_or_service_date: '2030-01-24' - payment_conditions: payment_conditions - store_payment_method_enabled: false - attachments: - - {} - creator_team_member_id: creator_team_member_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor.yml b/.mock/definition/labor.yml deleted file mode 100644 index b4cf1b91..00000000 --- a/.mock/definition/labor.yml +++ /dev/null @@ -1,1046 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - CreateScheduledShift: - path: /v2/labor/scheduled-shifts - method: POST - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Creates a scheduled shift by providing draft shift details such as job - ID, - - team member assignment, and start and end times. - - - The following `draft_shift_details` fields are required: - - - `location_id` - - - `job_id` - - - `start_at` - - - `end_at` - source: - openapi: ../default/openapi/openapi.json - display-name: CreateScheduledShift - request: - name: CreateScheduledShiftRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique identifier for the `CreateScheduledShift` request, used - to ensure the - - [idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - - of the operation. - validation: - maxLength: 128 - scheduled_shift: - type: root.ScheduledShift - docs: >- - The scheduled shift with `draft_shift_details`. - - If needed, call - [ListLocations](api-endpoint:Locations-ListLocations) to get - location IDs, - - [ListJobs](api-endpoint:Team-ListJobs) to get job IDs, and - [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) - - to get team member IDs and current job assignments. - - - The `start_at` and `end_at` timestamps must be provided in the - time zone + offset of the - - shift location specified in `location_id`. Example for Pacific - Standard Time: 2024-10-31T12:30:00-08:00 - content-type: application/json - response: - docs: Success - type: root.CreateScheduledShiftResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: HIDSNG5KS478L - scheduled_shift: - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - response: - body: - scheduled_shift: - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - timezone: America/New_York - published_shift_details: - team_member_id: team_member_id - location_id: location_id - job_id: job_id - start_at: start_at - end_at: end_at - notes: notes - is_deleted: true - timezone: timezone - version: 1 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:00-05:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - BulkPublishScheduledShifts: - path: /v2/labor/scheduled-shifts/bulk-publish - method: POST - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Publishes 1 - 100 scheduled shifts. This endpoint takes a map of - individual publish - - requests and returns a map of responses. When a scheduled shift is - published, Square keeps - - the `draft_shift_details` field as is and copies it to the - `published_shift_details` field. - - - The minimum `start_at` and maximum `end_at` timestamps of all shifts in - a - - `BulkPublishScheduledShifts` request must fall within a two-week period. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkPublishScheduledShifts - request: - name: BulkPublishScheduledShiftsRequest - body: - properties: - scheduled_shifts: - type: map - docs: >- - A map of 1 to 100 key-value pairs that represent individual - publish requests. - - - - Each key is the ID of a scheduled shift you want to publish. - - - Each value is a `BulkPublishScheduledShiftsData` object that - contains the - - `version` field or is an empty object. - scheduled_shift_notification_audience: - type: optional - docs: >- - Indicates whether Square should send email notifications to team - members and - - which team members should receive the notifications. This - setting applies to all shifts - - specified in the bulk operation. The default value is - `AFFECTED`. - - See - [ScheduledShiftNotificationAudience](#type-scheduledshiftnotificationaudience) - for possible values - content-type: application/json - response: - docs: Success - type: root.BulkPublishScheduledShiftsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - scheduled_shifts: - key: {} - scheduled_shift_notification_audience: AFFECTED - response: - body: - responses: - idp_key_1: - scheduled_shift: - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-03-25T03:11:00-05:00' - end_at: '2019-03-25T13:18:00-05:00' - notes: Don't forget to prep the vegetables - is_deleted: false - timezone: America/New_York - published_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-03-25T03:11:00-05:00' - end_at: '2019-03-25T13:18:00-05:00' - notes: Don't forget to prep the vegetables - is_deleted: false - timezone: America/New_York - version: 3 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:15-05:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - idp_key_2: - errors: - - category: INVALID_REQUEST_ERROR - code: INVALID_VALUE - detail: Scheduled shift with id 'scheduled-shift-2' not found - field: scheduled-shifts.scheduled-shift-2 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - SearchScheduledShifts: - path: /v2/labor/scheduled-shifts/search - method: POST - auth: - - oauth2: - - TIMECARDS_READ - docs: >- - Returns a paginated list of scheduled shifts, with optional filter and - sort settings. - - By default, results are sorted by `start_at` in ascending order. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchScheduledShifts - request: - name: SearchScheduledShiftsRequest - body: - properties: - query: - type: optional - docs: Query conditions used to filter and sort the results. - limit: - type: optional - docs: >- - The maximum number of results to return in a single response - page. The default value is 50. - validation: - min: 1 - max: 50 - cursor: - type: optional - docs: >- - The pagination cursor returned by the previous call to this - endpoint. Provide - - this cursor to retrieve the next page of results for your - original request. For more - - information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchScheduledShiftsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - assignment_status: ASSIGNED - sort: - field: CREATED_AT - order: ASC - limit: 2 - cursor: xoxp-1234-5678-90123 - response: - body: - scheduled_shifts: - - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - timezone: America/New_York - version: 1 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:00-05:00' - cursor: xoxp-123-2123-123232 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - RetrieveScheduledShift: - path: /v2/labor/scheduled-shifts/{id} - method: GET - auth: - - oauth2: - - TIMECARDS_READ - docs: Retrieves a scheduled shift by ID. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveScheduledShift - request: - name: RetrieveScheduledShiftRequest - path-parameters: - id: - type: string - docs: The ID of the scheduled shift to retrieve. - response: - docs: Success - type: root.RetrieveScheduledShiftResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - scheduled_shift: - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-03-25T03:11:00-05:00' - end_at: '2019-03-25T13:18:00-05:00' - notes: Don't forget to prep the vegetables - is_deleted: false - timezone: America/New_York - published_shift_details: - team_member_id: team_member_id - location_id: location_id - job_id: job_id - start_at: start_at - end_at: end_at - notes: notes - is_deleted: true - timezone: timezone - version: 2 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:15-05:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - UpdateScheduledShift: - path: /v2/labor/scheduled-shifts/{id} - method: PUT - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Updates the draft shift details for a scheduled shift. This endpoint - supports - - sparse updates, so only new, changed, or removed fields are required in - the request. - - You must publish the shift to make updates public. - - - You can make the following updates to `draft_shift_details`: - - - Change the `location_id`, `job_id`, `start_at`, and `end_at` fields. - - - Add, change, or clear the `team_member_id` and `notes` fields. To - clear these fields, - - set the value to null. - - - Change the `is_deleted` field. To delete a scheduled shift, set - `is_deleted` to true - - and then publish the shift. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateScheduledShift - request: - name: UpdateScheduledShiftRequest - path-parameters: - id: - type: string - docs: The ID of the scheduled shift to update. - body: - properties: - scheduled_shift: - type: root.ScheduledShift - docs: >- - The scheduled shift with any updates in the - `draft_shift_details` field. - - If needed, call - [ListLocations](api-endpoint:Locations-ListLocations) to get - location IDs, - - [ListJobs](api-endpoint:Team-ListJobs) to get job IDs, and - [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) - - to get team member IDs and current job assignments. Updates made - to `published_shift_details` - - are ignored. - - - If provided, the `start_at` and `end_at` timestamps must be in - the time zone + offset of the - - shift location specified in `location_id`. Example for Pacific - Standard Time: 2024-10-31T12:30:00-08:00 - - - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for the request, provide the current version of the - shift in the `version` field. - - If the provided version doesn't match the server version, the - request fails. If `version` is - - omitted, Square executes a blind write, potentially overwriting - data from another publish request. - content-type: application/json - response: - docs: Success - type: root.UpdateScheduledShiftResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - scheduled_shift: - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-03-25T03:11:00-05:00' - end_at: '2019-03-25T13:18:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - version: 1 - response: - body: - scheduled_shift: - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-03-25T03:11:00-05:00' - end_at: '2019-03-25T13:18:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - timezone: America/New_York - published_shift_details: - team_member_id: team_member_id - location_id: location_id - job_id: job_id - start_at: start_at - end_at: end_at - notes: notes - is_deleted: true - timezone: timezone - version: 2 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:15-05:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - PublishScheduledShift: - path: /v2/labor/scheduled-shifts/{id}/publish - method: POST - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Publishes a scheduled shift. When a scheduled shift is published, Square - keeps the - - `draft_shift_details` field as is and copies it to the - `published_shift_details` field. - source: - openapi: ../default/openapi/openapi.json - display-name: PublishScheduledShift - request: - name: PublishScheduledShiftRequest - path-parameters: - id: - type: string - docs: The ID of the scheduled shift to publish. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique identifier for the `PublishScheduledShift` request, - used to ensure the - - [idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - - of the operation. - validation: - minLength: 1 - maxLength: 128 - version: - type: optional - docs: >- - The current version of the scheduled shift, used to enable - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control. If the provided version doesn't match the server - version, the request fails. - - If omitted, Square executes a blind write, potentially - overwriting data from another publish request. - scheduled_shift_notification_audience: - type: optional - docs: >- - Indicates whether Square should send an email notification to - team members and - - which team members should receive the notification. The default - value is `AFFECTED`. - - See - [ScheduledShiftNotificationAudience](#type-scheduledshiftnotificationaudience) - for possible values - content-type: application/json - response: - docs: Success - type: root.PublishScheduledShiftResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: HIDSNG5KS478L - version: 2 - scheduled_shift_notification_audience: ALL - response: - body: - scheduled_shift: - id: K0YH4CV5462JB - draft_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - timezone: America/New_York - published_shift_details: - team_member_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - notes: Dont forget to prep the vegetables - is_deleted: false - timezone: America/New_York - version: 2 - created_at: '2019-02-25T03:11:00-05:00' - updated_at: '2019-02-25T03:11:00-05:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - CreateTimecard: - path: /v2/labor/timecards - method: POST - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Creates a new `Timecard`. - - - A `Timecard` represents a complete workday for a single team member. - - You must provide the following values in your request to this - - endpoint: - - - - `location_id` - - - `team_member_id` - - - `start_at` - - - An attempt to create a new `Timecard` can result in a `BAD_REQUEST` - error when: - - - The `status` of the new `Timecard` is `OPEN` and the team member has - another - - timecard with an `OPEN` status. - - - The `start_at` date is in the future. - - - The `start_at` or `end_at` date overlaps another timecard for the same - team member. - - - The `Break` instances are set in the request and a break `start_at` - - is before the `Timecard.start_at`, a break `end_at` is after - - the `Timecard.end_at`, or both. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTimecard - request: - name: CreateTimecardRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string value to ensure the idempotency of the - operation. - validation: - maxLength: 128 - timecard: - type: root.Timecard - docs: The `Timecard` to be created. - content-type: application/json - response: - docs: Success - type: root.CreateTimecardResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: HIDSNG5KS478L - timecard: - location_id: PAA1RJZZKXBFG - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - tip_eligible: true - breaks: - - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - response: - body: - timecard: - id: K0YH4CV5462JB - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - status: CLOSED - version: 1 - created_at: '2019-02-28T00:39:02Z' - updated_at: '2019-02-28T00:39:02Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - SearchTimecards: - path: /v2/labor/timecards/search - method: POST - auth: - - oauth2: - - TIMECARDS_READ - docs: |- - Returns a paginated list of `Timecard` records for a business. - The list to be returned can be filtered by: - - Location IDs - - Team member IDs - - Timecard status (`OPEN` or `CLOSED`) - - Timecard start - - Timecard end - - Workday details - - The list can be sorted by: - - `START_AT` - - `END_AT` - - `CREATED_AT` - - `UPDATED_AT` - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTimecards - request: - name: SearchTimecardsRequest - body: - properties: - query: - type: optional - docs: Query filters. - limit: - type: optional - docs: The number of resources in a page (200 by default). - validation: - min: 1 - max: 200 - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - content-type: application/json - response: - docs: Success - type: root.SearchTimecardsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - workday: - date_range: - start_date: '2019-01-20' - end_date: '2019-02-03' - match_timecards_by: START_AT - default_timezone: America/Los_Angeles - limit: 100 - response: - body: - timecards: - - id: X714F3HA6D1PT - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-21T03:11:00-05:00' - end_at: '2019-01-21T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - tip_eligible: true - breaks: - - id: SJW7X6AKEJQ65 - start_at: '2019-01-21T06:11:00-05:00' - end_at: '2019-01-21T06:11:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT10M - is_paid: true - status: CLOSED - version: 6 - created_at: '2019-01-24T01:12:03Z' - updated_at: '2019-02-07T22:21:08Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - - id: GDHYBZYWK0P2V - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-22T12:02:00-05:00' - end_at: '2019-01-22T13:02:00-05:00' - wage: - title: Cook - hourly_rate: - amount: 1600 - currency: USD - job_id: gcbz15vKGnMKmaWJJ152kjim - tip_eligible: true - breaks: - - id: BKS6VR7WR748A - start_at: '2019-01-22T14:30:00-05:00' - end_at: '2019-01-22T14:40:00-05:00' - break_type_id: WQX00VR99F53J - name: Tea Break - expected_duration: PT10M - is_paid: true - - id: BQFEZSHFZSC51 - start_at: '2019-01-22T12:30:00-05:00' - end_at: '2019-01-22T12:44:00-05:00' - break_type_id: P6Q468ZFRN1AC - name: Coffee Break - expected_duration: PT15M - is_paid: false - status: CLOSED - version: 16 - created_at: '2019-01-23T23:32:45Z' - updated_at: '2019-01-24T00:56:25Z' - team_member_id: 33fJchumvVdJwxV0H6L9 - declared_cash_tip_money: - amount: 0 - currency: USD - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - RetrieveTimecard: - path: /v2/labor/timecards/{id} - method: GET - auth: - - oauth2: - - TIMECARDS_READ - docs: Returns a single `Timecard` specified by `id`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTimecard - request: - name: RetrieveTimecardRequest - path-parameters: - id: - type: string - docs: The UUID for the `Timecard` being retrieved. - response: - docs: Success - type: root.RetrieveTimecardResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - timecard: - id: T35HMQSN89SV4 - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-02-23T18:00:00-05:00' - end_at: '2019-02-23T21:00:00-05:00' - wage: - title: Cashier - hourly_rate: - amount: 1457 - currency: USD - job_id: N4YKVLzFj3oGtNocqoYHYpW3 - tip_eligible: true - breaks: - - id: M9BBKEPQAQD2T - start_at: '2019-02-23T19:00:00-05:00' - end_at: '2019-02-23T20:00:00-05:00' - break_type_id: 92EPDRQKJ5088 - name: Lunch Break - expected_duration: PT1H - is_paid: true - status: CLOSED - version: 1 - created_at: '2019-02-27T00:12:12Z' - updated_at: '2019-02-27T00:12:12Z' - team_member_id: D71KRMQof6cXGUW0aAv7 - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - UpdateTimecard: - path: /v2/labor/timecards/{id} - method: PUT - auth: - - oauth2: - - TIMECARDS_WRITE - - TIMECARDS_READ - docs: >- - Updates an existing `Timecard`. - - - When adding a `Break` to a `Timecard`, any earlier `Break` instances in - the `Timecard` have - - the `end_at` property set to a valid RFC-3339 datetime string. - - - When closing a `Timecard`, all `Break` instances in the `Timecard` must - be complete with `end_at` - - set on each `Break`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateTimecard - request: - name: UpdateTimecardRequest - path-parameters: - id: - type: string - docs: The ID of the object being updated. - body: - properties: - timecard: - type: root.Timecard - docs: The updated `Timecard` object. - content-type: application/json - response: - docs: Success - type: root.UpdateTimecardResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - timecard: - location_id: PAA1RJZZKXBFG - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Bartender - hourly_rate: - amount: 1500 - currency: USD - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - status: CLOSED - version: 1 - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - response: - body: - timecard: - id: K0YH4CV5462JB - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Bartender - hourly_rate: - amount: 1500 - currency: USD - job_id: dZtrPh5GSDGugyXGByesVp51 - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - status: CLOSED - version: 2 - created_at: '2019-02-28T00:39:02Z' - updated_at: '2019-02-28T00:42:41Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - DeleteTimecard: - path: /v2/labor/timecards/{id} - method: DELETE - auth: - - oauth2: - - TIMECARDS_WRITE - docs: Deletes a `Timecard`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteTimecard - request: - name: DeleteTimecardRequest - path-parameters: - id: - type: string - docs: The UUID for the `Timecard` being deleted. - response: - docs: Success - type: root.DeleteTimecardResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor/breakTypes.yml b/.mock/definition/labor/breakTypes.yml deleted file mode 100644 index f19f95fe..00000000 --- a/.mock/definition/labor/breakTypes.yml +++ /dev/null @@ -1,290 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/labor/break-types - method: GET - auth: - - oauth2: - - TIMECARDS_SETTINGS_READ - docs: Returns a paginated list of `BreakType` instances for a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.break_types - source: - openapi: ../default/openapi/openapi.json - display-name: ListBreakTypes - request: - name: ListBreakTypesRequest - query-parameters: - location_id: - type: optional> - docs: >- - Filter the returned `BreakType` results to only those that are - associated with the - - specified location. - limit: - type: optional> - docs: >- - The maximum number of `BreakType` results to return per page. The - number can range between 1 - - and 200. The default is 200. - cursor: - type: optional> - docs: A pointer to the next page of `BreakType` results to fetch. - response: - docs: Success - type: root.ListBreakTypesResponse - status-code: 200 - examples: - - query-parameters: - location_id: location_id - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - break_types: - - id: REGS1EQR1TPZ5 - location_id: PAA1RJZZKXBFG - break_name: Coffee Break - expected_duration: PT5M - is_paid: false - version: 1 - created_at: '2019-01-22T20:47:37Z' - updated_at: '2019-01-22T20:47:37Z' - - id: 92EPDRQKJ5088 - location_id: PAA1RJZZKXBFG - break_name: Lunch Break - expected_duration: PT1H - is_paid: true - version: 3 - created_at: '2019-01-25T19:26:30Z' - updated_at: '2019-01-25T19:26:30Z' - cursor: 2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/labor/break-types - method: POST - auth: - - oauth2: - - TIMECARDS_SETTINGS_WRITE - docs: >- - Creates a new `BreakType`. - - - A `BreakType` is a template for creating `Break` objects. - - You must provide the following values in your request to this - - endpoint: - - - - `location_id` - - - `break_name` - - - `expected_duration` - - - `is_paid` - - - You can only have three `BreakType` instances per location. If you - attempt to add a fourth - - `BreakType` for a location, an `INVALID_REQUEST_ERROR` "Exceeded limit - of 3 breaks per location." - - is returned. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateBreakType - request: - name: CreateBreakTypeRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string value to ensure the idempotency of the - operation. - validation: - maxLength: 128 - break_type: - type: root.BreakType - docs: The `BreakType` to be created. - content-type: application/json - response: - docs: Success - type: root.CreateBreakTypeResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: PAD3NG5KSN2GL - break_type: - location_id: CGJN03P1D08GF - break_name: Lunch Break - expected_duration: PT30M - is_paid: true - response: - body: - break_type: - id: 49SSVDJG76WF3 - location_id: CGJN03P1D08GF - break_name: Lunch Break - expected_duration: PT30M - is_paid: true - version: 1 - created_at: '2019-02-26T22:42:54Z' - updated_at: '2019-02-26T22:42:54Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/labor/break-types/{id} - method: GET - auth: - - oauth2: - - TIMECARDS_SETTINGS_READ - docs: Returns a single `BreakType` specified by `id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetBreakType - request: - name: GetBreakTypesRequest - path-parameters: - id: - type: string - docs: The UUID for the `BreakType` being retrieved. - response: - docs: Success - type: root.GetBreakTypeResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - break_type: - id: lA0mj_RSOprNPwMUXdYp - location_id: 059SB0E0WCNWS - break_name: Lunch Break - expected_duration: PT30M - is_paid: true - version: 1 - created_at: '2019-02-21T17:50:00Z' - updated_at: '2019-02-21T17:50:00Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/labor/break-types/{id} - method: PUT - auth: - - oauth2: - - TIMECARDS_SETTINGS_WRITE - - TIMECARDS_SETTINGS_READ - docs: Updates an existing `BreakType`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateBreakType - request: - name: UpdateBreakTypeRequest - path-parameters: - id: - type: string - docs: ' The UUID for the `BreakType` being updated.' - body: - properties: - break_type: - type: root.BreakType - docs: The updated `BreakType`. - content-type: application/json - response: - docs: Success - type: root.UpdateBreakTypeResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - break_type: - location_id: 26M7H24AZ9N6R - break_name: Lunch - expected_duration: PT50M - is_paid: true - version: 1 - response: - body: - break_type: - id: Q6JSJS6D4DBCH - location_id: 26M7H24AZ9N6R - break_name: Lunch - expected_duration: PT50M - is_paid: true - version: 2 - created_at: '2018-06-12T20:19:12Z' - updated_at: '2019-02-26T23:12:59Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/labor/break-types/{id} - method: DELETE - auth: - - oauth2: - - TIMECARDS_SETTINGS_WRITE - docs: |- - Deletes an existing `BreakType`. - - A `BreakType` can be deleted even if it is referenced from a `Shift`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteBreakType - request: - name: DeleteBreakTypesRequest - path-parameters: - id: - type: string - docs: The UUID for the `BreakType` being deleted. - response: - docs: Success - type: root.DeleteBreakTypeResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor/employeeWages.yml b/.mock/definition/labor/employeeWages.yml deleted file mode 100644 index 08a4aeea..00000000 --- a/.mock/definition/labor/employeeWages.yml +++ /dev/null @@ -1,125 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/labor/employee-wages - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: Returns a paginated list of `EmployeeWage` instances for a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.employee_wages - source: - openapi: ../default/openapi/openapi.json - display-name: ListEmployeeWages - request: - name: ListEmployeeWagesRequest - query-parameters: - employee_id: - type: optional> - docs: >- - Filter the returned wages to only those that are associated with - the specified employee. - limit: - type: optional> - docs: >- - The maximum number of `EmployeeWage` results to return per page. - The number can range between - - 1 and 200. The default is 200. - cursor: - type: optional> - docs: A pointer to the next page of `EmployeeWage` results to fetch. - response: - docs: Success - type: root.ListEmployeeWagesResponse - status-code: 200 - availability: deprecated - examples: - - query-parameters: - employee_id: employee_id - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - employee_wages: - - id: pXS3qCv7BERPnEGedM4S8mhm - employee_id: 33fJchumvVdJwxV0H6L9 - title: Manager - hourly_rate: - amount: 3250 - currency: USD - - id: rZduCkzYDUVL3ovh1sQgbue6 - employee_id: 33fJchumvVdJwxV0H6L9 - title: Cook - hourly_rate: - amount: 2600 - currency: USD - - id: FxLbs5KpPUHa8wyt5ctjubDX - employee_id: 33fJchumvVdJwxV0H6L9 - title: Barista - hourly_rate: - amount: 1600 - currency: USD - - id: vD1wCgijMDR3cX5TPnu7VXto - employee_id: 33fJchumvVdJwxV0H6L9 - title: Cashier - hourly_rate: - amount: 1700 - currency: USD - cursor: 2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/labor/employee-wages/{id} - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: Returns a single `EmployeeWage` specified by `id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetEmployeeWage - request: - name: GetEmployeeWagesRequest - path-parameters: - id: - type: string - docs: The UUID for the `EmployeeWage` being retrieved. - response: - docs: Success - type: root.GetEmployeeWageResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - employee_wage: - id: pXS3qCv7BERPnEGedM4S8mhm - employee_id: 33fJchumvVdJwxV0H6L9 - title: Manager - hourly_rate: - amount: 2000 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor/shifts.yml b/.mock/definition/labor/shifts.yml deleted file mode 100644 index 02f895fc..00000000 --- a/.mock/definition/labor/shifts.yml +++ /dev/null @@ -1,472 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/labor/shifts - method: POST - auth: - - oauth2: - - TIMECARDS_WRITE - docs: >- - Creates a new `Shift`. - - - A `Shift` represents a complete workday for a single team member. - - You must provide the following values in your request to this - - endpoint: - - - - `location_id` - - - `team_member_id` - - - `start_at` - - - An attempt to create a new `Shift` can result in a `BAD_REQUEST` error - when: - - - The `status` of the new `Shift` is `OPEN` and the team member has - another - - shift with an `OPEN` status. - - - The `start_at` date is in the future. - - - The `start_at` or `end_at` date overlaps another shift for the same - team member. - - - The `Break` instances are set in the request and a break `start_at` - - is before the `Shift.start_at`, a break `end_at` is after - - the `Shift.end_at`, or both. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateShift - request: - name: CreateShiftRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string value to ensure the idempotency of the - operation. - validation: - maxLength: 128 - shift: - type: root.Shift - docs: The `Shift` to be created. - content-type: application/json - response: - docs: Success - type: root.CreateShiftResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: HIDSNG5KS478L - shift: - location_id: PAA1RJZZKXBFG - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - tip_eligible: true - breaks: - - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - response: - body: - shift: - id: K0YH4CV5462JB - employee_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - status: CLOSED - version: 1 - created_at: '2019-02-28T00:39:02Z' - updated_at: '2019-02-28T00:39:02Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/labor/shifts/search - method: POST - auth: - - oauth2: - - TIMECARDS_READ - docs: |- - Returns a paginated list of `Shift` records for a business. - The list to be returned can be filtered by: - - Location IDs - - Team member IDs - - Shift status (`OPEN` or `CLOSED`) - - Shift start - - Shift end - - Workday details - - The list can be sorted by: - - `START_AT` - - `END_AT` - - `CREATED_AT` - - `UPDATED_AT` - source: - openapi: ../default/openapi/openapi.json - display-name: SearchShifts - request: - name: SearchShiftsRequest - body: - properties: - query: - type: optional - docs: Query filters. - limit: - type: optional - docs: The number of resources in a page (200 by default). - validation: - min: 1 - max: 200 - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - content-type: application/json - response: - docs: Success - type: root.SearchShiftsResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - workday: - date_range: - start_date: '2019-01-20' - end_date: '2019-02-03' - match_shifts_by: START_AT - default_timezone: America/Los_Angeles - limit: 100 - response: - body: - shifts: - - id: X714F3HA6D1PT - employee_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-21T03:11:00-05:00' - end_at: '2019-01-21T13:11:00-05:00' - wage: - title: Barista - hourly_rate: - amount: 1100 - currency: USD - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - tip_eligible: true - breaks: - - id: SJW7X6AKEJQ65 - start_at: '2019-01-21T06:11:00-05:00' - end_at: '2019-01-21T06:11:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT10M - is_paid: true - status: CLOSED - version: 6 - created_at: '2019-01-24T01:12:03Z' - updated_at: '2019-02-07T22:21:08Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - - id: GDHYBZYWK0P2V - employee_id: 33fJchumvVdJwxV0H6L9 - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-22T12:02:00-05:00' - end_at: '2019-01-22T13:02:00-05:00' - wage: - title: Cook - hourly_rate: - amount: 1600 - currency: USD - job_id: gcbz15vKGnMKmaWJJ152kjim - tip_eligible: true - breaks: - - id: BKS6VR7WR748A - start_at: '2019-01-23T14:30:00-05:00' - end_at: '2019-01-23T14:40:00-05:00' - break_type_id: WQX00VR99F53J - name: Tea Break - expected_duration: PT10M - is_paid: true - - id: BQFEZSHFZSC51 - start_at: '2019-01-22T12:30:00-05:00' - end_at: '2019-01-22T12:44:00-05:00' - break_type_id: P6Q468ZFRN1AC - name: Coffee Break - expected_duration: PT15M - is_paid: false - status: CLOSED - version: 16 - created_at: '2019-01-23T23:32:45Z' - updated_at: '2019-01-24T00:56:25Z' - team_member_id: 33fJchumvVdJwxV0H6L9 - declared_cash_tip_money: - amount: 0 - currency: USD - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/labor/shifts/{id} - method: GET - auth: - - oauth2: - - TIMECARDS_READ - docs: Returns a single `Shift` specified by `id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetShift - request: - name: GetShiftsRequest - path-parameters: - id: - type: string - docs: The UUID for the `Shift` being retrieved. - response: - docs: Success - type: root.GetShiftResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - shift: - id: T35HMQSN89SV4 - employee_id: D71KRMQof6cXGUW0aAv7 - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-02-23T18:00:00-05:00' - end_at: '2019-02-23T21:00:00-05:00' - wage: - title: Cashier - hourly_rate: - amount: 1457 - currency: USD - job_id: N4YKVLzFj3oGtNocqoYHYpW3 - tip_eligible: true - breaks: - - id: M9BBKEPQAQD2T - start_at: '2019-02-23T19:00:00-05:00' - end_at: '2019-02-23T20:00:00-05:00' - break_type_id: 92EPDRQKJ5088 - name: Lunch Break - expected_duration: PT1H - is_paid: true - status: CLOSED - version: 1 - created_at: '2019-02-27T00:12:12Z' - updated_at: '2019-02-27T00:12:12Z' - team_member_id: D71KRMQof6cXGUW0aAv7 - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/labor/shifts/{id} - method: PUT - auth: - - oauth2: - - TIMECARDS_WRITE - - TIMECARDS_READ - docs: >- - Updates an existing `Shift`. - - - When adding a `Break` to a `Shift`, any earlier `Break` instances in the - `Shift` have - - the `end_at` property set to a valid RFC-3339 datetime string. - - - When closing a `Shift`, all `Break` instances in the `Shift` must be - complete with `end_at` - - set on each `Break`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateShift - request: - name: UpdateShiftRequest - path-parameters: - id: - type: string - docs: The ID of the object being updated. - body: - properties: - shift: - type: root.Shift - docs: The updated `Shift` object. - content-type: application/json - response: - docs: Success - type: root.UpdateShiftResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - shift: - location_id: PAA1RJZZKXBFG - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Bartender - hourly_rate: - amount: 1500 - currency: USD - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - version: 1 - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - response: - body: - shift: - id: K0YH4CV5462JB - employee_id: ormj0jJJZ5OZIzxrZYJI - location_id: PAA1RJZZKXBFG - timezone: America/New_York - start_at: '2019-01-25T03:11:00-05:00' - end_at: '2019-01-25T13:11:00-05:00' - wage: - title: Bartender - hourly_rate: - amount: 1500 - currency: USD - job_id: dZtrPh5GSDGugyXGByesVp51 - tip_eligible: true - breaks: - - id: X7GAQYVVRRG6P - start_at: '2019-01-25T06:11:00-05:00' - end_at: '2019-01-25T06:16:00-05:00' - break_type_id: REGS1EQR1TPZ5 - name: Tea Break - expected_duration: PT5M - is_paid: true - status: CLOSED - version: 2 - created_at: '2019-02-28T00:39:02Z' - updated_at: '2019-02-28T00:42:41Z' - team_member_id: ormj0jJJZ5OZIzxrZYJI - declared_cash_tip_money: - amount: 500 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/labor/shifts/{id} - method: DELETE - auth: - - oauth2: - - TIMECARDS_WRITE - docs: Deletes a `Shift`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteShift - request: - name: DeleteShiftsRequest - path-parameters: - id: - type: string - docs: The UUID for the `Shift` being deleted. - response: - docs: Success - type: root.DeleteShiftResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor/teamMemberWages.yml b/.mock/definition/labor/teamMemberWages.yml deleted file mode 100644 index 7e03a131..00000000 --- a/.mock/definition/labor/teamMemberWages.yml +++ /dev/null @@ -1,135 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/labor/team-member-wages - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: Returns a paginated list of `TeamMemberWage` instances for a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.team_member_wages - source: - openapi: ../default/openapi/openapi.json - display-name: ListTeamMemberWages - request: - name: ListTeamMemberWagesRequest - query-parameters: - team_member_id: - type: optional> - docs: >- - Filter the returned wages to only those that are associated with - the - - specified team member. - limit: - type: optional> - docs: >- - The maximum number of `TeamMemberWage` results to return per page. - The number can range between - - 1 and 200. The default is 200. - cursor: - type: optional> - docs: A pointer to the next page of `EmployeeWage` results to fetch. - response: - docs: Success - type: root.ListTeamMemberWagesResponse - status-code: 200 - examples: - - query-parameters: - team_member_id: team_member_id - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - team_member_wages: - - id: pXS3qCv7BERPnEGedM4S8mhm - team_member_id: 33fJchumvVdJwxV0H6L9 - title: Manager - hourly_rate: - amount: 3250 - currency: USD - job_id: jxJNN6eCJsLrhg5UFJrDWDGE - tip_eligible: false - - id: rZduCkzYDUVL3ovh1sQgbue6 - team_member_id: 33fJchumvVdJwxV0H6L9 - title: Cook - hourly_rate: - amount: 2600 - currency: USD - job_id: gcbz15vKGnMKmaWJJ152kjim - tip_eligible: true - - id: FxLbs5KpPUHa8wyt5ctjubDX - team_member_id: 33fJchumvVdJwxV0H6L9 - title: Barista - hourly_rate: - amount: 1600 - currency: USD - job_id: FzbJAtt9qEWncK1BWgVCxQ6M - tip_eligible: true - - id: vD1wCgijMDR3cX5TPnu7VXto - team_member_id: 33fJchumvVdJwxV0H6L9 - title: Cashier - hourly_rate: - amount: 1700 - currency: USD - job_id: N4YKVLzFj3oGtNocqoYHYpW3 - tip_eligible: true - cursor: 2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/labor/team-member-wages/{id} - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: Returns a single `TeamMemberWage` specified by `id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetTeamMemberWage - request: - name: GetTeamMemberWagesRequest - path-parameters: - id: - type: string - docs: The UUID for the `TeamMemberWage` being retrieved. - response: - docs: Success - type: root.GetTeamMemberWageResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - response: - body: - team_member_wage: - id: pXS3qCv7BERPnEGedM4S8mhm - team_member_id: 33fJchumvVdJwxV0H6L9 - title: Manager - hourly_rate: - amount: 2000 - currency: USD - job_id: jxJNN6eCJsLrhg5UFJrDWDGE - tip_eligible: false - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/labor/workweekConfigs.yml b/.mock/definition/labor/workweekConfigs.yml deleted file mode 100644 index 225be007..00000000 --- a/.mock/definition/labor/workweekConfigs.yml +++ /dev/null @@ -1,109 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/labor/workweek-configs - method: GET - auth: - - oauth2: - - TIMECARDS_SETTINGS_READ - docs: Returns a list of `WorkweekConfig` instances for a business. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.workweek_configs - source: - openapi: ../default/openapi/openapi.json - display-name: ListWorkweekConfigs - request: - name: ListWorkweekConfigsRequest - query-parameters: - limit: - type: optional> - docs: >- - The maximum number of `WorkweekConfigs` results to return per - page. - cursor: - type: optional> - docs: A pointer to the next page of `WorkweekConfig` results to fetch. - response: - docs: Success - type: root.ListWorkweekConfigsResponse - status-code: 200 - examples: - - query-parameters: - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - workweek_configs: - - id: FY4VCAQN700GM - start_of_week: MON - start_of_day_local_time: '10:00' - version: 11 - created_at: '2016-02-04T00:58:24Z' - updated_at: '2019-02-28T01:04:35Z' - cursor: 2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/labor/workweek-configs/{id} - method: PUT - auth: - - oauth2: - - TIMECARDS_SETTINGS_WRITE - - TIMECARDS_SETTINGS_READ - docs: Updates a `WorkweekConfig`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateWorkweekConfig - request: - name: UpdateWorkweekConfigRequest - path-parameters: - id: - type: string - docs: The UUID for the `WorkweekConfig` object being updated. - body: - properties: - workweek_config: - type: root.WorkweekConfig - docs: The updated `WorkweekConfig` object. - content-type: application/json - response: - docs: Success - type: root.UpdateWorkweekConfigResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - Square-Version: '2025-10-16' - request: - workweek_config: - start_of_week: MON - start_of_day_local_time: '10:00' - version: 10 - response: - body: - workweek_config: - id: FY4VCAQN700GM - start_of_week: MON - start_of_day_local_time: '10:00' - version: 11 - created_at: '2016-02-04T00:58:24Z' - updated_at: '2019-02-28T01:04:35Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/locations.yml b/.mock/definition/locations.yml deleted file mode 100644 index 48bd356d..00000000 --- a/.mock/definition/locations.yml +++ /dev/null @@ -1,807 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/locations - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Provides details about all of the seller's - [locations](https://developer.squareup.com/docs/locations-api), - - including those with an inactive status. Locations are listed - alphabetically by `name`. - source: - openapi: ../default/openapi/openapi.json - display-name: ListLocations - response: - docs: Success - type: root.ListLocationsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - locations: - - id: 18YC4JDH91E1H - name: Grant Park - address: - address_line_1: 123 Main St - locality: San Francisco - administrative_district_level_1: CA - postal_code: '94114' - country: US - timezone: America/Los_Angeles - capabilities: - - CREDIT_CARD_PROCESSING - status: ACTIVE - created_at: '2016-09-19T17:33:12Z' - merchant_id: 3MYCJG5GVYQ8Q - country: US - language_code: en-US - currency: USD - phone_number: +1 650-354-7217 - business_name: Jet Fuel Coffee - type: PHYSICAL - website_url: website_url - business_email: business_email - description: description - twitter_username: twitter_username - instagram_username: instagram_username - facebook_url: facebook_url - logo_url: logo_url - pos_background_url: pos_background_url - mcc: mcc - full_format_logo_url: full_format_logo_url - - id: 3Z4V4WHQK64X9 - name: Midtown - address: - address_line_1: 1234 Peachtree St. NE - locality: Atlanta - administrative_district_level_1: GA - postal_code: '30309' - timezone: America/New_York - capabilities: - - CREDIT_CARD_PROCESSING - status: ACTIVE - created_at: '2022-02-19T17:58:25Z' - merchant_id: 3MYCJG5GVYQ8Q - country: US - language_code: en-US - currency: USD - phone_number: phone_number - business_name: Jet Fuel Coffee - type: PHYSICAL - website_url: website_url - business_email: business_email - description: Midtown Atlanta store - twitter_username: twitter_username - instagram_username: instagram_username - facebook_url: facebook_url - coordinates: - latitude: 33.7889 - longitude: -84.3841 - logo_url: logo_url - pos_background_url: pos_background_url - mcc: '7299' - full_format_logo_url: full_format_logo_url - create: - path: /v2/locations - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates a [location](https://developer.squareup.com/docs/locations-api). - - Creating new locations allows for separate configuration of receipt - layouts, item prices, - - and sales reports. Developers can use locations to separate sales - activity through applications - - that integrate with Square from sales activity elsewhere in a seller's - account. - - Locations created programmatically with the Locations API last forever - and - - are visible to the seller for their own management. Therefore, ensure - that - - each location has a sensible and unique name. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateLocation - request: - name: CreateLocationRequest - body: - properties: - location: - type: optional - docs: >- - The initial values of the location being created. The `name` - field is required and must be unique within a seller account. - - All other fields are optional, but any information you care - about for the location should be included. - - The remaining fields are automatically added based on the data - from the [main - location](https://developer.squareup.com/docs/locations-api#about-the-main-location). - content-type: application/json - response: - docs: Success - type: root.CreateLocationResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - location: - name: Midtown - address: - address_line_1: 1234 Peachtree St. NE - locality: Atlanta - administrative_district_level_1: GA - postal_code: '30309' - description: Midtown Atlanta store - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - location: - id: 3Z4V4WHQK64X9 - name: Midtown - address: - address_line_1: 1234 Peachtree St. NE - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: Atlanta - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: GA - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '30309' - country: ZZ - first_name: first_name - last_name: last_name - timezone: America/New_York - capabilities: - - CREDIT_CARD_PROCESSING - status: ACTIVE - created_at: '2022-02-19T17:58:25Z' - merchant_id: 3MYCJG5GVYQ8Q - country: US - language_code: en-US - currency: USD - phone_number: phone_number - business_name: Jet Fuel Coffee - type: PHYSICAL - website_url: website_url - business_hours: - periods: - - {} - business_email: business_email - description: Midtown Atlanta store - twitter_username: twitter_username - instagram_username: instagram_username - facebook_url: facebook_url - coordinates: - latitude: 33.7889 - longitude: -84.3841 - logo_url: logo_url - pos_background_url: pos_background_url - mcc: '7299' - full_format_logo_url: full_format_logo_url - tax_ids: - eu_vat: eu_vat - fr_siret: fr_siret - fr_naf: fr_naf - es_nif: es_nif - jp_qii: jp_qii - get: - path: /v2/locations/{location_id} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Retrieves details of a single location. Specify "main" - - as the location ID to retrieve details of the [main - location](https://developer.squareup.com/docs/locations-api#about-the-main-location). - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLocation - request: - name: GetLocationsRequest - path-parameters: - location_id: - type: string - docs: |- - The ID of the location to retrieve. Specify the string - "main" to return the main location. - response: - docs: Success - type: root.GetLocationResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - location: - id: 18YC4JDH91E1H - name: Grant Park - address: - address_line_1: 123 Main St - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: San Francisco - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: CA - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '94114' - country: US - first_name: first_name - last_name: last_name - timezone: America/Los_Angeles - capabilities: - - CREDIT_CARD_PROCESSING - status: ACTIVE - created_at: '2016-09-19T17:33:12Z' - merchant_id: 3MYCJG5GVYQ8Q - country: US - language_code: en-US - currency: USD - phone_number: +1 650-354-7217 - business_name: Jet Fuel Coffee - type: PHYSICAL - website_url: website_url - business_hours: - periods: - - {} - business_email: business_email - description: description - twitter_username: twitter_username - instagram_username: instagram_username - facebook_url: facebook_url - coordinates: - latitude: 1.1 - longitude: 1.1 - logo_url: logo_url - pos_background_url: pos_background_url - mcc: mcc - full_format_logo_url: full_format_logo_url - tax_ids: - eu_vat: eu_vat - fr_siret: fr_siret - fr_naf: fr_naf - es_nif: es_nif - jp_qii: jp_qii - update: - path: /v2/locations/{location_id} - method: PUT - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: Updates a [location](https://developer.squareup.com/docs/locations-api). - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateLocation - request: - name: UpdateLocationRequest - path-parameters: - location_id: - type: string - docs: The ID of the location to update. - body: - properties: - location: - type: optional - docs: The `Location` object with only the fields to update. - content-type: application/json - response: - docs: Success - type: root.UpdateLocationResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - request: - location: - business_hours: - periods: - - day_of_week: FRI - start_local_time: '07:00' - end_local_time: '18:00' - - day_of_week: SAT - start_local_time: '07:00' - end_local_time: '18:00' - - day_of_week: SUN - start_local_time: '09:00' - end_local_time: '15:00' - description: Midtown Atlanta store - Open weekends - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - location: - id: 3Z4V4WHQK64X9 - name: Midtown - address: - address_line_1: 1234 Peachtree St. NE - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: Atlanta - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: GA - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '30309' - country: ZZ - first_name: first_name - last_name: last_name - timezone: America/New_York - capabilities: - - CREDIT_CARD_PROCESSING - status: ACTIVE - created_at: '2022-02-19T17:58:25Z' - merchant_id: 3MYCJG5GVYQ8Q - country: US - language_code: en-US - currency: USD - phone_number: phone_number - business_name: Jet Fuel Coffee - type: PHYSICAL - website_url: website_url - business_hours: - periods: - - day_of_week: FRI - start_local_time: '07:00' - end_local_time: '18:00' - - day_of_week: SAT - start_local_time: '07:00' - end_local_time: '18:00' - - day_of_week: SUN - start_local_time: '09:00' - end_local_time: '15:00' - business_email: business_email - description: Midtown Atlanta store - Open weekends - twitter_username: twitter_username - instagram_username: instagram_username - facebook_url: facebook_url - coordinates: - latitude: 33.7889 - longitude: -84.3841 - logo_url: logo_url - pos_background_url: pos_background_url - mcc: '7299' - full_format_logo_url: full_format_logo_url - tax_ids: - eu_vat: eu_vat - fr_siret: fr_siret - fr_naf: fr_naf - es_nif: es_nif - jp_qii: jp_qii - checkouts: - path: /v2/locations/{location_id}/checkouts - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - - ORDERS_WRITE - docs: >- - Links a `checkoutId` to a `checkout_page_url` that customers are - - directed to in order to provide their payment information using a - - payment processing workflow hosted on connect.squareup.com. - - - - NOTE: The Checkout API has been updated with new features. - - For more information, see [Checkout API - highlights](https://developer.squareup.com/docs/checkout-api#checkout-api-highlights). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateCheckout - request: - name: CreateCheckoutRequest - path-parameters: - location_id: - type: string - docs: The ID of the business location to associate the checkout with. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this checkout among others you - have created. It can be - - any valid string but must be unique for every order sent to - Square Checkout for a given location ID. - - - The idempotency key is used to avoid processing the same order - more than once. If you are - - unsure whether a particular checkout was created successfully, - you can attempt it again with - - the same idempotency key and all the same other parameters - without worrying about creating duplicates. - - - You should use a random number/string generator native to the - language - - you are working in to generate strings for your idempotency - keys. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - maxLength: 192 - order: - type: root.CreateOrderRequest - docs: The order including line items to be checked out. - ask_for_shipping_address: - type: optional - docs: >- - If `true`, Square Checkout collects shipping information on your - behalf and stores - - that information with the transaction information in the Square - Seller Dashboard. - - - Default: `false`. - merchant_support_email: - type: optional - docs: >- - The email address to display on the Square Checkout confirmation - page - - and confirmation email that the buyer can use to contact the - seller. - - - If this value is not set, the confirmation page and email - display the - - primary email address associated with the seller's Square - account. - - - Default: none; only exists if explicitly set. - validation: - maxLength: 254 - pre_populate_buyer_email: - type: optional - docs: >- - If provided, the buyer's email is prepopulated on the checkout - page - - as an editable text field. - - - Default: none; only exists if explicitly set. - validation: - maxLength: 254 - pre_populate_shipping_address: - type: optional - docs: >- - If provided, the buyer's shipping information is prepopulated on - the - - checkout page as editable text fields. - - - Default: none; only exists if explicitly set. - redirect_url: - type: optional - docs: >- - The URL to redirect to after the checkout is completed with - `checkoutId`, - - `transactionId`, and `referenceId` appended as URL parameters. - For example, - - if the provided redirect URL is - `http://www.example.com/order-complete`, a - - successful transaction redirects the customer to: - - - `http://www.example.com/order-complete?checkoutId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx` - - - If you do not provide a redirect URL, Square Checkout displays - an order - - confirmation page on your behalf; however, it is strongly - recommended that - - you provide a redirect URL so you can verify the transaction - results and - - finalize the order through your existing/normal confirmation - workflow. - - - Default: none; only exists if explicitly set. - validation: - maxLength: 800 - additional_recipients: - type: optional> - docs: >- - The basic primitive of a multi-party transaction. The value is - optional. - - The transaction facilitated by you can be split from here. - - - If you provide this value, the `amount_money` value in your - `additional_recipients` field - - cannot be more than 90% of the `total_money` calculated by - Square for your order. - - The `location_id` must be a valid seller location where the - checkout is occurring. - - - This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission. - - - This field is currently not supported in the Square Sandbox. - note: - type: optional - docs: |- - An optional note to associate with the `checkout` object. - - This value cannot exceed 60 characters. - validation: - maxLength: 60 - content-type: application/json - response: - docs: Success - type: root.CreateCheckoutResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 86ae1696-b1e3-4328-af6d-f1e04d947ad6 - order: - order: - location_id: location_id - reference_id: reference_id - customer_id: customer_id - line_items: - - name: Printed T Shirt - quantity: '2' - applied_taxes: - - tax_uid: 38ze1696-z1e3-5628-af6d-f1e04d947fg3 - applied_discounts: - - discount_uid: 56ae1696-z1e3-9328-af6d-f1e04d947gd4 - base_price_money: - amount: 1500 - currency: USD - - name: Slim Jeans - quantity: '1' - base_price_money: - amount: 2500 - currency: USD - - name: Woven Sweater - quantity: '3' - base_price_money: - amount: 3500 - currency: USD - taxes: - - uid: 38ze1696-z1e3-5628-af6d-f1e04d947fg3 - type: INCLUSIVE - percentage: '7.75' - scope: LINE_ITEM - discounts: - - uid: 56ae1696-z1e3-9328-af6d-f1e04d947gd4 - type: FIXED_AMOUNT - amount_money: - amount: 100 - currency: USD - scope: LINE_ITEM - idempotency_key: 12ae1696-z1e3-4328-af6d-f1e04d947gd4 - ask_for_shipping_address: true - merchant_support_email: merchant+support@website.com - pre_populate_buyer_email: example@email.com - pre_populate_shipping_address: - address_line_1: 1455 Market St. - address_line_2: Suite 600 - locality: San Francisco - administrative_district_level_1: CA - postal_code: '94103' - country: US - first_name: Jane - last_name: Doe - redirect_url: https://merchant.website.com/order-confirm - additional_recipients: - - location_id: 057P5VYJ4A5X1 - description: Application fees - amount_money: - amount: 60 - currency: USD - response: - body: - checkout: - id: CAISEHGimXh-C3RIT4og1a6u1qw - checkout_page_url: >- - https://connect.squareup.com/v2/checkout?c=CAISEHGimXh-C3RIT4og1a6u1qw&l=CYTKRM7R7JMV8 - ask_for_shipping_address: true - merchant_support_email: merchant+support@website.com - pre_populate_buyer_email: example@email.com - pre_populate_shipping_address: - address_line_1: 1455 Market St. - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: San Francisco - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: CA - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '94103' - country: US - first_name: Jane - last_name: Doe - redirect_url: https://merchant.website.com/order-confirm - order: - id: id - location_id: location_id - reference_id: reference_id - customer_id: customer_id - line_items: - - name: Printed T Shirt - quantity: '2' - applied_taxes: - - tax_uid: 38ze1696-z1e3-5628-af6d-f1e04d947fg3 - applied_money: - amount: 103 - currency: USD - applied_discounts: - - discount_uid: 56ae1696-z1e3-9328-af6d-f1e04d947gd4 - applied_money: - amount: 100 - currency: USD - base_price_money: - amount: 1500 - currency: USD - total_tax_money: - amount: 103 - currency: USD - total_discount_money: - amount: 100 - currency: USD - total_money: - amount: 1503 - currency: USD - - name: Slim Jeans - quantity: '1' - base_price_money: - amount: 2500 - currency: USD - total_money: - amount: 2500 - currency: USD - - name: Woven Sweater - quantity: '3' - base_price_money: - amount: 3500 - currency: USD - total_money: - amount: 10500 - currency: USD - taxes: - - uid: 38ze1696-z1e3-5628-af6d-f1e04d947fg3 - type: INCLUSIVE - percentage: '7.75' - scope: LINE_ITEM - discounts: - - uid: 56ae1696-z1e3-9328-af6d-f1e04d947gd4 - type: FIXED_AMOUNT - amount_money: - amount: 100 - currency: USD - applied_money: - amount: 100 - currency: USD - scope: LINE_ITEM - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - created_at: created_at - updated_at: updated_at - closed_at: closed_at - state: OPEN - version: 1 - total_money: - amount: 14503 - currency: USD - total_tax_money: - amount: 103 - currency: USD - total_discount_money: - amount: 100 - currency: USD - ticket_name: ticket_name - rewards: - - id: id - reward_tier_id: reward_tier_id - created_at: '2017-06-16T22:25:35Z' - additional_recipients: - - location_id: 057P5VYJ4A5X1 - description: Application fees - amount_money: - amount: 60 - currency: USD - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/locations/customAttributeDefinitions.yml b/.mock/definition/locations/customAttributeDefinitions.yml deleted file mode 100644 index 242bbc85..00000000 --- a/.mock/definition/locations/customAttributeDefinitions.yml +++ /dev/null @@ -1,419 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/locations/custom-attribute-definitions - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Lists the location-related [custom attribute - definitions](entity:CustomAttributeDefinition) that belong to a Square - seller account. - - When all response pages are retrieved, the results include all custom - attribute definitions - - that are visible to the requesting application, including those that are - created by other - - applications and set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attribute_definitions - source: - openapi: ../default/openapi/openapi.json - display-name: ListLocationCustomAttributeDefinitions - request: - name: ListCustomAttributeDefinitionsRequest - query-parameters: - visibility_filter: - type: optional> - docs: >- - Filters the `CustomAttributeDefinition` results by their - `visibility` values. - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListLocationCustomAttributeDefinitionsResponse - status-code: 200 - examples: - - query-parameters: - visibility_filter: ALL - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definitions: - - key: phone-number - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.PhoneNumber - name: phone number - description: Location's phone number - visibility: VISIBILITY_READ_ONLY - version: 1 - updated_at: '2022-12-02T19:50:21.832Z' - created_at: '2022-12-02T19:50:21.832Z' - - key: bestseller - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Bestseller - description: Bestselling item at location - visibility: VISIBILITY_READ_WRITE_VALUES - version: 4 - updated_at: '2022-12-03T10:17:52.341Z' - created_at: '2022-12-02T19:06:36.559Z' - cursor: >- - ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/locations/custom-attribute-definitions - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates a location-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - Use this endpoint to define a custom attribute that can be associated - with locations. - - A custom attribute definition specifies the `key`, `visibility`, - `schema`, and other properties - - for a custom attribute. After the definition is created, you can call - - [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) - or - - [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) - - to set the custom attribute for locations. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateLocationCustomAttributeDefinition - request: - name: CreateLocationCustomAttributeDefinitionRequest - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition to create. Note the following: - - - With the exception of the `Selection` data type, the `schema` - is specified as a simple URL to the JSON schema - - definition hosted on the Square CDN. For more information, - including supported values and constraints, see - - [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). - - - `name` is required unless `visibility` is set to - `VISIBILITY_HIDDEN`. - idempotency_key: - type: optional - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateLocationCustomAttributeDefinitionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - key: bestseller - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Bestseller - description: Bestselling item at location - visibility: VISIBILITY_READ_WRITE_VALUES - response: - body: - custom_attribute_definition: - key: bestseller - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Bestseller - description: Bestselling item at location - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-12-02T19:06:36.559Z' - created_at: '2022-12-02T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/locations/custom-attribute-definitions/{key} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Retrieves a location-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - To retrieve a custom attribute definition created by another - application, the `visibility` - - setting must be `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLocationCustomAttributeDefinition - request: - name: GetCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: >- - The key of the custom attribute definition to retrieve. If the - requesting application - - is not the definition owner, you must use the qualified key. - query-parameters: - version: - type: optional> - docs: >- - The current version of the custom attribute definition, which is - used for strongly consistent - - reads to guarantee that you receive the most up-to-date data. When - included in the request, - - Square returns the specified version or a higher version if one - exists. If the specified version - - is higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveLocationCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definition: - key: bestseller - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Bestseller - description: Bestselling item at location - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-12-02T19:06:36.559Z' - created_at: '2022-12-02T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/locations/custom-attribute-definitions/{key} - method: PUT - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Updates a location-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - Use this endpoint to update the following fields: `name`, `description`, - `visibility`, or the - - `schema` for a `Selection` data type. - - Only the definition owner can update a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateLocationCustomAttributeDefinition - request: - name: UpdateLocationCustomAttributeDefinitionRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to update. - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition that contains the fields to - update. This endpoint - - supports sparse updates, so only new or changed fields need to - be included in the request. - - Only the following fields can be updated: - - - `name` - - - `description` - - - `visibility` - - - `schema` for a `Selection` data type. Only changes to the - named options or the maximum number of allowed - - selections are supported. - - - For more information, see - - [Update a location custom attribute - definition](https://developer.squareup.com/docs/location-custom-attributes-api/custom-attribute-definitions#update-custom-attribute-definition). - - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, specify the current version of the custom attribute - definition. - - If this is not important for your application, `version` can be - set to -1. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateLocationCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - response: - body: - custom_attribute_definition: - key: bestseller - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Bestseller - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 2 - updated_at: '2022-12-02T19:34:10.181Z' - created_at: '2022-12-02T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/locations/custom-attribute-definitions/{key} - method: DELETE - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes a location-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - Deleting a custom attribute definition also deletes the corresponding - custom attribute from - - all locations. - - Only the definition owner can delete a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteLocationCustomAttributeDefinition - request: - name: DeleteCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to delete. - response: - docs: Success - type: root.DeleteLocationCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/locations/customAttributes.yml b/.mock/definition/locations/customAttributes.yml deleted file mode 100644 index 252d2cd3..00000000 --- a/.mock/definition/locations/customAttributes.yml +++ /dev/null @@ -1,577 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - batchDelete: - path: /v2/locations/custom-attributes/bulk-delete - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes [custom attributes](entity:CustomAttribute) for locations as a - bulk operation. - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkDeleteLocationCustomAttributes - request: - name: BulkDeleteLocationCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - The data used to update the `CustomAttribute` objects. - - The keys must be unique and are used to map to the corresponding - response. - content-type: application/json - response: - docs: Success - type: root.BulkDeleteLocationCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - id1: - key: bestseller - id2: - key: bestseller - id3: - key: phone-number - response: - body: - values: - id1: - location_id: L0TBCBTB7P8RQ - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - location_id: L9XMD04V3STJX - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id3: - location_id: L0TBCBTB7P8RQ - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchUpsert: - path: /v2/locations/custom-attributes/bulk-upsert - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates or updates [custom attributes](entity:CustomAttribute) for - locations as a bulk operation. - - Use this endpoint to set the value of one or more custom attributes for - one or more locations. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which is - - created using the - [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) - endpoint. - - This `BulkUpsertLocationCustomAttributes` endpoint accepts a map of 1 to - 25 individual upsert - - requests and returns a map of individual upsert responses. Each upsert - request has a unique ID - - and provides a location ID and custom attribute. Each upsert response is - returned with the ID - - of the corresponding request. - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpsertLocationCustomAttributes - request: - name: BulkUpsertLocationCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - A map containing 1 to 25 individual upsert requests. For each - request, provide an - - arbitrary ID that is unique for this - `BulkUpsertLocationCustomAttributes` request and the - - information needed to create or update a custom attribute. - content-type: application/json - response: - docs: Success - type: root.BulkUpsertLocationCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - id1: - location_id: L0TBCBTB7P8RQ - custom_attribute: - key: bestseller - value: hot cocoa - id2: - location_id: L9XMD04V3STJX - custom_attribute: - key: bestseller - value: berry smoothie - id3: - location_id: L0TBCBTB7P8RQ - custom_attribute: - key: phone-number - value: '+12223334444' - response: - body: - values: - id1: - location_id: L0TBCBTB7P8RQ - custom_attribute: - key: bestseller - value: hot cocoa - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2023-01-09T19:21:04.551Z' - created_at: '2023-01-09T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - location_id: L9XMD04V3STJX - custom_attribute: - key: bestseller - value: berry smoothie - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2023-01-09T19:21:04.551Z' - created_at: '2023-01-09T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id3: - location_id: L0TBCBTB7P8RQ - custom_attribute: - key: phone-number - value: '+12239903892' - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2023-01-09T19:21:04.563Z' - created_at: '2023-01-09T19:04:57.985Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - list: - path: /v2/locations/{location_id}/custom-attributes - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Lists the [custom attributes](entity:CustomAttribute) associated with a - location. - - You can use the `with_definitions` query parameter to also retrieve - custom attribute definitions - - in the same call. - - When all response pages are retrieved, the results include all custom - attributes that are - - visible to the requesting application, including those that are owned by - other applications - - and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attributes - source: - openapi: ../default/openapi/openapi.json - display-name: ListLocationCustomAttributes - request: - name: ListCustomAttributesRequest - path-parameters: - location_id: - type: string - docs: The ID of the target [location](entity:Location). - query-parameters: - visibility_filter: - type: optional> - docs: >- - Filters the `CustomAttributeDefinition` results by their - `visibility` values. - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. For more - - information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - with_definitions: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - response: - docs: Success - type: root.ListLocationCustomAttributesResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - query-parameters: - visibility_filter: ALL - limit: 1 - cursor: cursor - with_definitions: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attributes: - - key: phone-number - value: '+12223334444' - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-12-12T18:13:03.745Z' - created_at: '2022-12-12T18:13:03.745Z' - - key: bestseller - value: hot cocoa - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-12-12T19:27:57.975Z' - created_at: '2022-12-12T19:27:57.975Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/locations/{location_id}/custom-attributes/{key} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Retrieves a [custom attribute](entity:CustomAttribute) associated with a - location. - - You can use the `with_definition` query parameter to also retrieve the - custom attribute definition - - in the same call. - - To retrieve a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLocationCustomAttribute - request: - name: GetCustomAttributesRequest - path-parameters: - location_id: - type: string - docs: The ID of the target [location](entity:Location). - key: - type: string - docs: >- - The key of the custom attribute to retrieve. This key must match - the `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - query-parameters: - with_definition: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of - - the custom attribute. Set this parameter to `true` to get the name - and description of the custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - version: - type: optional> - docs: >- - The current version of the custom attribute, which is used for - strongly consistent reads to - - guarantee that you receive the most up-to-date data. When included - in the request, Square - - returns the specified version or a higher version if one exists. - If the specified version is - - higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveLocationCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - key: key - query-parameters: - with_definition: true - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute: - key: bestseller - value: hot cocoa - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2023-01-09T19:21:04.551Z' - created_at: '2023-01-09T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - upsert: - path: /v2/locations/{location_id}/custom-attributes/{key} - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates or updates a [custom attribute](entity:CustomAttribute) for a - location. - - Use this endpoint to set the value of a custom attribute for a specified - location. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which - - is created using the - [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) - endpoint. - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertLocationCustomAttribute - request: - name: UpsertLocationCustomAttributeRequest - path-parameters: - location_id: - type: string - docs: The ID of the target [location](entity:Location). - key: - type: string - docs: >- - The key of the custom attribute to create or update. This key must - match the `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - body: - properties: - custom_attribute: - type: root.CustomAttribute - docs: >- - The custom attribute to create or update, with the following - fields: - - - `value`. This value must conform to the `schema` specified by - the definition. - - For more information, see [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control for an update operation, include the current version of - the custom attribute. - - If this is not important for your application, version can be - set to -1. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpsertLocationCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute: - value: hot cocoa - response: - body: - custom_attribute: - key: bestseller - value: hot cocoa - version: 2 - visibility: VISIBILITY_READ_WRITE_VALUES - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2023-01-09T19:21:04.551Z' - created_at: '2023-01-09T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/locations/{location_id}/custom-attributes/{key} - method: DELETE - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes a [custom attribute](entity:CustomAttribute) associated with a - location. - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteLocationCustomAttribute - request: - name: DeleteCustomAttributesRequest - path-parameters: - location_id: - type: string - docs: The ID of the target [location](entity:Location). - key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - response: - docs: Success - type: root.DeleteLocationCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - location_id: location_id - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/locations/transactions.yml b/.mock/definition/locations/transactions.yml deleted file mode 100644 index 605e1b42..00000000 --- a/.mock/definition/locations/transactions.yml +++ /dev/null @@ -1,344 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/locations/{location_id}/transactions - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Lists transactions for a particular location. - - - Transactions include payment information from sales and exchanges and - refund - - information from returns and exchanges. - - - Max results per - [page](https://developer.squareup.com/docs/working-with-apis/pagination): - 50 - source: - openapi: ../default/openapi/openapi.json - display-name: ListTransactions - request: - name: ListTransactionsRequest - path-parameters: - location_id: - type: string - docs: The ID of the location to list transactions for. - query-parameters: - begin_time: - type: optional> - docs: >- - The beginning of the requested reporting period, in RFC 3339 - format. - - - See [Date - ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) - for details on date inclusivity/exclusivity. - - - Default value: The current time minus one year. - end_time: - type: optional> - docs: >- - The end of the requested reporting period, in RFC 3339 format. - - - See [Date - ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) - for details on date inclusivity/exclusivity. - - - Default value: The current time. - sort_order: - type: optional> - docs: |- - The order in which results are listed in the response (`ASC` for - oldest first, `DESC` for newest first). - - Default value: `DESC` - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this to retrieve the next set of results for your original - query. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - response: - docs: Success - type: root.ListTransactionsResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - query-parameters: - begin_time: begin_time - end_time: end_time - sort_order: DESC - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - transactions: - - id: KnL67ZIwXCPtzOrqj0HrkxMF - location_id: 18YC4JDH91E1H - created_at: '2016-01-20T22:57:56Z' - tenders: - - id: MtZRYYdDrYNQbOvV7nbuBvMF - location_id: 18YC4JDH91E1H - transaction_id: KnL67ZIwXCPtzOrqj0HrkxMF - created_at: '2016-01-20T22:57:56Z' - note: some optional note - amount_money: - amount: 5000 - currency: USD - processing_fee_money: - amount: 138 - currency: USD - type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - entry_method: KEYED - additional_recipients: - - location_id: 057P5VYJ4A5X1 - description: Application fees - amount_money: - amount: 20 - currency: USD - refunds: - - id: 7a5RcVI0CxbOcJ2wMOkE - location_id: 18YC4JDH91E1H - transaction_id: KnL67ZIwXCPtzOrqj0HrkxMF - tender_id: MtZRYYdDrYNQbOvV7nbuBvMF - created_at: '2016-01-20T22:59:20Z' - reason: some reason why - amount_money: - amount: 5000 - currency: USD - status: APPROVED - processing_fee_money: - amount: 138 - currency: USD - additional_recipients: - - location_id: 057P5VYJ4A5X1 - description: Application fees - amount_money: - amount: 100 - currency: USD - reference_id: some optional reference id - product: EXTERNAL_API - client_id: client_id - order_id: order_id - cursor: cursor - get: - path: /v2/locations/{location_id}/transactions/{transaction_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: Retrieves details for a single transaction. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTransaction - request: - name: GetTransactionsRequest - path-parameters: - location_id: - type: string - docs: The ID of the transaction's associated location. - transaction_id: - type: string - docs: The ID of the transaction to retrieve. - response: - docs: Success - type: root.GetTransactionResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - transaction_id: transaction_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - transaction: - id: KnL67ZIwXCPtzOrqj0HrkxMF - location_id: 18YC4JDH91E1H - created_at: '2016-03-10T22:57:56Z' - tenders: - - id: MtZRYYdDrYNQbOvV7nbuBvMF - location_id: 18YC4JDH91E1H - transaction_id: KnL67ZIwXCPtzOrqj0HrkxMF - created_at: '2016-03-10T22:57:56Z' - note: some optional note - amount_money: - amount: 5000 - currency: USD - processing_fee_money: - amount: 138 - currency: USD - type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - entry_method: KEYED - additional_recipients: - - location_id: 057P5VYJ4A5X1 - description: Application fees - amount_money: - amount: 20 - currency: USD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - reference_id: some optional reference id - product: EXTERNAL_API - client_id: client_id - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - order_id: order_id - capture: - path: /v2/locations/{location_id}/transactions/{transaction_id}/capture - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Captures a transaction that was created with the - [Charge](api-endpoint:Transactions-Charge) - - endpoint with a `delay_capture` value of `true`. - - - - See [Delayed capture - transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) - - for more information. - source: - openapi: ../default/openapi/openapi.json - display-name: CaptureTransaction - request: - name: CaptureTransactionsRequest - path-parameters: - location_id: - type: string - docs: '' - transaction_id: - type: string - docs: '' - response: - docs: Success - type: root.CaptureTransactionResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - transaction_id: transaction_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - void: - path: /v2/locations/{location_id}/transactions/{transaction_id}/void - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels a transaction that was created with the - [Charge](api-endpoint:Transactions-Charge) - - endpoint with a `delay_capture` value of `true`. - - - - See [Delayed capture - transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) - - for more information. - source: - openapi: ../default/openapi/openapi.json - display-name: VoidTransaction - request: - name: VoidTransactionsRequest - path-parameters: - location_id: - type: string - docs: '' - transaction_id: - type: string - docs: '' - response: - docs: Success - type: root.VoidTransactionResponse - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - transaction_id: transaction_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/loyalty.yml b/.mock/definition/loyalty.yml deleted file mode 100644 index 5a9e2484..00000000 --- a/.mock/definition/loyalty.yml +++ /dev/null @@ -1,139 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - searchEvents: - path: /v2/loyalty/events/search - method: POST - auth: - - oauth2: - - LOYALTY_READ - docs: >- - 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. - - - Search results are sorted by `created_at` in descending order. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchLoyaltyEvents - request: - name: SearchLoyaltyEventsRequest - body: - properties: - query: - type: optional - docs: >- - 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. - limit: - type: optional - docs: |- - The maximum number of results to include in the response. - The last page might contain fewer events. - The default is 30 events. - validation: - min: 1 - max: 30 - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchLoyaltyEventsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - order_filter: - order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - limit: 30 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - events: - - id: c27c8465-806e-36f2-b4b3-71f5887b5ba8 - type: ACCUMULATE_POINTS - created_at: '2020-05-08T22:01:30Z' - accumulate_points: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - points: 5 - order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - adjust_points: - points: 1 - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: P034NEENMD09F - source: LOYALTY_API - expire_points: - points: 1 - other_event: - points: 1 - - id: e4a5cbc3-a4d0-3779-98e9-e578885d9430 - type: REDEEM_REWARD - created_at: '2020-05-08T22:01:15Z' - redeem_reward: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - reward_id: d03f79f4-815f-3500-b851-cc1e68a457f9 - order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - adjust_points: - points: 1 - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: P034NEENMD09F - source: LOYALTY_API - expire_points: - points: 1 - other_event: - points: 1 - - id: 5e127479-0b03-3671-ab1e-15faea8b7188 - type: CREATE_REWARD - created_at: '2020-05-08T22:00:44Z' - create_reward: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - reward_id: d03f79f4-815f-3500-b851-cc1e68a457f9 - points: -10 - adjust_points: - points: 1 - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: location_id - source: LOYALTY_API - expire_points: - points: 1 - other_event: - points: 1 - cursor: cursor - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/loyalty/accounts.yml b/.mock/definition/loyalty/accounts.yml deleted file mode 100644 index a5103eda..00000000 --- a/.mock/definition/loyalty/accounts.yml +++ /dev/null @@ -1,482 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/loyalty/accounts - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - Creates a loyalty account. To create a loyalty account, you must provide - the `program_id` and a `mapping` with the `phone_number` of the buyer. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateLoyaltyAccount - request: - name: CreateLoyaltyAccountRequest - body: - properties: - loyalty_account: - type: root.LoyaltyAccount - docs: The loyalty account to create. - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreateLoyaltyAccount` - request. - - Keys can be any valid string, but must be unique for every - request. - validation: - minLength: 1 - maxLength: 128 - content-type: application/json - response: - docs: Success - type: root.CreateLoyaltyAccountResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - loyalty_account: - program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - mapping: - phone_number: '+14155551234' - idempotency_key: ec78c477-b1c3-4899-a209-a4e71337c996 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_account: - id: 79b807d2-d786-46a9-933b-918028d7a8c5 - program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - balance: 0 - lifetime_points: 0 - customer_id: QPTXM8PQNX3Q726ZYHPMNP46XC - enrolled_at: enrolled_at - created_at: '2020-05-08T21:44:32Z' - updated_at: '2020-05-08T21:44:32Z' - mapping: - id: 66aaab3f-da99-49ed-8b19-b87f851c844f - created_at: '2020-05-08T21:44:32Z' - phone_number: '+14155551234' - expiring_point_deadlines: - - points: 1 - expires_at: expires_at - search: - path: /v2/loyalty/accounts/search - method: POST - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Searches for loyalty accounts in a loyalty program. - - - You can search for a loyalty account using the phone number or customer - ID associated with the account. To return all loyalty accounts, specify - an empty `query` object or omit it entirely. - - - Search results are sorted by `created_at` in ascending order. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchLoyaltyAccounts - request: - name: SearchLoyaltyAccountsRequest - body: - properties: - query: - type: optional - docs: The search criteria for the request. - limit: - type: optional - docs: >- - The maximum number of results to include in the response. The - default value is 30. - validation: - min: 1 - max: 200 - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchLoyaltyAccountsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - mappings: - - phone_number: '+14155551234' - limit: 10 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_accounts: - - id: 79b807d2-d786-46a9-933b-918028d7a8c5 - program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - balance: 10 - lifetime_points: 20 - customer_id: Q8002FAM9V1EZ0ADB2T5609X6NET1H0 - enrolled_at: enrolled_at - created_at: '2020-05-08T21:44:32Z' - updated_at: '2020-05-08T21:44:32Z' - mapping: - id: 66aaab3f-da99-49ed-8b19-b87f851c844f - created_at: '2020-05-08T21:44:32Z' - phone_number: '+14155551234' - expiring_point_deadlines: - - points: 1 - expires_at: expires_at - cursor: cursor - get: - path: /v2/loyalty/accounts/{account_id} - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: Retrieves a loyalty account. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLoyaltyAccount - request: - name: GetAccountsRequest - path-parameters: - account_id: - type: string - docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) to - retrieve. - response: - docs: Success - type: root.GetLoyaltyAccountResponse - status-code: 200 - examples: - - path-parameters: - account_id: account_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_account: - id: 79b807d2-d786-46a9-933b-918028d7a8c5 - program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - balance: 10 - lifetime_points: 20 - customer_id: Q8002FAM9V1EZ0ADB2T5609X6NET1H0 - enrolled_at: enrolled_at - created_at: '2020-05-08T21:44:32Z' - updated_at: '2020-05-08T21:44:32Z' - mapping: - id: 66aaab3f-da99-49ed-8b19-b87f851c844f - created_at: '2020-05-08T21:44:32Z' - phone_number: '+14155551234' - expiring_point_deadlines: - - points: 1 - expires_at: expires_at - accumulatePoints: - path: /v2/loyalty/accounts/{account_id}/accumulate - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - Adds points earned from a purchase to a [loyalty - account](entity:LoyaltyAccount). - - - - If you are using the Orders API to manage orders, provide the - `order_id`. Square reads the order - - to compute the points earned from both the base loyalty program and an - associated - - [loyalty promotion](entity:LoyaltyPromotion). For purchases that qualify - for multiple accrual - - rules, Square computes points based on the accrual rule that grants the - most points. - - For purchases that qualify for multiple promotions, Square computes - points based on the most - - recently created promotion. A purchase must first qualify for program - points to be eligible for promotion points. - - - - If you are not using the Orders API to manage orders, provide `points` - with the number of points to add. - - You must first perform a client-side computation of the points earned - from the loyalty program and - - loyalty promotion. For spend-based and visit-based programs, you can - call - [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) - - to compute the points earned from the base loyalty program. For - information about computing points earned from a loyalty promotion, see - - [Calculating promotion - points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points). - source: - openapi: ../default/openapi/openapi.json - display-name: AccumulateLoyaltyPoints - request: - name: AccumulateLoyaltyPointsRequest - path-parameters: - account_id: - type: string - docs: The ID of the target [loyalty account](entity:LoyaltyAccount). - body: - properties: - accumulate_points: - type: root.LoyaltyEventAccumulatePoints - docs: >- - The points to add to the account. - - If you are using the Orders API to manage orders, specify the - order ID. - - Otherwise, specify the points to add. - idempotency_key: - type: string - docs: >- - A unique string that identifies the `AccumulateLoyaltyPoints` - request. - - Keys can be any valid string but must be unique for every - request. - validation: - minLength: 1 - maxLength: 128 - location_id: - type: string - docs: The [location](entity:Location) where the purchase was made. - content-type: application/json - response: - docs: Success - type: root.AccumulateLoyaltyPointsResponse - status-code: 200 - examples: - - path-parameters: - account_id: account_id - headers: - Square-Version: '2025-10-16' - request: - accumulate_points: - order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - idempotency_key: 58b90739-c3e8-4b11-85f7-e636d48d72cb - location_id: P034NEENMD09F - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - event: - id: id - type: ACCUMULATE_POINTS - created_at: created_at - accumulate_points: - loyalty_program_id: loyalty_program_id - points: 1 - order_id: order_id - create_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - redeem_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - order_id: order_id - delete_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - adjust_points: - loyalty_program_id: loyalty_program_id - points: 1 - reason: reason - loyalty_account_id: loyalty_account_id - location_id: location_id - source: SQUARE - expire_points: - loyalty_program_id: loyalty_program_id - points: 1 - other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: - loyalty_program_id: loyalty_program_id - loyalty_promotion_id: loyalty_promotion_id - points: 1 - order_id: order_id - events: - - id: ee46aafd-1af6-3695-a385-276e2ef0be26 - type: ACCUMULATE_POINTS - created_at: '2020-05-08T21:41:12Z' - accumulate_points: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - points: 6 - order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - adjust_points: - points: 1 - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: P034NEENMD09F - source: LOYALTY_API - expire_points: - points: 1 - other_event: - points: 1 - adjust: - path: /v2/loyalty/accounts/{account_id}/adjust - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - 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](api-endpoint:Loyalty-AccumulateLoyaltyPoints) - - to add points when a buyer pays for the purchase. - source: - openapi: ../default/openapi/openapi.json - display-name: AdjustLoyaltyPoints - request: - name: AdjustLoyaltyPointsRequest - path-parameters: - account_id: - type: string - docs: The ID of the target [loyalty account](entity:LoyaltyAccount). - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this `AdjustLoyaltyPoints` - request. - - Keys can be any valid string, but must be unique for every - request. - validation: - minLength: 1 - maxLength: 128 - adjust_points: - type: root.LoyaltyEventAdjustPoints - docs: >- - The points to add or subtract and the reason for the adjustment. - To add points, specify a positive integer. - - To subtract points, specify a negative integer. - allow_negative_balance: - type: optional> - docs: >- - Indicates whether to allow a negative adjustment to result in a - negative balance. If `true`, a negative - - balance is allowed when subtracting points. If `false`, Square - returns a `BAD_REQUEST` error when subtracting - - the specified number of points would result in a negative - balance. The default value is `false`. - content-type: application/json - response: - docs: Success - type: root.AdjustLoyaltyPointsResponse - status-code: 200 - examples: - - path-parameters: - account_id: account_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: bc29a517-3dc9-450e-aa76-fae39ee849d1 - adjust_points: - points: 10 - reason: Complimentary points - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - event: - id: 613a6fca-8d67-39d0-bad2-3b4bc45c8637 - type: ADJUST_POINTS - created_at: '2020-05-08T21:42:32Z' - accumulate_points: - loyalty_program_id: loyalty_program_id - points: 1 - order_id: order_id - create_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - redeem_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - order_id: order_id - delete_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - adjust_points: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - points: 10 - reason: Complimentary points - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: location_id - source: LOYALTY_API - expire_points: - loyalty_program_id: loyalty_program_id - points: 1 - other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: - loyalty_program_id: loyalty_program_id - loyalty_promotion_id: loyalty_promotion_id - points: 1 - order_id: order_id - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/loyalty/programs.yml b/.mock/definition/loyalty/programs.yml deleted file mode 100644 index ff17dbb9..00000000 --- a/.mock/definition/loyalty/programs.yml +++ /dev/null @@ -1,280 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/loyalty/programs - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Returns a list of loyalty programs in the seller's account. - - Loyalty programs define how buyers can earn points and redeem points for - rewards. Square sellers can have only one loyalty program, which is - created and managed from the Seller Dashboard. For more information, see - [Loyalty Program - Overview](https://developer.squareup.com/docs/loyalty/overview). - - - - Replaced with - [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) - when used with the keyword `main`. - source: - openapi: ../default/openapi/openapi.json - display-name: ListLoyaltyPrograms - response: - docs: Success - type: root.ListLoyaltyProgramsResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - programs: - - id: d619f755-2d17-41f3-990d-c04ecedd64dd - status: ACTIVE - reward_tiers: - - id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - name: 10% off entire sale - created_at: '2020-04-20T16:55:11Z' - pricing_rule_reference: - object_id: 74C4JSHESNLTB2A7ITO5HO6F - catalog_version: 1000000 - expiration_policy: - expiration_duration: expiration_duration - terminology: - one: Point - other: Points - location_ids: - - P034NEENMD09F - created_at: '2020-04-20T16:55:11Z' - updated_at: '2020-05-01T02:00:02Z' - accrual_rules: - - accrual_type: SPEND - points: 1 - spend_data: - amount_money: - amount: 100 - currency: USD - excluded_category_ids: - - 7ZERJKO5PVYXCVUHV2JCZ2UG - - FQKAOJE5C4FIMF5A2URMLW6V - excluded_item_variation_ids: - - CBZXBUVVTYUBZGQO44RHMR6B - - EDILT24Z2NISEXDKGY6HP7XV - tax_mode: BEFORE_TAX - get: - path: /v2/loyalty/programs/{program_id} - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Retrieves the loyalty program in a seller's account, specified by the - program ID or the keyword `main`. - - - Loyalty programs define how buyers can earn points and redeem points for - rewards. Square sellers can have only one loyalty program, which is - created and managed from the Seller Dashboard. For more information, see - [Loyalty Program - Overview](https://developer.squareup.com/docs/loyalty/overview). - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLoyaltyProgram - request: - name: GetProgramsRequest - path-parameters: - program_id: - type: string - docs: >- - The ID of the loyalty program or the keyword `main`. Either value - can be used to retrieve the single loyalty program that belongs to - the seller. - response: - docs: Success - type: root.GetLoyaltyProgramResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - program: - id: d619f755-2d17-41f3-990d-c04ecedd64dd - status: ACTIVE - reward_tiers: - - id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - name: 10% off entire sale - created_at: '2020-04-20T16:55:11Z' - pricing_rule_reference: - object_id: 74C4JSHESNLTB2A7ITO5HO6F - catalog_version: 1000000 - expiration_policy: - expiration_duration: expiration_duration - terminology: - one: Point - other: Points - location_ids: - - P034NEENMD09F - created_at: '2020-04-20T16:55:11Z' - updated_at: '2020-05-01T02:00:02Z' - accrual_rules: - - accrual_type: SPEND - points: 1 - spend_data: - amount_money: - amount: 100 - currency: USD - excluded_category_ids: - - 7ZERJKO5PVYXCVUHV2JCZ2UG - - FQKAOJE5C4FIMF5A2URMLW6V - excluded_item_variation_ids: - - CBZXBUVVTYUBZGQO44RHMR6B - - EDILT24Z2NISEXDKGY6HP7XV - tax_mode: BEFORE_TAX - calculate: - path: /v2/loyalty/programs/{program_id}/calculate - method: POST - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Calculates the number of points a buyer can earn from a purchase. - Applications might call this endpoint - - to display the points to the buyer. - - - - If you are using the Orders API to manage orders, provide the - `order_id` and (optional) `loyalty_account_id`. - - Square reads the order to compute the points earned from the base - loyalty program and an associated - - [loyalty promotion](entity:LoyaltyPromotion). - - - - If you are not using the Orders API to manage orders, provide - `transaction_amount_money` with the - - purchase amount. Square uses this amount to calculate the points earned - from the base loyalty program, - - but not points earned from a loyalty promotion. For spend-based and - visit-based programs, the `tax_mode` - - setting of the accrual rule indicates how taxes should be treated for - loyalty points accrual. - - If the purchase qualifies for program points, call - - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) and - perform a client-side computation - - to calculate whether the purchase also qualifies for promotion points. - For more information, see - - [Calculating promotion - points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points). - source: - openapi: ../default/openapi/openapi.json - display-name: CalculateLoyaltyPoints - request: - name: CalculateLoyaltyPointsRequest - path-parameters: - program_id: - type: string - docs: >- - The ID of the [loyalty program](entity:LoyaltyProgram), which - defines the rules for accruing points. - body: - properties: - order_id: - type: optional> - docs: >- - The [order](entity: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_money`. - transaction_amount_money: - type: optional - docs: >- - 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`. - loyalty_account_id: - type: optional> - docs: >- - The ID of the target [loyalty account](entity:LoyaltyAccount). - Optionally specify this field - - if your application uses the Orders API to process orders. - - - If specified, the `promotion_points` field in the response shows - the number of points the buyer would - - earn from the purchase. In this case, Square uses the account ID - to determine whether the promotion's - - `trigger_limit` (the maximum number of times that a buyer can - trigger the promotion) has been reached. - - If not specified, the `promotion_points` field shows the number - of points the purchase qualifies - - for regardless of the trigger limit. - validation: - minLength: 1 - maxLength: 36 - content-type: application/json - response: - docs: Success - type: root.CalculateLoyaltyPointsResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - headers: - Square-Version: '2025-10-16' - request: - order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - loyalty_account_id: 79b807d2-d786-46a9-933b-918028d7a8c5 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - points: 6 - promotion_points: 12 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/loyalty/programs/promotions.yml b/.mock/definition/loyalty/programs/promotions.yml deleted file mode 100644 index 086deb5e..00000000 --- a/.mock/definition/loyalty/programs/promotions.yml +++ /dev/null @@ -1,476 +0,0 @@ -imports: - root: ../../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/loyalty/programs/{program_id}/promotions - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Lists the loyalty promotions associated with a [loyalty - program](entity:LoyaltyProgram). - - Results are sorted by the `created_at` date in descending order (newest - to oldest). - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.loyalty_promotions - source: - openapi: ../default/openapi/openapi.json - display-name: ListLoyaltyPromotions - request: - name: ListPromotionsRequest - path-parameters: - program_id: - type: string - docs: >- - The ID of the base [loyalty program](entity:LoyaltyProgram). To - get the program ID, - - call - [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) - using the `main` keyword. - query-parameters: - status: - type: optional> - docs: >- - The status to filter the results by. If a status is provided, only - loyalty promotions - - with the specified status are returned. Otherwise, all loyalty - promotions associated with - - the loyalty program are returned. - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. - - The minimum value is 1 and the maximum value is 30. The default - value is 30. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListLoyaltyPromotionsResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - query-parameters: - status: ACTIVE - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_promotions: - - id: loypromo_f0f9b849-725e-378d-b810-511237e07b67 - name: Tuesday Happy Hour Promo - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - points_multiplier: 3 - multiplier: '3.000' - available_time: - start_date: '2022-08-16' - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220816T160000 - DURATION:PT2H - RRULE:FREQ=WEEKLY;BYDAY=TU - END:VEVENT - trigger_limit: - times: 1 - interval: DAY - status: ACTIVE - created_at: '2022-08-16T08:38:54Z' - canceled_at: canceled_at - updated_at: '2022-08-16T08:38:54Z' - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - qualifying_item_variation_ids: - - CJ3RYL56ITAKMD4VRCM7XERS - - AT3RYLR3TUA9C34VRCB7X5RR - qualifying_category_ids: - - qualifying_category_ids - - id: loypromo_e696f057-2286-35ff-8108-132241328106 - name: July Special - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - points_multiplier: 2 - multiplier: '2.000' - available_time: - start_date: '2022-07-01' - end_date: '2022-08-01' - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220704T090000 - DURATION:PT8H - RRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=MO - END:VEVENT - - |- - BEGIN:VEVENT - DTSTART:20220705T090000 - DURATION:PT8H - RRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=TU - END:VEVENT - - |- - BEGIN:VEVENT - DTSTART:20220706T090000 - DURATION:PT8H - RRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=WE - END:VEVENT - - |- - BEGIN:VEVENT - DTSTART:20220707T090000 - DURATION:PT8H - RRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=TH - END:VEVENT - - |- - BEGIN:VEVENT - DTSTART:20220701T090000 - DURATION:PT8H - RRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=FR - END:VEVENT - trigger_limit: - times: 5 - interval: ALL_TIME - status: ENDED - created_at: '2022-06-27T15:37:38Z' - canceled_at: canceled_at - updated_at: '2022-06-27T15:37:38Z' - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - minimum_spend_amount_money: - amount: 2000 - currency: USD - qualifying_item_variation_ids: - - qualifying_item_variation_ids - qualifying_category_ids: - - XTQPYLR3IIU9C44VRCB3XD12 - cursor: cursor - create: - path: /v2/loyalty/programs/{program_id}/promotions - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - Creates a loyalty promotion for a [loyalty - program](entity:LoyaltyProgram). A loyalty promotion - - enables buyers to earn points in addition to those earned from the base - loyalty program. - - - This endpoint sets the loyalty promotion to the `ACTIVE` or `SCHEDULED` - status, depending on the - - `available_time` setting. A loyalty program can have a maximum of 10 - loyalty promotions with an - - `ACTIVE` or `SCHEDULED` status. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateLoyaltyPromotion - request: - name: CreateLoyaltyPromotionRequest - path-parameters: - program_id: - type: string - docs: >- - The ID of the [loyalty program](entity:LoyaltyProgram) to - associate with the promotion. - - To get the program ID, call - [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) - - using the `main` keyword. - body: - properties: - loyalty_promotion: - type: root.LoyaltyPromotion - docs: The loyalty promotion to create. - idempotency_key: - type: string - docs: >- - A unique identifier for this request, which is used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 128 - content-type: application/json - response: - docs: Success - type: root.CreateLoyaltyPromotionResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - headers: - Square-Version: '2025-10-16' - request: - loyalty_promotion: - name: Tuesday Happy Hour Promo - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - multiplier: '3.0' - available_time: - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220816T160000 - DURATION:PT2H - RRULE:FREQ=WEEKLY;BYDAY=TU - END:VEVENT - trigger_limit: - times: 1 - interval: DAY - minimum_spend_amount_money: - amount: 2000 - currency: USD - qualifying_category_ids: - - XTQPYLR3IIU9C44VRCB3XD12 - idempotency_key: ec78c477-b1c3-4899-a209-a4e71337c996 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_promotion: - id: loypromo_f0f9b849-725e-378d-b810-511237e07b67 - name: Tuesday Happy Hour Promo - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - points_multiplier: 3 - multiplier: '3.000' - points_addition_data: - points_addition: 1 - available_time: - start_date: '2022-08-16' - end_date: end_date - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220816T160000 - DURATION:PT2H - RRULE:FREQ=WEEKLY;BYDAY=TU - END:VEVENT - trigger_limit: - times: 1 - interval: DAY - status: ACTIVE - created_at: '2022-08-16T08:38:54Z' - canceled_at: canceled_at - updated_at: '2022-08-16T08:38:54Z' - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - minimum_spend_amount_money: - amount: 2000 - currency: USD - qualifying_item_variation_ids: - - qualifying_item_variation_ids - qualifying_category_ids: - - XTQPYLR3IIU9C44VRCB3XD12 - get: - path: /v2/loyalty/programs/{program_id}/promotions/{promotion_id} - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: Retrieves a loyalty promotion. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLoyaltyPromotion - request: - name: GetPromotionsRequest - path-parameters: - program_id: - type: string - docs: >- - The ID of the base [loyalty program](entity:LoyaltyProgram). To - get the program ID, - - call - [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) - using the `main` keyword. - promotion_id: - type: string - docs: >- - The ID of the [loyalty promotion](entity:LoyaltyPromotion) to - retrieve. - response: - docs: Success - type: root.GetLoyaltyPromotionResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - promotion_id: promotion_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_promotion: - id: loypromo_f0f9b849-725e-378d-b810-511237e07b67 - name: Tuesday Happy Hour Promo - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - points_multiplier: 3 - multiplier: '3.000' - points_addition_data: - points_addition: 1 - available_time: - start_date: '2022-08-16' - end_date: end_date - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220816T160000 - DURATION:PT2H - RRULE:FREQ=WEEKLY;BYDAY=TU - END:VEVENT - trigger_limit: - times: 1 - interval: DAY - status: ACTIVE - created_at: '2022-08-16T08:38:54Z' - canceled_at: canceled_at - updated_at: '2022-08-16T08:38:54Z' - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - minimum_spend_amount_money: - amount: 2000 - currency: USD - qualifying_item_variation_ids: - - CJ3RYL56ITAKMD4VRCM7XERS - - AT3RYLR3TUA9C34VRCB7X5RR - qualifying_category_ids: - - qualifying_category_ids - cancel: - path: /v2/loyalty/programs/{program_id}/promotions/{promotion_id}/cancel - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - Cancels a loyalty promotion. Use this endpoint to cancel an `ACTIVE` - promotion earlier than the - - end date, cancel an `ACTIVE` promotion when an end date is not - specified, or cancel a `SCHEDULED` promotion. - - Because updating a promotion is not supported, you can also use this - endpoint to cancel a promotion before - - you create a new one. - - - This endpoint sets the loyalty promotion to the `CANCELED` state - source: - openapi: ../default/openapi/openapi.json - display-name: CancelLoyaltyPromotion - request: - name: CancelPromotionsRequest - path-parameters: - program_id: - type: string - docs: The ID of the base [loyalty program](entity:LoyaltyProgram). - promotion_id: - type: string - docs: >- - The ID of the [loyalty promotion](entity:LoyaltyPromotion) to - cancel. You can cancel a - - promotion that has an `ACTIVE` or `SCHEDULED` status. - response: - docs: Success - type: root.CancelLoyaltyPromotionResponse - status-code: 200 - examples: - - path-parameters: - program_id: program_id - promotion_id: promotion_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - loyalty_promotion: - id: loypromo_f0f9b849-725e-378d-b810-511237e07b67 - name: Tuesday Happy Hour Promo - incentive: - type: POINTS_MULTIPLIER - points_multiplier_data: - points_multiplier: 3 - multiplier: '3.000' - points_addition_data: - points_addition: 1 - available_time: - start_date: '2022-08-16' - end_date: end_date - time_periods: - - |- - BEGIN:VEVENT - DTSTART:20220816T160000 - DURATION:PT2H - RRULE:FREQ=WEEKLY;BYDAY=TU - END:VEVENT - trigger_limit: - times: 1 - interval: DAY - status: CANCELED - created_at: '2022-08-16T08:38:54Z' - canceled_at: '2022-08-17T12:42:49Z' - updated_at: '2022-08-17T12:42:49Z' - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - minimum_spend_amount_money: - amount: 2000 - currency: USD - qualifying_item_variation_ids: - - qualifying_item_variation_ids - qualifying_category_ids: - - XTQPYLR3IIU9C44VRCB3XD12 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/loyalty/rewards.yml b/.mock/definition/loyalty/rewards.yml deleted file mode 100644 index 4e153c2e..00000000 --- a/.mock/definition/loyalty/rewards.yml +++ /dev/null @@ -1,390 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/loyalty/rewards - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - 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. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateLoyaltyReward - request: - name: CreateLoyaltyRewardRequest - body: - properties: - reward: - type: root.LoyaltyReward - docs: The reward to create. - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreateLoyaltyReward` - request. - - Keys can be any valid string, but must be unique for every - request. - validation: - minLength: 1 - maxLength: 128 - content-type: application/json - response: - docs: Success - type: root.CreateLoyaltyRewardResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - reward: - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - idempotency_key: 18c2e5ea-a620-4b1f-ad60-7b167285e451 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - reward: - id: a8f43ebe-2ad6-3001-bdd5-7d7c2da08943 - status: ISSUED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - created_at: '2020-05-01T21:49:54Z' - updated_at: '2020-05-01T21:49:54Z' - redeemed_at: redeemed_at - search: - path: /v2/loyalty/rewards/search - method: POST - auth: - - oauth2: - - LOYALTY_READ - docs: >- - Searches for loyalty rewards. This endpoint accepts a request with no - query filters and returns results for all loyalty accounts. - - If you include a `query` object, `loyalty_account_id` is required and - `status` is optional. - - - If you know a reward ID, use the - - [RetrieveLoyaltyReward](api-endpoint:Loyalty-RetrieveLoyaltyReward) - endpoint. - - - Search results are sorted by `updated_at` in descending order. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchLoyaltyRewards - request: - name: SearchLoyaltyRewardsRequest - body: - properties: - query: - type: optional - docs: >- - The search criteria for the request. - - If empty, the endpoint retrieves all loyalty rewards in the - loyalty program. - limit: - type: optional - docs: >- - The maximum number of results to return in the response. The - default value is 30. - validation: - min: 1 - max: 30 - cursor: - type: optional - docs: >- - 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/build-basics/common-api-patterns/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchLoyaltyRewardsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - limit: 10 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - rewards: - - id: d03f79f4-815f-3500-b851-cc1e68a457f9 - status: REDEEMED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - created_at: '2020-05-08T22:00:44Z' - updated_at: '2020-05-08T22:01:17Z' - redeemed_at: '2020-05-08T22:01:17Z' - - id: 9f18ac21-233a-31c3-be77-b45840f5a810 - status: REDEEMED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: order_id - created_at: '2020-05-08T21:55:42Z' - updated_at: '2020-05-08T21:56:00Z' - redeemed_at: '2020-05-08T21:56:00Z' - - id: a8f43ebe-2ad6-3001-bdd5-7d7c2da08943 - status: DELETED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: 5NB69ZNh3FbsOs1ox43bh1xrli6YY - created_at: '2020-05-01T21:49:54Z' - updated_at: '2020-05-08T21:55:10Z' - redeemed_at: redeemed_at - - id: a051254c-f840-3b45-8cf1-50bcd38ff92a - status: ISSUED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: LQQ16znvi2VIUKPVhUfJefzr1eEZY - created_at: '2020-05-01T20:20:37Z' - updated_at: '2020-05-01T20:20:40Z' - redeemed_at: redeemed_at - cursor: cursor - get: - path: /v2/loyalty/rewards/{reward_id} - method: GET - auth: - - oauth2: - - LOYALTY_READ - docs: Retrieves a loyalty reward. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveLoyaltyReward - request: - name: GetRewardsRequest - path-parameters: - reward_id: - type: string - docs: The ID of the [loyalty reward](entity:LoyaltyReward) to retrieve. - response: - docs: Success - type: root.GetLoyaltyRewardResponse - status-code: 200 - examples: - - path-parameters: - reward_id: reward_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - reward: - id: 9f18ac21-233a-31c3-be77-b45840f5a810 - status: REDEEMED - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f - points: 10 - order_id: order_id - created_at: '2020-05-08T21:55:42Z' - updated_at: '2020-05-08T21:56:00Z' - redeemed_at: '2020-05-08T21:56:00Z' - delete: - path: /v2/loyalty/rewards/{reward_id} - method: DELETE - auth: - - oauth2: - - LOYALTY_WRITE - docs: >- - 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](api-endpoint:Loyalty-CreateLoyaltyReward)), - - it updates the order by removing the reward and related - - discounts. - - - You cannot delete a reward that has reached the terminal state - (REDEEMED). - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteLoyaltyReward - request: - name: DeleteRewardsRequest - path-parameters: - reward_id: - type: string - docs: The ID of the [loyalty reward](entity:LoyaltyReward) to delete. - response: - docs: Success - type: root.DeleteLoyaltyRewardResponse - status-code: 200 - examples: - - path-parameters: - reward_id: reward_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - redeem: - path: /v2/loyalty/rewards/{reward_id}/redeem - method: POST - auth: - - oauth2: - - LOYALTY_WRITE - docs: |- - Redeems a loyalty reward. - - The endpoint sets the reward to the `REDEEMED` terminal state. - - If you are using your own order processing system (not using the - Orders API), you call this endpoint after the buyer paid for the - purchase. - - After the reward reaches the terminal state, it cannot be deleted. - In other words, points used for the reward cannot be returned - to the account. - source: - openapi: ../default/openapi/openapi.json - display-name: RedeemLoyaltyReward - request: - name: RedeemLoyaltyRewardRequest - path-parameters: - reward_id: - type: string - docs: The ID of the [loyalty reward](entity:LoyaltyReward) to redeem. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this `RedeemLoyaltyReward` - request. - - Keys can be any valid string, but must be unique for every - request. - validation: - minLength: 1 - maxLength: 128 - location_id: - type: string - docs: >- - The ID of the [location](entity:Location) where the reward is - redeemed. - validation: - minLength: 1 - content-type: application/json - response: - docs: Success - type: root.RedeemLoyaltyRewardResponse - status-code: 200 - examples: - - path-parameters: - reward_id: reward_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 98adc7f7-6963-473b-b29c-f3c9cdd7d994 - location_id: P034NEENMD09F - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - event: - id: 67377a6e-dbdc-369d-aa16-2e7ed422e71f - type: REDEEM_REWARD - created_at: '2020-05-08T21:56:00Z' - accumulate_points: - loyalty_program_id: loyalty_program_id - points: 1 - order_id: order_id - create_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - redeem_reward: - loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd - reward_id: 9f18ac21-233a-31c3-be77-b45840f5a810 - order_id: order_id - delete_reward: - loyalty_program_id: loyalty_program_id - reward_id: reward_id - points: 1 - adjust_points: - loyalty_program_id: loyalty_program_id - points: 1 - reason: reason - loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd - location_id: P034NEENMD09F - source: LOYALTY_API - expire_points: - loyalty_program_id: loyalty_program_id - points: 1 - other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: - loyalty_program_id: loyalty_program_id - loyalty_promotion_id: loyalty_promotion_id - points: 1 - order_id: order_id - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/merchants.yml b/.mock/definition/merchants.yml deleted file mode 100644 index e8ab22a9..00000000 --- a/.mock/definition/merchants.yml +++ /dev/null @@ -1,122 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/merchants - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Provides details about the merchant associated with a given access - token. - - - The access token used to connect your application to a Square seller is - associated - - with a single merchant. That means that `ListMerchants` returns a list - - with a single `Merchant` object. You can specify your personal access - token - - to get your own merchant information or specify an OAuth token to get - the - - information for the merchant that granted your application access. - - - If you know the merchant ID, you can also use the - [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) - - endpoint to retrieve the merchant information. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.merchant - source: - openapi: ../default/openapi/openapi.json - display-name: ListMerchants - request: - name: ListMerchantsRequest - query-parameters: - cursor: - type: optional> - docs: The cursor generated by the previous response. - response: - docs: Success - type: root.ListMerchantsResponse - status-code: 200 - examples: - - query-parameters: - cursor: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - merchant: - - id: DM7VKY8Q63GNP - business_name: Apple A Day - country: US - language_code: en-US - currency: USD - status: ACTIVE - main_location_id: 9A65CGC72ZQG1 - created_at: '2021-12-10T19:25:52.484Z' - cursor: 1 - get: - path: /v2/merchants/{merchant_id} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: Retrieves the `Merchant` object for the given `merchant_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveMerchant - request: - name: GetMerchantsRequest - path-parameters: - merchant_id: - type: string - docs: >- - The ID of the merchant to retrieve. If the string "me" is supplied - as the ID, - - then retrieve the merchant that is currently accessible to this - call. - response: - docs: Success - type: root.GetMerchantResponse - status-code: 200 - examples: - - path-parameters: - merchant_id: merchant_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - merchant: - id: DM7VKY8Q63GNP - business_name: Apple A Day - country: US - language_code: en-US - currency: USD - status: ACTIVE - main_location_id: 9A65CGC72ZQG1 - created_at: '2021-12-10T19:25:52.484Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/merchants/customAttributeDefinitions.yml b/.mock/definition/merchants/customAttributeDefinitions.yml deleted file mode 100644 index cb19194a..00000000 --- a/.mock/definition/merchants/customAttributeDefinitions.yml +++ /dev/null @@ -1,421 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/merchants/custom-attribute-definitions - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Lists the merchant-related [custom attribute - definitions](entity:CustomAttributeDefinition) that belong to a Square - seller account. - - When all response pages are retrieved, the results include all custom - attribute definitions - - that are visible to the requesting application, including those that are - created by other - - applications and set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attribute_definitions - source: - openapi: ../default/openapi/openapi.json - display-name: ListMerchantCustomAttributeDefinitions - request: - name: ListCustomAttributeDefinitionsRequest - query-parameters: - visibility_filter: - type: optional> - docs: >- - Filters the `CustomAttributeDefinition` results by their - `visibility` values. - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListMerchantCustomAttributeDefinitionsResponse - status-code: 200 - examples: - - query-parameters: - visibility_filter: ALL - limit: 1 - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definitions: - - key: has_seen_tutorial - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean - name: NAME - description: >- - Whether the merchant has seen the tutorial screen for using - the app. - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2023-05-05T16:50:21.832Z' - created_at: '2023-05-05T16:50:21.832Z' - - key: alternative_seller_name - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Alternative Merchant Name - description: This is the other name this merchant goes by. - visibility: VISIBILITY_READ_ONLY - version: 4 - updated_at: '2023-05-05T10:17:52.341Z' - created_at: '2023-05-05T19:06:36.559Z' - cursor: >- - ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/merchants/custom-attribute-definitions - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates a merchant-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - Use this endpoint to define a custom attribute that can be associated - with a merchant connecting to your application. - - A custom attribute definition specifies the `key`, `visibility`, - `schema`, and other properties - - for a custom attribute. After the definition is created, you can call - - [UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) - or - - [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) - - to set the custom attribute for a merchant. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateMerchantCustomAttributeDefinition - request: - name: CreateMerchantCustomAttributeDefinitionRequest - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition to create. Note the following: - - - With the exception of the `Selection` data type, the `schema` - is specified as a simple URL to the JSON schema - - definition hosted on the Square CDN. For more information, - including supported values and constraints, see - - [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). - - - `name` is required unless `visibility` is set to - `VISIBILITY_HIDDEN`. - idempotency_key: - type: optional - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateMerchantCustomAttributeDefinitionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - key: alternative_seller_name - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Alternative Merchant Name - description: This is the other name this merchant goes by. - visibility: VISIBILITY_READ_ONLY - response: - body: - custom_attribute_definition: - key: alternative_seller_name - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Alternative Merchant Name - description: This is the other name this merchant goes by. - visibility: VISIBILITY_READ_ONLY - version: 1 - updated_at: '2023-05-05T19:06:36.559Z' - created_at: '2023-05-05T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/merchants/custom-attribute-definitions/{key} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Retrieves a merchant-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - To retrieve a custom attribute definition created by another - application, the `visibility` - - setting must be `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveMerchantCustomAttributeDefinition - request: - name: GetCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: >- - The key of the custom attribute definition to retrieve. If the - requesting application - - is not the definition owner, you must use the qualified key. - query-parameters: - version: - type: optional> - docs: >- - The current version of the custom attribute definition, which is - used for strongly consistent - - reads to guarantee that you receive the most up-to-date data. When - included in the request, - - Square returns the specified version or a higher version if one - exists. If the specified version - - is higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveMerchantCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definition: - key: alternative_seller_name - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Alternative Merchant Name - description: This is the other name this merchant goes by. - visibility: VISIBILITY_READ_ONLY - version: 1 - updated_at: '2023-05-05T19:06:36.559Z' - created_at: '2023-05-05T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/merchants/custom-attribute-definitions/{key} - method: PUT - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Updates a merchant-related [custom attribute - definition](entity:CustomAttributeDefinition) for a Square seller - account. - - Use this endpoint to update the following fields: `name`, `description`, - `visibility`, or the - - `schema` for a `Selection` data type. - - Only the definition owner can update a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateMerchantCustomAttributeDefinition - request: - name: UpdateMerchantCustomAttributeDefinitionRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to update. - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition that contains the fields to - update. This endpoint - - supports sparse updates, so only new or changed fields need to - be included in the request. - - Only the following fields can be updated: - - - `name` - - - `description` - - - `visibility` - - - `schema` for a `Selection` data type. Only changes to the - named options or the maximum number of allowed - - selections are supported. - - For more information, see - - [Update a merchant custom attribute - definition](https://developer.squareup.com/docs/merchant-custom-attributes-api/custom-attribute-definitions#update-custom-attribute-definition). - - The version field must match the current version of the custom - attribute definition to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - If this is not important for your application, version can be - set to -1. For any other values, the request fails with a - BAD_REQUEST error. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateMerchantCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - response: - body: - custom_attribute_definition: - key: alternative_seller_name - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String - name: Alternative Merchant Name - description: Update the description as desired. - visibility: VISIBILITY_READ_ONLY - version: 2 - updated_at: '2023-05-05T19:34:10.181Z' - created_at: '2023-05-05T19:06:36.559Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/merchants/custom-attribute-definitions/{key} - method: DELETE - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes a merchant-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - Deleting a custom attribute definition also deletes the corresponding - custom attribute from - - the merchant. - - Only the definition owner can delete a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteMerchantCustomAttributeDefinition - request: - name: DeleteCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to delete. - response: - docs: Success - type: root.DeleteMerchantCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/merchants/customAttributes.yml b/.mock/definition/merchants/customAttributes.yml deleted file mode 100644 index f1105769..00000000 --- a/.mock/definition/merchants/customAttributes.yml +++ /dev/null @@ -1,552 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - batchDelete: - path: /v2/merchants/custom-attributes/bulk-delete - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes [custom attributes](entity:CustomAttribute) for a merchant as a - bulk operation. - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkDeleteMerchantCustomAttributes - request: - name: BulkDeleteMerchantCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - The data used to update the `CustomAttribute` objects. - - The keys must be unique and are used to map to the corresponding - response. - content-type: application/json - response: - docs: Success - type: root.BulkDeleteMerchantCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - id1: - key: alternative_seller_name - id2: - key: has_seen_tutorial - response: - body: - values: - id1: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchUpsert: - path: /v2/merchants/custom-attributes/bulk-upsert - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates or updates [custom attributes](entity:CustomAttribute) for a - merchant as a bulk operation. - - Use this endpoint to set the value of one or more custom attributes for - a merchant. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which is - - created using the - [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) - endpoint. - - This `BulkUpsertMerchantCustomAttributes` endpoint accepts a map of 1 to - 25 individual upsert - - requests and returns a map of individual upsert responses. Each upsert - request has a unique ID - - and provides a merchant ID and custom attribute. Each upsert response is - returned with the ID - - of the corresponding request. - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpsertMerchantCustomAttributes - request: - name: BulkUpsertMerchantCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - A map containing 1 to 25 individual upsert requests. For each - request, provide an - - arbitrary ID that is unique for this - `BulkUpsertMerchantCustomAttributes` request and the - - information needed to create or update a custom attribute. - content-type: application/json - response: - docs: Success - type: root.BulkUpsertMerchantCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - id1: - merchant_id: DM7VKY8Q63GNP - custom_attribute: - key: alternative_seller_name - value: Ultimate Sneaker Store - id2: - merchant_id: DM7VKY8Q63GNP - custom_attribute: - key: has_seen_tutorial - value: true - response: - body: - values: - id1: - merchant_id: DM7VKY8Q63GNP - custom_attribute: - key: alternative_seller_name - value: Ultimate Sneaker Store - version: 2 - visibility: VISIBILITY_READ_ONLY - updated_at: '2023-05-06T19:21:04.551Z' - created_at: '2023-05-06T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id2: - merchant_id: DM7VKY8Q63GNP - custom_attribute: - key: has_seen_tutorial - value: true - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2023-05-06T19:21:04.551Z' - created_at: '2023-05-06T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - list: - path: /v2/merchants/{merchant_id}/custom-attributes - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Lists the [custom attributes](entity:CustomAttribute) associated with a - merchant. - - You can use the `with_definitions` query parameter to also retrieve - custom attribute definitions - - in the same call. - - When all response pages are retrieved, the results include all custom - attributes that are - - visible to the requesting application, including those that are owned by - other applications - - and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attributes - source: - openapi: ../default/openapi/openapi.json - display-name: ListMerchantCustomAttributes - request: - name: ListCustomAttributesRequest - path-parameters: - merchant_id: - type: string - docs: The ID of the target [merchant](entity:Merchant). - query-parameters: - visibility_filter: - type: optional> - docs: >- - Filters the `CustomAttributeDefinition` results by their - `visibility` values. - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. For more - - information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - with_definitions: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - response: - docs: Success - type: root.ListMerchantCustomAttributesResponse - status-code: 200 - examples: - - path-parameters: - merchant_id: merchant_id - query-parameters: - visibility_filter: ALL - limit: 1 - cursor: cursor - with_definitions: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attributes: - - key: has_seen_tutorial - value: true - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2023-05-05T18:13:03.745Z' - created_at: '2023-05-05T18:13:03.745Z' - - key: alternative_seller_name - value: Ultimate Sneaker Store - version: 1 - visibility: VISIBILITY_READ_ONLY - updated_at: '2023-05-05T19:27:57.975Z' - created_at: '2023-05-05T19:27:57.975Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/merchants/{merchant_id}/custom-attributes/{key} - method: GET - auth: - - oauth2: - - MERCHANT_PROFILE_READ - docs: >- - Retrieves a [custom attribute](entity:CustomAttribute) associated with a - merchant. - - You can use the `with_definition` query parameter to also retrieve the - custom attribute definition - - in the same call. - - To retrieve a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveMerchantCustomAttribute - request: - name: GetCustomAttributesRequest - path-parameters: - merchant_id: - type: string - docs: The ID of the target [merchant](entity:Merchant). - key: - type: string - docs: >- - The key of the custom attribute to retrieve. This key must match - the `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - query-parameters: - with_definition: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of - - the custom attribute. Set this parameter to `true` to get the name - and description of the custom - - attribute, information about the data type, or other definition - details. The default value is `false`. - version: - type: optional> - docs: >- - The current version of the custom attribute, which is used for - strongly consistent reads to - - guarantee that you receive the most up-to-date data. When included - in the request, Square - - returns the specified version or a higher version if one exists. - If the specified version is - - higher than the current version, Square returns a `BAD_REQUEST` - error. - response: - docs: Success - type: root.RetrieveMerchantCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - merchant_id: merchant_id - key: key - query-parameters: - with_definition: true - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute: - key: alternative_seller_name - value: Ultimate Sneaker Store - version: 2 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2023-05-06T19:21:04.551Z' - created_at: '2023-05-06T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - upsert: - path: /v2/merchants/{merchant_id}/custom-attributes/{key} - method: POST - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Creates or updates a [custom attribute](entity:CustomAttribute) for a - merchant. - - Use this endpoint to set the value of a custom attribute for a specified - merchant. - - A custom attribute is based on a custom attribute definition in a Square - seller account, which - - is created using the - [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) - endpoint. - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertMerchantCustomAttribute - request: - name: UpsertMerchantCustomAttributeRequest - path-parameters: - merchant_id: - type: string - docs: The ID of the target [merchant](entity:Merchant). - key: - type: string - docs: >- - The key of the custom attribute to create or update. This key must - match the `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - body: - properties: - custom_attribute: - type: root.CustomAttribute - docs: >- - The custom attribute to create or update, with the following - fields: - - - `value`. This value must conform to the `schema` specified by - the definition. - - For more information, see [Supported data - types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). - - - The version field must match the current version of the custom - attribute definition to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - If this is not important for your application, version can be - set to -1. For any other values, the request fails with a - BAD_REQUEST error. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. For more information, - - see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpsertMerchantCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - merchant_id: merchant_id - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute: - value: Ultimate Sneaker Store - response: - body: - custom_attribute: - key: alternative_seller_name - value: Ultimate Sneaker Store - version: 2 - visibility: VISIBILITY_READ_ONLY - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2023-05-06T19:21:04.551Z' - created_at: '2023-05-06T19:02:58.647Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/merchants/{merchant_id}/custom-attributes/{key} - method: DELETE - auth: - - oauth2: - - MERCHANT_PROFILE_WRITE - docs: >- - Deletes a [custom attribute](entity:CustomAttribute) associated with a - merchant. - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteMerchantCustomAttribute - request: - name: DeleteCustomAttributesRequest - path-parameters: - merchant_id: - type: string - docs: The ID of the target [merchant](entity:Merchant). - key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a custom - - attribute definition in the Square seller account. If the - requesting application is not the - - definition owner, you must use the qualified key. - response: - docs: Success - type: root.DeleteMerchantCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - merchant_id: merchant_id - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/mobile.yml b/.mock/definition/mobile.yml deleted file mode 100644 index 7dc82048..00000000 --- a/.mock/definition/mobile.yml +++ /dev/null @@ -1,80 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - authorizationCode: - path: /mobile/authorization-code - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE_IN_PERSON - docs: >- - __Note:__ This endpoint is used by the deprecated Reader SDK. - - Developers should update their integration to use the [Mobile Payments - SDK](https://developer.squareup.com/docs/mobile-payments-sdk), which - includes its own authorization methods. - - - Generates code to authorize a mobile application to connect to a Square - card reader. - - - Authorization codes are one-time-use codes and expire 60 minutes after - being issued. - - - The `Authorization` header you provide to this endpoint must have the - following format: - - - ``` - - Authorization: Bearer ACCESS_TOKEN - - ``` - - - Replace `ACCESS_TOKEN` with a - - [valid production authorization - credential](https://developer.squareup.com/docs/build-basics/access-tokens). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateMobileAuthorizationCode - request: - name: CreateMobileAuthorizationCodeRequest - body: - properties: - location_id: - type: optional - docs: >- - The Square location ID that the authorization code should be - tied to. - validation: - minLength: 1 - maxLength: 191 - content-type: application/json - response: - docs: Success - type: root.CreateMobileAuthorizationCodeResponse - status-code: 200 - availability: deprecated - examples: - - headers: - Square-Version: '2025-10-16' - request: - location_id: YOUR_LOCATION_ID - response: - body: - authorization_code: YOUR_MOBILE_AUTHORIZATION_CODE - expires_at: '2019-01-10T19:42:08Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/oAuth.yml b/.mock/definition/oAuth.yml deleted file mode 100644 index dcd74e96..00000000 --- a/.mock/definition/oAuth.yml +++ /dev/null @@ -1,376 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - revokeToken: - path: /oauth2/revoke - method: POST - auth: - - {} - docs: >- - Revokes an access token generated with the OAuth flow. - - - If an account has more than one OAuth access token for your application, - this - - endpoint revokes all of them, regardless of which token you specify. - - - __Important:__ The `Authorization` header for this endpoint must have - the - - following format: - - - ``` - - Authorization: Client APPLICATION_SECRET - - ``` - - - Replace `APPLICATION_SECRET` with the application secret on the - **OAuth** - - page for your application in the Developer Dashboard. - source: - openapi: ../default/openapi/openapi.json - display-name: RevokeToken - request: - name: RevokeTokenRequest - body: - properties: - client_id: - type: optional> - docs: >- - The Square-issued ID for your application, which is available on - the **OAuth** page in the - - [Developer Dashboard](https://developer.squareup.com/apps). - validation: - maxLength: 191 - access_token: - type: optional> - docs: >- - The access token of the merchant whose token you want to revoke. - - Do not provide a value for `merchant_id` if you provide this - parameter. - validation: - minLength: 2 - maxLength: 1024 - merchant_id: - type: optional> - docs: >- - The ID of the merchant whose token you want to revoke. - - Do not provide a value for `access_token` if you provide this - parameter. - revoke_only_access_token: - type: optional> - docs: |- - If `true`, terminate the given single access token, but do not - terminate the entire authorization. - Default: `false` - content-type: application/json - response: - docs: Success - type: root.RevokeTokenResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - client_id: CLIENT_ID - access_token: ACCESS_TOKEN - response: - body: - success: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - obtainToken: - path: /oauth2/token - method: POST - docs: >- - Returns an OAuth access token and refresh token using the - `authorization_code` - - or `refresh_token` grant type. - - - When `grant_type` is `authorization_code`: - - - With the [code - flow](https://developer.squareup.com/docs/oauth-api/overview#code-flow), - - provide `code`, `client_id`, and `client_secret`. - - - With the [PKCE - flow](https://developer.squareup.com/docs/oauth-api/overview#pkce-flow), - - provide `code`, `client_id`, and `code_verifier`. - - - When `grant_type` is `refresh_token`: - - - With the code flow, provide `refresh_token`, `client_id`, and - `client_secret`. - - The response returns the same refresh token provided in the request. - - - With the PKCE flow, provide `refresh_token` and `client_id`. The - response returns - - a new refresh token. - - - You can use the `scopes` parameter to limit the set of permissions - authorized by the - - access token. You can use the `short_lived` parameter to create an - access token that - - expires in 24 hours. - - - __Important:__ OAuth tokens should be encrypted and stored on a secure - server. - - Application clients should never interact directly with OAuth tokens. - source: - openapi: ../default/openapi/openapi.json - display-name: ObtainToken - request: - name: ObtainTokenRequest - body: - properties: - client_id: - type: string - docs: >- - The Square-issued ID of your application, which is available as - the **Application ID** - - on the **OAuth** page in the [Developer - Console](https://developer.squareup.com/apps). - - - Required for the code flow and PKCE flow for any grant type. - validation: - maxLength: 191 - client_secret: - type: optional> - docs: >- - The secret key for your application, which is available as the - **Application secret** - - on the **OAuth** page in the [Developer - Console](https://developer.squareup.com/apps). - - - Required for the code flow for any grant type. Don't confuse - your client secret with your - - personal access token. - validation: - minLength: 2 - maxLength: 1024 - code: - type: optional> - docs: >- - The authorization code to exchange for an OAuth access token. - This is the `code` - - value that Square sent to your redirect URL in the authorization - response. - - - Required for the code flow and PKCE flow if `grant_type` is - `authorization_code`. - validation: - maxLength: 191 - redirect_uri: - type: optional> - docs: >- - The redirect URL for your application, which you registered as - the **Redirect URL** - - on the **OAuth** page in the [Developer - Console](https://developer.squareup.com/apps). - - - Required for the code flow and PKCE flow if `grant_type` is - `authorization_code` and - - you provided the `redirect_uri` parameter in your authorization - URL. - validation: - maxLength: 2048 - grant_type: - type: string - docs: >- - The method used to obtain an OAuth access token. The request - must include the - - credential that corresponds to the specified grant type. Valid - values are: - - - `authorization_code` - Requires the `code` field. - - - `refresh_token` - Requires the `refresh_token` field. - - - `migration_token` - LEGACY for access tokens obtained using a - Square API version prior - - to 2019-03-13. Requires the `migration_token` field. - validation: - minLength: 10 - maxLength: 20 - refresh_token: - type: optional> - docs: >- - A valid refresh token used to generate a new OAuth access token. - This is a - - refresh token that was returned in a previous `ObtainToken` - response. - - - Required for the code flow and PKCE flow if `grant_type` is - `refresh_token`. - validation: - minLength: 2 - maxLength: 1024 - migration_token: - type: optional> - docs: >- - __LEGACY__ A valid access token (obtained using a Square API - version prior to 2019-03-13) - - used to generate a new OAuth access token. - - - Required if `grant_type` is `migration_token`. For more - information, see - - [Migrate to Using Refresh - Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens). - validation: - minLength: 2 - maxLength: 1024 - scopes: - type: optional>> - docs: >- - The list of permissions that are explicitly requested for the - access token. - - For example, - ["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"]. - - - The returned access token is limited to the permissions that are - the intersection - - of these requested permissions and those authorized by the - provided `refresh_token`. - - - Optional for the code flow and PKCE flow if `grant_type` is - `refresh_token`. - short_lived: - type: optional> - docs: >- - Indicates whether the returned access token should expire in 24 - hours. - - - Optional for the code flow and PKCE flow for any grant type. The - default value is `false`. - code_verifier: - type: optional> - docs: >- - The secret your application generated for the authorization - request used to - - obtain the authorization code. This is the source of the - `code_challenge` hash you - - provided in your authorization URL. - - - Required for the PKCE flow if `grant_type` is - `authorization_code`. - content-type: application/json - response: - docs: Success - type: root.ObtainTokenResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - client_id: sq0idp-uaPHILoPzWZk3tlJqlML0g - client_secret: sq0csp-30a-4C_tVOnTh14Piza2BfTPBXyLafLPWSzY1qAjeBfM - code: sq0cgb-l0SBqxs4uwxErTVyYOdemg - grant_type: authorization_code - response: - body: - access_token: EAAl3ikZIe18J-2-cHlV2bL4-EaZHGoJUhtEBT7QA6-7AgwIHw8Xe1IoUvGsNxA - token_type: bearer - expires_at: '2025-04-03T18:31:06Z' - merchant_id: MLQW2MYBY81PZ - subscription_id: subscription_id - plan_id: plan_id - id_token: id_token - refresh_token: EQAAl0OcByu3IYJYScGGg-8E5YNf0r0b6jCTCMy5nOcRZ4ok0wbWAL8vY3tZWNcc - short_lived: false - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refresh_token_expires_at: refresh_token_expires_at - RetrieveTokenStatus: - path: /oauth2/token/status - method: POST - auth: - - oauth2: [] - docs: "Returns information about an [OAuth access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-an-oauth-access-token)\_or an application’s [personal access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-a-personal-access-token).\n\nAdd the access token to the Authorization header of the request.\n\n__Important:__ The `Authorization` header you provide to this endpoint must have the following format:\n\n```\nAuthorization: Bearer ACCESS_TOKEN\n```\n\nwhere `ACCESS_TOKEN` is a\n[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).\n\nIf the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error." - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTokenStatus - response: - docs: Success - type: root.RetrieveTokenStatusResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - scopes: - - PAYMENTS_READ - - PAYMENTS_WRITE - expires_at: '2022-10-14T14:44:00Z' - client_id: CLIENT_ID - merchant_id: MERCHANT_ID - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - authorize: - path: /oauth2/authorize - method: GET - source: - openapi: ../default/openapi/openapi.json - examples: - - headers: - Square-Version: '2025-10-16' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml deleted file mode 100644 index f5e91a55..00000000 --- a/.mock/definition/orders.yml +++ /dev/null @@ -1,1734 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/orders - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Creates a new [order](entity:Order) that can include information about - products for - - purchase and settings to apply to the purchase. - - - To pay for a created order, see - - [Pay for - Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders). - - - You can modify open orders using the - [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateOrder - request: - body: root.CreateOrderRequest - content-type: application/json - response: - docs: Success - type: root.CreateOrderResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - order: - location_id: 057P5VYJ4A5X1 - reference_id: my-order-001 - line_items: - - name: New York Strip Steak - quantity: '1' - base_price_money: - amount: 1599 - currency: USD - - quantity: '2' - catalog_object_id: BEMYCSMIJL46OCDV4KYIKXIB - modifiers: - - catalog_object_id: CHQX7Y4KY6N5KINJKZCFURPZ - applied_discounts: - - discount_uid: one-dollar-off - taxes: - - uid: state-sales-tax - name: State Sales Tax - percentage: '9' - scope: ORDER - discounts: - - uid: labor-day-sale - name: Labor Day Sale - percentage: '5' - scope: ORDER - - uid: membership-discount - catalog_object_id: DB7L55ZH2BGWI4H23ULIWOQ7 - scope: ORDER - - uid: one-dollar-off - name: Sale - $1.00 off - amount_money: - amount: 100 - currency: USD - scope: LINE_ITEM - idempotency_key: 8193148c-9586-11e6-99f9-28cfe92138cf - response: - body: - order: - id: CAISENgvlJ6jLWAzERDzjyHVybY - location_id: 057P5VYJ4A5X1 - reference_id: my-order-001 - source: - name: My App - customer_id: customer_id - line_items: - - uid: 8uSwfzvUImn3IRrvciqlXC - name: New York Strip Steak - quantity: '1' - applied_taxes: - - uid: aKG87ArnDpvMLSZJHxWUl - tax_uid: state-sales-tax - applied_money: - amount: 136 - currency: USD - applied_discounts: - - uid: jWdgP1TpHPFBuVrz81mXVC - discount_uid: membership-discount - applied_money: - amount: 8 - currency: USD - - uid: jnZOjjVY57eRcQAVgEwFuC - discount_uid: labor-day-sale - applied_money: - amount: 79 - currency: USD - base_price_money: - amount: 1599 - currency: USD - variation_total_price_money: - amount: 1599 - currency: USD - gross_sales_money: - amount: 1599 - currency: USD - total_tax_money: - amount: 136 - currency: USD - total_discount_money: - amount: 87 - currency: USD - total_money: - amount: 1648 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: v8ZuEXpOJpb0bazLuvrLDB - name: New York Steak - quantity: '2' - catalog_object_id: BEMYCSMIJL46OCDV4KYIKXIB - variation_name: Larger - modifiers: - - uid: Lo3qMMckDluu9Qsb58d4CC - catalog_object_id: CHQX7Y4KY6N5KINJKZCFURPZ - name: Well - base_price_money: - amount: 50 - currency: USD - total_price_money: - amount: 100 - currency: USD - applied_taxes: - - uid: v1dAgrfUVUPTnVTf9sRPz - tax_uid: state-sales-tax - applied_money: - amount: 374 - currency: USD - applied_discounts: - - uid: nUXvdsIItfKko0dbYtY58C - discount_uid: membership-discount - applied_money: - amount: 22 - currency: USD - - uid: qSdkOOOernlVQqsJ94SPjB - discount_uid: labor-day-sale - applied_money: - amount: 224 - currency: USD - - uid: y7bVl4njrWAnfDwmz19izB - discount_uid: one-dollar-off - applied_money: - amount: 100 - currency: USD - base_price_money: - amount: 2200 - currency: USD - variation_total_price_money: - amount: 4400 - currency: USD - gross_sales_money: - amount: 4500 - currency: USD - total_tax_money: - amount: 374 - currency: USD - total_discount_money: - amount: 346 - currency: USD - total_money: - amount: 4528 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - uid: state-sales-tax - name: State Sales Tax - type: ADDITIVE - percentage: '9' - applied_money: - amount: 510 - currency: USD - scope: ORDER - discounts: - - uid: membership-discount - catalog_object_id: DB7L55ZH2BGWI4H23ULIWOQ7 - name: Membership Discount - type: FIXED_PERCENTAGE - percentage: '0.5' - applied_money: - amount: 30 - currency: USD - scope: ORDER - - uid: labor-day-sale - name: Labor Day Sale - type: FIXED_PERCENTAGE - percentage: '5' - applied_money: - amount: 303 - currency: USD - scope: ORDER - - uid: one-dollar-off - name: Sale - $1.00 off - type: FIXED_AMOUNT - amount_money: - amount: 100 - currency: USD - applied_money: - amount: 100 - currency: USD - scope: LINE_ITEM - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 6176 - currency: USD - tax_money: - amount: 510 - currency: USD - discount_money: - amount: 433 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2020-01-17T20:47:53.293Z' - updated_at: '2020-01-17T20:47:53.293Z' - closed_at: closed_at - state: OPEN - version: 1 - total_money: - amount: 6176 - currency: USD - total_tax_money: - amount: 510 - currency: USD - total_discount_money: - amount: 433 - currency: USD - total_tip_money: - amount: 0 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchGet: - path: /v2/orders/batch-retrieve - method: POST - auth: - - oauth2: - - ORDERS_READ - docs: >- - Retrieves a set of [orders](entity:Order) by their IDs. - - - If a given order ID does not exist, the ID is ignored instead of - generating an error. - source: - openapi: ../default/openapi/openapi.json - display-name: BatchRetrieveOrders - request: - name: BatchGetOrdersRequest - body: - properties: - location_id: - type: optional> - docs: >- - The ID of the location for these orders. This field is optional: - omit it to retrieve - - orders within the scope of the current authorization's merchant - ID. - order_ids: - docs: >- - The IDs of the orders to retrieve. A maximum of 100 orders can - be retrieved per request. - type: list - content-type: application/json - response: - docs: Success - type: root.BatchGetOrdersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - location_id: 057P5VYJ4A5X1 - order_ids: - - CAISEM82RcpmcFBM0TfOyiHV3es - - CAISENgvlJ6jLWAzERDzjyHVybY - response: - body: - orders: - - id: CAISEM82RcpmcFBM0TfOyiHV3es - location_id: 057P5VYJ4A5X1 - reference_id: my-order-001 - customer_id: customer_id - line_items: - - uid: 945986d1-9586-11e6-ad5a-28cfe92138cf - name: Awesome product - quantity: '1' - base_price_money: - amount: 1599 - currency: USD - total_money: - amount: 1599 - currency: USD - - uid: a8f4168c-9586-11e6-bdf0-28cfe92138cf - name: Another awesome product - quantity: '3' - base_price_money: - amount: 2000 - currency: USD - total_money: - amount: 6000 - currency: USD - taxes: - - {} - discounts: - - {} - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - created_at: created_at - updated_at: updated_at - closed_at: closed_at - state: OPEN - version: 1 - total_money: - amount: 7599 - currency: USD - ticket_name: ticket_name - rewards: - - id: id - reward_tier_id: reward_tier_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - calculate: - path: /v2/orders/calculate - method: POST - auth: - - oauth2: [] - docs: Enables applications to preview order pricing without creating an order. - source: - openapi: ../default/openapi/openapi.json - display-name: CalculateOrder - request: - name: CalculateOrderRequest - body: - properties: - order: - type: root.Order - docs: >- - The order to be calculated. Expects the entire order, not a - sparse update. - proposed_rewards: - type: optional>> - docs: >- - Identifies one or more loyalty reward tiers to apply during the - order calculation. - - The discounts defined by the reward tiers are added to the order - only to preview the - - effect of applying the specified rewards. The rewards 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. - content-type: application/json - response: - docs: Success - type: root.CalculateOrderResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - order: - location_id: D7AVYMEAPJ3A3 - line_items: - - name: Item 1 - quantity: '1' - base_price_money: - amount: 500 - currency: USD - - name: Item 2 - quantity: '2' - base_price_money: - amount: 300 - currency: USD - discounts: - - name: 50% Off - percentage: '50' - scope: ORDER - response: - body: - order: - id: id - location_id: D7AVYMEAPJ3A3 - reference_id: reference_id - source: - name: name - customer_id: customer_id - line_items: - - uid: ULkg0tQTRK2bkU9fNv3IJD - name: Item 1 - quantity: '1' - applied_discounts: - - uid: 9zr9S4dxvPAixvn0lpa1VC - discount_uid: zGsRZP69aqSSR9lq9euSPB - applied_money: - amount: 250 - currency: USD - base_price_money: - amount: 500 - currency: USD - variation_total_price_money: - amount: 500 - currency: USD - gross_sales_money: - amount: 500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 250 - currency: USD - total_money: - amount: 250 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: mumY8Nun4BC5aKe2yyx5a - name: Item 2 - quantity: '2' - applied_discounts: - - uid: qa8LwwZK82FgSEkQc2HYVC - discount_uid: zGsRZP69aqSSR9lq9euSPB - applied_money: - amount: 300 - currency: USD - base_price_money: - amount: 300 - currency: USD - variation_total_price_money: - amount: 600 - currency: USD - gross_sales_money: - amount: 600 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 300 - currency: USD - total_money: - amount: 300 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - {} - discounts: - - uid: zGsRZP69aqSSR9lq9euSPB - name: 50% Off - type: FIXED_PERCENTAGE - percentage: '50' - applied_money: - amount: 550 - currency: USD - scope: ORDER - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 550 - currency: USD - tax_money: - amount: 0 - currency: USD - discount_money: - amount: 550 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2020-05-18T16:30:49.614Z' - updated_at: '2020-05-18T16:30:49.614Z' - closed_at: closed_at - state: OPEN - version: 1 - total_money: - amount: 550 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 550 - currency: USD - total_tip_money: - amount: 0 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - clone: - path: /v2/orders/clone - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Creates a new order, in the `DRAFT` state, by duplicating an existing - order. The newly created order has - - only the core fields (such as line items, taxes, and discounts) copied - from the original order. - source: - openapi: ../default/openapi/openapi.json - display-name: CloneOrder - request: - name: CloneOrderRequest - body: - properties: - order_id: - type: string - docs: The ID of the order to clone. - version: - type: optional - docs: >- - An optional order version for concurrency protection. - - - If a version is provided, it must match the latest stored - version of the order to clone. - - If a version is not provided, the API clones the latest version. - idempotency_key: - type: optional> - docs: >- - A value you specify that uniquely identifies this clone request. - - - If you are unsure whether a particular order was cloned - successfully, - - you can reattempt the call with the same idempotency key without - - worrying about creating duplicate cloned orders. - - The originally cloned order is returned. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - content-type: application/json - response: - docs: Success - type: root.CloneOrderResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - order_id: ZAISEM52YcpmcWAzERDOyiWS123 - version: 3 - idempotency_key: UNIQUE_STRING - response: - body: - order: - id: CAISENgvlJ6jLWAzERDzjyHVybY - location_id: 057P5VYJ4A5X1 - reference_id: my-order-001 - source: - name: My App - customer_id: customer_id - line_items: - - uid: 8uSwfzvUImn3IRrvciqlXC - name: New York Strip Steak - quantity: '1' - applied_taxes: - - uid: aKG87ArnDpvMLSZJHxWUl - tax_uid: state-sales-tax - applied_money: - amount: 136 - currency: USD - applied_discounts: - - uid: jWdgP1TpHPFBuVrz81mXVC - discount_uid: membership-discount - applied_money: - amount: 8 - currency: USD - - uid: jnZOjjVY57eRcQAVgEwFuC - discount_uid: labor-day-sale - applied_money: - amount: 79 - currency: USD - base_price_money: - amount: 1599 - currency: USD - variation_total_price_money: - amount: 1599 - currency: USD - gross_sales_money: - amount: 1599 - currency: USD - total_tax_money: - amount: 136 - currency: USD - total_discount_money: - amount: 87 - currency: USD - total_money: - amount: 1648 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: v8ZuEXpOJpb0bazLuvrLDB - name: New York Steak - quantity: '2' - catalog_object_id: BEMYCSMIJL46OCDV4KYIKXIB - variation_name: Larger - modifiers: - - uid: Lo3qMMckDluu9Qsb58d4CC - catalog_object_id: CHQX7Y4KY6N5KINJKZCFURPZ - name: Well - base_price_money: - amount: 50 - currency: USD - total_price_money: - amount: 100 - currency: USD - applied_taxes: - - uid: v1dAgrfUVUPTnVTf9sRPz - tax_uid: state-sales-tax - applied_money: - amount: 374 - currency: USD - applied_discounts: - - uid: nUXvdsIItfKko0dbYtY58C - discount_uid: membership-discount - applied_money: - amount: 22 - currency: USD - - uid: qSdkOOOernlVQqsJ94SPjB - discount_uid: labor-day-sale - applied_money: - amount: 224 - currency: USD - - uid: y7bVl4njrWAnfDwmz19izB - discount_uid: one-dollar-off - applied_money: - amount: 100 - currency: USD - base_price_money: - amount: 2200 - currency: USD - variation_total_price_money: - amount: 4400 - currency: USD - gross_sales_money: - amount: 4500 - currency: USD - total_tax_money: - amount: 374 - currency: USD - total_discount_money: - amount: 346 - currency: USD - total_money: - amount: 4528 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - uid: state-sales-tax - name: State Sales Tax - type: ADDITIVE - percentage: '9' - applied_money: - amount: 510 - currency: USD - scope: ORDER - discounts: - - uid: membership-discount - catalog_object_id: DB7L55ZH2BGWI4H23ULIWOQ7 - name: Membership Discount - type: FIXED_PERCENTAGE - percentage: '0.5' - applied_money: - amount: 30 - currency: USD - scope: ORDER - - uid: labor-day-sale - name: Labor Day Sale - type: FIXED_PERCENTAGE - percentage: '5' - applied_money: - amount: 303 - currency: USD - scope: ORDER - - uid: one-dollar-off - name: Sale - $1.00 off - type: FIXED_AMOUNT - amount_money: - amount: 100 - currency: USD - applied_money: - amount: 100 - currency: USD - scope: LINE_ITEM - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 6176 - currency: USD - tax_money: - amount: 510 - currency: USD - discount_money: - amount: 433 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2020-01-17T20:47:53.293Z' - updated_at: '2020-01-17T20:47:53.293Z' - closed_at: closed_at - state: DRAFT - version: 1 - total_money: - amount: 6176 - currency: USD - total_tax_money: - amount: 510 - currency: USD - total_discount_money: - amount: 433 - currency: USD - total_tip_money: - amount: 0 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/orders/search - method: POST - auth: - - oauth2: - - ORDERS_READ - docs: >- - Search all orders for one or more locations. Orders include all sales, - - returns, and exchanges regardless of how or when they entered the Square - - ecosystem (such as Point of Sale, Invoices, and Connect APIs). - - - `SearchOrders` requests need to specify which locations to search and - define a - - [SearchOrdersQuery](entity:SearchOrdersQuery) object that controls - - how to sort or filter the results. Your `SearchOrdersQuery` can: - - Set filter criteria. - Set the sort order. - Determine whether to return results as complete `Order` objects or as - [OrderEntry](entity:OrderEntry) objects. - - - Note that details for orders processed with Square Point of Sale while - in - - offline mode might not be transmitted to Square for up to 72 hours. - Offline - - orders have a `created_at` value that reflects the time the order was - created, - - not the time it was subsequently transmitted to Square. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchOrders - request: - name: SearchOrdersRequest - body: - properties: - location_ids: - type: optional> - docs: >- - The location IDs for the orders to query. All locations must - belong to - - the same merchant. - - - Max: 10 location IDs. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this cursor to retrieve the next set of results for your - original query. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - query: - type: optional - docs: >- - Query conditions used to filter or sort the results. Note that - when - - retrieving additional pages using a cursor, you must use the - original query. - limit: - type: optional - docs: |- - The maximum number of results to be returned in a single page. - - Default: `500` - Max: `1000` - return_entries: - type: optional - docs: >- - A Boolean that controls the format of the search results. If - `true`, - - `SearchOrders` returns [OrderEntry](entity:OrderEntry) objects. - If `false`, `SearchOrders` - - returns complete order objects. - - - Default: `false`. - content-type: application/json - response: - docs: Success - type: root.SearchOrdersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - location_ids: - - 057P5VYJ4A5X1 - - 18YC4JDH91E1H - query: - filter: - state_filter: - states: - - COMPLETED - date_time_filter: - closed_at: - start_at: '2018-03-03T20:00:00+00:00' - end_at: '2019-03-04T21:54:45+00:00' - sort: - sort_field: CLOSED_AT - sort_order: DESC - limit: 3 - return_entries: true - response: - body: - order_entries: - - order_id: CAISEM82RcpmcFBM0TfOyiHV3es - version: 1 - location_id: 057P5VYJ4A5X1 - - order_id: CAISENgvlJ6jLWAzERDzjyHVybY - version: 1 - location_id: 18YC4JDH91E1H - - order_id: CAISEM52YcpmcWAzERDOyiWS3ty - version: 1 - location_id: 057P5VYJ4A5X1 - orders: - - id: id - location_id: location_id - reference_id: reference_id - customer_id: customer_id - line_items: - - quantity: quantity - taxes: - - {} - discounts: - - {} - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - created_at: created_at - updated_at: updated_at - closed_at: closed_at - state: OPEN - version: 1 - ticket_name: ticket_name - rewards: - - id: id - reward_tier_id: reward_tier_id - cursor: '123' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/orders/{order_id} - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: Retrieves an [Order](entity:Order) by ID. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveOrder - request: - name: GetOrdersRequest - path-parameters: - order_id: - type: string - docs: The ID of the order to retrieve. - response: - docs: Success - type: root.GetOrderResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - headers: - Square-Version: '2025-10-16' - response: - body: - order: - id: CAISENgvlJ6jLWAzERDzjyHVybY - location_id: D7AVYMEAPJ3A3 - reference_id: reference_id - source: - name: name - customer_id: customer_id - line_items: - - uid: ULkg0tQTRK2bkU9fNv3IJD - name: Item 1 - quantity: '1' - applied_discounts: - - uid: 9zr9S4dxvPAixvn0lpa1VC - discount_uid: zGsRZP69aqSSR9lq9euSPB - applied_money: - amount: 250 - currency: USD - base_price_money: - amount: 500 - currency: USD - variation_total_price_money: - amount: 500 - currency: USD - gross_sales_money: - amount: 500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 250 - currency: USD - total_money: - amount: 250 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: mumY8Nun4BC5aKe2yyx5a - name: Item 2 - quantity: '2' - applied_discounts: - - uid: qa8LwwZK82FgSEkQc2HYVC - discount_uid: zGsRZP69aqSSR9lq9euSPB - applied_money: - amount: 300 - currency: USD - base_price_money: - amount: 300 - currency: USD - variation_total_price_money: - amount: 600 - currency: USD - gross_sales_money: - amount: 600 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 300 - currency: USD - total_money: - amount: 300 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - {} - discounts: - - uid: zGsRZP69aqSSR9lq9euSPB - name: 50% Off - type: FIXED_PERCENTAGE - percentage: '50' - applied_money: - amount: 550 - currency: USD - scope: ORDER - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 550 - currency: USD - tax_money: - amount: 0 - currency: USD - discount_money: - amount: 550 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2020-05-18T16:30:49.614Z' - updated_at: '2020-05-18T16:30:49.614Z' - closed_at: closed_at - state: OPEN - version: 1 - total_money: - amount: 550 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 550 - currency: USD - total_tip_money: - amount: 0 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/orders/{order_id} - method: PUT - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Updates an open [order](entity:Order) by adding, replacing, or deleting - - fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated. - - - An `UpdateOrder` request requires the following: - - - - The `order_id` in the endpoint path, identifying the order to update. - - - The latest `version` of the order to update. - - - The [sparse - order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects) - - containing only the fields to update and the version to which the update - is - - being applied. - - - If deleting fields, the [dot notation - paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete) - - identifying the fields to clear. - - - To pay for an order, see - - [Pay for - Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders). - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateOrder - request: - name: UpdateOrderRequest - path-parameters: - order_id: - type: string - docs: The ID of the order to update. - body: - properties: - order: - type: optional - docs: >- - The [sparse - order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects) - - containing only the fields to update and the version to which - the update is - - being applied. - fields_to_clear: - type: optional>> - docs: >- - The [dot notation - paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete) - - fields to clear. For example, `line_items[uid].note`. - - For more information, see [Deleting - fields](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#deleting-fields). - idempotency_key: - type: optional> - docs: >- - A value you specify that uniquely identifies this update - request. - - - If you are unsure whether a particular update was applied to an - order successfully, - - you can reattempt it with the same idempotency key without - - worrying about creating duplicate updates to the order. - - The latest order version is returned. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - maxLength: 192 - content-type: application/json - response: - docs: Success - type: root.UpdateOrderResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - headers: - Square-Version: '2025-10-16' - request: - order: - location_id: location_id - line_items: - - uid: cookie_uid - name: COOKIE - quantity: '2' - base_price_money: - amount: 200 - currency: USD - version: 1 - fields_to_clear: - - discounts - idempotency_key: UNIQUE_STRING - response: - body: - order: - id: DREk7wJcyXNHqULq8JJ2iPAsluJZY - location_id: MXVQSVNDGN3C8 - reference_id: reference_id - source: - name: Cookies - customer_id: customer_id - line_items: - - uid: EuYkakhmu3ksHIds5Hiot - name: Small Coffee - quantity: '1' - base_price_money: - amount: 500 - currency: USD - variation_total_price_money: - amount: 500 - currency: USD - gross_sales_money: - amount: 500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_money: - amount: 500 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: cookie_uid - name: COOKIE - quantity: '2' - base_price_money: - amount: 200 - currency: USD - variation_total_price_money: - amount: 400 - currency: USD - gross_sales_money: - amount: 400 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_money: - amount: 400 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - {} - discounts: - - {} - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 900 - currency: USD - tax_money: - amount: 0 - currency: USD - discount_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - type: CARD - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2019-08-23T18:26:18.243Z' - updated_at: '2019-08-23T18:33:47.523Z' - closed_at: closed_at - state: OPEN - version: 2 - total_money: - amount: 900 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - pay: - path: /v2/orders/{order_id}/pay - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - - ORDERS_WRITE - docs: >- - Pay for an [order](entity:Order) using one or more approved - [payments](entity:Payment) - - or settle an order with a total of `0`. - - - The total of the `payment_ids` listed in the request must be equal to - the order - - total. Orders with a total amount of `0` can be marked as paid by - specifying an empty - - array of `payment_ids` in the request. - - - To be used with `PayOrder`, a payment must: - - - - Reference the order by specifying the `order_id` when [creating the - payment](api-endpoint:Payments-CreatePayment). - - Any approved payments that reference the same `order_id` not specified - in the - - `payment_ids` is canceled. - - - Be approved with [delayed - capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture). - - Using a delayed capture payment with `PayOrder` completes the approved - payment. - source: - openapi: ../default/openapi/openapi.json - display-name: PayOrder - request: - name: PayOrderRequest - path-parameters: - order_id: - type: string - docs: The ID of the order being paid. - body: - properties: - idempotency_key: - type: string - docs: >- - A value you specify that uniquely identifies this request among - requests you have sent. If - - you are unsure whether a particular payment request was - completed successfully, you can reattempt - - it with the same idempotency key without worrying about - duplicate payments. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - maxLength: 192 - order_version: - type: optional> - docs: >- - The version of the order being paid. If not supplied, the latest - version will be paid. - payment_ids: - type: optional>> - docs: |- - The IDs of the [payments](entity:Payment) to collect. - The payment total must match the order total. - content-type: application/json - response: - docs: Success - type: root.PayOrderResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: c043a359-7ad9-4136-82a9-c3f1d66dcbff - payment_ids: - - EnZdNAlWCmfh6Mt5FMNST1o7taB - - 0LRiVlbXVwe8ozu4KbZxd12mvaB - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - order: - id: lgwOlEityYPJtcuvKTVKT1pA986YY - location_id: P3CCK6HSNDAS7 - reference_id: reference_id - source: - name: Source Name - customer_id: customer_id - line_items: - - uid: QW6kofLHJK7JEKMjlSVP5C - name: Item 1 - quantity: '1' - base_price_money: - amount: 500 - currency: USD - gross_sales_money: - amount: 500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_money: - amount: 500 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - - uid: zhw8MNfRGdFQMI2WE1UBJD - name: Item 2 - quantity: '2' - base_price_money: - amount: 750 - currency: USD - gross_sales_money: - amount: 1500 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_money: - amount: 1500 - currency: USD - total_service_charge_money: - amount: 0 - currency: USD - taxes: - - {} - discounts: - - {} - service_charges: - - {} - fulfillments: - - {} - returns: - - {} - net_amounts: - total_money: - amount: 2000 - currency: USD - tax_money: - amount: 0 - currency: USD - discount_money: - amount: 0 - currency: USD - tip_money: - amount: 0 - currency: USD - service_charge_money: - amount: 0 - currency: USD - rounding_adjustment: - uid: uid - name: name - tenders: - - id: EnZdNAlWCmfh6Mt5FMNST1o7taB - location_id: P3CCK6HSNDAS7 - transaction_id: lgwOlEityYPJtcuvKTVKT1pA986YY - created_at: '2019-08-06T02:47:36.293Z' - amount_money: - amount: 1000 - currency: USD - type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 2 - exp_year: 2022 - fingerprint: >- - sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ - entry_method: KEYED - payment_id: EnZdNAlWCmfh6Mt5FMNST1o7taB - - id: 0LRiVlbXVwe8ozu4KbZxd12mvaB - location_id: P3CCK6HSNDAS7 - transaction_id: lgwOlEityYPJtcuvKTVKT1pA986YY - created_at: '2019-08-06T02:47:36.809Z' - amount_money: - amount: 1000 - currency: USD - type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 2 - exp_year: 2022 - fingerprint: >- - sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ - entry_method: KEYED - payment_id: 0LRiVlbXVwe8ozu4KbZxd12mvaB - refunds: - - id: id - location_id: location_id - reason: reason - amount_money: {} - status: PENDING - metadata: - key: value - created_at: '2019-08-06T02:47:35.693Z' - updated_at: '2019-08-06T02:47:37.140Z' - closed_at: '2019-08-06T02:47:37.140Z' - state: COMPLETED - version: 4 - total_money: - amount: 2000 - currency: USD - total_tax_money: - amount: 0 - currency: USD - total_discount_money: - amount: 0 - currency: USD - total_tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - total_service_charge_money: - amount: 0 - currency: USD - ticket_name: ticket_name - pricing_options: - auto_apply_discounts: true - auto_apply_taxes: true - rewards: - - id: id - reward_tier_id: reward_tier_id - net_amount_due_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/orders/customAttributeDefinitions.yml b/.mock/definition/orders/customAttributeDefinitions.yml deleted file mode 100644 index 19c58414..00000000 --- a/.mock/definition/orders/customAttributeDefinitions.yml +++ /dev/null @@ -1,404 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/orders/custom-attribute-definitions - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: >- - Lists the order-related [custom attribute - definitions](entity:CustomAttributeDefinition) that belong to a Square - seller account. - - - When all response pages are retrieved, the results include all custom - attribute definitions - - that are visible to the requesting application, including those that are - created by other - - applications and set to `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. Note that - - seller-defined custom attributes (also known as custom fields) are - always set to `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attribute_definitions - source: - openapi: ../default/openapi/openapi.json - display-name: ListOrderCustomAttributeDefinitions - request: - name: ListCustomAttributeDefinitionsRequest - query-parameters: - visibility_filter: - type: optional> - docs: >- - Requests that all of the custom attributes be returned, or only - those that are read-only or read-write. - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - response: - docs: Success - type: root.ListOrderCustomAttributeDefinitionsResponse - status-code: 200 - examples: - - query-parameters: - visibility_filter: ALL - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definitions: - - key: cover-count - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Cover count - description: The number of people seated at a table - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-11-16T18:03:44.051Z' - created_at: '2022-11-16T18:03:44.051Z' - - key: seat-number - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Seat number - description: The identifier for a particular seat - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-11-16T18:04:32.059Z' - created_at: '2022-11-16T18:04:32.059Z' - - key: table-number - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Table number - description: The identifier for a particular table - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-11-16T18:04:21.912Z' - created_at: '2022-11-16T18:04:21.912Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - create: - path: /v2/orders/custom-attribute-definitions - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Creates an order-related custom attribute definition. Use this endpoint - to - - define a custom attribute that can be associated with orders. - - - After creating a custom attribute definition, you can set the custom - attribute for orders - - in the Square seller account. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateOrderCustomAttributeDefinition - request: - name: CreateOrderCustomAttributeDefinitionRequest - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition to create. Note the following: - - - With the exception of the `Selection` data type, the `schema` - is specified as a simple URL to the JSON schema - - definition hosted on the Square CDN. For more information, - including supported values and constraints, see - - [Specifying the - schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema). - - - If provided, `name` must be unique (case-sensitive) across all - visible customer-related custom attribute definitions for the - seller. - - - All custom attributes are visible in exported customer data, - including those set to `VISIBILITY_HIDDEN`. - idempotency_key: - type: optional - docs: >- - A unique identifier for this request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateOrderCustomAttributeDefinitionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - key: cover-count - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Cover count - description: The number of people seated at a table - visibility: VISIBILITY_READ_WRITE_VALUES - idempotency_key: IDEMPOTENCY_KEY - response: - body: - custom_attribute_definition: - key: cover-count - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Cover count - description: The number of people seated at a table - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-10-06T16:53:23.141Z' - created_at: '2022-10-06T16:53:23.141Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/orders/custom-attribute-definitions/{key} - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: >- - Retrieves an order-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - - To retrieve a custom attribute definition created by another - application, the `visibility` - - setting must be `VISIBILITY_READ_ONLY` or - `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveOrderCustomAttributeDefinition - request: - name: GetCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to retrieve. - query-parameters: - version: - type: optional> - docs: >- - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include this optional field and specify the current - version of the custom attribute. - response: - docs: Success - type: root.RetrieveOrderCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - query-parameters: - version: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute_definition: - key: cover-count - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Cover count - description: The number of people seated at a table - visibility: VISIBILITY_READ_WRITE_VALUES - version: 1 - updated_at: '2022-10-06T16:53:23.141Z' - created_at: '2022-10-06T16:53:23.141Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/orders/custom-attribute-definitions/{key} - method: PUT - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Updates an order-related custom attribute definition for a Square seller - account. - - - Only the definition owner can update a custom attribute definition. Note - that sellers can view all custom attributes in exported customer data, - including those set to `VISIBILITY_HIDDEN`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateOrderCustomAttributeDefinition - request: - name: UpdateOrderCustomAttributeDefinitionRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to update. - body: - properties: - custom_attribute_definition: - type: root.CustomAttributeDefinition - docs: >- - The custom attribute definition that contains the fields to - update. This endpoint supports sparse updates, - - so only new or changed fields need to be included in the - request. For more information, see - - [Updatable definition - fields](https://developer.squareup.com/docs/orders-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields). - - - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - control, include the optional `version` field and specify the - current version of the custom attribute definition. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateOrderCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute_definition: - key: cover-count - visibility: VISIBILITY_READ_ONLY - version: 1 - idempotency_key: IDEMPOTENCY_KEY - response: - body: - custom_attribute_definition: - key: cover-count - schema: - \$ref: >- - https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number - name: Cover count - description: The number of people seated at a table - visibility: VISIBILITY_READ_ONLY - version: 2 - updated_at: '2022-11-16T17:44:11.436Z' - created_at: '2022-11-16T16:53:23.141Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/orders/custom-attribute-definitions/{key} - method: DELETE - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Deletes an order-related [custom attribute - definition](entity:CustomAttributeDefinition) from a Square seller - account. - - - Only the definition owner can delete a custom attribute definition. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteOrderCustomAttributeDefinition - request: - name: DeleteCustomAttributeDefinitionsRequest - path-parameters: - key: - type: string - docs: The key of the custom attribute definition to delete. - response: - docs: Success - type: root.DeleteOrderCustomAttributeDefinitionResponse - status-code: 200 - examples: - - path-parameters: - key: key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/orders/customAttributes.yml b/.mock/definition/orders/customAttributes.yml deleted file mode 100644 index 68af7d57..00000000 --- a/.mock/definition/orders/customAttributes.yml +++ /dev/null @@ -1,581 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - batchDelete: - path: /v2/orders/custom-attributes/bulk-delete - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Deletes order [custom attributes](entity:CustomAttribute) as a bulk - operation. - - - Use this endpoint to delete one or more custom attributes from one or - more orders. - - A custom attribute is based on a custom attribute definition in a Square - seller account. (To create a - - custom attribute definition, use the - [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) - endpoint.) - - - This `BulkDeleteOrderCustomAttributes` endpoint accepts a map of 1 to 25 - individual delete - - requests and returns a map of individual delete responses. Each delete - request has a unique ID - - and provides an order ID and custom attribute. Each delete response is - returned with the ID - - of the corresponding request. - - - To delete a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkDeleteOrderCustomAttributes - request: - name: BulkDeleteOrderCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - A map of requests that correspond to individual delete - operations for custom attributes. - content-type: application/json - response: - docs: Success - type: root.BulkDeleteOrderCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - cover-count: - key: cover-count - order_id: 7BbXGEIWNldxAzrtGf9GPVZTwZ4F - table-number: - key: table-number - order_id: 7BbXGEIWNldxAzrtGf9GPVZTwZ4F - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - values: - cover-count: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - table-number: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - batchUpsert: - path: /v2/orders/custom-attributes/bulk-upsert - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Creates or updates order [custom attributes](entity:CustomAttribute) as - a bulk operation. - - - Use this endpoint to delete one or more custom attributes from one or - more orders. - - A custom attribute is based on a custom attribute definition in a Square - seller account. (To create a - - custom attribute definition, use the - [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) - endpoint.) - - - This `BulkUpsertOrderCustomAttributes` endpoint accepts a map of 1 to 25 - individual upsert - - requests and returns a map of individual upsert responses. Each upsert - request has a unique ID - - and provides an order ID and custom attribute. Each upsert response is - returned with the ID - - of the corresponding request. - - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpsertOrderCustomAttributes - request: - name: BulkUpsertOrderCustomAttributesRequest - body: - properties: - values: - type: >- - map - docs: >- - A map of requests that correspond to individual upsert - operations for custom attributes. - content-type: application/json - response: - docs: Success - type: root.BulkUpsertOrderCustomAttributesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - values: - cover-count: - custom_attribute: - key: cover-count - value: '6' - version: 2 - order_id: 7BbXGEIWNldxAzrtGf9GPVZTwZ4F - table-number: - custom_attribute: - key: table-number - value: '11' - version: 4 - order_id: 7BbXGEIWNldxAzrtGf9GPVZTwZ4F - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - values: - cover-count: - custom_attribute: - key: cover-count - value: '6' - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-22T21:28:35.721Z' - created_at: '2022-11-22T21:27:33.429Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - table-number: - custom_attribute: - key: table-number - value: '11' - visibility: VISIBILITY_HIDDEN - updated_at: '2022-11-22T21:28:35.726Z' - created_at: '2022-11-22T21:24:57.823Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - list: - path: /v2/orders/{order_id}/custom-attributes - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: >- - Lists the [custom attributes](entity:CustomAttribute) associated with an - order. - - - You can use the `with_definitions` query parameter to also retrieve - custom attribute definitions - - in the same call. - - - When all response pages are retrieved, the results include all custom - attributes that are - - visible to the requesting application, including those that are owned by - other applications - - and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.custom_attributes - source: - openapi: ../default/openapi/openapi.json - display-name: ListOrderCustomAttributes - request: - name: ListCustomAttributesRequest - path-parameters: - order_id: - type: string - docs: The ID of the target [order](entity:Order). - query-parameters: - visibility_filter: - type: optional> - docs: >- - Requests that all of the custom attributes be returned, or only - those that are read-only or read-write. - cursor: - type: optional> - docs: >- - The cursor returned in the paged response from the previous call - to this endpoint. - - Provide this cursor to retrieve the next page of results for your - original request. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - limit: - type: optional> - docs: >- - The maximum number of results to return in a single paged - response. This limit is advisory. - - The response might contain more or fewer results. The minimum - value is 1 and the maximum value is 100. - - The default value is 20. - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - with_definitions: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom attribute, - - information about the data type, or other definition details. The - default value is `false`. - response: - docs: Success - type: root.ListOrderCustomAttributesResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - query-parameters: - visibility_filter: ALL - cursor: cursor - limit: 1 - with_definitions: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attributes: - - key: wayne-test-15 - value: TEST - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - updated_at: '2022-11-10T17:31:36.111Z' - created_at: '2022-11-10T17:31:36.111Z' - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/orders/{order_id}/custom-attributes/{custom_attribute_key} - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: >- - Retrieves a [custom attribute](entity:CustomAttribute) associated with - an order. - - - You can use the `with_definition` query parameter to also retrieve the - custom attribute definition - - in the same call. - - - To retrieve a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that - seller-defined custom attributes - - also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveOrderCustomAttribute - request: - name: GetCustomAttributesRequest - path-parameters: - order_id: - type: string - docs: The ID of the target [order](entity:Order). - custom_attribute_key: - type: string - docs: >- - The key of the custom attribute to retrieve. This key must match - the key of an - - existing custom attribute definition. - query-parameters: - version: - type: optional> - docs: >- - To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include this optional field and specify the current - version of the custom attribute. - with_definition: - type: optional> - default: false - docs: >- - Indicates whether to return the [custom attribute - definition](entity:CustomAttributeDefinition) in the `definition` - field of each - - custom attribute. Set this parameter to `true` to get the name and - description of each custom attribute, - - information about the data type, or other definition details. The - default value is `false`. - response: - docs: Success - type: root.RetrieveOrderCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - custom_attribute_key: custom_attribute_key - query-parameters: - version: 1 - with_definition: true - headers: - Square-Version: '2025-10-16' - response: - body: - custom_attribute: - key: cover-count - value: '6' - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-11-22T21:28:35.721Z' - created_at: '2022-11-22T21:27:33.429Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - upsert: - path: /v2/orders/{order_id}/custom-attributes/{custom_attribute_key} - method: POST - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Creates or updates a [custom attribute](entity:CustomAttribute) for an - order. - - - Use this endpoint to set the value of a custom attribute for a specific - order. - - A custom attribute is based on a custom attribute definition in a Square - seller account. (To create a - - custom attribute definition, use the - [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) - endpoint.) - - - To create or update a custom attribute owned by another application, the - `visibility` setting - - must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertOrderCustomAttribute - request: - name: UpsertOrderCustomAttributeRequest - path-parameters: - order_id: - type: string - docs: The ID of the target [order](entity:Order). - custom_attribute_key: - type: string - docs: >- - The key of the custom attribute to create or update. This key - must match the key - - of an existing custom attribute definition. - body: - properties: - custom_attribute: - type: root.CustomAttribute - docs: >- - The custom attribute to create or update, with the following - fields: - - - - `value`. This value must conform to the `schema` specified by - the definition. - - For more information, see [Value data - types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types). - - - - `version`. To enable [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control, include this optional field and specify the current - version of the custom attribute. - idempotency_key: - type: optional> - docs: >- - A unique identifier for this request, used to ensure - idempotency. - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpsertOrderCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - custom_attribute_key: custom_attribute_key - headers: - Square-Version: '2025-10-16' - request: - custom_attribute: - key: table-number - value: '42' - version: 1 - response: - body: - custom_attribute: - key: table-number - value: '42' - version: 1 - visibility: VISIBILITY_READ_WRITE_VALUES - definition: - key: key - schema: - key: value - name: name - description: description - visibility: VISIBILITY_HIDDEN - version: 1 - updated_at: updated_at - created_at: created_at - updated_at: '2022-10-06T20:41:22.673Z' - created_at: '2022-10-06T20:41:22.673Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/orders/{order_id}/custom-attributes/{custom_attribute_key} - method: DELETE - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Deletes a [custom attribute](entity:CustomAttribute) associated with a - customer profile. - - - To delete a custom attribute owned by another application, the - `visibility` setting must be - - `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom - attributes - - (also known as custom fields) are always set to - `VISIBILITY_READ_WRITE_VALUES`. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteOrderCustomAttribute - request: - name: DeleteCustomAttributesRequest - path-parameters: - order_id: - type: string - docs: The ID of the target [order](entity:Order). - custom_attribute_key: - type: string - docs: >- - The key of the custom attribute to delete. This key must match - the key of an - - existing custom attribute definition. - response: - docs: Success - type: root.DeleteOrderCustomAttributeResponse - status-code: 200 - examples: - - path-parameters: - order_id: order_id - custom_attribute_key: custom_attribute_key - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/payments.yml b/.mock/definition/payments.yml deleted file mode 100644 index eee9cf90..00000000 --- a/.mock/definition/payments.yml +++ /dev/null @@ -1,1646 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/payments - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a list of payments taken by the account making the request. - - - Results are eventually consistent, and new payments or changes to - payments might take several - - seconds to appear. - - - The maximum results per page is 100. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.payments - source: - openapi: ../default/openapi/openapi.json - display-name: ListPayments - request: - name: ListPaymentsRequest - query-parameters: - begin_time: - type: optional> - docs: >- - Indicates the start of the time range to retrieve payments for, in - RFC 3339 format. - - The range is determined using the `created_at` field for each - Payment. - - Inclusive. Default: The current time minus one year. - end_time: - type: optional> - docs: >- - Indicates the end of the time range to retrieve payments for, in - RFC 3339 format. The - - range is determined using the `created_at` field for each Payment. - - - Default: The current time. - sort_order: - type: optional> - docs: >- - The order in which results are listed by - `ListPaymentsRequest.sort_field`: - - - `ASC` - Oldest to newest. - - - `DESC` - Newest to oldest (default). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - location_id: - type: optional> - docs: >- - Limit results to the location supplied. By default, results are - returned - - for the default (main) location associated with the seller. - total: - type: optional> - docs: The exact amount in the `total_money` for a payment. - last_4: - type: optional> - docs: The last four digits of a payment card. - card_brand: - type: optional> - docs: The brand of the payment card (for example, VISA). - limit: - type: optional> - docs: >- - The maximum number of results to be returned in a single page. - - It is possible to receive fewer results than the specified limit - on a given page. - - - The default value of 100 is also the maximum allowed value. If the - provided value is - - greater than 100, it is ignored and the default value is used - instead. - - - Default: `100` - is_offline_payment: - type: optional> - default: false - docs: Whether the payment was taken offline or not. - offline_begin_time: - type: optional> - docs: >- - Indicates the start of the time range for which to retrieve - offline payments, in RFC 3339 - - format for timestamps. The range is determined using the - - `offline_payment_details.client_created_at` field for each - Payment. If set, payments without a - - value set in `offline_payment_details.client_created_at` will not - be returned. - - - Default: The current time. - offline_end_time: - type: optional> - docs: >- - Indicates the end of the time range for which to retrieve offline - payments, in RFC 3339 - - format for timestamps. The range is determined using the - - `offline_payment_details.client_created_at` field for each - Payment. If set, payments without a - - value set in `offline_payment_details.client_created_at` will not - be returned. - - - Default: The current time. - updated_at_begin_time: - type: optional> - docs: >- - Indicates the start of the time range to retrieve payments for, in - RFC 3339 format. The - - range is determined using the `updated_at` field for each Payment. - updated_at_end_time: - type: optional> - docs: >- - Indicates the end of the time range to retrieve payments for, in - RFC 3339 format. The - - range is determined using the `updated_at` field for each Payment. - sort_field: - type: optional> - docs: The field used to sort results by. The default is `CREATED_AT`. - response: - docs: Success - type: root.ListPaymentsResponse - status-code: 200 - examples: - - query-parameters: - begin_time: begin_time - end_time: end_time - sort_order: sort_order - cursor: cursor - location_id: location_id - total: 1000000 - last_4: last_4 - card_brand: card_brand - limit: 1 - is_offline_payment: true - offline_begin_time: offline_begin_time - offline_end_time: offline_end_time - updated_at_begin_time: updated_at_begin_time - updated_at_end_time: updated_at_end_time - sort_field: CREATED_AT - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payments: - - id: bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - created_at: '2021-10-13T19:34:33.524Z' - updated_at: '2021-10-13T19:34:37.261Z' - amount_money: - amount: 555 - currency: USD - total_money: - amount: 555 - currency: USD - approved_money: - amount: 555 - currency: USD - processing_fee: - - effective_at: '2021-10-13T21:34:35.000Z' - type: INITIAL - amount_money: - amount: 34 - currency: USD - status: COMPLETED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T19:34:33.524Z' - source_type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: KEYED - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: 2Nkw7q - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T19:34:33.680Z' - captured_at: '2021-10-13T19:34:34.340Z' - cash_details: - buyer_supplied_money: {} - external_details: - type: type - source: source - location_id: L88917AVBK2S5 - order_id: d7eKah653Z579f3gVtjlxpSlmUcZY - reference_id: reference_id - customer_id: customer_id - employee_id: TMoK_ogh6rH1o4dV - team_member_id: TMoK_ogh6rH1o4dV - refund_ids: - - refund_ids - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - note: Test Note - statement_description_identifier: statement_description_identifier - capabilities: - - capabilities - receipt_number: bP9m - receipt_url: >- - https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - application_details: - square_product: VIRTUAL_TERMINAL - application_id: sq0ids-Pw67AZAlLVB7hsRmwlJPuA - is_offline_payment: true - version_token: vguW2km0KpVCdAXZcNTZ438qg5LlVPTP4HO5OpiHNfa6o - cursor: cursor - create: - path: /v2/payments - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Creates a payment using the provided source. You can use this endpoint - - to charge a card (credit/debit card or - - Square gift card) or record a payment that the seller received outside - of Square - - (cash payment from a buyer or a payment that an external entity - - processed on behalf of the seller). - - - The endpoint creates a - - `Payment` object and returns it in the response. - source: - openapi: ../default/openapi/openapi.json - display-name: CreatePayment - request: - name: CreatePaymentRequest - body: - properties: - source_id: - type: string - docs: >- - The ID for the source of funds for this payment. - - This could be a payment token generated by the Web Payments SDK - for any of its - - [supported - methods](https://developer.squareup.com/docs/web-payments/overview#explore-payment-methods), - - including cards, bank transfers, Afterpay or Cash App Pay. If - recording a payment - - that the seller received outside of Square, specify either - "CASH" or "EXTERNAL". - - For more information, see - - [Take - Payments](https://developer.squareup.com/docs/payments-api/take-payments). - validation: - minLength: 1 - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreatePayment` request. - Keys can be any valid string - - but must be unique for every `CreatePayment` request. - - - Note: The number of allowed characters might be less than the - stated maximum, if multi-byte - - characters are used. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - maxLength: 45 - amount_money: - type: optional - docs: >- - The amount of money to accept for this payment, not including - `tip_money`. - - - The amount must be specified in the smallest denomination of the - applicable currency - - (for example, US dollar amounts are specified in cents). For - more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - - - The currency code must match the currency associated with the - business - - that is accepting the payment. - tip_money: - type: optional - docs: >- - The amount designated as a tip, in addition to `amount_money`. - - - The amount must be specified in the smallest denomination of the - applicable currency - - (for example, US dollar amounts are specified in cents). For - more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - - - The currency code must match the currency associated with the - business - - that is accepting the payment. - app_fee_money: - type: optional - docs: >- - The amount of money that the developer is taking as a fee - - for facilitating the payment on behalf of the seller. - - - The amount cannot be more than 90% of the total amount of the - payment. - - - The amount must be specified in the smallest denomination of the - applicable currency - - (for example, US dollar amounts are specified in cents). For - more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - - - The fee currency code must match the currency associated with - the seller - - that is accepting the payment. The application must be from a - developer - - account in the same country and using the same currency code as - the seller. - - - For more information about the application fee scenario, see - - [Take Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - - - To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission is required. - - For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - delay_duration: - type: optional - docs: >- - The duration of time after the payment's creation when Square - automatically - - either completes or cancels the payment depending on the - `delay_action` field value. - - For more information, see - - [Time - threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - - - This parameter should be specified as a time duration, in RFC - 3339 format. - - - Note: This feature is only supported for card payments. This - parameter can only be set for a delayed - - capture payment (`autocomplete=false`). - - - Default: - - - - Card-present payments: "PT36H" (36 hours) from the creation - time. - - - Card-not-present payments: "P7D" (7 days) from the creation - time. - delay_action: - type: optional - docs: >- - The action to be applied to the payment when the - `delay_duration` has elapsed. The action must be - - CANCEL or COMPLETE. For more information, see - - [Time - Threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - - - Default: CANCEL - autocomplete: - type: optional - docs: >- - If set to `true`, this payment will be completed when possible. - If - - set to `false`, this payment is held in an approved state until - either - - explicitly completed (captured) or canceled (voided). For more - information, see - - [Delayed - capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment). - - - Default: true - order_id: - type: optional - docs: Associates a previously created order with this payment. - customer_id: - type: optional - docs: >- - The [Customer](entity:Customer) ID of the customer associated - with the payment. - - - This is required if the `source_id` refers to a card on file - created using the Cards API. - location_id: - type: optional - docs: >- - The location ID to associate with the payment. If not specified, - the [main - location](https://developer.squareup.com/docs/locations-api#about-the-main-location) - is - - used. - team_member_id: - type: optional - docs: |- - An optional [TeamMember](entity:TeamMember) ID to associate with - this payment. - reference_id: - type: optional - docs: >- - 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). - validation: - maxLength: 40 - verification_token: - type: optional - docs: >- - An identifying token generated by - [payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer). - - Verification tokens encapsulate customer device information and - 3-D Secure - - challenge results to indicate that Square has verified the buyer - identity. - - - For more information, see [SCA - Overview](https://developer.squareup.com/docs/sca-overview). - accept_partial_authorization: - type: optional - docs: >- - If set to `true` and charging a Square Gift Card, a payment - might be returned with - - `amount_money` equal to less than what was requested. For - example, a request for $20 when charging - - a Square Gift Card with a balance of $5 results in an APPROVED - payment of $5. You might choose - - to prompt the buyer for an additional payment to cover the - remainder or cancel the Gift Card - - payment. This field cannot be `true` when `autocomplete = true`. - - - For more information, see - - [Partial amount with Square Gift - Cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card). - - - Default: false - buyer_email_address: - type: optional - docs: The buyer's email address. - validation: - maxLength: 255 - buyer_phone_number: - type: optional - docs: >- - The buyer's phone number. - - Must follow the following format: - - 1. A leading + symbol (followed by a country code) - - 2. The phone number can contain spaces and the special - characters `(` , `)` , `-` , and `.`. - - Alphabetical characters aren't allowed. - - 3. The phone number must contain between 9 and 16 digits. - billing_address: - type: optional - docs: The buyer's billing address. - shipping_address: - type: optional - docs: The buyer's shipping address. - note: - type: optional - docs: >- - An optional note to be entered by the developer when creating a - payment. - validation: - maxLength: 500 - statement_description_identifier: - type: optional - docs: >- - Optional additional payment information to include on the - customer's card statement - - as part of the statement description. This can be, for example, - an invoice number, ticket number, - - or short description that uniquely identifies the purchase. - - - Note that the `statement_description_identifier` might get - truncated on the statement description - - to fit the required information including the Square identifier - (SQ *) and name of the - - seller taking the payment. - validation: - maxLength: 20 - cash_details: - type: optional - docs: >- - Additional details required when recording a cash payment - (`source_id` is CASH). - external_details: - type: optional - docs: >- - Additional details required when recording an external payment - (`source_id` is EXTERNAL). - customer_details: - type: optional - docs: Details about the customer making the payment. - offline_payment_details: - type: optional - docs: >- - An optional field for specifying the offline payment details. - This is intended for - - internal 1st-party callers only. - content-type: application/json - response: - docs: Success - type: root.CreatePaymentResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - source_id: ccof:GaJGNaZa8x4OgDJn4GB - idempotency_key: 7b0f3ec5-086a-4871-8f13-3c81b3875218 - amount_money: - amount: 1000 - currency: USD - app_fee_money: - amount: 10 - currency: USD - autocomplete: true - customer_id: W92WH6P11H4Z77CTET0RNTGFW8 - location_id: L88917AVBK2S5 - reference_id: '123456' - note: Brief description - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment: - id: R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY - created_at: '2021-10-13T21:14:29.577Z' - updated_at: '2021-10-13T21:14:30.504Z' - amount_money: - amount: 1000 - currency: USD - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - total_money: - amount: 1000 - currency: USD - app_fee_money: - amount: 10 - currency: USD - approved_money: - amount: 1000 - currency: USD - processing_fee: - - {} - refunded_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: COMPLETED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T21:14:29.577Z' - source_type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: ON_FILE - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: vNEn2f - application_identifier: application_identifier - application_name: application_name - application_cryptogram: application_cryptogram - verification_method: verification_method - verification_results: verification_results - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T21:14:29.732Z' - captured_at: '2021-10-13T21:14:30.504Z' - refund_requires_card_presence: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - cash_details: - buyer_supplied_money: {} - bank_account_details: - bank_name: bank_name - transfer_type: transfer_type - account_ownership_type: account_ownership_type - fingerprint: fingerprint - country: country - statement_description: statement_description - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - external_details: - type: type - source: source - source_id: source_id - wallet_details: - status: status - brand: brand - buy_now_pay_later_details: - brand: brand - square_account_details: - payment_source_token: payment_source_token - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - location_id: L88917AVBK2S5 - order_id: pRsjRTgFWATl7so6DxdKBJa7ssbZY - reference_id: '123456' - customer_id: W92WH6P11H4Z77CTET0RNTGFW8 - employee_id: employee_id - team_member_id: team_member_id - refund_ids: - - refund_ids - risk_evaluation: - created_at: '2021-10-13T21:14:30.423Z' - risk_level: NORMAL - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - billing_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - note: Brief Description - statement_description_identifier: statement_description_identifier - capabilities: - - capabilities - receipt_number: R2B3 - receipt_url: https://squareup.com/receipt/preview/EXAMPLE_RECEIPT_ID - device_details: - device_id: device_id - device_installation_id: device_installation_id - device_name: device_name - application_details: - square_product: ECOMMERCE_API - application_id: sq0ids-TcgftTEtKxJTRF1lCFJ9TA - is_offline_payment: true - offline_payment_details: - client_created_at: client_created_at - version_token: TPtNEOBOa6Qq6E3C3IjckSVOM6b3hMbfhjvTxHBQUsB6o - cancelByIdempotencyKey: - path: /v2/payments/cancel - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels (voids) a payment identified by the idempotency key that is - specified in the - - request. - - - Use this method when the status of a `CreatePayment` request is unknown - (for example, after you send a - - `CreatePayment` request, a network error occurs and you do not get a - response). In this case, you can - - direct Square to cancel the payment using this endpoint. In the request, - you provide the same - - idempotency key that you provided in your `CreatePayment` request that - you want to cancel. After - - canceling the payment, you can submit your `CreatePayment` request - again. - - - Note that if no payment with the specified idempotency key is found, no - action is taken and the endpoint - - returns successfully. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelPaymentByIdempotencyKey - request: - name: CancelPaymentByIdempotencyKeyRequest - body: - properties: - idempotency_key: - type: string - docs: The `idempotency_key` identifying the payment to be canceled. - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CancelPaymentByIdempotencyKeyResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: a7e36d40-d24b-11e8-b568-0800200c9a66 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/payments/{payment_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: Retrieves details for a specific payment. - source: - openapi: ../default/openapi/openapi.json - display-name: GetPayment - request: - name: GetPaymentsRequest - path-parameters: - payment_id: - type: string - docs: A unique ID for the desired payment. - response: - docs: Success - type: root.GetPaymentResponse - status-code: 200 - examples: - - path-parameters: - payment_id: payment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment: - id: bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - created_at: '2021-10-13T19:34:33.524Z' - updated_at: '2021-10-13T19:34:34.339Z' - amount_money: - amount: 555 - currency: USD - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - total_money: - amount: 555 - currency: USD - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - approved_money: - amount: 555 - currency: USD - processing_fee: - - effective_at: '2021-10-13T21:34:35.000Z' - type: INITIAL - amount_money: - amount: 34 - currency: USD - refunded_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: COMPLETED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T19:34:33.524Z' - source_type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: KEYED - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: 2Nkw7q - application_identifier: application_identifier - application_name: application_name - application_cryptogram: application_cryptogram - verification_method: verification_method - verification_results: verification_results - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T19:34:33.680Z' - captured_at: '2021-10-13T19:34:34.340Z' - refund_requires_card_presence: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - cash_details: - buyer_supplied_money: {} - bank_account_details: - bank_name: bank_name - transfer_type: transfer_type - account_ownership_type: account_ownership_type - fingerprint: fingerprint - country: country - statement_description: statement_description - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - external_details: - type: type - source: source - source_id: source_id - wallet_details: - status: status - brand: brand - buy_now_pay_later_details: - brand: brand - square_account_details: - payment_source_token: payment_source_token - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - location_id: L88917AVBK2S5 - order_id: d7eKah653Z579f3gVtjlxpSlmUcZY - reference_id: reference_id - customer_id: customer_id - employee_id: TMoK_ogh6rH1o4dV - team_member_id: TMoK_ogh6rH1o4dV - refund_ids: - - refund_ids - risk_evaluation: - created_at: created_at - risk_level: PENDING - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - billing_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - note: Test Note - statement_description_identifier: statement_description_identifier - capabilities: - - capabilities - receipt_number: bP9m - receipt_url: >- - https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - device_details: - device_id: device_id - device_installation_id: device_installation_id - device_name: device_name - application_details: - square_product: VIRTUAL_TERMINAL - application_id: sq0ids-Pw67AZAlLVB7hsRmwlJPuA - is_offline_payment: true - offline_payment_details: - client_created_at: client_created_at - version_token: 56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o - update: - path: /v2/payments/{payment_id} - method: PUT - auth: - - oauth2: - - PAYMENTS_WRITE - docs: |- - Updates a payment with the APPROVED status. - You can update the `amount_money` and `tip_money` using this endpoint. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdatePayment - request: - name: UpdatePaymentRequest - path-parameters: - payment_id: - type: string - docs: The ID of the payment to update. - body: - properties: - payment: - type: optional - docs: The updated `Payment` object. - idempotency_key: - type: string - docs: >- - A unique string that identifies this `UpdatePayment` request. - Keys can be any valid string - - but must be unique for every `UpdatePayment` request. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdatePaymentResponse - status-code: 200 - examples: - - path-parameters: - payment_id: payment_id - headers: - Square-Version: '2025-10-16' - request: - payment: - amount_money: - amount: 1000 - currency: USD - tip_money: - amount: 100 - currency: USD - version_token: ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o - idempotency_key: 956f8b13-e4ec-45d6-85e8-d1d95ef0c5de - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment: - id: 1QjqpBVyrI9S4H9sTGDWU9JeiWdZY - created_at: '2021-10-13T20:26:44.191Z' - updated_at: '2021-10-13T20:26:44.364Z' - amount_money: - amount: 1000 - currency: USD - tip_money: - amount: 100 - currency: USD - total_money: - amount: 1100 - currency: USD - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - approved_money: - amount: 1000 - currency: USD - processing_fee: - - {} - refunded_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: APPROVED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T20:26:44.191Z' - source_type: CARD - card_details: - status: AUTHORIZED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: ON_FILE - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: 68aLBM - application_identifier: application_identifier - application_name: application_name - application_cryptogram: application_cryptogram - verification_method: verification_method - verification_results: verification_results - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T20:26:44.364Z' - refund_requires_card_presence: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - cash_details: - buyer_supplied_money: {} - bank_account_details: - bank_name: bank_name - transfer_type: transfer_type - account_ownership_type: account_ownership_type - fingerprint: fingerprint - country: country - statement_description: statement_description - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - external_details: - type: type - source: source - source_id: source_id - wallet_details: - status: status - brand: brand - buy_now_pay_later_details: - brand: brand - square_account_details: - payment_source_token: payment_source_token - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - location_id: L88917AVBK2S5 - order_id: nUSN9TdxpiK3SrQg3wzmf6r8LP9YY - reference_id: reference_id - customer_id: W92WH6P11H4Z77CTET0RNTGFW8 - employee_id: employee_id - team_member_id: team_member_id - refund_ids: - - refund_ids - risk_evaluation: - created_at: '2021-10-13T20:26:45.271Z' - risk_level: NORMAL - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - billing_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - note: Example Note - statement_description_identifier: statement_description_identifier - capabilities: - - EDIT_AMOUNT_UP - - EDIT_AMOUNT_DOWN - - EDIT_TIP_AMOUNT_UP - - EDIT_TIP_AMOUNT_DOWN - receipt_number: 1Qjq - receipt_url: receipt_url - device_details: - device_id: device_id - device_installation_id: device_installation_id - device_name: device_name - application_details: - square_product: ECOMMERCE_API - application_id: sq0ids-TcgftTEtKxJTRF1lCFJ9TA - is_offline_payment: true - offline_payment_details: - client_created_at: client_created_at - version_token: rDrXnqiS7fJgexccgdpzmwqTiXui1aIKCp9EchZ7trE6o - cancel: - path: /v2/payments/{payment_id}/cancel - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels (voids) a payment. You can use this endpoint to cancel a payment - with - - the APPROVED `status`. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelPayment - request: - name: CancelPaymentsRequest - path-parameters: - payment_id: - type: string - docs: The ID of the payment to cancel. - response: - docs: Success - type: root.CancelPaymentResponse - status-code: 200 - examples: - - path-parameters: - payment_id: payment_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment: - id: 1QjqpBVyrI9S4H9sTGDWU9JeiWdZY - created_at: '2021-10-13T20:26:44.191Z' - updated_at: '2021-10-13T20:31:21.597Z' - amount_money: - amount: 1000 - currency: USD - tip_money: - amount: 100 - currency: USD - total_money: - amount: 1100 - currency: USD - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - approved_money: - amount: 1000 - currency: USD - processing_fee: - - {} - refunded_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: CANCELED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T20:26:44.191Z' - source_type: CARD - card_details: - status: VOIDED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: ON_FILE - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: 68aLBM - application_identifier: application_identifier - application_name: application_name - application_cryptogram: application_cryptogram - verification_method: verification_method - verification_results: verification_results - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T20:26:44.364Z' - voided_at: '2021-10-13T20:31:21.597Z' - refund_requires_card_presence: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - cash_details: - buyer_supplied_money: {} - bank_account_details: - bank_name: bank_name - transfer_type: transfer_type - account_ownership_type: account_ownership_type - fingerprint: fingerprint - country: country - statement_description: statement_description - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - external_details: - type: type - source: source - source_id: source_id - wallet_details: - status: status - brand: brand - buy_now_pay_later_details: - brand: brand - square_account_details: - payment_source_token: payment_source_token - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - location_id: L88917AVBK2S5 - order_id: nUSN9TdxpiK3SrQg3wzmf6r8LP9YY - reference_id: reference_id - customer_id: W92WH6P11H4Z77CTET0RNTGFW8 - employee_id: employee_id - team_member_id: team_member_id - refund_ids: - - refund_ids - risk_evaluation: - created_at: '2021-10-13T20:26:45.271Z' - risk_level: NORMAL - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - billing_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - note: Example Note - statement_description_identifier: statement_description_identifier - capabilities: - - capabilities - receipt_number: receipt_number - receipt_url: receipt_url - device_details: - device_id: device_id - device_installation_id: device_installation_id - device_name: device_name - application_details: - square_product: ECOMMERCE_API - application_id: sq0ids-TcgftTEtKxJTRF1lCFJ9TA - is_offline_payment: true - offline_payment_details: - client_created_at: client_created_at - version_token: N8AGYgEjCiY9Q57Jw7aVHEpBq8bzGCDCQMRX8Vs56N06o - complete: - path: /v2/payments/{payment_id}/complete - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Completes (captures) a payment. - - By default, payments are set to complete immediately after they are - created. - - - You can use this endpoint to complete a payment with the APPROVED - `status`. - source: - openapi: ../default/openapi/openapi.json - display-name: CompletePayment - request: - name: CompletePaymentRequest - path-parameters: - payment_id: - type: string - docs: The unique ID identifying the payment to be completed. - body: - properties: - version_token: - type: optional> - docs: >- - Used for optimistic concurrency. This opaque token identifies - the current `Payment` - - version that the caller expects. If the server has a different - version of the Payment, - - the update fails and a response with a VERSION_MISMATCH error is - returned. - content-type: application/json - response: - docs: Success - type: root.CompletePaymentResponse - status-code: 200 - examples: - - path-parameters: - payment_id: payment_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - payment: - id: bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - created_at: '2021-10-13T19:34:33.524Z' - updated_at: '2021-10-13T19:34:34.339Z' - amount_money: - amount: 555 - currency: USD - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - total_money: - amount: 555 - currency: USD - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - approved_money: - amount: 555 - currency: USD - processing_fee: - - effective_at: '2021-10-13T21:34:35.000Z' - type: INITIAL - amount_money: - amount: 34 - currency: USD - refunded_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - status: COMPLETED - delay_duration: PT168H - delay_action: CANCEL - delayed_until: '2021-10-20T19:34:33.524Z' - source_type: CARD - card_details: - status: CAPTURED - card: - card_brand: VISA - last_4: '1111' - exp_month: 11 - exp_year: 2022 - fingerprint: >- - sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ - card_type: DEBIT - prepaid_type: NOT_PREPAID - bin: '411111' - entry_method: KEYED - cvv_status: CVV_ACCEPTED - avs_status: AVS_ACCEPTED - auth_result_code: 2Nkw7q - application_identifier: application_identifier - application_name: application_name - application_cryptogram: application_cryptogram - verification_method: verification_method - verification_results: verification_results - statement_description: SQ *EXAMPLE TEST GOSQ.C - card_payment_timeline: - authorized_at: '2021-10-13T19:34:33.680Z' - captured_at: '2021-10-13T19:34:34.340Z' - refund_requires_card_presence: true - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - cash_details: - buyer_supplied_money: {} - bank_account_details: - bank_name: bank_name - transfer_type: transfer_type - account_ownership_type: account_ownership_type - fingerprint: fingerprint - country: country - statement_description: statement_description - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - external_details: - type: type - source: source - source_id: source_id - wallet_details: - status: status - brand: brand - buy_now_pay_later_details: - brand: brand - square_account_details: - payment_source_token: payment_source_token - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - location_id: L88917AVBK2S5 - order_id: d7eKah653Z579f3gVtjlxpSlmUcZY - reference_id: reference_id - customer_id: customer_id - employee_id: TMoK_ogh6rH1o4dV - team_member_id: TMoK_ogh6rH1o4dV - refund_ids: - - refund_ids - risk_evaluation: - created_at: created_at - risk_level: PENDING - terminal_checkout_id: terminal_checkout_id - buyer_email_address: buyer_email_address - billing_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - note: Test Note - statement_description_identifier: statement_description_identifier - capabilities: - - capabilities - receipt_number: bP9m - receipt_url: >- - https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - device_details: - device_id: device_id - device_installation_id: device_installation_id - device_name: device_name - application_details: - square_product: VIRTUAL_TERMINAL - application_id: sq0ids-Pw67AZAlLVB7hsRmwlJPuA - is_offline_payment: true - offline_payment_details: - client_created_at: client_created_at - version_token: 56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/payouts.yml b/.mock/definition/payouts.yml deleted file mode 100644 index 480551e1..00000000 --- a/.mock/definition/payouts.yml +++ /dev/null @@ -1,297 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/payouts - method: GET - auth: - - oauth2: [] - docs: >- - Retrieves a list of all payouts for the default location. - - You can filter payouts by location ID, status, time range, and order - them in ascending or descending order. - - To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.payouts - source: - openapi: ../default/openapi/openapi.json - display-name: ListPayouts - request: - name: ListPayoutsRequest - query-parameters: - location_id: - type: optional> - docs: >- - The ID of the location for which to list the payouts. - - By default, payouts are returned for the default (main) location - associated with the seller. - status: - type: optional> - docs: If provided, only payouts with the given status are returned. - begin_time: - type: optional> - docs: >- - The timestamp for the beginning of the payout creation time, in - RFC 3339 format. - - Inclusive. Default: The current time minus one year. - end_time: - type: optional> - docs: >- - The timestamp for the end of the payout creation time, in RFC 3339 - format. - - Default: The current time. - sort_order: - type: optional> - docs: The order in which payouts are listed. - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - - If request parameters change between requests, subsequent results - may contain duplicates or missing records. - limit: - type: optional> - docs: >- - The maximum number of results to be returned in a single page. - - It is possible to receive fewer results than the specified limit - on a given page. - - The default value of 100 is also the maximum allowed value. If the - provided value is - - greater than 100, it is ignored and the default value is used - instead. - - Default: `100` - response: - docs: Success - type: root.ListPayoutsResponse - status-code: 200 - examples: - - query-parameters: - location_id: location_id - status: SENT - begin_time: begin_time - end_time: end_time - sort_order: DESC - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - payouts: - - id: po_b345d2c7-90b3-4f0b-a2aa-df1def7f8afc - status: PAID - location_id: L88917AVBK2S5 - created_at: '2022-03-29T16:12:31Z' - updated_at: '2022-03-30T01:07:22.875Z' - amount_money: - amount: 6259 - destination: - type: CARD - id: ccof:ZPp3oedR3AeEUNd3z7 - version: 2 - type: BATCH - payout_fee: - - amount_money: - amount: 95 - effective_at: '2022-03-29T16:12:31Z' - type: TRANSFER_FEE - arrival_date: '2022-03-29' - end_to_end_id: L2100000005 - - id: po_f3c0fb38-a5ce-427d-b858-52b925b72e45 - status: PAID - location_id: L88917AVBK2S5 - created_at: '2022-03-24T03:07:09Z' - updated_at: '2022-03-24T03:07:09Z' - amount_money: - amount: -103 - destination: - type: BANK_ACCOUNT - id: bact:ZPp3oedR3AeEUNd3z7 - version: 1 - type: BATCH - payout_fee: - - {} - arrival_date: '2022-03-24' - end_to_end_id: L2100000006 - cursor: >- - EMPCyStibo64hS8wLayZPp3oedR3AeEUNd3z7u6zphi72LQZFIEMbkKVvot9eefpU - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/payouts/{payout_id} - method: GET - auth: - - oauth2: [] - docs: |- - Retrieves details of a specific payout identified by a payout ID. - To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. - source: - openapi: ../default/openapi/openapi.json - display-name: GetPayout - request: - name: GetPayoutsRequest - path-parameters: - payout_id: - type: string - docs: The ID of the payout to retrieve the information for. - response: - docs: Success - type: root.GetPayoutResponse - status-code: 200 - examples: - - path-parameters: - payout_id: payout_id - headers: - Square-Version: '2025-10-16' - response: - body: - payout: - id: po_f3c0fb38-a5ce-427d-b858-52b925b72e45 - status: PAID - location_id: L88917AVBK2S5 - created_at: '2022-03-24T03:07:09Z' - updated_at: '2022-03-24T03:07:09Z' - amount_money: - amount: -103 - currency: UNKNOWN_CURRENCY - destination: - type: BANK_ACCOUNT - id: bact:ZPp3oedR3AeEUNd3z7 - version: 1 - type: BATCH - payout_fee: - - {} - arrival_date: '2022-03-24' - end_to_end_id: end_to_end_id - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - ListEntries: - path: /v2/payouts/{payout_id}/payout-entries - method: GET - auth: - - oauth2: [] - docs: |- - Retrieves a list of all payout entries for a specific payout. - To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.payout_entries - source: - openapi: ../default/openapi/openapi.json - display-name: ListPayoutEntries - request: - name: ListEntriesPayoutsRequest - path-parameters: - payout_id: - type: string - docs: The ID of the payout to retrieve the information for. - query-parameters: - sort_order: - type: optional> - docs: The order in which payout entries are listed. - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - - If request parameters change between requests, subsequent results - may contain duplicates or missing records. - limit: - type: optional> - docs: >- - The maximum number of results to be returned in a single page. - - It is possible to receive fewer results than the specified limit - on a given page. - - The default value of 100 is also the maximum allowed value. If the - provided value is - - greater than 100, it is ignored and the default value is used - instead. - - Default: `100` - response: - docs: Success - type: root.ListPayoutEntriesResponse - status-code: 200 - examples: - - path-parameters: - payout_id: payout_id - query-parameters: - sort_order: DESC - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - payout_entries: - - id: poe_ZQWcw41d0SGJS6IWd4cSi8mKHk - payout_id: po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6 - effective_at: '2021-12-14T23:31:49Z' - type: REFUND - gross_amount_money: - amount: -50 - fee_amount_money: - amount: -2 - net_amount_money: - amount: -48 - type_refund_details: - payment_id: HVdG62HeMlti8YYf94oxrN - refund_id: HVdG62HeMlti8YYf94oxrN_dR8Nztxg7umf94oxrN12Ji5r2KW14FAY - - id: poe_EibbY9Ob1d0SGJS6IWd4cSiSi6wkaPk - payout_id: po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6 - effective_at: '2021-12-14T23:31:49Z' - type: CHARGE - gross_amount_money: - amount: 100 - fee_amount_money: - amount: 19 - net_amount_money: - amount: 81 - type_charge_details: - payment_id: HVdG62H5K3291d0SGJS6IWd4cSi8YY - cursor: >- - TbfI80z98Xc2LdApCyZ2NvCYLpkPurYLR16GRIttpMJ55mrSIMzHgtkcRQdT0mOnTtfHO - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/refunds.yml b/.mock/definition/refunds.yml deleted file mode 100644 index 913be908..00000000 --- a/.mock/definition/refunds.yml +++ /dev/null @@ -1,507 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/refunds - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a list of refunds for the account making the request. - - - Results are eventually consistent, and new refunds or changes to refunds - might take several - - seconds to appear. - - - The maximum results per page is 100. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.refunds - source: - openapi: ../default/openapi/openapi.json - display-name: ListPaymentRefunds - request: - name: ListRefundsRequest - query-parameters: - begin_time: - type: optional> - docs: >- - Indicates the start of the time range to retrieve each - `PaymentRefund` for, in RFC 3339 - - format. The range is determined using the `created_at` field for - each `PaymentRefund`. - - - Default: The current time minus one year. - end_time: - type: optional> - docs: >- - Indicates the end of the time range to retrieve each - `PaymentRefund` for, in RFC 3339 - - format. The range is determined using the `created_at` field for - each `PaymentRefund`. - - - Default: The current time. - sort_order: - type: optional> - docs: >- - The order in which results are listed by - `PaymentRefund.created_at`: - - - `ASC` - Oldest to newest. - - - `DESC` - Newest to oldest (default). - cursor: - type: optional> - docs: >- - A pagination cursor returned by a previous call to this endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - location_id: - type: optional> - docs: >- - Limit results to the location supplied. By default, results are - returned - - for all locations associated with the seller. - status: - type: optional> - docs: >- - If provided, only refunds with the given status are returned. - - For a list of refund status values, see - [PaymentRefund](entity:PaymentRefund). - - - Default: If omitted, refunds are returned regardless of their - status. - source_type: - type: optional> - docs: >- - If provided, only returns refunds whose payments have the - indicated source type. - - Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, - and `EXTERNAL`. - - For information about these payment source types, see - - [Take - Payments](https://developer.squareup.com/docs/payments-api/take-payments). - - - Default: If omitted, refunds are returned regardless of the source - type. - limit: - type: optional> - docs: >- - The maximum number of results to be returned in a single page. - - - It is possible to receive fewer results than the specified limit - on a given page. - - - If the supplied value is greater than 100, no more than 100 - results are returned. - - - Default: 100 - updated_at_begin_time: - type: optional> - docs: >- - Indicates the start of the time range to retrieve each - `PaymentRefund` for, in RFC 3339 - - format. The range is determined using the `updated_at` field for - each `PaymentRefund`. - - - Default: If omitted, the time range starts at `begin_time`. - updated_at_end_time: - type: optional> - docs: >- - Indicates the end of the time range to retrieve each - `PaymentRefund` for, in RFC 3339 - - format. The range is determined using the `updated_at` field for - each `PaymentRefund`. - - - Default: The current time. - sort_field: - type: optional> - docs: The field used to sort results by. The default is `CREATED_AT`. - response: - docs: Success - type: root.ListPaymentRefundsResponse - status-code: 200 - examples: - - query-parameters: - begin_time: begin_time - end_time: end_time - sort_order: sort_order - cursor: cursor - location_id: location_id - status: status - source_type: source_type - limit: 1 - updated_at_begin_time: updated_at_begin_time - updated_at_end_time: updated_at_end_time - sort_field: CREATED_AT - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refunds: - - id: >- - bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd - status: COMPLETED - location_id: L88917AVBK2S5 - unlinked: true - destination_type: destination_type - amount_money: - amount: 555 - currency: USD - processing_fee: - - effective_at: '2021-10-13T21:34:35.000Z' - type: INITIAL - amount_money: - amount: -34 - currency: USD - payment_id: bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - order_id: 9ltv0bx5PuvGXUYHYHxYSKEqC3IZY - reason: Example Refund - created_at: '2021-10-13T19:59:05.342Z' - updated_at: '2021-10-13T20:00:03.497Z' - team_member_id: team_member_id - terminal_refund_id: terminal_refund_id - cursor: >- - 5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb - RefundPayment: - path: /v2/refunds - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Refunds a payment. You can refund the entire payment amount or a - - portion of it. You can use this endpoint to refund a card payment or - record a - - refund of a cash or external payment. For more information, see - - [Refund - Payment](https://developer.squareup.com/docs/payments-api/refund-payments). - source: - openapi: ../default/openapi/openapi.json - display-name: RefundPayment - request: - name: RefundPaymentRequest - body: - properties: - idempotency_key: - type: string - docs: >2- - A unique string that identifies this `RefundPayment` request. The key can be any valid string - but must be unique for every `RefundPayment` request. - - - Keys are limited to a max of 45 characters - however, the number - of allowed characters might be - - less than 45, if multi-byte characters are used. - - - For more information, see - [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). - validation: - minLength: 1 - amount_money: - type: root.Money - docs: >- - The amount of money to refund. - - - This amount cannot be more than the `total_money` value of the - payment minus the total - - amount of all previously completed refunds for this payment. - - - This amount must be specified in the smallest denomination of - the applicable currency - - (for example, US dollar amounts are specified in cents). For - more information, see - - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - - - The currency code must match the currency associated with the - business - - that is charging the card. - app_fee_money: - type: optional - docs: >- - The amount of money the developer contributes to help cover the - refunded amount. - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). - - - The value cannot be more than the `amount_money`. - - - You can specify this parameter in a refund request only if the - same parameter was also included - - when taking the payment. This is part of the application fee - scenario the API supports. For more - - information, see [Take Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - - - To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission is required. - - For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - payment_id: - type: optional> - docs: |- - The unique ID of the payment being refunded. - Required when unlinked=false, otherwise must not be set. - destination_id: - type: optional> - docs: >- - The ID indicating where funds will be refunded to. Required for - unlinked refunds. For more - - information, see [Process an Unlinked - Refund](https://developer.squareup.com/docs/refunds-api/unlinked-refunds). - - - For refunds linked to Square payments, `destination_id` is - usually omitted; in this case, funds - - will be returned to the original payment source. The field may - be specified in order to request - - a cross-method refund to a gift card. For more information, - - see [Cross-method refunds to gift - cards](https://developer.squareup.com/docs/payments-api/refund-payments#cross-method-refunds-to-gift-cards). - unlinked: - type: optional> - docs: >- - Indicates that the refund is not linked to a Square payment. - - If set to true, `destination_id` and `location_id` must be - supplied while `payment_id` must not - - be provided. - location_id: - type: optional> - docs: >- - The location ID associated with the unlinked refund. - - Required for requests specifying `unlinked=true`. - - Otherwise, if included when `unlinked=false`, will throw an - error. - validation: - maxLength: 50 - customer_id: - type: optional> - docs: >- - The [Customer](entity:Customer) ID of the customer associated - with the refund. - - This is required if the `destination_id` refers to a card on - file created using the Cards - - API. Only allowed when `unlinked=true`. - reason: - type: optional> - docs: A description of the reason for the refund. - validation: - maxLength: 192 - payment_version_token: - type: optional> - docs: >2- - Used for optimistic concurrency. This opaque token identifies the current `Payment` - version that the caller expects. If the server has a different - version of the Payment, - - the update fails and a response with a VERSION_MISMATCH error is - returned. - - If the versions match, or the field is not provided, the refund - proceeds as normal. - team_member_id: - type: optional> - docs: >- - An optional [TeamMember](entity:TeamMember) ID to associate with - this refund. - validation: - maxLength: 192 - cash_details: - type: optional - docs: >- - Additional details required when recording an unlinked cash - refund (`destination_id` is CASH). - external_details: - type: optional - docs: >- - Additional details required when recording an unlinked external - refund - - (`destination_id` is EXTERNAL). - content-type: application/json - response: - docs: Success - type: root.RefundPaymentResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 9b7f2dcf-49da-4411-b23e-a2d6af21333a - amount_money: - amount: 1000 - currency: USD - app_fee_money: - amount: 10 - currency: USD - payment_id: R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY - reason: Example - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: >- - R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY_KlWP8IC1557ddwc9QWTKrCVU6m0JXDz15R2Qym5eQfR - status: PENDING - location_id: L88917AVBK2S5 - unlinked: true - destination_type: destination_type - destination_details: - cash_details: - seller_supplied_money: {} - external_details: - type: type - source: source - amount_money: - amount: 1000 - currency: USD - app_fee_money: - amount: 10 - currency: USD - processing_fee: - - {} - payment_id: R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY - order_id: 1JLEUZeEooAIX8HMqm9kvWd69aQZY - reason: Example - created_at: '2021-10-13T21:23:19.116Z' - updated_at: '2021-10-13T21:23:19.508Z' - team_member_id: team_member_id - terminal_refund_id: terminal_refund_id - get: - path: /v2/refunds/{refund_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: Retrieves a specific refund using the `refund_id`. - source: - openapi: ../default/openapi/openapi.json - display-name: GetPaymentRefund - request: - name: GetRefundsRequest - path-parameters: - refund_id: - type: string - docs: The unique ID for the desired `PaymentRefund`. - response: - docs: Success - type: root.GetPaymentRefundResponse - status-code: 200 - examples: - - path-parameters: - refund_id: refund_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: >- - bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd - status: COMPLETED - location_id: L88917AVBK2S5 - unlinked: true - destination_type: destination_type - destination_details: - cash_details: - seller_supplied_money: {} - external_details: - type: type - source: source - amount_money: - amount: 555 - currency: USD - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - processing_fee: - - effective_at: '2021-10-13T21:34:35.000Z' - type: INITIAL - amount_money: - amount: -34 - currency: USD - payment_id: bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY - order_id: 9ltv0bx5PuvGXUYHYHxYSKEqC3IZY - reason: Example Refund - created_at: '2021-10-13T19:59:05.073Z' - updated_at: '2021-10-13T20:00:02.442Z' - team_member_id: team_member_id - terminal_refund_id: terminal_refund_id - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml deleted file mode 100644 index ea44092e..00000000 --- a/.mock/definition/sites.yml +++ /dev/null @@ -1,54 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/sites - method: GET - auth: - - oauth2: - - ONLINE_STORE_SITE_READ - docs: >- - Lists the Square Online sites that belong to a seller. Sites are listed - in descending order by the `created_at` date. - - - - __Note:__ Square Online APIs are publicly available as part of an early - access program. For more information, see [Early access program for - Square Online - APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis). - source: - openapi: ../default/openapi/openapi.json - display-name: ListSites - response: - docs: Success - type: root.ListSitesResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - sites: - - id: site_278075276488921835 - site_title: My Second Site - domain: mysite2.square.site - is_published: false - created_at: '2020-10-28T13:22:51.000000Z' - updated_at: '2020-10-28T13:22:51.000000Z' - - id: site_102725345836253849 - site_title: My First Site - domain: mysite1.square.site - is_published: true - created_at: '2020-06-18T17:45:13.000000Z' - updated_at: '2020-11-23T02:19:10.000000Z' - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/snippets.yml b/.mock/definition/snippets.yml deleted file mode 100644 index eb5b45ad..00000000 --- a/.mock/definition/snippets.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - get: - path: /v2/sites/{site_id}/snippet - method: GET - auth: - - oauth2: - - ONLINE_STORE_SNIPPETS_READ - docs: >- - Retrieves your snippet from a Square Online site. A site can contain - snippets from multiple snippet applications, but you can retrieve only - the snippet that was added by your application. - - - You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of - the sites that belong to a seller. - - - - __Note:__ Square Online APIs are publicly available as part of an early - access program. For more information, see [Early access program for - Square Online - APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis). - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveSnippet - request: - name: GetSnippetsRequest - path-parameters: - site_id: - type: string - docs: The ID of the site that contains the snippet. - response: - docs: Success - type: root.GetSnippetResponse - status-code: 200 - examples: - - path-parameters: - site_id: site_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - snippet: - id: snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7 - site_id: site_278075276488921835 - content: - created_at: '2021-03-11T25:40:09.000000Z' - updated_at: '2021-03-11T25:40:09.000000Z' - upsert: - path: /v2/sites/{site_id}/snippet - method: POST - auth: - - oauth2: - - ONLINE_STORE_SNIPPETS_WRITE - docs: >- - Adds a snippet to a Square Online site or updates the existing snippet - on the site. - - The snippet code is appended to the end of the `head` element on every - page of the site, except checkout pages. A snippet application can add - one snippet to a given site. - - - You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of - the sites that belong to a seller. - - - - __Note:__ Square Online APIs are publicly available as part of an early - access program. For more information, see [Early access program for - Square Online - APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis). - source: - openapi: ../default/openapi/openapi.json - display-name: UpsertSnippet - request: - name: UpsertSnippetRequest - path-parameters: - site_id: - type: string - docs: The ID of the site where you want to add or update the snippet. - body: - properties: - snippet: - type: root.Snippet - docs: The snippet for the site. - content-type: application/json - response: - docs: Success - type: root.UpsertSnippetResponse - status-code: 200 - examples: - - path-parameters: - site_id: site_id - headers: - Square-Version: '2025-10-16' - request: - snippet: - content: - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - snippet: - id: snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7 - site_id: site_278075276488921835 - content: - created_at: '2021-03-11T25:40:09.000000Z' - updated_at: '2021-03-11T25:40:09.000000Z' - delete: - path: /v2/sites/{site_id}/snippet - method: DELETE - auth: - - oauth2: - - ONLINE_STORE_SNIPPETS_WRITE - docs: >- - Removes your snippet from a Square Online site. - - - You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of - the sites that belong to a seller. - - - - __Note:__ Square Online APIs are publicly available as part of an early - access program. For more information, see [Early access program for - Square Online - APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis). - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteSnippet - request: - name: DeleteSnippetsRequest - path-parameters: - site_id: - type: string - docs: The ID of the site that contains the snippet. - response: - docs: Success - type: root.DeleteSnippetResponse - status-code: 200 - examples: - - path-parameters: - site_id: site_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/subscriptions.yml b/.mock/definition/subscriptions.yml deleted file mode 100644 index d15b2cd6..00000000 --- a/.mock/definition/subscriptions.yml +++ /dev/null @@ -1,1309 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/subscriptions - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - - PAYMENTS_WRITE - - SUBSCRIPTIONS_WRITE - - ITEMS_READ - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Enrolls a customer in a subscription. - - - If you provide a card on file in the request, Square charges the card - for - - the subscription. Otherwise, Square sends an invoice to the customer's - email - - address. The subscription starts immediately, unless the request - includes - - the optional `start_date`. Each individual subscription is associated - with a particular location. - - - For more information, see [Create a - subscription](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#create-a-subscription). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateSubscription - request: - name: CreateSubscriptionRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string that identifies this `CreateSubscription` - request. - - If you do not provide a unique string (or provide an empty - string as the value), - - the endpoint treats each request as independent. - - - For more information, see [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - location_id: - type: string - docs: The ID of the location the subscription is associated with. - validation: - minLength: 1 - plan_variation_id: - type: optional - docs: >- - The ID of the [subscription plan - variation](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations#plan-variations) - created using the Catalog API. - customer_id: - type: string - docs: >- - The ID of the [customer](entity:Customer) subscribing to the - subscription plan variation. - validation: - minLength: 1 - start_date: - type: optional - docs: |- - The `YYYY-MM-DD`-formatted date to start the subscription. - If it is unspecified, the subscription starts immediately. - canceled_date: - type: optional - docs: >- - The `YYYY-MM-DD`-formatted date when the newly created - subscription is scheduled for cancellation. - - - This date overrides the cancellation date set in the plan - variation configuration. - - If the cancellation date is earlier than the end date of a - subscription cycle, the subscription stops - - at the canceled date and the subscriber is sent a prorated - invoice at the beginning of the canceled cycle. - - - When the subscription plan of the newly created subscription has - a fixed number of cycles and the `canceled_date` - - occurs before the subscription plan completes, the specified - `canceled_date` sets the date when the subscription - - stops through the end of the last cycle. - tax_percentage: - type: optional - docs: >- - The tax to add when billing the subscription. - - The percentage is expressed in decimal form, using a `'.'` as - the decimal - - separator and without a `'%'` sign. For example, a value of 7.5 - - corresponds to 7.5%. - validation: - maxLength: 10 - price_override_money: - type: optional - docs: >- - A custom price which overrides the cost of a subscription plan - variation with `STATIC` pricing. - - This field does not affect itemized subscriptions with - `RELATIVE` pricing. Instead, - - you should edit the Subscription's [order - template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates). - card_id: - type: optional - docs: >- - The ID of the [subscriber's](entity:Customer) - [card](entity:Card) to charge. - - If it is not specified, the subscriber receives an invoice via - email with a link to pay for their subscription. - timezone: - type: optional - docs: >- - The timezone that is used in date calculations for the - subscription. If unset, defaults to - - the location timezone. If a timezone is not configured for the - location, defaults to "America/New_York". - - Format: the IANA Timezone Database identifier for the location - timezone. For - - a list of time zones, see [List of tz database time - zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - source: - type: optional - docs: The origination details of the subscription. - monthly_billing_anchor_date: - type: optional - docs: The day-of-the-month to change the billing date to. - validation: - min: 1 - max: 31 - phases: - type: optional> - docs: array of phases for this subscription - content-type: application/json - response: - docs: Success - type: root.CreateSubscriptionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 8193148c-9586-11e6-99f9-28cfe92138cf - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2023-06-20' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - phases: - - ordinal: 0 - order_template_id: U2NaowWxzXwpsZU697x7ZHOAnCNZY - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 56214fb2-cc85-47a1-93bc-44f3766bb56f - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2023-06-20' - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - price_override_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - version: 1 - created_at: '2023-06-20T21:53:10Z' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - uid: 873451e0-745b-4e87-ab0b-c574933fe616 - ordinal: 0 - order_template_id: U2NaowWxzXwpsZU697x7ZHOAnCNZY - plan_phase_uid: X2Q2AONPB3RB64Y27S25QCZP - completed_date: completed_date - BulkSwapPlan: - path: /v2/subscriptions/bulk-swap-plan - method: POST - auth: - - oauth2: - - SUBSCRIPTIONS_WRITE - - SUBSCRIPTIONS_READ - - ITEMS_READ - docs: >- - Schedules a plan variation change for all active subscriptions under a - given plan - - variation. For more information, see [Swap Subscription Plan - Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations). - source: - openapi: ../default/openapi/openapi.json - display-name: BulkSwapPlan - request: - name: BulkSwapPlanRequest - body: - properties: - new_plan_variation_id: - type: string - docs: |- - The ID of the new subscription plan variation. - - This field is required. - validation: - minLength: 1 - old_plan_variation_id: - type: string - docs: >- - The ID of the plan variation whose subscriptions should be - swapped. Active subscriptions - - using this plan variation will be subscribed to the new plan - variation on their next billing - - day. - validation: - minLength: 1 - location_id: - type: string - docs: >- - The ID of the location to associate with the swapped - subscriptions. - validation: - minLength: 1 - content-type: application/json - response: - docs: Success - type: root.BulkSwapPlanResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - new_plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 - old_plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - location_id: S8GWD5R9QB376 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - affected_subscriptions: 12 - search: - path: /v2/subscriptions/search - method: POST - auth: - - oauth2: - - SUBSCRIPTIONS_READ - docs: >- - Searches for subscriptions. - - - Results are ordered chronologically by subscription creation date. If - - the request specifies more than one location ID, - - the endpoint orders the result - - by location ID, and then by creation date within each location. If no - locations are given - - in the query, all locations are searched. - - - You can also optionally specify `customer_ids` to search by customer. - - If left unset, all customers - - associated with the specified locations are returned. - - If the request specifies customer IDs, the endpoint orders results - - first by location, within location by customer ID, and within - - customer by subscription creation date. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchSubscriptions - request: - name: SearchSubscriptionsRequest - body: - properties: - cursor: - type: optional - docs: >- - When the total number of resulting subscriptions exceeds the - limit of a paged response, - - specify the cursor returned from a preceding response here to - fetch the next set of results. - - If the cursor is unset, the response contains the last page of - the results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional - docs: |- - The upper limit on the number of subscriptions to return - in a paged response. - validation: - min: 1 - query: - type: optional - docs: >- - A subscription query consisting of specified filtering - conditions. - - - If this `query` field is unspecified, the `SearchSubscriptions` - call will return all subscriptions. - include: - type: optional> - docs: >- - An option to include related information in the response. - - - The supported values are: - - - - `actions`: to include scheduled actions on the targeted - subscriptions. - content-type: application/json - response: - docs: Success - type: root.SearchSubscriptionsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - customer_ids: - - CHFGVKYY8RSV93M5KCYTG4PN0G - location_ids: - - S8GWD5R9QB376 - source_names: - - My App - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscriptions: - - id: de86fc96-8664-474b-af1a-abbe59cacf0e - location_id: S8GWD5R9QB376 - plan_variation_id: L3TJVDHVBEQEGQDEZL2JJM7R - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2021-10-20' - canceled_date: '2021-10-30' - charged_through_date: '2021-11-20' - status: CANCELED - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - version: 1000000 - created_at: '2021-10-20T21:53:10Z' - card_id: ccof:mueUsvgajChmjEbp4GB - timezone: UTC - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - - id: 56214fb2-cc85-47a1-93bc-44f3766bb56f - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2022-01-19' - canceled_date: canceled_date - charged_through_date: '2022-08-19' - status: PAUSED - tax_percentage: '5' - invoice_ids: - - grebK0Q_l8H4fqoMMVvt-Q - - rcX_i3sNmHTGKhI4W2mceA - price_override_money: - amount: 1000 - currency: USD - version: 2 - created_at: '2022-01-19T21:53:10Z' - card_id: card_id - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - - id: 56214fb2-cc85-47a1-93bc-44f3766bb56f - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2023-06-20' - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - version: 1 - created_at: '2023-06-20T21:53:10Z' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - uid: 873451e0-745b-4e87-ab0b-c574933fe616 - ordinal: 0 - order_template_id: U2NaowWxzXwpsZU697x7ZHOAnCNZY - plan_phase_uid: X2Q2AONPB3RB64Y27S25QCZP - completed_date: completed_date - cursor: cursor - get: - path: /v2/subscriptions/{subscription_id} - method: GET - auth: - - oauth2: - - SUBSCRIPTIONS_READ - docs: Retrieves a specific subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveSubscription - request: - name: GetSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to retrieve. - query-parameters: - include: - type: optional> - docs: >- - A query parameter to specify related information to be included in - the response. - - - The supported query parameter values are: - - - - `actions`: to include scheduled actions on the targeted - subscription. - response: - docs: Success - type: root.GetSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - query-parameters: - include: include - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 8151fc89-da15-4eb9-a685-1a70883cebfc - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - start_date: '2022-07-27' - canceled_date: canceled_date - charged_through_date: '2023-11-20' - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - - inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA - price_override_money: - amount: 25000 - currency: USD - version: 1000000 - created_at: '2022-07-27T21:53:10Z' - card_id: ccof:IkWfpLj4tNHMyFii3GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - update: - path: /v2/subscriptions/{subscription_id} - method: PUT - auth: - - oauth2: - - CUSTOMERS_READ - - PAYMENTS_WRITE - - SUBSCRIPTIONS_WRITE - - ITEMS_READ - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Updates a subscription by modifying or clearing `subscription` field - values. - - To clear a field, set its value to `null`. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateSubscription - request: - name: UpdateSubscriptionRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to update. - body: - properties: - subscription: - type: optional - docs: >- - The subscription object containing the current version, and - fields to update. - - Unset fields will be left at their current server values, and - JSON `null` values will - - be treated as a request to clear the relevant data. - content-type: application/json - response: - docs: Success - type: root.UpdateSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - subscription: - card_id: '{NEW CARD ID}' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 7217d8ca-1fee-4446-a9e5-8540b5d8c9bb - location_id: LPJKHYR7WFDKN - plan_variation_id: XOUNEKCE6NSXQW5NTSQ73MMX - customer_id: AM69AB81FT4479YH9HGWS1HZY8 - start_date: '2023-01-30' - canceled_date: canceled_date - charged_through_date: '2023-03-13' - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - inv:0-ChAPSfVYvNewckgf3x4iigN_ENMM - - inv:0-ChBQaCCLfjcm9WEUBGxvuydJENMM - price_override_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - version: 3 - created_at: '2023-01-30T19:27:32Z' - card_id: '{NEW CARD ID}' - timezone: UTC - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - DeleteAction: - path: /v2/subscriptions/{subscription_id}/actions/{action_id} - method: DELETE - auth: - - oauth2: - - SUBSCRIPTIONS_WRITE - docs: Deletes a scheduled action for a subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteSubscriptionAction - request: - name: DeleteActionSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription the targeted action is to act upon. - action_id: - type: string - docs: The ID of the targeted action to be deleted. - response: - docs: Success - type: root.DeleteSubscriptionActionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - action_id: action_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 8151fc89-da15-4eb9-a685-1a70883cebfc - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: JDKYHBWT1D4F8MFH63DBMEN8Y4 - start_date: '2022-07-27' - canceled_date: canceled_date - charged_through_date: '2023-11-20' - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - - inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA - price_override_money: - amount: 25000 - currency: USD - version: 1000000 - created_at: '2022-07-27T21:53:10Z' - card_id: ccof:IkWfpLj4tNHMyFii3GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - ChangeBillingAnchorDate: - path: /v2/subscriptions/{subscription_id}/billing-anchor - method: POST - auth: - - oauth2: - - SUBSCRIPTIONS_WRITE - - SUBSCRIPTIONS_READ - - ITEMS_READ - docs: >- - Changes the [billing anchor - date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates) - - for a subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: ChangeBillingAnchorDate - request: - name: ChangeBillingAnchorDateRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to update the billing anchor date. - body: - properties: - monthly_billing_anchor_date: - type: optional> - docs: The anchor day for the billing cycle. - validation: - min: 1 - max: 31 - effective_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the scheduled - `BILLING_ANCHOR_CHANGE` action takes - - place on the subscription. - - - When this date is unspecified or falls within the current - billing cycle, the billing anchor date - - is changed immediately. - content-type: application/json - response: - docs: Success - type: root.ChangeBillingAnchorDateResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - monthly_billing_anchor_date: 1 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 9ba40961-995a-4a3d-8c53-048c40cafc13 - location_id: S8GWD5R9QB376 - plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: start_date - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - price_override_money: - amount: 2000 - currency: USD - version: 3 - created_at: '2023-06-20T21:53:10Z' - card_id: card_id - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 20 - phases: - - uid: 98d6f53b-40e1-4714-8827-032fd923be25 - ordinal: 0 - order_template_id: E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY - plan_phase_uid: C66BKH3ASTDYGJJCEZXQQSS7 - completed_date: completed_date - actions: - - id: f0a1dfdc-675b-3a14-a640-99f7ac1cee83 - type: CHANGE_BILLING_ANCHOR_DATE - effective_date: '2023-11-01' - monthly_billing_anchor_date: 1 - phases: - - {} - new_plan_variation_id: new_plan_variation_id - cancel: - path: /v2/subscriptions/{subscription_id}/cancel - method: POST - auth: - - oauth2: - - SUBSCRIPTIONS_WRITE - docs: >- - Schedules a `CANCEL` action to cancel an active subscription. This - - sets the `canceled_date` field to the end of the active billing period. - After this date, - - the subscription status changes from ACTIVE to CANCELED. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelSubscription - request: - name: CancelSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to cancel. - response: - docs: Success - type: root.CancelSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 910afd30-464a-4e00-a8d8-2296e - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2022-01-19' - canceled_date: '2023-06-05' - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - inv:0-ChCHu2mZEabLeeHahQnXDjZQECY - - inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA - price_override_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - version: 3 - created_at: '2022-01-19T21:53:10Z' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - {} - completed_date: completed_date - actions: - - id: id - type: CANCEL - effective_date: effective_date - monthly_billing_anchor_date: 1 - phases: - - {} - new_plan_variation_id: new_plan_variation_id - listEvents: - path: /v2/subscriptions/{subscription_id}/events - method: GET - auth: - - oauth2: - - SUBSCRIPTIONS_READ - docs: >- - Lists all - [events](https://developer.squareup.com/docs/subscriptions-api/actions-events) - for a specific subscription. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.subscription_events - source: - openapi: ../default/openapi/openapi.json - display-name: ListSubscriptionEvents - request: - name: ListEventsSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to retrieve the events for. - query-parameters: - cursor: - type: optional> - docs: >- - When the total number of resulting subscription events exceeds the - limit of a paged response, - - specify the cursor returned from a preceding response here to - fetch the next set of results. - - If the cursor is unset, the response contains the last page of the - results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - limit: - type: optional> - docs: |- - The upper limit on the number of subscription events to return - in a paged response. - response: - docs: Success - type: root.ListSubscriptionEventsResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - query-parameters: - cursor: cursor - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription_events: - - id: 06809161-3867-4598-8269-8aea5be4f9de - subscription_event_type: START_SUBSCRIPTION - effective_date: '2020-04-24' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - - id: f2736603-cd2e-47ec-8675-f815fff54f88 - subscription_event_type: DEACTIVATE_SUBSCRIPTION - effective_date: '2020-05-01' - monthly_billing_anchor_date: 1 - info: - detail: >- - The customer with ID `V74BMG0GPS2KNCWJE1BTYJ37Y0` does not - have a name on record. - code: CUSTOMER_NO_NAME - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - - id: b426fc85-6859-450b-b0d0-fe3a5d1b565f - subscription_event_type: RESUME_SUBSCRIPTION - effective_date: '2022-05-01' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - - id: 09f14de1-2f53-4dae-9091-49aa53f83d01 - subscription_event_type: PAUSE_SUBSCRIPTION - effective_date: '2022-09-01' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - - id: f28a73ac-1a1b-4b0f-8eeb-709a72945776 - subscription_event_type: RESUME_SUBSCRIPTION - effective_date: '2022-12-01' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - - id: 1eee8790-472d-4efe-8c69-8ad84e9cefe0 - subscription_event_type: PLAN_CHANGE - effective_date: '2023-04-01' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 02CD53CFA4d1498AFAD42 - - id: a0c08083-5db0-4800-85c7-d398de4fbb6e - subscription_event_type: STOP_SUBSCRIPTION - effective_date: '2023-06-21' - monthly_billing_anchor_date: 1 - phases: - - {} - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - cursor: cursor - pause: - path: /v2/subscriptions/{subscription_id}/pause - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - - PAYMENTS_WRITE - - SUBSCRIPTIONS_WRITE - - ITEMS_READ - - ORDERS_WRITE - - INVOICES_WRITE - docs: Schedules a `PAUSE` action to pause an active subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: PauseSubscription - request: - name: PauseSubscriptionRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to pause. - body: - properties: - pause_effective_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` - action takes place on the subscription. - - - When this date is unspecified or falls within the current - billing cycle, the subscription is paused - - on the starting date of the next billing cycle. - pause_cycle_duration: - type: optional> - docs: >- - The number of billing cycles the subscription will be paused - before it is reactivated. - - - When this is set, a `RESUME` action is also scheduled to take - place on the subscription at - - the end of the specified pause cycle duration. In this case, - neither `resume_effective_date` - - nor `resume_change_timing` may be specified. - resume_effective_date: - type: optional> - docs: >- - The date when the subscription is reactivated by a scheduled - `RESUME` action. - - This date must be at least one billing cycle ahead of - `pause_effective_date`. - resume_change_timing: - type: optional - docs: >- - The timing whether the subscription is reactivated immediately - or at the end of the billing cycle, relative to - - `resume_effective_date`. - - See [ChangeTiming](#type-changetiming) for possible values - pause_reason: - type: optional> - docs: The user-provided reason to pause the subscription. - validation: - maxLength: 255 - content-type: application/json - response: - docs: Success - type: root.PauseSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 56214fb2-cc85-47a1-93bc-44f3766bb56f - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2023-06-20' - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - price_override_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - version: 1 - created_at: '2023-06-20T21:53:10Z' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - uid: 873451e0-745b-4e87-ab0b-c574933fe616 - ordinal: 0 - order_template_id: U2NaowWxzXwpsZU697x7ZHOAnCNZY - plan_phase_uid: X2Q2AONPB3RB64Y27S25QCZP - completed_date: completed_date - actions: - - id: 99b2439e-63f7-3ad5-95f7-ab2447a80673 - type: PAUSE - effective_date: '2023-11-17' - monthly_billing_anchor_date: 1 - phases: - - {} - new_plan_variation_id: new_plan_variation_id - resume: - path: /v2/subscriptions/{subscription_id}/resume - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - - PAYMENTS_WRITE - - SUBSCRIPTIONS_WRITE - - ITEMS_READ - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Schedules a `RESUME` action to resume a paused or a deactivated - subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: ResumeSubscription - request: - name: ResumeSubscriptionRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to resume. - body: - properties: - resume_effective_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the subscription - reactivated. - resume_change_timing: - type: optional - docs: |- - The timing to resume a subscription, relative to the specified - `resume_effective_date` attribute value. - See [ChangeTiming](#type-changetiming) for possible values - content-type: application/json - response: - docs: Success - type: root.ResumeSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 56214fb2-cc85-47a1-93bc-44f3766bb56f - location_id: S8GWD5R9QB376 - plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: '2023-06-20' - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - price_override_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - version: 1 - created_at: '2023-06-20T21:53:10Z' - card_id: ccof:qy5x8hHGYsgLrp4Q4GB - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - uid: 873451e0-745b-4e87-ab0b-c574933fe616 - ordinal: 0 - order_template_id: U2NaowWxzXwpsZU697x7ZHOAnCNZY - plan_phase_uid: X2Q2AONPB3RB64Y27S25QCZP - completed_date: completed_date - actions: - - id: 18ff74f4-3da4-30c5-929f-7d6fca84f115 - type: RESUME - effective_date: '2023-09-01' - monthly_billing_anchor_date: 1 - phases: - - {} - new_plan_variation_id: new_plan_variation_id - SwapPlan: - path: /v2/subscriptions/{subscription_id}/swap-plan - method: POST - auth: - - oauth2: - - CUSTOMERS_READ - - PAYMENTS_WRITE - - SUBSCRIPTIONS_WRITE - - ITEMS_READ - - ORDERS_WRITE - - INVOICES_WRITE - docs: >- - Schedules a `SWAP_PLAN` action to swap a subscription plan variation in - an existing subscription. - - For more information, see [Swap Subscription Plan - Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations). - source: - openapi: ../default/openapi/openapi.json - display-name: SwapPlan - request: - name: SwapPlanRequest - path-parameters: - subscription_id: - type: string - docs: The ID of the subscription to swap the subscription plan for. - body: - properties: - new_plan_variation_id: - type: optional> - docs: |- - The ID of the new subscription plan variation. - - This field is required. - phases: - type: optional>> - docs: >- - A list of PhaseInputs, to pass phase-specific information used - in the swap. - content-type: application/json - response: - docs: Success - type: root.SwapPlanResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - new_plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 - phases: - - ordinal: 0 - order_template_id: uhhnjH9osVv3shUADwaC0b3hNxQZY - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: 9ba40961-995a-4a3d-8c53-048c40cafc13 - location_id: S8GWD5R9QB376 - plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 - customer_id: CHFGVKYY8RSV93M5KCYTG4PN0G - start_date: start_date - canceled_date: canceled_date - charged_through_date: charged_through_date - status: ACTIVE - tax_percentage: tax_percentage - invoice_ids: - - invoice_ids - price_override_money: - amount: 2000 - currency: USD - version: 3 - created_at: '2023-06-20T21:53:10Z' - card_id: card_id - timezone: America/Los_Angeles - source: - name: My Application - actions: - - {} - monthly_billing_anchor_date: 1 - phases: - - uid: 98d6f53b-40e1-4714-8827-032fd923be25 - ordinal: 0 - order_template_id: E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY - plan_phase_uid: C66BKH3ASTDYGJJCEZXQQSS7 - completed_date: completed_date - actions: - - id: f0a1dfdc-675b-3a14-a640-99f7ac1cee83 - type: SWAP_PLAN - effective_date: '2023-11-17' - monthly_billing_anchor_date: 1 - phases: - - ordinal: 0 - order_template_id: uhhnjH9osVv3shUADwaC0b3hNxQZY - new_plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/team.yml b/.mock/definition/team.yml deleted file mode 100644 index a6440452..00000000 --- a/.mock/definition/team.yml +++ /dev/null @@ -1,228 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - ListJobs: - path: /v2/team-members/jobs - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: >- - Lists jobs in a seller account. Results are sorted by title in ascending - order. - source: - openapi: ../default/openapi/openapi.json - display-name: ListJobs - request: - name: ListJobsRequest - query-parameters: - cursor: - type: optional> - docs: >- - The pagination cursor returned by the previous call to this - endpoint. Provide this - - cursor to retrieve the next page of results for your original - request. For more information, - - see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - response: - docs: Success - type: root.ListJobsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - headers: - Square-Version: '2025-10-16' - response: - body: - jobs: - - id: VDNpRv8da51NU8qZFC5zDWpF - title: Cashier - is_tip_eligible: true - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - version: 2 - - id: FjS8x95cqHiMenw4f1NAUH4P - title: Chef - is_tip_eligible: false - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - version: 1 - cursor: cursor - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - CreateJob: - path: /v2/team-members/jobs - method: POST - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Creates a job in a seller account. A job defines a title and tip - eligibility. Note that - - compensation is defined in a [job assignment](entity:JobAssignment) in a - team member's wage setting. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateJob - request: - name: CreateJobRequest - body: - properties: - job: - type: root.Job - docs: >- - The job to create. The `title` field is required and - `is_tip_eligible` defaults to true. - idempotency_key: - type: string - docs: >- - A unique identifier for the `CreateJob` request. Keys can be any - valid string, - - but must be unique for each request. For more information, see - - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). - validation: - minLength: 1 - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.CreateJobResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - job: - title: Cashier - is_tip_eligible: true - idempotency_key: idempotency-key-0 - response: - body: - job: - id: 1yJlHapkseYnNPETIU1B - title: Cashier - is_tip_eligible: true - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - version: 1 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - RetrieveJob: - path: /v2/team-members/jobs/{job_id} - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: Retrieves a specified job. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveJob - request: - name: RetrieveJobRequest - path-parameters: - job_id: - type: string - docs: The ID of the job to retrieve. - response: - docs: Success - type: root.RetrieveJobResponse - status-code: 200 - examples: - - path-parameters: - job_id: job_id - headers: - Square-Version: '2025-10-16' - response: - body: - job: - id: 1yJlHapkseYnNPETIU1B - title: Cashier 1 - is_tip_eligible: true - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - version: 2 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - UpdateJob: - path: /v2/team-members/jobs/{job_id} - method: PUT - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Updates the title or tip eligibility of a job. Changes to the title - propagate to all - - `JobAssignment`, `Shift`, and `TeamMemberWage` objects that reference - the job ID. Changes to - - tip eligibility propagate to all `TeamMemberWage` objects that reference - the job ID. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateJob - request: - name: UpdateJobRequest - path-parameters: - job_id: - type: string - docs: The ID of the job to update. - body: - properties: - job: - type: root.Job - docs: >- - The job with the updated fields, either `title`, - `is_tip_eligible`, or both. Only changed fields need - - to be included in the request. Optionally include `version` to - enable optimistic concurrency control. - content-type: application/json - response: - docs: Success - type: root.UpdateJobResponse - status-code: 200 - examples: - - path-parameters: - job_id: job_id - headers: - Square-Version: '2025-10-16' - request: - job: - title: Cashier 1 - is_tip_eligible: true - response: - body: - job: - id: 1yJlHapkseYnNPETIU1B - title: Cashier 1 - is_tip_eligible: true - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-13T12:55:45Z' - version: 2 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/teamMembers.yml b/.mock/definition/teamMembers.yml deleted file mode 100644 index a5c96534..00000000 --- a/.mock/definition/teamMembers.yml +++ /dev/null @@ -1,789 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/team-members - method: POST - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Creates a single `TeamMember` object. The `TeamMember` object is - returned on successful creates. - - You must provide the following values in your request to this endpoint: - - - `given_name` - - - `family_name` - - - Learn about [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#createteammember). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTeamMember - request: - body: root.CreateTeamMemberRequest - content-type: application/json - response: - docs: Success - type: root.CreateTeamMemberResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: idempotency-key-0 - team_member: - reference_id: reference_id_1 - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@gmail.com - phone_number: '+14159283333' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - YSGH2WBKG94QZ - - GA2Y9HSJ8KRYT - wage_setting: - job_assignments: - - pay_type: SALARY - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - response: - body: - team_member: - id: 1yJlHapkseYnNPETIU1B - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@example.com - phone_number: '+14159283333' - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - GA2Y9HSJ8KRYT - - YSGH2WBKG94QZ - wage_setting: - team_member_id: 1yJlHapkseYnNPETIU1B - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 1443 - currency: USD - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchCreate: - path: /v2/team-members/bulk-create - method: POST - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Creates multiple `TeamMember` objects. The created `TeamMember` objects - are returned on successful creates. - - This process is non-transactional and processes as much of the request - as possible. If one of the creates in - - the request cannot be successfully processed, the request is not marked - as failed, but the body of the response - - contains explicit error information for the failed create. - - - Learn about [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#bulk-create-team-members). - source: - openapi: ../default/openapi/openapi.json - display-name: BulkCreateTeamMembers - request: - name: BatchCreateTeamMembersRequest - body: - properties: - team_members: - type: map - docs: >- - The data used to create the `TeamMember` objects. Each key is - the `idempotency_key` that maps to the - `CreateTeamMemberRequest`. - - The maximum number of create objects is 25. - - - If you include a team member's `wage_setting`, you must provide - `job_id` for each job assignment. To get job IDs, - - call [ListJobs](api-endpoint:Team-ListJobs). - content-type: application/json - response: - docs: Success - type: root.BatchCreateTeamMembersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - team_members: - idempotency-key-1: - team_member: - reference_id: reference_id_1 - given_name: Joe - family_name: Doe - email_address: joe_doe@gmail.com - phone_number: '+14159283333' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - YSGH2WBKG94QZ - - GA2Y9HSJ8KRYT - idempotency-key-2: - team_member: - reference_id: reference_id_2 - given_name: Jane - family_name: Smith - email_address: jane_smith@gmail.com - phone_number: '+14159223334' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - response: - body: - team_members: - idempotency-key-1: - team_member: - id: ywhG1qfIOoqsHfVRubFV - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@gmail.com - phone_number: '+14159283333' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - GA2Y9HSJ8KRYT - - YSGH2WBKG94QZ - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - idempotency-key-2: - team_member: - id: IF_Ncrg7fHhCqxVI9T6R - reference_id: reference_id_2 - is_owner: false - status: ACTIVE - given_name: Jane - family_name: Smith - email_address: jane_smith@gmail.com - phone_number: '+14159223334' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - batchUpdate: - path: /v2/team-members/bulk-update - method: POST - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Updates multiple `TeamMember` objects. The updated `TeamMember` objects - are returned on successful updates. - - This process is non-transactional and processes as much of the request - as possible. If one of the updates in - - the request cannot be successfully processed, the request is not marked - as failed, but the body of the response - - contains explicit error information for the failed update. - - Learn about [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-team-members). - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpdateTeamMembers - request: - name: BatchUpdateTeamMembersRequest - body: - properties: - team_members: - type: map - docs: >- - The data used to update the `TeamMember` objects. Each key is - the `team_member_id` that maps to the `UpdateTeamMemberRequest`. - - The maximum number of update objects is 25. - - - For each team member, include the fields to add, change, or - clear. Fields can be cleared using a null value. - - To update `wage_setting.job_assignments`, you must provide the - complete list of job assignments. If needed, - - call [ListJobs](api-endpoint:Team-ListJobs) to get the required - `job_id` values. - content-type: application/json - response: - docs: Success - type: root.BatchUpdateTeamMembersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - team_members: - AFMwA08kR-MIF-3Vs0OE: - team_member: - reference_id: reference_id_2 - is_owner: false - status: ACTIVE - given_name: Jane - family_name: Smith - email_address: jane_smith@gmail.com - phone_number: '+14159223334' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - fpgteZNMaf0qOK-a4t6P: - team_member: - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@gmail.com - phone_number: '+14159283333' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - YSGH2WBKG94QZ - - GA2Y9HSJ8KRYT - response: - body: - team_members: - AFMwA08kR-MIF-3Vs0OE: - team_member: - id: AFMwA08kR-MIF-3Vs0OE - reference_id: reference_id_2 - is_owner: false - status: ACTIVE - given_name: Jane - family_name: Smith - email_address: jane_smith@example.com - phone_number: '+14159223334' - created_at: '2020-03-24T18:14:00Z' - updated_at: '2020-03-24T18:18:00Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - fpgteZNMaf0qOK-a4t6P: - team_member: - id: fpgteZNMaf0qOK-a4t6P - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@example.com - phone_number: '+14159283333' - created_at: '2020-03-24T18:14:00Z' - updated_at: '2020-03-24T18:18:00Z' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - GA2Y9HSJ8KRYT - - YSGH2WBKG94QZ - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/team-members/search - method: POST - auth: - - oauth2: - - EMPLOYEES_READ - docs: >- - Returns a paginated list of `TeamMember` objects for a business. - - The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, - or whether - - the team member is the Square account owner. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTeamMembers - request: - name: SearchTeamMembersRequest - body: - properties: - query: - type: optional - docs: The query parameters. - limit: - type: optional - docs: >- - The maximum number of `TeamMember` objects in a page (100 by - default). - validation: - min: 1 - max: 200 - cursor: - type: optional - docs: >- - The opaque cursor for fetching the next page. For more - information, see - - [pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - content-type: application/json - response: - docs: Success - type: root.SearchTeamMembersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - location_ids: - - 0G5P3VGACMMQZ - status: ACTIVE - limit: 10 - response: - body: - team_members: - - id: '-3oZQKPKVk6gUXU_V5Qa' - reference_id: '12345678' - is_owner: false - status: ACTIVE - given_name: Johnny - family_name: Cash - email_address: johnny_cash@squareup.com - phone_number: phone_number - created_at: '2019-07-10T17:26:48Z' - updated_at: '2020-04-28T21:49:28Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - wage_setting: - team_member_id: '-3oZQKPKVk6gUXU_V5Qa' - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 1443 - currency: USD - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - - id: 1AVJj0DjkzbmbJw5r4KK - reference_id: abcded - is_owner: false - status: ACTIVE - given_name: Lombard - family_name: Smith - email_address: email_address - phone_number: '+14155552671' - created_at: '2020-03-24T18:14:01Z' - updated_at: '2020-06-09T17:38:05Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - wage_setting: - team_member_id: 1AVJj0DjkzbmbJw5r4KK - job_assignments: - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2400 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 2 - created_at: '2020-03-24T18:14:01Z' - updated_at: '2020-06-09T17:38:05Z' - - id: 2JCmiJol_KKFs9z2Evim - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Monica - family_name: Sway - email_address: email_address - phone_number: phone_number - created_at: '2020-03-24T01:09:25Z' - updated_at: '2020-03-24T01:11:25Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - wage_setting: - team_member_id: 2JCmiJol_KKFs9z2Evim - job_assignments: - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2400 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2020-03-24T01:09:25Z' - updated_at: '2020-03-24T01:09:25Z' - - id: 4uXcJQSLtbk3F0UQHFNQ - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Elton - family_name: Ipsum - email_address: email_address - phone_number: phone_number - created_at: '2020-03-24T01:09:23Z' - updated_at: '2020-03-24T01:15:23Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - - id: 5CoUpyrw1YwGWcRd-eDL - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Steven - family_name: Lo - email_address: email_address - phone_number: phone_number - created_at: '2020-03-24T01:09:23Z' - updated_at: '2020-03-24T01:19:23Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - - id: 5MRPTTp8MMBLVSmzrGha - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Patrick - family_name: Steward - email_address: email_address - phone_number: '+14155552671' - created_at: '2020-03-24T18:14:03Z' - updated_at: '2020-03-24T18:18:03Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - wage_setting: - team_member_id: 5MRPTTp8MMBLVSmzrGha - job_assignments: - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2020-03-24T18:14:03Z' - updated_at: '2020-03-24T18:14:03Z' - - id: 7F5ZxsfRnkexhu1PTbfh - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Ivy - family_name: Manny - email_address: email_address - phone_number: phone_number - created_at: '2020-03-24T01:09:25Z' - updated_at: '2020-03-24T01:09:25Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - - id: 808X9HR72yKvVaigQXf4 - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: John - family_name: Smith - email_address: john_smith@example.com - phone_number: '+14155552671' - created_at: '2020-03-24T18:14:02Z' - updated_at: '2020-03-24T18:14:02Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - - id: 9MVDVoY4hazkWKGo_OuZ - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Robert - family_name: Wen - email_address: r_wen@example.com - phone_number: '+14155552671' - created_at: '2020-03-24T18:14:00Z' - updated_at: '2020-03-24T18:14:00Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - - id: 9UglUjOXQ13-hMFypCft - reference_id: reference_id - is_owner: false - status: ACTIVE - given_name: Ashley - family_name: Simpson - email_address: asimpson@example.com - phone_number: '+14155552671' - created_at: '2020-03-24T18:14:00Z' - updated_at: '2020-03-24T18:18:00Z' - assigned_locations: - assignment_type: ALL_CURRENT_AND_FUTURE_LOCATIONS - wage_setting: - team_member_id: 9UglUjOXQ13-hMFypCft - job_assignments: - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2020-03-24T18:14:00Z' - updated_at: '2020-03-24T18:14:03Z' - cursor: N:9UglUjOXQ13-hMFypCft - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/team-members/{team_member_id} - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: >- - Retrieves a `TeamMember` object for the given `TeamMember.id`. - - Learn about [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-team-member). - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTeamMember - request: - name: GetTeamMembersRequest - path-parameters: - team_member_id: - type: string - docs: The ID of the team member to retrieve. - response: - docs: Success - type: root.GetTeamMemberResponse - status-code: 200 - examples: - - path-parameters: - team_member_id: team_member_id - headers: - Square-Version: '2025-10-16' - response: - body: - team_member: - id: 1yJlHapkseYnNPETIU1B - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@example.com - phone_number: '+14159283333' - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-15T17:38:05Z' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - GA2Y9HSJ8KRYT - - YSGH2WBKG94QZ - wage_setting: - team_member_id: 1yJlHapkseYnNPETIU1B - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 1443 - currency: USD - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/team-members/{team_member_id} - method: PUT - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Updates a single `TeamMember` object. The `TeamMember` object is - returned on successful updates. - - Learn about [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#update-a-team-member). - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateTeamMember - request: - body: root.UpdateTeamMemberRequest - path-parameters: - team_member_id: - type: string - docs: The ID of the team member to update. - name: UpdateTeamMembersRequest - content-type: application/json - response: - docs: Success - type: root.UpdateTeamMemberResponse - status-code: 200 - examples: - - path-parameters: - team_member_id: team_member_id - headers: - Square-Version: '2025-10-16' - request: - team_member: - reference_id: reference_id_1 - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@gmail.com - phone_number: '+14159283333' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - YSGH2WBKG94QZ - - GA2Y9HSJ8KRYT - wage_setting: - job_assignments: - - pay_type: SALARY - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - pay_type: HOURLY - hourly_rate: - amount: 1200 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - response: - body: - team_member: - id: 1yJlHapkseYnNPETIU1B - reference_id: reference_id_1 - is_owner: false - status: ACTIVE - given_name: Joe - family_name: Doe - email_address: joe_doe@example.com - phone_number: '+14159283333' - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-15T17:38:05Z' - assigned_locations: - assignment_type: EXPLICIT_LOCATIONS - location_ids: - - GA2Y9HSJ8KRYT - - YSGH2WBKG94QZ - wage_setting: - team_member_id: 1yJlHapkseYnNPETIU1B - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 1443 - currency: USD - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - job_id: FjS8x95cqHiMenw4f1NAUH4P - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 1200 - currency: USD - job_id: VDNpRv8da51NU8qZFC5zDWpF - is_overtime_exempt: true - version: 1 - created_at: '2021-06-11T22:55:45Z' - updated_at: '2021-06-11T22:55:45Z' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/teamMembers/wageSetting.yml b/.mock/definition/teamMembers/wageSetting.yml deleted file mode 100644 index 3f99fb89..00000000 --- a/.mock/definition/teamMembers/wageSetting.yml +++ /dev/null @@ -1,178 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get: - path: /v2/team-members/{team_member_id}/wage-setting - method: GET - auth: - - oauth2: - - EMPLOYEES_READ - docs: >- - Retrieves a `WageSetting` object for a team member specified - - by `TeamMember.id`. For more information, see - - [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting). - - - Square recommends using - [RetrieveTeamMember](api-endpoint:Team-RetrieveTeamMember) or - [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) - - to get this information directly from the `TeamMember.wage_setting` - field. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveWageSetting - request: - name: GetWageSettingRequest - path-parameters: - team_member_id: - type: string - docs: The ID of the team member for which to retrieve the wage setting. - response: - docs: Success - type: root.GetWageSettingResponse - status-code: 200 - examples: - - path-parameters: - team_member_id: team_member_id - headers: - Square-Version: '2025-10-16' - response: - body: - wage_setting: - team_member_id: 1yJlHapkseYnNPETIU1B - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 2164 - currency: USD - annual_rate: - amount: 4500000 - currency: USD - weekly_hours: 40 - is_overtime_exempt: false - version: 1 - created_at: '2020-06-11T23:01:21+00:00' - updated_at: '2020-06-11T23:01:21+00:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/team-members/{team_member_id}/wage-setting - method: PUT - auth: - - oauth2: - - EMPLOYEES_WRITE - docs: >- - Creates or updates a `WageSetting` object. The object is created if a - - `WageSetting` with the specified `team_member_id` doesn't exist. - Otherwise, - - it fully replaces the `WageSetting` object for the team member. - - The `WageSetting` is returned on a successful update. For more - information, see - - [Troubleshooting the Team - API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting). - - - Square recommends using - [CreateTeamMember](api-endpoint:Team-CreateTeamMember) or - [UpdateTeamMember](api-endpoint:Team-UpdateTeamMember) - - to manage the `TeamMember.wage_setting` field directly. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateWageSetting - request: - name: UpdateWageSettingRequest - path-parameters: - team_member_id: - type: string - docs: >- - The ID of the team member for which to update the `WageSetting` - object. - body: - properties: - wage_setting: - type: root.WageSetting - docs: >- - The complete `WageSetting` object. For all job assignments, - specify one of the following: - - - `job_id` (recommended) - If needed, call - [ListJobs](api-endpoint:Team-ListJobs) to get a list of all - jobs. - - Requires Square API version 2024-12-18 or later. - - - `job_title` - Use the exact, case-sensitive spelling of an - existing title unless you want to create a new job. - - This value is ignored if `job_id` is also provided. - content-type: application/json - response: - docs: Success - type: root.UpdateWageSettingResponse - status-code: 200 - examples: - - path-parameters: - team_member_id: team_member_id - headers: - Square-Version: '2025-10-16' - request: - wage_setting: - job_assignments: - - job_title: Manager - pay_type: SALARY - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - is_overtime_exempt: true - response: - body: - wage_setting: - team_member_id: '-3oZQKPKVk6gUXU_V5Qa' - job_assignments: - - job_title: Manager - pay_type: SALARY - hourly_rate: - amount: 1443 - currency: USD - annual_rate: - amount: 3000000 - currency: USD - weekly_hours: 40 - - job_title: Cashier - pay_type: HOURLY - hourly_rate: - amount: 2000 - currency: USD - is_overtime_exempt: true - version: 1 - created_at: '2019-07-10T17:26:48+00:00' - updated_at: '2020-06-11T23:12:04+00:00' - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/terminal.yml b/.mock/definition/terminal.yml deleted file mode 100644 index 7b99750d..00000000 --- a/.mock/definition/terminal.yml +++ /dev/null @@ -1,241 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - DismissTerminalAction: - path: /v2/terminals/actions/{action_id}/dismiss - method: POST - auth: - - oauth2: [] - docs: >- - Dismisses a Terminal action request if the status and type of the - request permits it. - - - See [Link and Dismiss - Actions](https://developer.squareup.com/docs/terminal-api/advanced-features/custom-workflows/link-and-dismiss-actions) - for more details. - source: - openapi: ../default/openapi/openapi.json - display-name: DismissTerminalAction - request: - name: DismissTerminalActionRequest - path-parameters: - action_id: - type: string - docs: >- - Unique ID for the `TerminalAction` associated with the action to - be dismissed. - response: - docs: Success - type: root.DismissTerminalActionResponse - status-code: 200 - examples: - - path-parameters: - action_id: action_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - action: - id: termapia:abcdefg1234567 - device_id: DEVICE_ID - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - created_at: '2021-07-28T23:22:07.476Z' - updated_at: '2021-07-28T23:22:29.511Z' - app_id: APP_ID - location_id: location_id - type: CONFIRMATION - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: customer_id - card_id: card_id - reference_id: reference_id - signature_options: - title: title - body: body - signature: - - {} - confirmation_options: - title: Marketing communications - body: >- - I agree to receive promotional emails about future events - and activities. - agree_button_text: Agree - disagree_button_text: Decline - decision: - has_agreed: true - receipt_options: - payment_id: payment_id - print_only: true - is_duplicate: true - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - selected_option: - reference_id: reference_id - title: title - device_metadata: - battery_percentage: battery_percentage - charging_state: charging_state - location_id: location_id - merchant_id: merchant_id - network_connection_type: network_connection_type - payment_region: payment_region - serial_number: serial_number - os_version: os_version - app_version: app_version - wifi_network_name: wifi_network_name - wifi_network_strength: wifi_network_strength - ip_address: ip_address - await_next_action: true - await_next_action_duration: PT5M - DismissTerminalCheckout: - path: /v2/terminals/checkouts/{checkout_id}/dismiss - method: POST - auth: - - oauth2: [] - docs: >- - Dismisses a Terminal checkout request if the status and type of the - request permits it. - source: - openapi: ../default/openapi/openapi.json - display-name: DismissTerminalCheckout - request: - name: DismissTerminalCheckoutRequest - path-parameters: - checkout_id: - type: string - docs: >- - Unique ID for the `TerminalCheckout` associated with the checkout - to be dismissed. - response: - docs: Success - type: root.DismissTerminalCheckoutResponse - status-code: 200 - examples: - - path-parameters: - checkout_id: checkout_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - checkout: - id: LmZEKbo3SBfqO - amount_money: - amount: 2610 - currency: USD - reference_id: reference_id - note: note - order_id: order_id - payment_options: - autocomplete: true - delay_duration: delay_duration - accept_partial_authorization: true - delay_action: CANCEL - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: false - collect_signature: true - tip_settings: - allow_tipping: true - separate_tip_screen: true - custom_tip_field: false - show_itemized_cart: true - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - payment_ids: - - D7vLJqMkvSoAlX4yyFzUitOy4EPZY - created_at: '2023-11-29T14:59:50.682Z' - updated_at: '2023-11-29T15:00:18.936Z' - app_id: APP_ID - location_id: LOCATION_ID - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - statement_description_identifier: statement_description_identifier - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - DismissTerminalRefund: - path: /v2/terminals/refunds/{terminal_refund_id}/dismiss - method: POST - auth: - - oauth2: [] - docs: >- - Dismisses a Terminal refund request if the status and type of the - request permits it. - source: - openapi: ../default/openapi/openapi.json - display-name: DismissTerminalRefund - request: - name: DismissTerminalRefundRequest - path-parameters: - terminal_refund_id: - type: string - docs: >- - Unique ID for the `TerminalRefund` associated with the refund to - be dismissed. - response: - docs: Success - type: root.DismissTerminalRefundResponse - status-code: 200 - examples: - - path-parameters: - terminal_refund_id: terminal_refund_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: vjkNb2HD-xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY - refund_id: refund_id - payment_id: xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY - order_id: s8OMhQcpEp1b61YywlccSHWqUaQZY - amount_money: - amount: 111 - currency: CAD - reason: Returning item - device_id: 47776348fd8b32b9 - deadline_duration: PT5M - status: IN_PROGRESS - cancel_reason: BUYER_CANCELED - created_at: '2023-11-30T16:16:39.299Z' - updated_at: '2023-11-30T16:16:57.863Z' - app_id: APP_ID - location_id: location_id - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/terminal/actions.yml b/.mock/definition/terminal/actions.yml deleted file mode 100644 index 04084427..00000000 --- a/.mock/definition/terminal/actions.yml +++ /dev/null @@ -1,464 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/terminals/actions - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: Creates a Terminal action request and sends it to the specified device. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTerminalAction - request: - name: CreateTerminalActionRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreateAction` request. - Keys can be any valid string - - but must be unique for every `CreateAction` request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more - - information. - validation: - minLength: 1 - maxLength: 64 - action: - type: root.TerminalAction - docs: The Action to create. - content-type: application/json - response: - docs: Success - type: root.CreateTerminalActionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e - action: - device_id: '{{DEVICE_ID}}' - deadline_duration: PT5M - type: SAVE_CARD - save_card_options: - customer_id: '{{CUSTOMER_ID}}' - reference_id: user-id-1 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - action: - id: termapia:jveJIAkkAjILHkdCE - device_id: DEVICE_ID - deadline_duration: PT5M - status: PENDING - cancel_reason: BUYER_CANCELED - created_at: '2021-07-28T23:22:07.476Z' - updated_at: '2021-07-28T23:22:07.476Z' - app_id: APP_ID - location_id: LOCATION_ID - type: SAVE_CARD - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: CUSTOMER_ID - card_id: card_id - reference_id: user-id-1 - signature_options: - title: title - body: body - signature: - - {} - confirmation_options: - title: title - body: body - agree_button_text: agree_button_text - disagree_button_text: disagree_button_text - receipt_options: - payment_id: payment_id - print_only: true - is_duplicate: true - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - selected_option: - reference_id: reference_id - title: title - device_metadata: - battery_percentage: battery_percentage - charging_state: charging_state - location_id: location_id - merchant_id: merchant_id - network_connection_type: network_connection_type - payment_region: payment_region - serial_number: serial_number - os_version: os_version - app_version: app_version - wifi_network_name: wifi_network_name - wifi_network_strength: wifi_network_strength - ip_address: ip_address - await_next_action: true - await_next_action_duration: await_next_action_duration - search: - path: /v2/terminals/actions/search - method: POST - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a filtered list of Terminal action requests created by the - account making the request. Terminal action requests are available for - 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTerminalActions - request: - name: SearchTerminalActionsRequest - body: - properties: - query: - type: optional - docs: >- - Queries terminal actions based on given conditions and sort - order. - - Leaving this unset will return all actions with the default sort - order. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this to retrieve the next set of results for the - original query. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more - - information. - limit: - type: optional - docs: Limit the number of results returned for a single request. - validation: - min: 1 - max: 100 - content-type: application/json - response: - docs: Success - type: root.SearchTerminalActionsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - created_at: - start_at: '2022-04-01T00:00:00.000Z' - sort: - sort_order: DESC - limit: 2 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - action: - - id: termapia:oBGWlAats8xWCiCE - device_id: DEVICE_ID - deadline_duration: PT5M - status: IN_PROGRESS - cancel_reason: BUYER_CANCELED - created_at: '2022-04-08T15:14:04.895Z' - updated_at: '2022-04-08T15:14:05.446Z' - app_id: APP_ID - location_id: LOCATION_ID - type: SAVE_CARD - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: CUSTOMER_ID - reference_id: user-id-1 - signature_options: - title: title - body: body - confirmation_options: - title: title - body: body - agree_button_text: agree_button_text - receipt_options: - payment_id: payment_id - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - await_next_action: true - await_next_action_duration: await_next_action_duration - - id: termapia:K2NY2YSSml3lTiCE - device_id: DEVICE_ID - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - created_at: '2022-04-08T15:14:01.210Z' - updated_at: '2022-04-08T15:14:09.861Z' - app_id: APP_ID - location_id: LOCATION_ID - type: SAVE_CARD - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: CUSTOMER_ID - card_id: ccof:CARD_ID - reference_id: user-id-1 - signature_options: - title: title - body: body - confirmation_options: - title: title - body: body - agree_button_text: agree_button_text - receipt_options: - payment_id: payment_id - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - await_next_action: true - await_next_action_duration: await_next_action_duration - cursor: CURSOR - get: - path: /v2/terminals/actions/{action_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a Terminal action request by `action_id`. Terminal action - requests are available for 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: GetTerminalAction - request: - name: GetActionsRequest - path-parameters: - action_id: - type: string - docs: Unique ID for the desired `TerminalAction`. - response: - docs: Success - type: root.GetTerminalActionResponse - status-code: 200 - examples: - - path-parameters: - action_id: action_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - action: - id: termapia:jveJIAkkAjILHkdCE - device_id: DEVICE_ID - deadline_duration: PT5M - status: IN_PROGRESS - cancel_reason: BUYER_CANCELED - created_at: '2021-07-28T23:22:07.476Z' - updated_at: '2021-07-28T23:22:08.301Z' - app_id: APP_ID - location_id: LOCATION_ID - type: SAVE_CARD - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: CUSTOMER_ID - card_id: card_id - reference_id: user-id-1 - signature_options: - title: title - body: body - signature: - - {} - confirmation_options: - title: title - body: body - agree_button_text: agree_button_text - disagree_button_text: disagree_button_text - receipt_options: - payment_id: payment_id - print_only: true - is_duplicate: true - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - selected_option: - reference_id: reference_id - title: title - device_metadata: - battery_percentage: battery_percentage - charging_state: charging_state - location_id: location_id - merchant_id: merchant_id - network_connection_type: network_connection_type - payment_region: payment_region - serial_number: serial_number - os_version: os_version - app_version: app_version - wifi_network_name: wifi_network_name - wifi_network_strength: wifi_network_strength - ip_address: ip_address - await_next_action: true - await_next_action_duration: await_next_action_duration - cancel: - path: /v2/terminals/actions/{action_id}/cancel - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels a Terminal action request if the status of the request permits - it. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelTerminalAction - request: - name: CancelActionsRequest - path-parameters: - action_id: - type: string - docs: Unique ID for the desired `TerminalAction`. - response: - docs: Success - type: root.CancelTerminalActionResponse - status-code: 200 - examples: - - path-parameters: - action_id: action_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - action: - id: termapia:jveJIAkkAjILHkdCE - device_id: DEVICE_ID - deadline_duration: PT5M - status: CANCELED - cancel_reason: SELLER_CANCELED - created_at: '2021-07-28T23:22:07.476Z' - updated_at: '2021-07-28T23:22:29.511Z' - app_id: APP_ID - location_id: LOCATION_ID - type: SAVE_CARD - qr_code_options: - title: title - body: body - barcode_contents: barcode_contents - save_card_options: - customer_id: CUSTOMER_ID - card_id: card_id - reference_id: user-id-1 - signature_options: - title: title - body: body - signature: - - {} - confirmation_options: - title: title - body: body - agree_button_text: agree_button_text - disagree_button_text: disagree_button_text - receipt_options: - payment_id: payment_id - print_only: true - is_duplicate: true - data_collection_options: - title: title - body: body - input_type: EMAIL - select_options: - title: title - body: body - options: - - reference_id: reference_id - title: title - selected_option: - reference_id: reference_id - title: title - device_metadata: - battery_percentage: battery_percentage - charging_state: charging_state - location_id: location_id - merchant_id: merchant_id - network_connection_type: network_connection_type - payment_region: payment_region - serial_number: serial_number - os_version: os_version - app_version: app_version - wifi_network_name: wifi_network_name - wifi_network_strength: wifi_network_strength - ip_address: ip_address - await_next_action: true - await_next_action_duration: await_next_action_duration - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/terminal/checkouts.yml b/.mock/definition/terminal/checkouts.yml deleted file mode 100644 index fa5acf5d..00000000 --- a/.mock/definition/terminal/checkouts.yml +++ /dev/null @@ -1,370 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/terminals/checkouts - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Creates a Terminal checkout request and sends it to the specified device - to take a payment - - for the requested amount. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTerminalCheckout - request: - name: CreateTerminalCheckoutRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreateCheckout` request. - Keys can be any valid string but - - must be unique for every `CreateCheckout` request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 64 - checkout: - type: root.TerminalCheckout - docs: The checkout to create. - content-type: application/json - response: - docs: Success - type: root.CreateTerminalCheckoutResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 28a0c3bc-7839-11ea-bc55-0242ac130003 - checkout: - amount_money: - amount: 2610 - currency: USD - reference_id: id11572 - note: A brief note - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - checkout: - id: 08YceKh7B3ZqO - amount_money: - amount: 2610 - currency: USD - reference_id: id11572 - note: A brief note - order_id: order_id - payment_options: - autocomplete: true - delay_duration: delay_duration - accept_partial_authorization: true - delay_action: CANCEL - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: false - collect_signature: true - tip_settings: - allow_tipping: false - show_itemized_cart: true - deadline_duration: PT5M - status: PENDING - cancel_reason: BUYER_CANCELED - payment_ids: - - payment_ids - created_at: '2020-04-06T16:39:32.545Z' - updated_at: '2020-04-06T16:39:32.545Z' - app_id: APP_ID - location_id: LOCATION_ID - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - statement_description_identifier: statement_description_identifier - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - search: - path: /v2/terminals/checkouts/search - method: POST - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Returns a filtered list of Terminal checkout requests created by the - application making the request. Only Terminal checkout requests created - for the merchant scoped to the OAuth token are returned. Terminal - checkout requests are available for 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTerminalCheckouts - request: - name: SearchTerminalCheckoutsRequest - body: - properties: - query: - type: optional - docs: >- - Queries Terminal checkouts based on given conditions and the - sort order. - - Leaving these unset returns all checkouts with the default sort - order. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - limit: - type: optional - docs: Limits the number of results returned for a single request. - validation: - min: 1 - max: 100 - content-type: application/json - response: - docs: Success - type: root.SearchTerminalCheckoutsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - status: COMPLETED - limit: 2 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - checkouts: - - id: tsQPvzwBpMqqO - amount_money: - amount: 2610 - currency: USD - reference_id: id14467 - note: A brief note - order_id: order_id - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: false - tip_settings: - allow_tipping: false - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - payment_ids: - - rXnhZzywrEk4vR6pw76fPZfgvaB - created_at: '2020-03-31T18:13:15.921Z' - updated_at: '2020-03-31T18:13:52.725Z' - app_id: APP_ID - location_id: location_id - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - statement_description_identifier: statement_description_identifier - - id: XlOPTgcEhrbqO - amount_money: - amount: 2610 - currency: USD - reference_id: id41623 - note: A brief note - order_id: order_id - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: true - tip_settings: - allow_tipping: false - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - payment_ids: - - VYBF861PaoKPP7Pih0TlbZiNvaB - created_at: '2020-03-31T18:08:31.882Z' - updated_at: '2020-03-31T18:08:41.635Z' - app_id: APP_ID - location_id: location_id - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - statement_description_identifier: statement_description_identifier - cursor: RiTJqBoTuXlbLmmrPvEkX9iG7XnQ4W4RjGnH - get: - path: /v2/terminals/checkouts/{checkout_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a Terminal checkout request by `checkout_id`. Terminal - checkout requests are available for 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: GetTerminalCheckout - request: - name: GetCheckoutsRequest - path-parameters: - checkout_id: - type: string - docs: The unique ID for the desired `TerminalCheckout`. - response: - docs: Success - type: root.GetTerminalCheckoutResponse - status-code: 200 - examples: - - path-parameters: - checkout_id: checkout_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - checkout: - id: 08YceKh7B3ZqO - amount_money: - amount: 2610 - currency: USD - reference_id: id11572 - note: A brief note - order_id: order_id - payment_options: - autocomplete: true - delay_duration: delay_duration - accept_partial_authorization: true - delay_action: CANCEL - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: false - collect_signature: true - tip_settings: - allow_tipping: false - show_itemized_cart: true - deadline_duration: PT5M - status: IN_PROGRESS - cancel_reason: BUYER_CANCELED - payment_ids: - - payment_ids - created_at: '2020-04-06T16:39:32.545Z' - updated_at: 2020-04-06T16:39:323.001Z - app_id: APP_ID - location_id: LOCATION_ID - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - statement_description_identifier: statement_description_identifier - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - cancel: - path: /v2/terminals/checkouts/{checkout_id}/cancel - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels a Terminal checkout request if the status of the request permits - it. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelTerminalCheckout - request: - name: CancelCheckoutsRequest - path-parameters: - checkout_id: - type: string - docs: The unique ID for the desired `TerminalCheckout`. - response: - docs: Success - type: root.CancelTerminalCheckoutResponse - status-code: 200 - examples: - - path-parameters: - checkout_id: checkout_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - checkout: - id: S1yDlPQx7slqO - amount_money: - amount: 123 - currency: USD - reference_id: id36815 - note: note - order_id: order_id - payment_options: - autocomplete: true - delay_duration: delay_duration - accept_partial_authorization: true - delay_action: CANCEL - device_options: - device_id: dbb5d83a-7838-11ea-bc55-0242ac130003 - skip_receipt_screen: true - collect_signature: true - tip_settings: - allow_tipping: true - show_itemized_cart: true - deadline_duration: PT5M - status: CANCELED - cancel_reason: SELLER_CANCELED - payment_ids: - - payment_ids - created_at: '2020-03-16T15:31:19.934Z' - updated_at: '2020-03-16T15:31:45.787Z' - app_id: APP_ID - location_id: LOCATION_ID - payment_type: CARD_PRESENT - team_member_id: team_member_id - customer_id: customer_id - app_fee_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - statement_description_identifier: statement_description_identifier - tip_money: - amount: 1000000 - currency: UNKNOWN_CURRENCY - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/terminal/refunds.yml b/.mock/definition/terminal/refunds.yml deleted file mode 100644 index d5b842ba..00000000 --- a/.mock/definition/terminal/refunds.yml +++ /dev/null @@ -1,269 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/terminals/refunds - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Creates a request to refund an Interac payment completed on a Square - Terminal. Refunds for Interac payments on a Square Terminal are - supported only for Interac debit cards in Canada. Other refunds for - Terminal payments should use the Refunds API. For more information, see - [Refunds API](api:Refunds). - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTerminalRefund - request: - name: CreateTerminalRefundRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this `CreateRefund` request. - Keys can be any valid string but - - must be unique for every `CreateRefund` request. - - - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 64 - refund: - type: optional - docs: The refund to create. - content-type: application/json - response: - docs: Success - type: root.CreateTerminalRefundResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 402a640b-b26f-401f-b406-46f839590c04 - refund: - payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY - amount_money: - amount: 111 - currency: CAD - reason: Returning items - device_id: f72dfb8e-4d65-4e56-aade-ec3fb8d33291 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: 009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY - refund_id: refund_id - payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY - order_id: kcuKDKreRaI4gF4TjmEgZjHk8Z7YY - amount_money: - amount: 111 - currency: CAD - reason: Returning items - device_id: f72dfb8e-4d65-4e56-aade-ec3fb8d33291 - deadline_duration: PT5M - status: PENDING - cancel_reason: BUYER_CANCELED - created_at: '2020-09-29T15:21:46.771Z' - updated_at: '2020-09-29T15:21:46.771Z' - app_id: sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ - location_id: 76C9W6K8CNNQ5 - search: - path: /v2/terminals/refunds/search - method: POST - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves a filtered list of Interac Terminal refund requests created by - the seller making the request. Terminal refund requests are available - for 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTerminalRefunds - request: - name: SearchTerminalRefundsRequest - body: - properties: - query: - type: optional - docs: >- - Queries the Terminal refunds based on given conditions and the - sort order. Calling - - `SearchTerminalRefunds` without an explicit query parameter - returns all available - - refunds with the default sort order. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this cursor to retrieve the next set of results for the - original query. - limit: - type: optional - docs: Limits the number of results returned for a single request. - validation: - min: 1 - max: 100 - content-type: application/json - response: - docs: Success - type: root.SearchTerminalRefundsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - status: COMPLETED - limit: 1 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refunds: - - id: 009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY - refund_id: >- - 5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb - payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY - order_id: kcuKDKreRaI4gF4TjmEgZjHk8Z7YY - amount_money: - amount: 111 - currency: CAD - reason: Returning item - device_id: f72dfb8e-4d65-4e56-aade-ec3fb8d33291 - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - created_at: '2020-09-29T15:21:46.771Z' - updated_at: '2020-09-29T15:21:48.675Z' - app_id: sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ - location_id: 76C9W6K8CNNQ5 - cursor: cursor - get: - path: /v2/terminals/refunds/{terminal_refund_id} - method: GET - auth: - - oauth2: - - PAYMENTS_READ - docs: >- - Retrieves an Interac Terminal refund object by ID. Terminal refund - objects are available for 30 days. - source: - openapi: ../default/openapi/openapi.json - display-name: GetTerminalRefund - request: - name: GetRefundsRequest - path-parameters: - terminal_refund_id: - type: string - docs: The unique ID for the desired `TerminalRefund`. - response: - docs: Success - type: root.GetTerminalRefundResponse - status-code: 200 - examples: - - path-parameters: - terminal_refund_id: terminal_refund_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: 009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY - refund_id: >- - 5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb - payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY - order_id: kcuKDKreRaI4gF4TjmEgZjHk8Z7YY - amount_money: - amount: 111 - currency: CAD - reason: Returning item - device_id: f72dfb8e-4d65-4e56-aade-ec3fb8d33291 - deadline_duration: PT5M - status: COMPLETED - cancel_reason: BUYER_CANCELED - created_at: '2020-09-29T15:21:46.771Z' - updated_at: '2020-09-29T15:21:48.675Z' - app_id: sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ - location_id: 76C9W6K8CNNQ5 - cancel: - path: /v2/terminals/refunds/{terminal_refund_id}/cancel - method: POST - auth: - - oauth2: - - PAYMENTS_WRITE - docs: >- - Cancels an Interac Terminal refund request by refund request ID if the - status of the request permits it. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelTerminalRefund - request: - name: CancelRefundsRequest - path-parameters: - terminal_refund_id: - type: string - docs: The unique ID for the desired `TerminalRefund`. - response: - docs: Success - type: root.CancelTerminalRefundResponse - status-code: 200 - examples: - - path-parameters: - terminal_refund_id: terminal_refund_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - refund: - id: g6ycb6HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY - refund_id: refund_id - payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY - order_id: kcuKDKreRaI4gF4TjmEgZjHk8Z7YY - amount_money: - amount: 100 - currency: CAD - reason: reason - device_id: 42690809-faa2-4701-a24b-19d3d34c9aaa - deadline_duration: PT5M - status: CANCELED - cancel_reason: SELLER_CANCELED - created_at: '2020-10-21T22:47:23.241Z' - updated_at: '2020-10-21T22:47:30.096Z' - app_id: sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ - location_id: 76C9W6K8CNNQ5 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/transferOrders.yml b/.mock/definition/transferOrders.yml deleted file mode 100644 index 251cdeb3..00000000 --- a/.mock/definition/transferOrders.yml +++ /dev/null @@ -1,807 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /v2/transfer-orders - method: POST - auth: - - oauth2: - - INVENTORY_READ - - INVENTORY_WRITE - docs: >- - Creates a new transfer order in [DRAFT](entity:TransferOrderStatus) - status. A transfer order represents the intent - - to move [CatalogItemVariation](entity:CatalogItemVariation)s from one - [Location](entity:Location) to another. - - The source and destination locations must be different and must belong - to your Square account. - - - In [DRAFT](entity:TransferOrderStatus) status, you can: - - - Add or remove items - - - Modify quantities - - - Update shipping information - - - Delete the entire order via - [DeleteTransferOrder](api-endpoint:TransferOrders-DeleteTransferOrder) - - - The request requires source_location_id and destination_location_id. - - Inventory levels are not affected until the order is started via - - [StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder). - - - Common integration points: - - - Sync with warehouse management systems - - - Automate regular stock transfers - - - Initialize transfers from inventory optimization systems - - - Creates a [transfer_order.created](webhook:transfer_order.created) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateTransferOrder - request: - name: CreateTransferOrderRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this CreateTransferOrder - request. Keys can be - - any valid string but must be unique for every - CreateTransferOrder request. - validation: - minLength: 1 - transfer_order: - type: root.CreateTransferOrderData - docs: The transfer order to create - content-type: application/json - response: - docs: Success - type: root.CreateTransferOrderResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 65cc0586-3e82-384s-b524-3885cffd52 - transfer_order: - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - expected_at: '2025-11-09T05:00:00Z' - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: DRAFT - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:30:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: completed_at - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '5' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - - uid: '2' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - quantity_pending: '3' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753109537351 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - search: - path: /v2/transfer-orders/search - method: POST - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Searches for transfer orders using filters. Returns a paginated list of - matching - - [TransferOrder](entity:TransferOrder)s sorted by creation date. - - - Common search scenarios: - - - Find orders for a source [Location](entity:Location) - - - Find orders for a destination [Location](entity:Location) - - - Find orders in a particular - [TransferOrderStatus](entity:TransferOrderStatus) - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.transfer_orders - source: - openapi: ../default/openapi/openapi.json - display-name: SearchTransferOrders - request: - name: SearchTransferOrdersRequest - body: - properties: - query: - type: optional - docs: The search query - cursor: - type: optional - docs: Pagination cursor from a previous search response - limit: - type: optional - docs: Maximum number of results to return (1-100) - validation: - min: 1 - max: 100 - content-type: application/json - response: - docs: Success - type: root.SearchTransferOrdersResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - query: - filter: - source_location_ids: - - EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_ids: - - EXAMPLE_DEST_LOCATION_ID_456 - statuses: - - STARTED - - PARTIALLY_RECEIVED - sort: - field: UPDATED_AT - order: DESC - cursor: eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTg2NjQ4NzN9 - limit: 10 - response: - body: - transfer_orders: - - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: STARTED - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:32:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: completed_at - notes: Inventory rebalance between stores - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '5' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753118664873 - - id: EXAMPLE_TRANSFER_ORDER_ID_456 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: PARTIALLY_RECEIVED - created_at: '2025-01-14T14:20:00Z' - updated_at: '2025-01-15T09:45:00Z' - expected_at: '2025-11-08T12:00:00Z' - completed_at: completed_at - notes: Seasonal stock transfer - tracking_number: tracking_number - created_by_team_member_id: created_by_team_member_id - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '10' - quantity_pending: '3' - quantity_received: '7' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753115540123 - cursor: eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTU1NDBfMTIzfQ== - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - get: - path: /v2/transfer-orders/{transfer_order_id} - method: GET - auth: - - oauth2: - - INVENTORY_READ - docs: >- - Retrieves a specific [TransferOrder](entity:TransferOrder) by ID. - Returns the complete - - order details including: - - - - Basic information (status, dates, notes) - - - Line items with ordered and received quantities - - - Source and destination [Location](entity:Location)s - - - Tracking information (if available) - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveTransferOrder - request: - name: GetTransferOrdersRequest - path-parameters: - transfer_order_id: - type: string - docs: The ID of the transfer order to retrieve - response: - docs: Success - type: root.RetrieveTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - headers: - Square-Version: '2025-10-16' - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: STARTED - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:35:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: completed_at - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '5' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - - uid: '2' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - quantity_pending: '3' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753117449752 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - update: - path: /v2/transfer-orders/{transfer_order_id} - method: PUT - auth: - - oauth2: - - INVENTORY_READ - - INVENTORY_WRITE - docs: >- - Updates an existing transfer order. This endpoint supports sparse - updates, - - allowing you to modify specific fields without affecting others. - - - Creates a [transfer_order.updated](webhook:transfer_order.updated) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateTransferOrder - request: - name: UpdateTransferOrderRequest - path-parameters: - transfer_order_id: - type: string - docs: The ID of the transfer order to update - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this UpdateTransferOrder - request. Keys must contain only alphanumeric characters, dashes - and underscores - validation: - minLength: 1 - transfer_order: - type: root.UpdateTransferOrderData - docs: The transfer order updates to apply - version: - type: optional - docs: Version for optimistic concurrency - content-type: application/json - response: - docs: Success - type: root.UpdateTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: f47ac10b-58cc-4372-a567-0e02b2c3d479 - transfer_order: - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_789 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_101 - expected_at: '2025-11-10T08:00:00Z' - notes: 'Updated: Priority transfer due to low stock at destination' - tracking_number: TRACK987654321 - line_items: - - uid: '1' - quantity_ordered: '7' - - item_variation_id: EXAMPLE_NEW_ITEM_VARIATION_ID_003 - quantity_ordered: '2' - - uid: '2' - remove: true - version: 1753109537351 - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_789 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_101 - status: DRAFT - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T11:15:00Z' - expected_at: '2025-11-10T08:00:00Z' - completed_at: completed_at - notes: 'Updated: Priority transfer due to low stock at destination' - tracking_number: TRACK987654321 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '7' - quantity_pending: '7' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - - uid: '3' - item_variation_id: EXAMPLE_NEW_ITEM_VARIATION_ID_003 - quantity_ordered: '2' - quantity_pending: '2' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753122900456 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - delete: - path: /v2/transfer-orders/{transfer_order_id} - method: DELETE - auth: - - oauth2: - - INVENTORY_WRITE - docs: >- - Deletes a transfer order in [DRAFT](entity:TransferOrderStatus) status. - - Only draft orders can be deleted. Once an order is started via - - [StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder), it - can no longer be deleted. - - - Creates a [transfer_order.deleted](webhook:transfer_order.deleted) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteTransferOrder - request: - name: DeleteTransferOrdersRequest - path-parameters: - transfer_order_id: - type: string - docs: The ID of the transfer order to delete - query-parameters: - version: - type: optional> - docs: Version for optimistic concurrency - response: - docs: Success - type: root.DeleteTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - query-parameters: - version: 1000000 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - cancel: - path: /v2/transfer-orders/{transfer_order_id}/cancel - method: POST - auth: - - oauth2: - - INVENTORY_READ - - INVENTORY_WRITE - docs: >- - Cancels a transfer order in [STARTED](entity:TransferOrderStatus) or - - [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. Any unreceived - quantities will no - - longer be receivable and will be immediately returned to the source - [Location](entity:Location)'s inventory. - - - Common reasons for cancellation: - - - Items no longer needed at destination - - - Source location needs the inventory - - - Order created in error - - - Creates a [transfer_order.updated](webhook:transfer_order.updated) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: CancelTransferOrder - request: - name: CancelTransferOrderRequest - path-parameters: - transfer_order_id: - type: string - docs: >- - The ID of the transfer order to cancel. Must be in STARTED or - PARTIALLY_RECEIVED status. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this UpdateTransferOrder - request. Keys can be - - any valid string but must be unique for every - UpdateTransferOrder request. - validation: - minLength: 1 - version: - type: optional - docs: Version for optimistic concurrency - content-type: application/json - response: - docs: Success - type: root.CancelTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 65cc0586-3e82-4d08-b524-3885cffd52 - version: 1753117449752 - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: CANCELED - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:45:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: '2025-01-15T10:45:00Z' - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '0' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '5' - - uid: '2' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - quantity_pending: '0' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '3' - version: 1753117461842 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - receive: - path: /v2/transfer-orders/{transfer_order_id}/receive - method: POST - auth: - - oauth2: - - INVENTORY_READ - - INVENTORY_WRITE - docs: >- - Records receipt of [CatalogItemVariation](entity:CatalogItemVariation)s - for a transfer order. - - This endpoint supports partial receiving - you can receive items in - multiple batches. - - - For each line item, you can specify: - - - Quantity received in good condition (added to destination inventory - with [InventoryState](entity:InventoryState) of IN_STOCK) - - - Quantity damaged during transit/handling (added to destination - inventory with [InventoryState](entity:InventoryState) of WASTE) - - - Quantity canceled (returned to source location's inventory) - - - The order must be in [STARTED](entity:TransferOrderStatus) or - [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. - - Received quantities are added to the destination - [Location](entity:Location)'s inventory according to their condition. - - Canceled quantities are immediately returned to the source - [Location](entity:Location)'s inventory. - - - When all items are either received, damaged, or canceled, the order - moves to - - [COMPLETED](entity:TransferOrderStatus) status. - - - Creates a [transfer_order.updated](webhook:transfer_order.updated) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: ReceiveTransferOrder - request: - name: ReceiveTransferOrderRequest - path-parameters: - transfer_order_id: - type: string - docs: The ID of the transfer order to receive items for - body: - properties: - idempotency_key: - type: string - docs: A unique key to make this request idempotent - validation: - minLength: 1 - receipt: - type: root.TransferOrderGoodsReceipt - docs: The receipt details - version: - type: optional - docs: Version for optimistic concurrency - content-type: application/json - response: - docs: Success - type: root.ReceiveTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: EXAMPLE_IDEMPOTENCY_KEY_101 - receipt: - line_items: - - transfer_order_line_uid: transfer_order_line_uid - quantity_received: '3' - quantity_damaged: '1' - quantity_canceled: '1' - - transfer_order_line_uid: transfer_order_line_uid - quantity_received: '2' - quantity_canceled: '1' - version: 1753118664873 - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: COMPLETED - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:55:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: '2025-01-15T10:55:00Z' - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '0' - quantity_received: '3' - quantity_damaged: '1' - quantity_canceled: '1' - - uid: '2' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - quantity_pending: '0' - quantity_received: '2' - quantity_damaged: '0' - quantity_canceled: '1' - version: 1753118667248 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - start: - path: /v2/transfer-orders/{transfer_order_id}/start - method: POST - auth: - - oauth2: - - INVENTORY_READ - - INVENTORY_WRITE - docs: >- - Changes a [DRAFT](entity:TransferOrderStatus) transfer order to - [STARTED](entity:TransferOrderStatus) status. - - This decrements inventory at the source [Location](entity:Location) and - marks it as in-transit. - - - The order must be in [DRAFT](entity:TransferOrderStatus) status and have - all required fields populated. - - Once started, the order can no longer be deleted, but it can be canceled - via - - [CancelTransferOrder](api-endpoint:TransferOrders-CancelTransferOrder). - - - Creates a [transfer_order.updated](webhook:transfer_order.updated) - webhook event. - source: - openapi: ../default/openapi/openapi.json - display-name: StartTransferOrder - request: - name: StartTransferOrderRequest - path-parameters: - transfer_order_id: - type: string - docs: The ID of the transfer order to start. Must be in DRAFT status. - body: - properties: - idempotency_key: - type: string - docs: >- - A unique string that identifies this UpdateTransferOrder - request. Keys can be - - any valid string but must be unique for every - UpdateTransferOrder request. - validation: - minLength: 1 - version: - type: optional - docs: Version for optimistic concurrency - content-type: application/json - response: - docs: Success - type: root.StartTransferOrderResponse - status-code: 200 - examples: - - path-parameters: - transfer_order_id: transfer_order_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: EXAMPLE_IDEMPOTENCY_KEY_789 - version: 1753109537351 - response: - body: - transfer_order: - id: EXAMPLE_TRANSFER_ORDER_ID_123 - source_location_id: EXAMPLE_SOURCE_LOCATION_ID_123 - destination_location_id: EXAMPLE_DEST_LOCATION_ID_456 - status: STARTED - created_at: '2025-01-15T10:30:00Z' - updated_at: '2025-01-15T10:32:00Z' - expected_at: '2025-11-09T05:00:00Z' - completed_at: completed_at - notes: >- - Example transfer order for inventory redistribution between - locations - tracking_number: TRACK123456789 - created_by_team_member_id: EXAMPLE_TEAM_MEMBER_ID_789 - line_items: - - uid: '1' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_001 - quantity_ordered: '5' - quantity_pending: '5' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - - uid: '2' - item_variation_id: EXAMPLE_ITEM_VARIATION_ID_002 - quantity_ordered: '3' - quantity_pending: '3' - quantity_received: '0' - quantity_damaged: '0' - quantity_canceled: '0' - version: 1753118664873 - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/v1Transactions.yml b/.mock/definition/v1Transactions.yml deleted file mode 100644 index 76b0f5b7..00000000 --- a/.mock/definition/v1Transactions.yml +++ /dev/null @@ -1,382 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - V1ListOrders: - path: /v1/{location_id}/orders - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: Provides summary information for a merchant's online store orders. - source: - openapi: ../default/openapi/openapi.json - display-name: V1ListOrders - request: - name: V1ListOrdersRequest - path-parameters: - location_id: - type: string - docs: The ID of the location to list online store orders for. - query-parameters: - order: - type: optional> - docs: The order in which payments are listed in the response. - limit: - type: optional> - docs: >- - The maximum number of payments to return in a single response. - This value cannot exceed 200. - batch_token: - type: optional> - docs: |- - A pagination cursor to retrieve the next set of results for your - original query to the endpoint. - response: - docs: Success - type: list - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - query-parameters: - order: DESC - limit: 1 - batch_token: batch_token - headers: - Square-Version: '2025-10-16' - response: - body: - - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - id: id - buyer_email: buyer_email - recipient_name: recipient_name - recipient_phone_number: recipient_phone_number - state: PENDING - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - subtotal_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_shipping_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_tax_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_price_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_discount_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - created_at: created_at - updated_at: updated_at - expires_at: expires_at - payment_id: payment_id - buyer_note: buyer_note - completed_note: completed_note - refunded_note: refunded_note - canceled_note: canceled_note - tender: - id: id - type: CREDIT_CARD - name: name - employee_id: employee_id - receipt_url: receipt_url - card_brand: OTHER_BRAND - pan_suffix: pan_suffix - entry_method: MANUAL - payment_note: payment_note - tendered_at: tendered_at - settled_at: settled_at - is_exchange: true - order_history: - - {} - promo_code: promo_code - btc_receive_address: btc_receive_address - btc_price_satoshi: 1.1 - V1RetrieveOrder: - path: /v1/{location_id}/orders/{order_id} - method: GET - auth: - - oauth2: - - ORDERS_READ - docs: >- - Provides comprehensive information for a single online store order, - including the order's history. - source: - openapi: ../default/openapi/openapi.json - display-name: V1RetrieveOrder - request: - name: V1RetrieveOrderRequest - path-parameters: - location_id: - type: string - docs: The ID of the order's associated location. - order_id: - type: string - docs: >- - The order's Square-issued ID. You obtain this value from Order - objects returned by the List Orders endpoint - response: - docs: Success - type: root.V1Order - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - order_id: order_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - id: id - buyer_email: buyer_email - recipient_name: recipient_name - recipient_phone_number: recipient_phone_number - state: PENDING - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - subtotal_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_shipping_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_tax_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_price_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_discount_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - created_at: created_at - updated_at: updated_at - expires_at: expires_at - payment_id: payment_id - buyer_note: buyer_note - completed_note: completed_note - refunded_note: refunded_note - canceled_note: canceled_note - tender: - id: id - type: CREDIT_CARD - name: name - employee_id: employee_id - receipt_url: receipt_url - card_brand: OTHER_BRAND - pan_suffix: pan_suffix - entry_method: MANUAL - payment_note: payment_note - total_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - tendered_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - tendered_at: tendered_at - settled_at: settled_at - change_back_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - refunded_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - is_exchange: true - order_history: - - action: ORDER_PLACED - created_at: created_at - promo_code: promo_code - btc_receive_address: btc_receive_address - btc_price_satoshi: 1.1 - V1UpdateOrder: - path: /v1/{location_id}/orders/{order_id} - method: PUT - auth: - - oauth2: - - ORDERS_WRITE - docs: >- - Updates the details of an online store order. Every update you perform - on an order corresponds to one of three actions: - source: - openapi: ../default/openapi/openapi.json - display-name: V1UpdateOrder - request: - name: V1UpdateOrderRequest - path-parameters: - location_id: - type: string - docs: The ID of the order's associated location. - order_id: - type: string - docs: >- - The order's Square-issued ID. You obtain this value from Order - objects returned by the List Orders endpoint - body: - properties: - action: - type: root.V1UpdateOrderRequestAction - docs: >- - The action to perform on the order (COMPLETE, CANCEL, or - REFUND). - - See - [V1UpdateOrderRequestAction](#type-v1updateorderrequestaction) - for possible values - shipped_tracking_number: - type: optional> - docs: >- - The tracking number of the shipment associated with the order. - Only valid if action is COMPLETE. - completed_note: - type: optional> - docs: >- - A merchant-specified note about the completion of the order. - Only valid if action is COMPLETE. - refunded_note: - type: optional> - docs: >- - A merchant-specified note about the refunding of the order. Only - valid if action is REFUND. - canceled_note: - type: optional> - docs: >- - A merchant-specified note about the canceling of the order. Only - valid if action is CANCEL. - content-type: application/json - response: - docs: Success - type: root.V1Order - status-code: 200 - availability: deprecated - examples: - - path-parameters: - location_id: location_id - order_id: order_id - headers: - Square-Version: '2025-10-16' - request: - action: COMPLETE - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - id: id - buyer_email: buyer_email - recipient_name: recipient_name - recipient_phone_number: recipient_phone_number - state: PENDING - shipping_address: - address_line_1: address_line_1 - address_line_2: address_line_2 - address_line_3: address_line_3 - locality: locality - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: administrative_district_level_1 - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: postal_code - country: ZZ - first_name: first_name - last_name: last_name - subtotal_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_shipping_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_tax_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_price_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - total_discount_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - created_at: created_at - updated_at: updated_at - expires_at: expires_at - payment_id: payment_id - buyer_note: buyer_note - completed_note: completed_note - refunded_note: refunded_note - canceled_note: canceled_note - tender: - id: id - type: CREDIT_CARD - name: name - employee_id: employee_id - receipt_url: receipt_url - card_brand: OTHER_BRAND - pan_suffix: pan_suffix - entry_method: MANUAL - payment_note: payment_note - total_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - tendered_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - tendered_at: tendered_at - settled_at: settled_at - change_back_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - refunded_money: - amount: 1 - currency_code: UNKNOWN_CURRENCY - is_exchange: true - order_history: - - action: ORDER_PLACED - created_at: created_at - promo_code: promo_code - btc_receive_address: btc_receive_address - btc_price_satoshi: 1.1 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/vendors.yml b/.mock/definition/vendors.yml deleted file mode 100644 index 70569772..00000000 --- a/.mock/definition/vendors.yml +++ /dev/null @@ -1,558 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - batchCreate: - path: /v2/vendors/bulk-create - method: POST - auth: - - oauth2: - - VENDOR_WRITE - docs: >- - Creates one or more [Vendor](entity:Vendor) objects to represent - suppliers to a seller. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkCreateVendors - request: - name: BatchCreateVendorsRequest - body: - properties: - vendors: - type: map - docs: >- - Specifies a set of new [Vendor](entity:Vendor) objects as - represented by a collection of idempotency-key/`Vendor`-object - pairs. - content-type: application/json - response: - docs: Success - type: root.BatchCreateVendorsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - vendors: - 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe: - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - responses: - 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T10:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - version: 0 - status: ACTIVE - batchGet: - path: /v2/vendors/bulk-retrieve - method: POST - auth: - - oauth2: - - VENDOR_READ - docs: Retrieves one or more vendors of specified [Vendor](entity:Vendor) IDs. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkRetrieveVendors - request: - name: BatchGetVendorsRequest - body: - properties: - vendor_ids: - type: optional>> - docs: IDs of the [Vendor](entity:Vendor) objects to retrieve. - content-type: application/json - response: - docs: Success - type: root.BatchGetVendorsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - vendor_ids: - - INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - responses: - INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T10:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - version: 1 - status: ACTIVE - batchUpdate: - path: /v2/vendors/bulk-update - method: PUT - auth: - - oauth2: - - VENDOR_WRITE - docs: >- - Updates one or more of existing [Vendor](entity:Vendor) objects as - suppliers to a seller. - source: - openapi: ../default/openapi/openapi.json - display-name: BulkUpdateVendors - request: - name: BatchUpdateVendorsRequest - body: - properties: - vendors: - type: map - docs: >- - A set of [UpdateVendorRequest](entity:UpdateVendorRequest) - objects encapsulating to-be-updated [Vendor](entity:Vendor) - - objects. The set is represented by a collection of - `Vendor`-ID/`UpdateVendorRequest`-object pairs. - content-type: application/json - response: - docs: Success - type: root.BatchUpdateVendorsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - vendors: - FMCYHBWT1TPL8MFH52PBMEN92A: - vendor: {} - INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4: - vendor: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - responses: - INV_V_FMCYHBWT1TPL8MFH52PBMEN92A: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - vendor: - id: INV_V_FMCYHBWT1TPL8MFH52PBMEN92A - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T20:21:54.859Z' - name: Annie’s Hot Sauce - address: - address_line_1: 202 Mill St - locality: Moorestown - administrative_district_level_1: NJ - postal_code: '08057' - country: US - contacts: - - id: INV_VC_ABYYHBWT1TPL8MFH52PBMENPJ4 - name: Annie Thomas - email_address: annie@annieshotsauce.com - phone_number: 1-212-555-4250 - ordinal: 0 - version: 11 - status: ACTIVE - INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:10:54.859Z' - updated_at: '2022-03-16T20:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 0 - account_number: '4025391' - note: favorite vendor - version: 31 - status: ACTIVE - create: - path: /v2/vendors/create - method: POST - auth: - - oauth2: - - VENDOR_WRITE - docs: >- - Creates a single [Vendor](entity:Vendor) object to represent a supplier - to a seller. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateVendor - request: - name: CreateVendorRequest - body: - properties: - idempotency_key: - type: string - docs: >- - A client-supplied, universally unique identifier (UUID) to make - this [CreateVendor](api-endpoint:Vendors-CreateVendor) call - idempotent. - - - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - in the - - [API Development - 101](https://developer.squareup.com/docs/buildbasics) section - for more - - information. - validation: - minLength: 1 - maxLength: 128 - vendor: - type: optional - docs: The requested [Vendor](entity:Vendor) to be created. - content-type: application/json - response: - docs: Success - type: root.CreateVendorResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe - vendor: - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T10:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - version: 1 - status: ACTIVE - search: - path: /v2/vendors/search - method: POST - auth: - - oauth2: - - VENDOR_READ - docs: >- - Searches for vendors using a filter against supported - [Vendor](entity:Vendor) properties and a supported sorter. - source: - openapi: ../default/openapi/openapi.json - display-name: SearchVendors - request: - name: SearchVendorsRequest - body: - properties: - filter: - type: optional - docs: Specifies a filter used to search for vendors. - sort: - type: optional - docs: Specifies a sorter used to sort the returned vendors. - cursor: - type: optional - docs: >- - A pagination cursor returned by a previous call to this - endpoint. - - Provide this to retrieve the next set of results for the - original query. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. - content-type: application/json - response: - docs: Success - type: root.SearchVendorsResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: {} - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - vendors: - - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T10:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - locality: New York - administrative_district_level_1: NY - postal_code: '10003' - country: US - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - version: 1 - status: ACTIVE - cursor: cursor - get: - path: /v2/vendors/{vendor_id} - method: GET - auth: - - oauth2: - - VENDOR_READ - docs: Retrieves the vendor of a specified [Vendor](entity:Vendor) ID. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveVendor - request: - name: GetVendorsRequest - path-parameters: - vendor_id: - type: string - docs: ID of the [Vendor](entity:Vendor) to retrieve. - response: - docs: Success - type: root.GetVendorResponse - status-code: 200 - examples: - - path-parameters: - vendor_id: vendor_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T10:21:54.859Z' - name: Joe's Fresh Seafood - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 1 - account_number: '4025391' - note: a vendor - version: 1 - status: ACTIVE - update: - path: /v2/vendors/{vendor_id} - method: PUT - auth: - - oauth2: - - VENDOR_WRITE - docs: >- - Updates an existing [Vendor](entity:Vendor) object as a supplier to a - seller. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateVendor - request: - body: root.UpdateVendorRequest - path-parameters: - vendor_id: - type: string - docs: ID of the [Vendor](entity:Vendor) to retrieve. - name: UpdateVendorsRequest - content-type: application/json - response: - docs: Success - type: root.UpdateVendorResponse - status-code: 200 - examples: - - path-parameters: - vendor_id: vendor_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - name: Jack's Chicken Shack - version: 1 - status: ACTIVE - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - vendor: - id: INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 - created_at: '2022-03-16T10:21:54.859Z' - updated_at: '2022-03-16T20:21:54.859Z' - name: Jack's Chicken Shack - address: - address_line_1: 505 Electric Ave - address_line_2: Suite 600 - address_line_3: address_line_3 - locality: New York - sublocality: sublocality - sublocality_2: sublocality_2 - sublocality_3: sublocality_3 - administrative_district_level_1: NY - administrative_district_level_2: administrative_district_level_2 - administrative_district_level_3: administrative_district_level_3 - postal_code: '10003' - country: US - first_name: first_name - last_name: last_name - contacts: - - id: INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A - name: Joe Burrow - email_address: joe@joesfreshseafood.com - phone_number: 1-212-555-4250 - ordinal: 0 - account_number: '4025391' - note: note - version: 2 - status: ACTIVE - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/webhooks/eventTypes.yml b/.mock/definition/webhooks/eventTypes.yml deleted file mode 100644 index 8d6b9aa9..00000000 --- a/.mock/definition/webhooks/eventTypes.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/webhooks/event-types - method: GET - auth: - - oauth2: [] - docs: Lists all webhook event types that can be subscribed to. - source: - openapi: ../default/openapi/openapi.json - display-name: ListWebhookEventTypes - request: - name: ListEventTypesRequest - query-parameters: - api_version: - type: optional> - docs: >- - The API version for which to list event types. Setting this field - overrides the default version used by the application. - response: - docs: Success - type: root.ListWebhookEventTypesResponse - status-code: 200 - examples: - - query-parameters: - api_version: api_version - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - event_types: - - inventory.count.updated - metadata: - - event_type: inventory.count.updated - api_version_introduced: '2018-07-12' - release_status: PUBLIC - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/definition/webhooks/subscriptions.yml b/.mock/definition/webhooks/subscriptions.yml deleted file mode 100644 index 718601a5..00000000 --- a/.mock/definition/webhooks/subscriptions.yml +++ /dev/null @@ -1,395 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /v2/webhooks/subscriptions - method: GET - auth: - - oauth2: [] - docs: Lists all webhook subscriptions owned by your application. - pagination: - cursor: $request.cursor - next_cursor: $response.cursor - results: $response.subscriptions - source: - openapi: ../default/openapi/openapi.json - display-name: ListWebhookSubscriptions - request: - name: ListSubscriptionsRequest - query-parameters: - cursor: - type: optional> - docs: >- - 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/build-basics/common-api-patterns/pagination). - include_disabled: - type: optional> - default: false - docs: >- - Includes disabled [Subscription](entity:WebhookSubscription)s. - - By default, all enabled - [Subscription](entity:WebhookSubscription)s are returned. - sort_order: - type: optional> - docs: >- - Sorts the returned list by when the - [Subscription](entity:WebhookSubscription) was created with the - specified order. - - This field defaults to ASC. - limit: - type: optional> - docs: >- - The maximum number of results to be returned in a single page. - - It is possible to receive fewer results than the specified limit - on a given page. - - The default value of 100 is also the maximum allowed value. - - - Default: 100 - response: - docs: Success - type: root.ListWebhookSubscriptionsResponse - status-code: 200 - examples: - - query-parameters: - cursor: cursor - include_disabled: true - sort_order: DESC - limit: 1 - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscriptions: - - id: wbhk_b35f6b3145074cf9ad513610786c19d5 - name: Example Webhook Subscription - enabled: true - event_types: - - payment.created - - payment.updated - notification_url: https://example-webhook-url.com - api_version: '2021-12-15' - signature_key: signature_key - created_at: 2022-01-10 23:29:48 +0000 UTC - updated_at: 2022-01-10 23:29:48 +0000 UTC - cursor: cursor - create: - path: /v2/webhooks/subscriptions - method: POST - auth: - - oauth2: [] - docs: Creates a webhook subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: CreateWebhookSubscription - request: - name: CreateWebhookSubscriptionRequest - body: - properties: - idempotency_key: - type: optional - docs: >- - A unique string that identifies the - [CreateWebhookSubscription](api-endpoint:WebhookSubscriptions-CreateWebhookSubscription) - request. - validation: - maxLength: 45 - subscription: - type: root.WebhookSubscription - docs: The [Subscription](entity:WebhookSubscription) to create. - content-type: application/json - response: - docs: Success - type: root.CreateWebhookSubscriptionResponse - status-code: 200 - examples: - - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: 63f84c6c-2200-4c99-846c-2670a1311fbf - subscription: - name: Example Webhook Subscription - event_types: - - payment.created - - payment.updated - notification_url: https://example-webhook-url.com - api_version: '2021-12-15' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: wbhk_b35f6b3145074cf9ad513610786c19d5 - name: Example Webhook Subscription - enabled: true - event_types: - - payment.created - - payment.updated - notification_url: https://example-webhook-url.com - api_version: '2021-12-15' - signature_key: 1k9bIJKCeTmSQwyagtNRLg - created_at: 2022-01-10 23:29:48 +0000 UTC - updated_at: 2022-01-10 23:29:48 +0000 UTC - get: - path: /v2/webhooks/subscriptions/{subscription_id} - method: GET - auth: - - oauth2: [] - docs: Retrieves a webhook subscription identified by its ID. - source: - openapi: ../default/openapi/openapi.json - display-name: RetrieveWebhookSubscription - request: - name: GetSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: >- - [REQUIRED] The ID of the - [Subscription](entity:WebhookSubscription) to retrieve. - response: - docs: Success - type: root.GetWebhookSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: wbhk_b35f6b3145074cf9ad513610786c19d5 - name: Example Webhook Subscription - enabled: true - event_types: - - payment.created - - payment.updated - notification_url: https://example-webhook-url.com - api_version: '2021-12-15' - signature_key: 1k9bIJKCeTmSQwyagtNRLg - created_at: 2022-01-10 23:29:48 +0000 UTC - updated_at: 2022-01-10 23:29:48 +0000 UTC - update: - path: /v2/webhooks/subscriptions/{subscription_id} - method: PUT - auth: - - oauth2: [] - docs: Updates a webhook subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateWebhookSubscription - request: - name: UpdateWebhookSubscriptionRequest - path-parameters: - subscription_id: - type: string - docs: >- - [REQUIRED] The ID of the - [Subscription](entity:WebhookSubscription) to update. - body: - properties: - subscription: - type: optional - docs: The [Subscription](entity:WebhookSubscription) to update. - content-type: application/json - response: - docs: Success - type: root.UpdateWebhookSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - subscription: - name: Updated Example Webhook Subscription - enabled: false - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription: - id: wbhk_b35f6b3145074cf9ad513610786c19d5 - name: Updated Example Webhook Subscription - enabled: false - event_types: - - payment.created - - payment.updated - notification_url: https://example-webhook-url.com - api_version: '2021-12-15' - signature_key: signature_key - created_at: 2022-01-10 23:29:48 +0000 UTC - updated_at: 2022-01-10 23:45:51 +0000 UTC - delete: - path: /v2/webhooks/subscriptions/{subscription_id} - method: DELETE - auth: - - oauth2: [] - docs: Deletes a webhook subscription. - source: - openapi: ../default/openapi/openapi.json - display-name: DeleteWebhookSubscription - request: - name: DeleteSubscriptionsRequest - path-parameters: - subscription_id: - type: string - docs: >- - [REQUIRED] The ID of the - [Subscription](entity:WebhookSubscription) to delete. - response: - docs: Success - type: root.DeleteWebhookSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - updateSignatureKey: - path: /v2/webhooks/subscriptions/{subscription_id}/signature-key - method: POST - auth: - - oauth2: [] - docs: >- - Updates a webhook subscription by replacing the existing signature key - with a new one. - source: - openapi: ../default/openapi/openapi.json - display-name: UpdateWebhookSubscriptionSignatureKey - request: - name: UpdateWebhookSubscriptionSignatureKeyRequest - path-parameters: - subscription_id: - type: string - docs: >- - [REQUIRED] The ID of the - [Subscription](entity:WebhookSubscription) to update. - body: - properties: - idempotency_key: - type: optional> - docs: >- - A unique string that identifies the - [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) - request. - validation: - maxLength: 45 - content-type: application/json - response: - docs: Success - type: root.UpdateWebhookSubscriptionSignatureKeyResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - idempotency_key: ed80ae6b-0654-473b-bbab-a39aee89a60d - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - signature_key: 1k9bIJKCeTmSQwyagtNRLg - test: - path: /v2/webhooks/subscriptions/{subscription_id}/test - method: POST - auth: - - oauth2: [] - docs: >- - Tests a webhook subscription by sending a test event to the notification - URL. - source: - openapi: ../default/openapi/openapi.json - display-name: TestWebhookSubscription - request: - name: TestWebhookSubscriptionRequest - path-parameters: - subscription_id: - type: string - docs: >- - [REQUIRED] The ID of the - [Subscription](entity:WebhookSubscription) to test. - body: - properties: - event_type: - type: optional> - docs: >- - The event type that will be used to test the - [Subscription](entity:WebhookSubscription). The event type must - be - - contained in the list of event types in the - [Subscription](entity:WebhookSubscription). - content-type: application/json - response: - docs: Success - type: root.TestWebhookSubscriptionResponse - status-code: 200 - examples: - - path-parameters: - subscription_id: subscription_id - headers: - Square-Version: '2025-10-16' - request: - event_type: payment.created - response: - body: - errors: - - category: API_ERROR - code: INTERNAL_SERVER_ERROR - detail: detail - field: field - subscription_test_result: - id: 23eed5a9-2b12-403e-b212-7e2889aea0f6 - status_code: 404 - payload: >- - {"merchant_id":"1ZYMKZY1YFGBW","type":"payment.created","event_id":"23eed5a9-2b12-403e-b212-7e2889aea0f6","created_at":"2022-01-11T00:06:48.322945116Z","data":{"type":"payment","id":"KkAkhdMsgzn59SM8A89WgKwekxLZY","object":{"payment":{"amount_money":{"amount":100,"currency":"USD"},"approved_money":{"amount":100,"currency":"USD"},"capabilities":["EDIT_TIP_AMOUNT","EDIT_TIP_AMOUNT_UP","EDIT_TIP_AMOUNT_DOWN"],"card_details":{"avs_status":"AVS_ACCEPTED","card":{"bin":"540988","card_brand":"MASTERCARD","card_type":"CREDIT","exp_month":11,"exp_year":2022,"fingerprint":"sq-1-Tvruf3vPQxlvI6n0IcKYfBukrcv6IqWr8UyBdViWXU2yzGn5VMJvrsHMKpINMhPmVg","last_4":"9029","prepaid_type":"NOT_PREPAID"},"card_payment_timeline":{"authorized_at":"2020-11-22T21:16:51.198Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"KEYED","statement_description":"SQ - *DEFAULT TEST - ACCOUNT","status":"AUTHORIZED"},"created_at":"2020-11-22T21:16:51.086Z","delay_action":"CANCEL","delay_duration":"PT168H","delayed_until":"2020-11-29T21:16:51.086Z","id":"hYy9pRFVxpDsO1FB05SunFWUe9JZY","location_id":"S8GWD5R9QB376","order_id":"03O3USaPaAaFnI6kkwB1JxGgBsUZY","receipt_number":"hYy9","risk_evaluation":{"created_at":"2020-11-22T21:16:51.198Z","risk_level":"NORMAL"},"source_type":"CARD","status":"APPROVED","total_money":{"amount":100,"currency":"USD"},"updated_at":"2020-11-22T21:16:51.198Z","version_token":"FfQhQJf9r3VSQIgyWBk1oqhIwiznLwVwJbVVA0bdyEv6o"}}}} - created_at: 2022-01-11 00:06:48.322945116 +0000 UTC m=+3863.054453746 - updated_at: 2022-01-11 00:06:48.322945116 +0000 UTC m=+3863.054453746 - source: - openapi: ../default/openapi/openapi.json diff --git a/.mock/fern.config.json b/.mock/fern.config.json deleted file mode 100644 index 6bf92d1d..00000000 --- a/.mock/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "organization" : "square", - "version" : "0.92.0" -} \ No newline at end of file diff --git a/Square.slnx b/Square.slnx new file mode 100644 index 00000000..840b1964 --- /dev/null +++ b/Square.slnx @@ -0,0 +1,4 @@ + + + + diff --git a/reference.md b/reference.md index ddcc7f32..a7f3900d 100644 --- a/reference.md +++ b/reference.md @@ -1,6 +1,6 @@ # Reference ## Mobile -
client.Mobile.AuthorizationCodeAsync(Mobile.CreateMobileAuthorizationCodeRequest { ... }) -> CreateMobileAuthorizationCodeResponse +
client.Mobile.AuthorizationCodeAsync(CreateMobileAuthorizationCodeRequest { ... }) -> CreateMobileAuthorizationCodeResponse
@@ -58,7 +58,7 @@ await client.Mobile.AuthorizationCodeAsync(
-**request:** `Mobile.CreateMobileAuthorizationCodeRequest` +**request:** `CreateMobileAuthorizationCodeRequest`
@@ -71,7 +71,7 @@ await client.Mobile.AuthorizationCodeAsync(
## OAuth -
client.OAuth.RevokeTokenAsync(OAuth.RevokeTokenRequest { ... }) -> RevokeTokenResponse +
client.OAuth.RevokeTokenAsync(RevokeTokenRequest { ... }) -> RevokeTokenResponse
@@ -128,7 +128,7 @@ await client.OAuth.RevokeTokenAsync(
-**request:** `OAuth.RevokeTokenRequest` +**request:** `RevokeTokenRequest`
@@ -140,7 +140,7 @@ await client.OAuth.RevokeTokenAsync(
-
client.OAuth.ObtainTokenAsync(OAuth.ObtainTokenRequest { ... }) -> ObtainTokenResponse +
client.OAuth.ObtainTokenAsync(ObtainTokenRequest { ... }) -> ObtainTokenResponse
@@ -210,7 +210,7 @@ await client.OAuth.ObtainTokenAsync(
-**request:** `OAuth.ObtainTokenRequest` +**request:** `ObtainTokenRequest`
@@ -300,7 +300,7 @@ await client.OAuth.AuthorizeAsync();
## V1Transactions -
client.V1Transactions.V1ListOrdersAsync(V1Transactions.V1ListOrdersRequest { ... }) -> IEnumerable +
client.V1Transactions.V1ListOrdersAsync(V1ListOrdersRequest { ... }) -> IEnumerable
@@ -350,7 +350,7 @@ await client.V1Transactions.V1ListOrdersAsync(
-**request:** `V1Transactions.V1ListOrdersRequest` +**request:** `V1ListOrdersRequest`
@@ -362,7 +362,7 @@ await client.V1Transactions.V1ListOrdersAsync(
-
client.V1Transactions.V1RetrieveOrderAsync(V1Transactions.V1RetrieveOrderRequest { ... }) -> V1Order +
client.V1Transactions.V1RetrieveOrderAsync(V1RetrieveOrderRequest { ... }) -> V1Order
@@ -406,7 +406,7 @@ await client.V1Transactions.V1RetrieveOrderAsync(
-**request:** `V1Transactions.V1RetrieveOrderRequest` +**request:** `V1RetrieveOrderRequest`
@@ -418,7 +418,7 @@ await client.V1Transactions.V1RetrieveOrderAsync(
-
client.V1Transactions.V1UpdateOrderAsync(V1Transactions.V1UpdateOrderRequest { ... }) -> V1Order +
client.V1Transactions.V1UpdateOrderAsync(V1UpdateOrderRequest { ... }) -> V1Order
@@ -467,7 +467,7 @@ await client.V1Transactions.V1UpdateOrderAsync(
-**request:** `V1Transactions.V1UpdateOrderRequest` +**request:** `V1UpdateOrderRequest`
@@ -480,7 +480,7 @@ await client.V1Transactions.V1UpdateOrderAsync(
## ApplePay -
client.ApplePay.RegisterDomainAsync(ApplePay.RegisterDomainRequest { ... }) -> RegisterDomainResponse +
client.ApplePay.RegisterDomainAsync(RegisterDomainRequest { ... }) -> RegisterDomainResponse
@@ -535,7 +535,7 @@ await client.ApplePay.RegisterDomainAsync(new RegisterDomainRequest { DomainName
-**request:** `ApplePay.RegisterDomainRequest` +**request:** `RegisterDomainRequest`
@@ -548,7 +548,7 @@ await client.ApplePay.RegisterDomainAsync(new RegisterDomainRequest { DomainName
## BankAccounts -
client.BankAccounts.ListAsync(BankAccounts.ListBankAccountsRequest { ... }) -> Core.Pager +
client.BankAccounts.ListAsync(ListBankAccountsRequest { ... }) -> Pager
@@ -597,7 +597,7 @@ await client.BankAccounts.ListAsync(
-**request:** `BankAccounts.ListBankAccountsRequest` +**request:** `ListBankAccountsRequest`
@@ -609,7 +609,7 @@ await client.BankAccounts.ListAsync(
-
client.BankAccounts.GetByV1IdAsync(BankAccounts.GetByV1IdBankAccountsRequest { ... }) -> GetBankAccountByV1IdResponse +
client.BankAccounts.GetByV1IdAsync(GetByV1IdBankAccountsRequest { ... }) -> GetBankAccountByV1IdResponse
@@ -653,7 +653,7 @@ await client.BankAccounts.GetByV1IdAsync(
-**request:** `BankAccounts.GetByV1IdBankAccountsRequest` +**request:** `GetByV1IdBankAccountsRequest`
@@ -665,7 +665,7 @@ await client.BankAccounts.GetByV1IdAsync(
-
client.BankAccounts.GetAsync(BankAccounts.GetBankAccountsRequest { ... }) -> GetBankAccountResponse +
client.BankAccounts.GetAsync(GetBankAccountsRequest { ... }) -> GetBankAccountResponse
@@ -710,7 +710,7 @@ await client.BankAccounts.GetAsync(
-**request:** `BankAccounts.GetBankAccountsRequest` +**request:** `GetBankAccountsRequest`
@@ -723,7 +723,7 @@ await client.BankAccounts.GetAsync(
## Bookings -
client.Bookings.ListAsync(Square.Bookings.ListBookingsRequest { ... }) -> Core.Pager +
client.Bookings.ListAsync(ListBookingsRequest { ... }) -> Pager
@@ -779,7 +779,7 @@ await client.Bookings.ListAsync(
-**request:** `Square.Bookings.ListBookingsRequest` +**request:** `ListBookingsRequest`
@@ -791,7 +791,7 @@ await client.Bookings.ListAsync(
-
client.Bookings.CreateAsync(Square.Bookings.CreateBookingRequest { ... }) -> CreateBookingResponse +
client.Bookings.CreateAsync(CreateBookingRequest { ... }) -> CreateBookingResponse
@@ -846,7 +846,7 @@ await client.Bookings.CreateAsync(new CreateBookingRequest { Booking = new Booki
-**request:** `Square.Bookings.CreateBookingRequest` +**request:** `CreateBookingRequest`
@@ -858,7 +858,7 @@ await client.Bookings.CreateAsync(new CreateBookingRequest { Booking = new Booki
-
client.Bookings.SearchAvailabilityAsync(Square.Bookings.SearchAvailabilityRequest { ... }) -> SearchAvailabilityResponse +
client.Bookings.SearchAvailabilityAsync(SearchAvailabilityRequest { ... }) -> SearchAvailabilityResponse
@@ -911,7 +911,7 @@ await client.Bookings.SearchAvailabilityAsync(
-**request:** `Square.Bookings.SearchAvailabilityRequest` +**request:** `SearchAvailabilityRequest`
@@ -923,7 +923,7 @@ await client.Bookings.SearchAvailabilityAsync(
-
client.Bookings.BulkRetrieveBookingsAsync(Square.Bookings.BulkRetrieveBookingsRequest { ... }) -> BulkRetrieveBookingsResponse +
client.Bookings.BulkRetrieveBookingsAsync(BulkRetrieveBookingsRequest { ... }) -> BulkRetrieveBookingsResponse
@@ -970,7 +970,7 @@ await client.Bookings.BulkRetrieveBookingsAsync(
-**request:** `Square.Bookings.BulkRetrieveBookingsRequest` +**request:** `BulkRetrieveBookingsRequest`
@@ -1021,7 +1021,7 @@ await client.Bookings.GetBusinessProfileAsync();
-
client.Bookings.RetrieveLocationBookingProfileAsync(Square.Bookings.RetrieveLocationBookingProfileRequest { ... }) -> RetrieveLocationBookingProfileResponse +
client.Bookings.RetrieveLocationBookingProfileAsync(RetrieveLocationBookingProfileRequest { ... }) -> RetrieveLocationBookingProfileResponse
@@ -1065,7 +1065,7 @@ await client.Bookings.RetrieveLocationBookingProfileAsync(
-**request:** `Square.Bookings.RetrieveLocationBookingProfileRequest` +**request:** `RetrieveLocationBookingProfileRequest`
@@ -1077,7 +1077,7 @@ await client.Bookings.RetrieveLocationBookingProfileAsync(
-
client.Bookings.BulkRetrieveTeamMemberBookingProfilesAsync(Square.Bookings.BulkRetrieveTeamMemberBookingProfilesRequest { ... }) -> BulkRetrieveTeamMemberBookingProfilesResponse +
client.Bookings.BulkRetrieveTeamMemberBookingProfilesAsync(BulkRetrieveTeamMemberBookingProfilesRequest { ... }) -> BulkRetrieveTeamMemberBookingProfilesResponse
@@ -1124,7 +1124,7 @@ await client.Bookings.BulkRetrieveTeamMemberBookingProfilesAsync(
-**request:** `Square.Bookings.BulkRetrieveTeamMemberBookingProfilesRequest` +**request:** `BulkRetrieveTeamMemberBookingProfilesRequest`
@@ -1136,7 +1136,7 @@ await client.Bookings.BulkRetrieveTeamMemberBookingProfilesAsync(
-
client.Bookings.GetAsync(Square.Bookings.GetBookingsRequest { ... }) -> GetBookingResponse +
client.Bookings.GetAsync(GetBookingsRequest { ... }) -> GetBookingResponse
@@ -1181,7 +1181,7 @@ await client.Bookings.GetAsync(new GetBookingsRequest { BookingId = "booking_id"
-**request:** `Square.Bookings.GetBookingsRequest` +**request:** `GetBookingsRequest`
@@ -1193,7 +1193,7 @@ await client.Bookings.GetAsync(new GetBookingsRequest { BookingId = "booking_id"
-
client.Bookings.UpdateAsync(Square.Bookings.UpdateBookingRequest { ... }) -> UpdateBookingResponse +
client.Bookings.UpdateAsync(UpdateBookingRequest { ... }) -> UpdateBookingResponse
@@ -1243,7 +1243,7 @@ await client.Bookings.UpdateAsync(
-**request:** `Square.Bookings.UpdateBookingRequest` +**request:** `UpdateBookingRequest`
@@ -1255,7 +1255,7 @@ await client.Bookings.UpdateAsync(
-
client.Bookings.CancelAsync(Square.Bookings.CancelBookingRequest { ... }) -> CancelBookingResponse +
client.Bookings.CancelAsync(CancelBookingRequest { ... }) -> CancelBookingResponse
@@ -1303,7 +1303,7 @@ await client.Bookings.CancelAsync(new CancelBookingRequest { BookingId = "bookin
-**request:** `Square.Bookings.CancelBookingRequest` +**request:** `CancelBookingRequest`
@@ -1316,7 +1316,7 @@ await client.Bookings.CancelAsync(new CancelBookingRequest { BookingId = "bookin
## Cards -
client.Cards.ListAsync(Cards.ListCardsRequest { ... }) -> Core.Pager +
client.Cards.ListAsync(ListCardsRequest { ... }) -> Pager
@@ -1368,7 +1368,7 @@ await client.Cards.ListAsync(
-**request:** `Cards.ListCardsRequest` +**request:** `ListCardsRequest`
@@ -1380,7 +1380,7 @@ await client.Cards.ListAsync(
-
client.Cards.CreateAsync(Cards.CreateCardRequest { ... }) -> CreateCardResponse +
client.Cards.CreateAsync(CreateCardRequest { ... }) -> CreateCardResponse
@@ -1443,7 +1443,7 @@ await client.Cards.CreateAsync(
-**request:** `Cards.CreateCardRequest` +**request:** `CreateCardRequest`
@@ -1455,7 +1455,7 @@ await client.Cards.CreateAsync(
-
client.Cards.GetAsync(Cards.GetCardsRequest { ... }) -> GetCardResponse +
client.Cards.GetAsync(GetCardsRequest { ... }) -> GetCardResponse
@@ -1497,7 +1497,7 @@ await client.Cards.GetAsync(new GetCardsRequest { CardId = "card_id" });
-**request:** `Cards.GetCardsRequest` +**request:** `GetCardsRequest`
@@ -1509,7 +1509,7 @@ await client.Cards.GetAsync(new GetCardsRequest { CardId = "card_id" });
-
client.Cards.DisableAsync(Cards.DisableCardsRequest { ... }) -> DisableCardResponse +
client.Cards.DisableAsync(DisableCardsRequest { ... }) -> DisableCardResponse
@@ -1552,7 +1552,7 @@ await client.Cards.DisableAsync(new DisableCardsRequest { CardId = "card_id" });
-**request:** `Cards.DisableCardsRequest` +**request:** `DisableCardsRequest`
@@ -1565,7 +1565,7 @@ await client.Cards.DisableAsync(new DisableCardsRequest { CardId = "card_id" });
## Catalog -
client.Catalog.BatchDeleteAsync(Square.Catalog.BatchDeleteCatalogObjectsRequest { ... }) -> BatchDeleteCatalogObjectsResponse +
client.Catalog.BatchDeleteAsync(BatchDeleteCatalogObjectsRequest { ... }) -> BatchDeleteCatalogObjectsResponse
@@ -1625,7 +1625,7 @@ await client.Catalog.BatchDeleteAsync(
-**request:** `Square.Catalog.BatchDeleteCatalogObjectsRequest` +**request:** `BatchDeleteCatalogObjectsRequest`
@@ -1637,7 +1637,7 @@ await client.Catalog.BatchDeleteAsync(
-
client.Catalog.BatchGetAsync(Square.Catalog.BatchGetCatalogObjectsRequest { ... }) -> BatchGetCatalogObjectsResponse +
client.Catalog.BatchGetAsync(BatchGetCatalogObjectsRequest { ... }) -> BatchGetCatalogObjectsResponse
@@ -1690,7 +1690,7 @@ await client.Catalog.BatchGetAsync(
-**request:** `Square.Catalog.BatchGetCatalogObjectsRequest` +**request:** `BatchGetCatalogObjectsRequest`
@@ -1702,7 +1702,7 @@ await client.Catalog.BatchGetAsync(
-
client.Catalog.BatchUpsertAsync(Square.Catalog.BatchUpsertCatalogObjectsRequest { ... }) -> BatchUpsertCatalogObjectsResponse +
client.Catalog.BatchUpsertAsync(BatchUpsertCatalogObjectsRequest { ... }) -> BatchUpsertCatalogObjectsResponse
@@ -1774,7 +1774,7 @@ await client.Catalog.BatchUpsertAsync(
-**request:** `Square.Catalog.BatchUpsertCatalogObjectsRequest` +**request:** `BatchUpsertCatalogObjectsRequest`
@@ -1826,7 +1826,7 @@ await client.Catalog.InfoAsync();
-
client.Catalog.ListAsync(Square.Catalog.ListCatalogRequest { ... }) -> Core.Pager +
client.Catalog.ListAsync(ListCatalogRequest { ... }) -> Pager
@@ -1882,7 +1882,7 @@ await client.Catalog.ListAsync(
-**request:** `Square.Catalog.ListCatalogRequest` +**request:** `ListCatalogRequest`
@@ -1894,7 +1894,7 @@ await client.Catalog.ListAsync(
-
client.Catalog.SearchAsync(Square.Catalog.SearchCatalogObjectsRequest { ... }) -> SearchCatalogObjectsResponse +
client.Catalog.SearchAsync(SearchCatalogObjectsRequest { ... }) -> SearchCatalogObjectsResponse
@@ -1959,7 +1959,7 @@ await client.Catalog.SearchAsync(
-**request:** `Square.Catalog.SearchCatalogObjectsRequest` +**request:** `SearchCatalogObjectsRequest`
@@ -1971,7 +1971,7 @@ await client.Catalog.SearchAsync(
-
client.Catalog.SearchItemsAsync(Square.Catalog.SearchCatalogItemsRequest { ... }) -> SearchCatalogItemsResponse +
client.Catalog.SearchItemsAsync(SearchCatalogItemsRequest { ... }) -> SearchCatalogItemsResponse
@@ -2056,7 +2056,7 @@ await client.Catalog.SearchItemsAsync(
-**request:** `Square.Catalog.SearchCatalogItemsRequest` +**request:** `SearchCatalogItemsRequest`
@@ -2068,7 +2068,7 @@ await client.Catalog.SearchItemsAsync(
-
client.Catalog.UpdateItemModifierListsAsync(Square.Catalog.UpdateItemModifierListsRequest { ... }) -> UpdateItemModifierListsResponse +
client.Catalog.UpdateItemModifierListsAsync(UpdateItemModifierListsRequest { ... }) -> UpdateItemModifierListsResponse
@@ -2123,7 +2123,7 @@ await client.Catalog.UpdateItemModifierListsAsync(
-**request:** `Square.Catalog.UpdateItemModifierListsRequest` +**request:** `UpdateItemModifierListsRequest`
@@ -2135,7 +2135,7 @@ await client.Catalog.UpdateItemModifierListsAsync(
-
client.Catalog.UpdateItemTaxesAsync(Square.Catalog.UpdateItemTaxesRequest { ... }) -> UpdateItemTaxesResponse +
client.Catalog.UpdateItemTaxesAsync(UpdateItemTaxesRequest { ... }) -> UpdateItemTaxesResponse
@@ -2186,7 +2186,7 @@ await client.Catalog.UpdateItemTaxesAsync(
-**request:** `Square.Catalog.UpdateItemTaxesRequest` +**request:** `UpdateItemTaxesRequest`
@@ -2199,7 +2199,7 @@ await client.Catalog.UpdateItemTaxesAsync(
## Channels -
client.Channels.ListAsync(Channels.ListChannelsRequest { ... }) -> Core.Pager +
client.Channels.ListAsync(ListChannelsRequest { ... }) -> Pager
@@ -2250,7 +2250,7 @@ await client.Channels.ListAsync(
-**request:** `Channels.ListChannelsRequest` +**request:** `ListChannelsRequest`
@@ -2262,7 +2262,7 @@ await client.Channels.ListAsync(
-
client.Channels.BulkRetrieveAsync(Channels.BulkRetrieveChannelsRequest { ... }) -> BulkRetrieveChannelsResponse +
client.Channels.BulkRetrieveAsync(BulkRetrieveChannelsRequest { ... }) -> BulkRetrieveChannelsResponse
@@ -2309,7 +2309,7 @@ await client.Channels.BulkRetrieveAsync(
-**request:** `Channels.BulkRetrieveChannelsRequest` +**request:** `BulkRetrieveChannelsRequest`
@@ -2321,7 +2321,7 @@ await client.Channels.BulkRetrieveAsync(
-
client.Channels.GetAsync(Channels.GetChannelsRequest { ... }) -> RetrieveChannelResponse +
client.Channels.GetAsync(GetChannelsRequest { ... }) -> RetrieveChannelResponse
@@ -2363,7 +2363,7 @@ await client.Channels.GetAsync(new GetChannelsRequest { ChannelId = "channel_id"
-**request:** `Channels.GetChannelsRequest` +**request:** `GetChannelsRequest`
@@ -2376,7 +2376,7 @@ await client.Channels.GetAsync(new GetChannelsRequest { ChannelId = "channel_id"
## Customers -
client.Customers.ListAsync(Square.Customers.ListCustomersRequest { ... }) -> Core.Pager +
client.Customers.ListAsync(ListCustomersRequest { ... }) -> Pager
@@ -2431,7 +2431,7 @@ await client.Customers.ListAsync(
-**request:** `Square.Customers.ListCustomersRequest` +**request:** `ListCustomersRequest`
@@ -2443,7 +2443,7 @@ await client.Customers.ListAsync(
-
client.Customers.CreateAsync(Square.Customers.CreateCustomerRequest { ... }) -> CreateCustomerResponse +
client.Customers.CreateAsync(CreateCustomerRequest { ... }) -> CreateCustomerResponse
@@ -2513,7 +2513,7 @@ await client.Customers.CreateAsync(
-**request:** `Square.Customers.CreateCustomerRequest` +**request:** `CreateCustomerRequest`
@@ -2525,7 +2525,7 @@ await client.Customers.CreateAsync(
-
client.Customers.BatchCreateAsync(Square.Customers.BulkCreateCustomersRequest { ... }) -> BulkCreateCustomersResponse +
client.Customers.BatchCreateAsync(BulkCreateCustomersRequest { ... }) -> BulkCreateCustomersResponse
@@ -2626,7 +2626,7 @@ await client.Customers.BatchCreateAsync(
-**request:** `Square.Customers.BulkCreateCustomersRequest` +**request:** `BulkCreateCustomersRequest`
@@ -2638,7 +2638,7 @@ await client.Customers.BatchCreateAsync(
-
client.Customers.BulkDeleteCustomersAsync(Square.Customers.BulkDeleteCustomersRequest { ... }) -> BulkDeleteCustomersResponse +
client.Customers.BulkDeleteCustomersAsync(BulkDeleteCustomersRequest { ... }) -> BulkDeleteCustomersResponse
@@ -2692,7 +2692,7 @@ await client.Customers.BulkDeleteCustomersAsync(
-**request:** `Square.Customers.BulkDeleteCustomersRequest` +**request:** `BulkDeleteCustomersRequest`
@@ -2704,7 +2704,7 @@ await client.Customers.BulkDeleteCustomersAsync(
-
client.Customers.BulkRetrieveCustomersAsync(Square.Customers.BulkRetrieveCustomersRequest { ... }) -> BulkRetrieveCustomersResponse +
client.Customers.BulkRetrieveCustomersAsync(BulkRetrieveCustomersRequest { ... }) -> BulkRetrieveCustomersResponse
@@ -2758,7 +2758,7 @@ await client.Customers.BulkRetrieveCustomersAsync(
-**request:** `Square.Customers.BulkRetrieveCustomersRequest` +**request:** `BulkRetrieveCustomersRequest`
@@ -2770,7 +2770,7 @@ await client.Customers.BulkRetrieveCustomersAsync(
-
client.Customers.BulkUpdateCustomersAsync(Square.Customers.BulkUpdateCustomersRequest { ... }) -> BulkUpdateCustomersResponse +
client.Customers.BulkUpdateCustomersAsync(BulkUpdateCustomersRequest { ... }) -> BulkUpdateCustomersResponse
@@ -2839,7 +2839,7 @@ await client.Customers.BulkUpdateCustomersAsync(
-**request:** `Square.Customers.BulkUpdateCustomersRequest` +**request:** `BulkUpdateCustomersRequest`
@@ -2851,7 +2851,7 @@ await client.Customers.BulkUpdateCustomersAsync(
-
client.Customers.SearchAsync(Square.Customers.SearchCustomersRequest { ... }) -> SearchCustomersResponse +
client.Customers.SearchAsync(SearchCustomersRequest { ... }) -> SearchCustomersResponse
@@ -2931,7 +2931,7 @@ await client.Customers.SearchAsync(
-**request:** `Square.Customers.SearchCustomersRequest` +**request:** `SearchCustomersRequest`
@@ -2943,7 +2943,7 @@ await client.Customers.SearchAsync(
-
client.Customers.GetAsync(Square.Customers.GetCustomersRequest { ... }) -> GetCustomerResponse +
client.Customers.GetAsync(GetCustomersRequest { ... }) -> GetCustomerResponse
@@ -2985,7 +2985,7 @@ await client.Customers.GetAsync(new GetCustomersRequest { CustomerId = "customer
-**request:** `Square.Customers.GetCustomersRequest` +**request:** `GetCustomersRequest`
@@ -2997,7 +2997,7 @@ await client.Customers.GetAsync(new GetCustomersRequest { CustomerId = "customer
-
client.Customers.UpdateAsync(Square.Customers.UpdateCustomerRequest { ... }) -> UpdateCustomerResponse +
client.Customers.UpdateAsync(UpdateCustomerRequest { ... }) -> UpdateCustomerResponse
@@ -3050,7 +3050,7 @@ await client.Customers.UpdateAsync(
-**request:** `Square.Customers.UpdateCustomerRequest` +**request:** `UpdateCustomerRequest`
@@ -3062,7 +3062,7 @@ await client.Customers.UpdateAsync(
-
client.Customers.DeleteAsync(Square.Customers.DeleteCustomersRequest { ... }) -> DeleteCustomerResponse +
client.Customers.DeleteAsync(DeleteCustomersRequest { ... }) -> DeleteCustomerResponse
@@ -3108,7 +3108,7 @@ await client.Customers.DeleteAsync(
-**request:** `Square.Customers.DeleteCustomersRequest` +**request:** `DeleteCustomersRequest`
@@ -3121,7 +3121,7 @@ await client.Customers.DeleteAsync(
## Devices -
client.Devices.ListAsync(Square.Devices.ListDevicesRequest { ... }) -> Core.Pager +
client.Devices.ListAsync(ListDevicesRequest { ... }) -> Pager
@@ -3172,7 +3172,7 @@ await client.Devices.ListAsync(
-**request:** `Square.Devices.ListDevicesRequest` +**request:** `ListDevicesRequest`
@@ -3184,7 +3184,7 @@ await client.Devices.ListAsync(
-
client.Devices.GetAsync(Square.Devices.GetDevicesRequest { ... }) -> GetDeviceResponse +
client.Devices.GetAsync(GetDevicesRequest { ... }) -> GetDeviceResponse
@@ -3226,7 +3226,7 @@ await client.Devices.GetAsync(new GetDevicesRequest { DeviceId = "device_id" });
-**request:** `Square.Devices.GetDevicesRequest` +**request:** `GetDevicesRequest`
@@ -3239,7 +3239,7 @@ await client.Devices.GetAsync(new GetDevicesRequest { DeviceId = "device_id" });
## Disputes -
client.Disputes.ListAsync(Square.Disputes.ListDisputesRequest { ... }) -> Core.Pager +
client.Disputes.ListAsync(ListDisputesRequest { ... }) -> Pager
@@ -3288,7 +3288,7 @@ await client.Disputes.ListAsync(
-**request:** `Square.Disputes.ListDisputesRequest` +**request:** `ListDisputesRequest`
@@ -3300,7 +3300,7 @@ await client.Disputes.ListAsync(
-
client.Disputes.GetAsync(Square.Disputes.GetDisputesRequest { ... }) -> GetDisputeResponse +
client.Disputes.GetAsync(GetDisputesRequest { ... }) -> GetDisputeResponse
@@ -3342,7 +3342,7 @@ await client.Disputes.GetAsync(new GetDisputesRequest { DisputeId = "dispute_id"
-**request:** `Square.Disputes.GetDisputesRequest` +**request:** `GetDisputesRequest`
@@ -3354,7 +3354,7 @@ await client.Disputes.GetAsync(new GetDisputesRequest { DisputeId = "dispute_id"
-
client.Disputes.AcceptAsync(Square.Disputes.AcceptDisputesRequest { ... }) -> AcceptDisputeResponse +
client.Disputes.AcceptAsync(AcceptDisputesRequest { ... }) -> AcceptDisputeResponse
@@ -3400,7 +3400,7 @@ await client.Disputes.AcceptAsync(new AcceptDisputesRequest { DisputeId = "dispu
-**request:** `Square.Disputes.AcceptDisputesRequest` +**request:** `AcceptDisputesRequest`
@@ -3412,7 +3412,64 @@ await client.Disputes.AcceptAsync(new AcceptDisputesRequest { DisputeId = "dispu
-
client.Disputes.CreateEvidenceTextAsync(Square.Disputes.CreateDisputeEvidenceTextRequest { ... }) -> CreateDisputeEvidenceTextResponse +
client.Disputes.CreateEvidenceFileAsync(CreateEvidenceFileDisputesRequest { ... }) -> CreateDisputeEvidenceFileResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Uploads a file to use as evidence in a dispute challenge. The endpoint accepts HTTP +multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Disputes.CreateEvidenceFileAsync( + new CreateEvidenceFileDisputesRequest { DisputeId = "dispute_id" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateEvidenceFileDisputesRequest` + +
+
+
+
+ + +
+
+
+ +
client.Disputes.CreateEvidenceTextAsync(CreateDisputeEvidenceTextRequest { ... }) -> CreateDisputeEvidenceTextResponse
@@ -3462,7 +3519,7 @@ await client.Disputes.CreateEvidenceTextAsync(
-**request:** `Square.Disputes.CreateDisputeEvidenceTextRequest` +**request:** `CreateDisputeEvidenceTextRequest`
@@ -3474,7 +3531,7 @@ await client.Disputes.CreateEvidenceTextAsync(
-
client.Disputes.SubmitEvidenceAsync(Square.Disputes.SubmitEvidenceDisputesRequest { ... }) -> SubmitEvidenceResponse +
client.Disputes.SubmitEvidenceAsync(SubmitEvidenceDisputesRequest { ... }) -> SubmitEvidenceResponse
@@ -3524,7 +3581,7 @@ await client.Disputes.SubmitEvidenceAsync(
-**request:** `Square.Disputes.SubmitEvidenceDisputesRequest` +**request:** `SubmitEvidenceDisputesRequest`
@@ -3537,7 +3594,7 @@ await client.Disputes.SubmitEvidenceAsync(
## Employees -
client.Employees.ListAsync(Employees.ListEmployeesRequest { ... }) -> Core.Pager +
client.Employees.ListAsync(ListEmployeesRequest { ... }) -> Pager
@@ -3587,7 +3644,7 @@ await client.Employees.ListAsync(
-**request:** `Employees.ListEmployeesRequest` +**request:** `ListEmployeesRequest`
@@ -3599,7 +3656,7 @@ await client.Employees.ListAsync(
-
client.Employees.GetAsync(Employees.GetEmployeesRequest { ... }) -> GetEmployeeResponse +
client.Employees.GetAsync(GetEmployeesRequest { ... }) -> GetEmployeeResponse
@@ -3641,7 +3698,7 @@ await client.Employees.GetAsync(new GetEmployeesRequest { Id = "id" });
-**request:** `Employees.GetEmployeesRequest` +**request:** `GetEmployeesRequest`
@@ -3654,7 +3711,7 @@ await client.Employees.GetAsync(new GetEmployeesRequest { Id = "id" });
## Events -
client.Events.SearchEventsAsync(Events.SearchEventsRequest { ... }) -> SearchEventsResponse +
client.Events.SearchEventsAsync(SearchEventsRequest { ... }) -> SearchEventsResponse
@@ -3696,7 +3753,7 @@ await client.Events.SearchEventsAsync(new SearchEventsRequest());
-**request:** `Events.SearchEventsRequest` +**request:** `SearchEventsRequest`
@@ -3788,7 +3845,7 @@ await client.Events.EnableEventsAsync();
-
client.Events.ListEventTypesAsync(Events.ListEventTypesRequest { ... }) -> ListEventTypesResponse +
client.Events.ListEventTypesAsync(ListEventTypesRequest { ... }) -> ListEventTypesResponse
@@ -3832,7 +3889,7 @@ await client.Events.ListEventTypesAsync(
-**request:** `Events.ListEventTypesRequest` +**request:** `ListEventTypesRequest`
@@ -3845,7 +3902,7 @@ await client.Events.ListEventTypesAsync(
## GiftCards -
client.GiftCards.ListAsync(Square.GiftCards.ListGiftCardsRequest { ... }) -> Core.Pager +
client.GiftCards.ListAsync(ListGiftCardsRequest { ... }) -> Pager
@@ -3897,7 +3954,7 @@ await client.GiftCards.ListAsync(
-**request:** `Square.GiftCards.ListGiftCardsRequest` +**request:** `ListGiftCardsRequest`
@@ -3909,7 +3966,7 @@ await client.GiftCards.ListAsync(
-
client.GiftCards.CreateAsync(Square.GiftCards.CreateGiftCardRequest { ... }) -> CreateGiftCardResponse +
client.GiftCards.CreateAsync(CreateGiftCardRequest { ... }) -> CreateGiftCardResponse
@@ -3962,7 +4019,7 @@ await client.GiftCards.CreateAsync(
-**request:** `Square.GiftCards.CreateGiftCardRequest` +**request:** `CreateGiftCardRequest`
@@ -3974,7 +4031,7 @@ await client.GiftCards.CreateAsync(
-
client.GiftCards.GetFromGanAsync(Square.GiftCards.GetGiftCardFromGanRequest { ... }) -> GetGiftCardFromGanResponse +
client.GiftCards.GetFromGanAsync(GetGiftCardFromGanRequest { ... }) -> GetGiftCardFromGanResponse
@@ -4016,7 +4073,7 @@ await client.GiftCards.GetFromGanAsync(new GetGiftCardFromGanRequest { Gan = "77
-**request:** `Square.GiftCards.GetGiftCardFromGanRequest` +**request:** `GetGiftCardFromGanRequest`
@@ -4028,7 +4085,7 @@ await client.GiftCards.GetFromGanAsync(new GetGiftCardFromGanRequest { Gan = "77
-
client.GiftCards.GetFromNonceAsync(Square.GiftCards.GetGiftCardFromNonceRequest { ... }) -> GetGiftCardFromNonceResponse +
client.GiftCards.GetFromNonceAsync(GetGiftCardFromNonceRequest { ... }) -> GetGiftCardFromNonceResponse
@@ -4072,7 +4129,7 @@ await client.GiftCards.GetFromNonceAsync(
-**request:** `Square.GiftCards.GetGiftCardFromNonceRequest` +**request:** `GetGiftCardFromNonceRequest`
@@ -4084,7 +4141,7 @@ await client.GiftCards.GetFromNonceAsync(
-
client.GiftCards.LinkCustomerAsync(Square.GiftCards.LinkCustomerToGiftCardRequest { ... }) -> LinkCustomerToGiftCardResponse +
client.GiftCards.LinkCustomerAsync(LinkCustomerToGiftCardRequest { ... }) -> LinkCustomerToGiftCardResponse
@@ -4132,7 +4189,7 @@ await client.GiftCards.LinkCustomerAsync(
-**request:** `Square.GiftCards.LinkCustomerToGiftCardRequest` +**request:** `LinkCustomerToGiftCardRequest`
@@ -4144,7 +4201,7 @@ await client.GiftCards.LinkCustomerAsync(
-
client.GiftCards.UnlinkCustomerAsync(Square.GiftCards.UnlinkCustomerFromGiftCardRequest { ... }) -> UnlinkCustomerFromGiftCardResponse +
client.GiftCards.UnlinkCustomerAsync(UnlinkCustomerFromGiftCardRequest { ... }) -> UnlinkCustomerFromGiftCardResponse
@@ -4192,7 +4249,7 @@ await client.GiftCards.UnlinkCustomerAsync(
-**request:** `Square.GiftCards.UnlinkCustomerFromGiftCardRequest` +**request:** `UnlinkCustomerFromGiftCardRequest`
@@ -4204,7 +4261,7 @@ await client.GiftCards.UnlinkCustomerAsync(
-
client.GiftCards.GetAsync(Square.GiftCards.GetGiftCardsRequest { ... }) -> GetGiftCardResponse +
client.GiftCards.GetAsync(GetGiftCardsRequest { ... }) -> GetGiftCardResponse
@@ -4246,7 +4303,7 @@ await client.GiftCards.GetAsync(new GetGiftCardsRequest { Id = "id" });
-**request:** `Square.GiftCards.GetGiftCardsRequest` +**request:** `GetGiftCardsRequest`
@@ -4259,7 +4316,7 @@ await client.GiftCards.GetAsync(new GetGiftCardsRequest { Id = "id" });
## Inventory -
client.Inventory.DeprecatedGetAdjustmentAsync(Inventory.DeprecatedGetAdjustmentInventoryRequest { ... }) -> GetInventoryAdjustmentResponse +
client.Inventory.DeprecatedGetAdjustmentAsync(DeprecatedGetAdjustmentInventoryRequest { ... }) -> GetInventoryAdjustmentResponse
@@ -4304,7 +4361,7 @@ await client.Inventory.DeprecatedGetAdjustmentAsync(
-**request:** `Inventory.DeprecatedGetAdjustmentInventoryRequest` +**request:** `DeprecatedGetAdjustmentInventoryRequest`
@@ -4316,7 +4373,7 @@ await client.Inventory.DeprecatedGetAdjustmentAsync(
-
client.Inventory.GetAdjustmentAsync(Inventory.GetAdjustmentInventoryRequest { ... }) -> GetInventoryAdjustmentResponse +
client.Inventory.GetAdjustmentAsync(GetAdjustmentInventoryRequest { ... }) -> GetInventoryAdjustmentResponse
@@ -4361,7 +4418,7 @@ await client.Inventory.GetAdjustmentAsync(
-**request:** `Inventory.GetAdjustmentInventoryRequest` +**request:** `GetAdjustmentInventoryRequest`
@@ -4659,7 +4716,7 @@ await client.Inventory.BatchCreateChangesAsync(
-
client.Inventory.BatchGetChangesAsync(BatchRetrieveInventoryChangesRequest { ... }) -> Core.Pager +
client.Inventory.BatchGetChangesAsync(BatchRetrieveInventoryChangesRequest { ... }) -> Pager
@@ -4730,7 +4787,7 @@ await client.Inventory.BatchGetChangesAsync(
-
client.Inventory.BatchGetCountsAsync(BatchGetInventoryCountsRequest { ... }) -> Core.Pager +
client.Inventory.BatchGetCountsAsync(BatchGetInventoryCountsRequest { ... }) -> Pager
@@ -4801,7 +4858,7 @@ await client.Inventory.BatchGetCountsAsync(
-
client.Inventory.DeprecatedGetPhysicalCountAsync(Inventory.DeprecatedGetPhysicalCountInventoryRequest { ... }) -> GetInventoryPhysicalCountResponse +
client.Inventory.DeprecatedGetPhysicalCountAsync(DeprecatedGetPhysicalCountInventoryRequest { ... }) -> GetInventoryPhysicalCountResponse
@@ -4846,7 +4903,7 @@ await client.Inventory.DeprecatedGetPhysicalCountAsync(
-**request:** `Inventory.DeprecatedGetPhysicalCountInventoryRequest` +**request:** `DeprecatedGetPhysicalCountInventoryRequest`
@@ -4858,7 +4915,7 @@ await client.Inventory.DeprecatedGetPhysicalCountAsync(
-
client.Inventory.GetPhysicalCountAsync(Inventory.GetPhysicalCountInventoryRequest { ... }) -> GetInventoryPhysicalCountResponse +
client.Inventory.GetPhysicalCountAsync(GetPhysicalCountInventoryRequest { ... }) -> GetInventoryPhysicalCountResponse
@@ -4903,7 +4960,7 @@ await client.Inventory.GetPhysicalCountAsync(
-**request:** `Inventory.GetPhysicalCountInventoryRequest` +**request:** `GetPhysicalCountInventoryRequest`
@@ -4915,7 +4972,7 @@ await client.Inventory.GetPhysicalCountAsync(
-
client.Inventory.GetTransferAsync(Inventory.GetTransferInventoryRequest { ... }) -> GetInventoryTransferResponse +
client.Inventory.GetTransferAsync(GetTransferInventoryRequest { ... }) -> GetInventoryTransferResponse
@@ -4960,7 +5017,7 @@ await client.Inventory.GetTransferAsync(
-**request:** `Inventory.GetTransferInventoryRequest` +**request:** `GetTransferInventoryRequest`
@@ -4972,7 +5029,7 @@ await client.Inventory.GetTransferAsync(
-
client.Inventory.GetAsync(Inventory.GetInventoryRequest { ... }) -> Core.Pager +
client.Inventory.GetAsync(GetInventoryRequest { ... }) -> Pager
@@ -5024,7 +5081,7 @@ await client.Inventory.GetAsync(
-**request:** `Inventory.GetInventoryRequest` +**request:** `GetInventoryRequest`
@@ -5036,7 +5093,7 @@ await client.Inventory.GetAsync(
-
client.Inventory.ChangesAsync(Inventory.ChangesInventoryRequest { ... }) -> Core.Pager +
client.Inventory.ChangesAsync(ChangesInventoryRequest { ... }) -> Pager
@@ -5097,7 +5154,7 @@ await client.Inventory.ChangesAsync(
-**request:** `Inventory.ChangesInventoryRequest` +**request:** `ChangesInventoryRequest`
@@ -5110,7 +5167,7 @@ await client.Inventory.ChangesAsync(
## Invoices -
client.Invoices.ListAsync(Invoices.ListInvoicesRequest { ... }) -> Core.Pager +
client.Invoices.ListAsync(ListInvoicesRequest { ... }) -> Pager
@@ -5161,7 +5218,7 @@ await client.Invoices.ListAsync(
-**request:** `Invoices.ListInvoicesRequest` +**request:** `ListInvoicesRequest`
@@ -5173,7 +5230,7 @@ await client.Invoices.ListAsync(
-
client.Invoices.CreateAsync(Invoices.CreateInvoiceRequest { ... }) -> CreateInvoiceResponse +
client.Invoices.CreateAsync(CreateInvoiceRequest { ... }) -> CreateInvoiceResponse
@@ -5278,7 +5335,7 @@ await client.Invoices.CreateAsync(
-**request:** `Invoices.CreateInvoiceRequest` +**request:** `CreateInvoiceRequest`
@@ -5290,7 +5347,7 @@ await client.Invoices.CreateAsync(
-
client.Invoices.SearchAsync(Invoices.SearchInvoicesRequest { ... }) -> SearchInvoicesResponse +
client.Invoices.SearchAsync(SearchInvoicesRequest { ... }) -> SearchInvoicesResponse
@@ -5352,7 +5409,7 @@ await client.Invoices.SearchAsync(
-**request:** `Invoices.SearchInvoicesRequest` +**request:** `SearchInvoicesRequest`
@@ -5364,7 +5421,7 @@ await client.Invoices.SearchAsync(
-
client.Invoices.GetAsync(Invoices.GetInvoicesRequest { ... }) -> GetInvoiceResponse +
client.Invoices.GetAsync(GetInvoicesRequest { ... }) -> GetInvoiceResponse
@@ -5406,7 +5463,7 @@ await client.Invoices.GetAsync(new GetInvoicesRequest { InvoiceId = "invoice_id"
-**request:** `Invoices.GetInvoicesRequest` +**request:** `GetInvoicesRequest`
@@ -5418,7 +5475,7 @@ await client.Invoices.GetAsync(new GetInvoicesRequest { InvoiceId = "invoice_id"
-
client.Invoices.UpdateAsync(Invoices.UpdateInvoiceRequest { ... }) -> UpdateInvoiceResponse +
client.Invoices.UpdateAsync(UpdateInvoiceRequest { ... }) -> UpdateInvoiceResponse
@@ -5481,7 +5538,7 @@ await client.Invoices.UpdateAsync(
-**request:** `Invoices.UpdateInvoiceRequest` +**request:** `UpdateInvoiceRequest`
@@ -5493,7 +5550,7 @@ await client.Invoices.UpdateAsync(
-
client.Invoices.DeleteAsync(Invoices.DeleteInvoicesRequest { ... }) -> DeleteInvoiceResponse +
client.Invoices.DeleteAsync(DeleteInvoicesRequest { ... }) -> DeleteInvoiceResponse
@@ -5539,7 +5596,70 @@ await client.Invoices.DeleteAsync(
-**request:** `Invoices.DeleteInvoicesRequest` +**request:** `DeleteInvoicesRequest` + +
+
+
+
+ + + + +
+ +
client.Invoices.CreateInvoiceAttachmentAsync(CreateInvoiceAttachmentRequest { ... }) -> CreateInvoiceAttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Uploads a file and attaches it to an invoice. This endpoint accepts HTTP multipart/form-data file uploads +with a JSON `request` part and a `file` part. The `file` part must be a `readable stream` that contains a file +in a supported format: GIF, JPEG, PNG, TIFF, BMP, or PDF. + +Invoices can have up to 10 attachments with a total file size of 25 MB. Attachments can be added only to invoices +in the `DRAFT`, `SCHEDULED`, `UNPAID`, or `PARTIALLY_PAID` state. + +__NOTE:__ When testing in the Sandbox environment, the total file size is limited to 1 KB. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Invoices.CreateInvoiceAttachmentAsync( + new CreateInvoiceAttachmentRequest { InvoiceId = "invoice_id" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateInvoiceAttachmentRequest`
@@ -5551,7 +5671,7 @@ await client.Invoices.DeleteAsync(
-
client.Invoices.DeleteInvoiceAttachmentAsync(Invoices.DeleteInvoiceAttachmentRequest { ... }) -> DeleteInvoiceAttachmentResponse +
client.Invoices.DeleteInvoiceAttachmentAsync(DeleteInvoiceAttachmentRequest { ... }) -> DeleteInvoiceAttachmentResponse
@@ -5596,7 +5716,7 @@ await client.Invoices.DeleteInvoiceAttachmentAsync(
-**request:** `Invoices.DeleteInvoiceAttachmentRequest` +**request:** `DeleteInvoiceAttachmentRequest`
@@ -5608,7 +5728,7 @@ await client.Invoices.DeleteInvoiceAttachmentAsync(
-
client.Invoices.CancelAsync(Invoices.CancelInvoiceRequest { ... }) -> CancelInvoiceResponse +
client.Invoices.CancelAsync(CancelInvoiceRequest { ... }) -> CancelInvoiceResponse
@@ -5655,7 +5775,7 @@ await client.Invoices.CancelAsync(
-**request:** `Invoices.CancelInvoiceRequest` +**request:** `CancelInvoiceRequest`
@@ -5667,7 +5787,7 @@ await client.Invoices.CancelAsync(
-
client.Invoices.PublishAsync(Invoices.PublishInvoiceRequest { ... }) -> PublishInvoiceResponse +
client.Invoices.PublishAsync(PublishInvoiceRequest { ... }) -> PublishInvoiceResponse
@@ -5729,7 +5849,7 @@ await client.Invoices.PublishAsync(
-**request:** `Invoices.PublishInvoiceRequest` +**request:** `PublishInvoiceRequest`
@@ -5742,7 +5862,7 @@ await client.Invoices.PublishAsync(
## Labor -
client.Labor.CreateScheduledShiftAsync(Square.Labor.CreateScheduledShiftRequest { ... }) -> CreateScheduledShiftResponse +
client.Labor.CreateScheduledShiftAsync(CreateScheduledShiftRequest { ... }) -> CreateScheduledShiftResponse
@@ -5809,7 +5929,7 @@ await client.Labor.CreateScheduledShiftAsync(
-**request:** `Square.Labor.CreateScheduledShiftRequest` +**request:** `CreateScheduledShiftRequest`
@@ -5821,7 +5941,7 @@ await client.Labor.CreateScheduledShiftAsync(
-
client.Labor.BulkPublishScheduledShiftsAsync(Square.Labor.BulkPublishScheduledShiftsRequest { ... }) -> BulkPublishScheduledShiftsResponse +
client.Labor.BulkPublishScheduledShiftsAsync(BulkPublishScheduledShiftsRequest { ... }) -> BulkPublishScheduledShiftsResponse
@@ -5877,7 +5997,7 @@ await client.Labor.BulkPublishScheduledShiftsAsync(
-**request:** `Square.Labor.BulkPublishScheduledShiftsRequest` +**request:** `BulkPublishScheduledShiftsRequest`
@@ -5889,7 +6009,7 @@ await client.Labor.BulkPublishScheduledShiftsAsync(
-
client.Labor.SearchScheduledShiftsAsync(Square.Labor.SearchScheduledShiftsRequest { ... }) -> SearchScheduledShiftsResponse +
client.Labor.SearchScheduledShiftsAsync(SearchScheduledShiftsRequest { ... }) -> SearchScheduledShiftsResponse
@@ -5950,7 +6070,7 @@ await client.Labor.SearchScheduledShiftsAsync(
-**request:** `Square.Labor.SearchScheduledShiftsRequest` +**request:** `SearchScheduledShiftsRequest`
@@ -5962,7 +6082,7 @@ await client.Labor.SearchScheduledShiftsAsync(
-
client.Labor.RetrieveScheduledShiftAsync(Square.Labor.RetrieveScheduledShiftRequest { ... }) -> RetrieveScheduledShiftResponse +
client.Labor.RetrieveScheduledShiftAsync(RetrieveScheduledShiftRequest { ... }) -> RetrieveScheduledShiftResponse
@@ -6004,7 +6124,7 @@ await client.Labor.RetrieveScheduledShiftAsync(new RetrieveScheduledShiftRequest
-**request:** `Square.Labor.RetrieveScheduledShiftRequest` +**request:** `RetrieveScheduledShiftRequest`
@@ -6016,7 +6136,7 @@ await client.Labor.RetrieveScheduledShiftAsync(new RetrieveScheduledShiftRequest
-
client.Labor.UpdateScheduledShiftAsync(Square.Labor.UpdateScheduledShiftRequest { ... }) -> UpdateScheduledShiftResponse +
client.Labor.UpdateScheduledShiftAsync(UpdateScheduledShiftRequest { ... }) -> UpdateScheduledShiftResponse
@@ -6086,7 +6206,7 @@ await client.Labor.UpdateScheduledShiftAsync(
-**request:** `Square.Labor.UpdateScheduledShiftRequest` +**request:** `UpdateScheduledShiftRequest`
@@ -6098,7 +6218,7 @@ await client.Labor.UpdateScheduledShiftAsync(
-
client.Labor.PublishScheduledShiftAsync(Square.Labor.PublishScheduledShiftRequest { ... }) -> PublishScheduledShiftResponse +
client.Labor.PublishScheduledShiftAsync(PublishScheduledShiftRequest { ... }) -> PublishScheduledShiftResponse
@@ -6149,7 +6269,7 @@ await client.Labor.PublishScheduledShiftAsync(
-**request:** `Square.Labor.PublishScheduledShiftRequest` +**request:** `PublishScheduledShiftRequest`
@@ -6161,7 +6281,7 @@ await client.Labor.PublishScheduledShiftAsync(
-
client.Labor.CreateTimecardAsync(Square.Labor.CreateTimecardRequest { ... }) -> CreateTimecardResponse +
client.Labor.CreateTimecardAsync(CreateTimecardRequest { ... }) -> CreateTimecardResponse
@@ -6251,7 +6371,7 @@ await client.Labor.CreateTimecardAsync(
-**request:** `Square.Labor.CreateTimecardRequest` +**request:** `CreateTimecardRequest`
@@ -6263,7 +6383,7 @@ await client.Labor.CreateTimecardAsync(
-
client.Labor.SearchTimecardsAsync(Square.Labor.SearchTimecardsRequest { ... }) -> SearchTimecardsResponse +
client.Labor.SearchTimecardsAsync(SearchTimecardsRequest { ... }) -> SearchTimecardsResponse
@@ -6335,7 +6455,7 @@ await client.Labor.SearchTimecardsAsync(
-**request:** `Square.Labor.SearchTimecardsRequest` +**request:** `SearchTimecardsRequest`
@@ -6347,7 +6467,7 @@ await client.Labor.SearchTimecardsAsync(
-
client.Labor.RetrieveTimecardAsync(Square.Labor.RetrieveTimecardRequest { ... }) -> RetrieveTimecardResponse +
client.Labor.RetrieveTimecardAsync(RetrieveTimecardRequest { ... }) -> RetrieveTimecardResponse
@@ -6389,7 +6509,7 @@ await client.Labor.RetrieveTimecardAsync(new RetrieveTimecardRequest { Id = "id"
-**request:** `Square.Labor.RetrieveTimecardRequest` +**request:** `RetrieveTimecardRequest`
@@ -6401,7 +6521,7 @@ await client.Labor.RetrieveTimecardAsync(new RetrieveTimecardRequest { Id = "id"
-
client.Labor.UpdateTimecardAsync(Square.Labor.UpdateTimecardRequest { ... }) -> UpdateTimecardResponse +
client.Labor.UpdateTimecardAsync(UpdateTimecardRequest { ... }) -> UpdateTimecardResponse
@@ -6483,7 +6603,7 @@ await client.Labor.UpdateTimecardAsync(
-**request:** `Square.Labor.UpdateTimecardRequest` +**request:** `UpdateTimecardRequest`
@@ -6495,7 +6615,7 @@ await client.Labor.UpdateTimecardAsync(
-
client.Labor.DeleteTimecardAsync(Square.Labor.DeleteTimecardRequest { ... }) -> DeleteTimecardResponse +
client.Labor.DeleteTimecardAsync(DeleteTimecardRequest { ... }) -> DeleteTimecardResponse
@@ -6537,7 +6657,7 @@ await client.Labor.DeleteTimecardAsync(new DeleteTimecardRequest { Id = "id" });
-**request:** `Square.Labor.DeleteTimecardRequest` +**request:** `DeleteTimecardRequest`
@@ -6590,7 +6710,7 @@ await client.Locations.ListAsync();
-
client.Locations.CreateAsync(Square.Locations.CreateLocationRequest { ... }) -> CreateLocationResponse +
client.Locations.CreateAsync(CreateLocationRequest { ... }) -> CreateLocationResponse
@@ -6654,7 +6774,7 @@ await client.Locations.CreateAsync(
-**request:** `Square.Locations.CreateLocationRequest` +**request:** `CreateLocationRequest`
@@ -6666,7 +6786,7 @@ await client.Locations.CreateAsync(
-
client.Locations.GetAsync(Square.Locations.GetLocationsRequest { ... }) -> GetLocationResponse +
client.Locations.GetAsync(GetLocationsRequest { ... }) -> GetLocationResponse
@@ -6709,7 +6829,7 @@ await client.Locations.GetAsync(new GetLocationsRequest { LocationId = "location
-**request:** `Square.Locations.GetLocationsRequest` +**request:** `GetLocationsRequest`
@@ -6721,7 +6841,7 @@ await client.Locations.GetAsync(new GetLocationsRequest { LocationId = "location
-
client.Locations.UpdateAsync(Square.Locations.UpdateLocationRequest { ... }) -> UpdateLocationResponse +
client.Locations.UpdateAsync(UpdateLocationRequest { ... }) -> UpdateLocationResponse
@@ -6796,7 +6916,7 @@ await client.Locations.UpdateAsync(
-**request:** `Square.Locations.UpdateLocationRequest` +**request:** `UpdateLocationRequest`
@@ -6808,7 +6928,7 @@ await client.Locations.UpdateAsync(
-
client.Locations.CheckoutsAsync(Square.Locations.CreateCheckoutRequest { ... }) -> CreateCheckoutResponse +
client.Locations.CheckoutsAsync(CreateCheckoutRequest { ... }) -> CreateCheckoutResponse
@@ -6951,7 +7071,7 @@ await client.Locations.CheckoutsAsync(
-**request:** `Square.Locations.CreateCheckoutRequest` +**request:** `CreateCheckoutRequest`
@@ -6964,7 +7084,7 @@ await client.Locations.CheckoutsAsync(
## Loyalty -
client.Loyalty.SearchEventsAsync(Square.Loyalty.SearchLoyaltyEventsRequest { ... }) -> SearchLoyaltyEventsResponse +
client.Loyalty.SearchEventsAsync(SearchLoyaltyEventsRequest { ... }) -> SearchLoyaltyEventsResponse
@@ -7028,7 +7148,7 @@ await client.Loyalty.SearchEventsAsync(
-**request:** `Square.Loyalty.SearchLoyaltyEventsRequest` +**request:** `SearchLoyaltyEventsRequest`
@@ -7041,7 +7161,7 @@ await client.Loyalty.SearchEventsAsync(
## Merchants -
client.Merchants.ListAsync(Square.Merchants.ListMerchantsRequest { ... }) -> Core.Pager +
client.Merchants.ListAsync(ListMerchantsRequest { ... }) -> Pager
@@ -7092,7 +7212,7 @@ await client.Merchants.ListAsync(new ListMerchantsRequest { Cursor = 1 });
-**request:** `Square.Merchants.ListMerchantsRequest` +**request:** `ListMerchantsRequest`
@@ -7104,7 +7224,7 @@ await client.Merchants.ListAsync(new ListMerchantsRequest { Cursor = 1 });
-
client.Merchants.GetAsync(Square.Merchants.GetMerchantsRequest { ... }) -> GetMerchantResponse +
client.Merchants.GetAsync(GetMerchantsRequest { ... }) -> GetMerchantResponse
@@ -7146,7 +7266,7 @@ await client.Merchants.GetAsync(new GetMerchantsRequest { MerchantId = "merchant
-**request:** `Square.Merchants.GetMerchantsRequest` +**request:** `GetMerchantsRequest`
@@ -7159,7 +7279,7 @@ await client.Merchants.GetAsync(new GetMerchantsRequest { MerchantId = "merchant
## Checkout -
client.Checkout.RetrieveLocationSettingsAsync(Square.Checkout.RetrieveLocationSettingsRequest { ... }) -> RetrieveLocationSettingsResponse +
client.Checkout.RetrieveLocationSettingsAsync(RetrieveLocationSettingsRequest { ... }) -> RetrieveLocationSettingsResponse
@@ -7203,7 +7323,7 @@ await client.Checkout.RetrieveLocationSettingsAsync(
-**request:** `Square.Checkout.RetrieveLocationSettingsRequest` +**request:** `RetrieveLocationSettingsRequest`
@@ -7215,7 +7335,7 @@ await client.Checkout.RetrieveLocationSettingsAsync(
-
client.Checkout.UpdateLocationSettingsAsync(Square.Checkout.UpdateLocationSettingsRequest { ... }) -> UpdateLocationSettingsResponse +
client.Checkout.UpdateLocationSettingsAsync(UpdateLocationSettingsRequest { ... }) -> UpdateLocationSettingsResponse
@@ -7263,7 +7383,7 @@ await client.Checkout.UpdateLocationSettingsAsync(
-**request:** `Square.Checkout.UpdateLocationSettingsRequest` +**request:** `UpdateLocationSettingsRequest`
@@ -7314,7 +7434,7 @@ await client.Checkout.RetrieveMerchantSettingsAsync();
-
client.Checkout.UpdateMerchantSettingsAsync(Square.Checkout.UpdateMerchantSettingsRequest { ... }) -> UpdateMerchantSettingsResponse +
client.Checkout.UpdateMerchantSettingsAsync(UpdateMerchantSettingsRequest { ... }) -> UpdateMerchantSettingsResponse
@@ -7358,7 +7478,7 @@ await client.Checkout.UpdateMerchantSettingsAsync(
-**request:** `Square.Checkout.UpdateMerchantSettingsRequest` +**request:** `UpdateMerchantSettingsRequest`
@@ -7496,7 +7616,7 @@ await client.Orders.CreateAsync(
-
client.Orders.BatchGetAsync(Square.Orders.BatchGetOrdersRequest { ... }) -> BatchGetOrdersResponse +
client.Orders.BatchGetAsync(BatchGetOrdersRequest { ... }) -> BatchGetOrdersResponse
@@ -7550,7 +7670,7 @@ await client.Orders.BatchGetAsync(
-**request:** `Square.Orders.BatchGetOrdersRequest` +**request:** `BatchGetOrdersRequest`
@@ -7562,7 +7682,7 @@ await client.Orders.BatchGetAsync(
-
client.Orders.CalculateAsync(Square.Orders.CalculateOrderRequest { ... }) -> CalculateOrderResponse +
client.Orders.CalculateAsync(CalculateOrderRequest { ... }) -> CalculateOrderResponse
@@ -7636,7 +7756,7 @@ await client.Orders.CalculateAsync(
-**request:** `Square.Orders.CalculateOrderRequest` +**request:** `CalculateOrderRequest`
@@ -7648,7 +7768,7 @@ await client.Orders.CalculateAsync(
-
client.Orders.CloneAsync(Square.Orders.CloneOrderRequest { ... }) -> CloneOrderResponse +
client.Orders.CloneAsync(CloneOrderRequest { ... }) -> CloneOrderResponse
@@ -7698,7 +7818,7 @@ await client.Orders.CloneAsync(
-**request:** `Square.Orders.CloneOrderRequest` +**request:** `CloneOrderRequest`
@@ -7710,7 +7830,7 @@ await client.Orders.CloneAsync(
-
client.Orders.SearchAsync(Square.Orders.SearchOrdersRequest { ... }) -> SearchOrdersResponse +
client.Orders.SearchAsync(SearchOrdersRequest { ... }) -> SearchOrdersResponse
@@ -7798,7 +7918,7 @@ await client.Orders.SearchAsync(
-**request:** `Square.Orders.SearchOrdersRequest` +**request:** `SearchOrdersRequest`
@@ -7810,7 +7930,7 @@ await client.Orders.SearchAsync(
-
client.Orders.GetAsync(Square.Orders.GetOrdersRequest { ... }) -> GetOrderResponse +
client.Orders.GetAsync(GetOrdersRequest { ... }) -> GetOrderResponse
@@ -7852,7 +7972,7 @@ await client.Orders.GetAsync(new GetOrdersRequest { OrderId = "order_id" });
-**request:** `Square.Orders.GetOrdersRequest` +**request:** `GetOrdersRequest`
@@ -7864,7 +7984,7 @@ await client.Orders.GetAsync(new GetOrdersRequest { OrderId = "order_id" });
-
client.Orders.UpdateAsync(Square.Orders.UpdateOrderRequest { ... }) -> UpdateOrderResponse +
client.Orders.UpdateAsync(UpdateOrderRequest { ... }) -> UpdateOrderResponse
@@ -7942,7 +8062,7 @@ await client.Orders.UpdateAsync(
-**request:** `Square.Orders.UpdateOrderRequest` +**request:** `UpdateOrderRequest`
@@ -7954,7 +8074,7 @@ await client.Orders.UpdateAsync(
-
client.Orders.PayAsync(Square.Orders.PayOrderRequest { ... }) -> PayOrderResponse +
client.Orders.PayAsync(PayOrderRequest { ... }) -> PayOrderResponse
@@ -8020,7 +8140,7 @@ await client.Orders.PayAsync(
-**request:** `Square.Orders.PayOrderRequest` +**request:** `PayOrderRequest`
@@ -8033,7 +8153,7 @@ await client.Orders.PayAsync(
## Payments -
client.Payments.ListAsync(Payments.ListPaymentsRequest { ... }) -> Core.Pager +
client.Payments.ListAsync(ListPaymentsRequest { ... }) -> Pager
@@ -8099,7 +8219,7 @@ await client.Payments.ListAsync(
-**request:** `Payments.ListPaymentsRequest` +**request:** `ListPaymentsRequest`
@@ -8111,7 +8231,7 @@ await client.Payments.ListAsync(
-
client.Payments.CreateAsync(Payments.CreatePaymentRequest { ... }) -> CreatePaymentResponse +
client.Payments.CreateAsync(CreatePaymentRequest { ... }) -> CreatePaymentResponse
@@ -8173,7 +8293,7 @@ await client.Payments.CreateAsync(
-**request:** `Payments.CreatePaymentRequest` +**request:** `CreatePaymentRequest`
@@ -8185,7 +8305,7 @@ await client.Payments.CreateAsync(
-
client.Payments.CancelByIdempotencyKeyAsync(Payments.CancelPaymentByIdempotencyKeyRequest { ... }) -> CancelPaymentByIdempotencyKeyResponse +
client.Payments.CancelByIdempotencyKeyAsync(CancelPaymentByIdempotencyKeyRequest { ... }) -> CancelPaymentByIdempotencyKeyResponse
@@ -8242,7 +8362,7 @@ await client.Payments.CancelByIdempotencyKeyAsync(
-**request:** `Payments.CancelPaymentByIdempotencyKeyRequest` +**request:** `CancelPaymentByIdempotencyKeyRequest`
@@ -8254,7 +8374,7 @@ await client.Payments.CancelByIdempotencyKeyAsync(
-
client.Payments.GetAsync(Payments.GetPaymentsRequest { ... }) -> GetPaymentResponse +
client.Payments.GetAsync(GetPaymentsRequest { ... }) -> GetPaymentResponse
@@ -8296,7 +8416,7 @@ await client.Payments.GetAsync(new GetPaymentsRequest { PaymentId = "payment_id"
-**request:** `Payments.GetPaymentsRequest` +**request:** `GetPaymentsRequest`
@@ -8308,7 +8428,7 @@ await client.Payments.GetAsync(new GetPaymentsRequest { PaymentId = "payment_id"
-
client.Payments.UpdateAsync(Payments.UpdatePaymentRequest { ... }) -> UpdatePaymentResponse +
client.Payments.UpdateAsync(UpdatePaymentRequest { ... }) -> UpdatePaymentResponse
@@ -8363,7 +8483,7 @@ await client.Payments.UpdateAsync(
-**request:** `Payments.UpdatePaymentRequest` +**request:** `UpdatePaymentRequest`
@@ -8375,7 +8495,7 @@ await client.Payments.UpdateAsync(
-
client.Payments.CancelAsync(Payments.CancelPaymentsRequest { ... }) -> CancelPaymentResponse +
client.Payments.CancelAsync(CancelPaymentsRequest { ... }) -> CancelPaymentResponse
@@ -8418,7 +8538,7 @@ await client.Payments.CancelAsync(new CancelPaymentsRequest { PaymentId = "payme
-**request:** `Payments.CancelPaymentsRequest` +**request:** `CancelPaymentsRequest`
@@ -8430,7 +8550,7 @@ await client.Payments.CancelAsync(new CancelPaymentsRequest { PaymentId = "payme
-
client.Payments.CompleteAsync(Payments.CompletePaymentRequest { ... }) -> CompletePaymentResponse +
client.Payments.CompleteAsync(CompletePaymentRequest { ... }) -> CompletePaymentResponse
@@ -8475,7 +8595,7 @@ await client.Payments.CompleteAsync(new CompletePaymentRequest { PaymentId = "pa
-**request:** `Payments.CompletePaymentRequest` +**request:** `CompletePaymentRequest`
@@ -8488,7 +8608,7 @@ await client.Payments.CompleteAsync(new CompletePaymentRequest { PaymentId = "pa
## Payouts -
client.Payouts.ListAsync(Payouts.ListPayoutsRequest { ... }) -> Core.Pager +
client.Payouts.ListAsync(ListPayoutsRequest { ... }) -> Pager
@@ -8543,7 +8663,7 @@ await client.Payouts.ListAsync(
-**request:** `Payouts.ListPayoutsRequest` +**request:** `ListPayoutsRequest`
@@ -8555,7 +8675,7 @@ await client.Payouts.ListAsync(
-
client.Payouts.GetAsync(Payouts.GetPayoutsRequest { ... }) -> GetPayoutResponse +
client.Payouts.GetAsync(GetPayoutsRequest { ... }) -> GetPayoutResponse
@@ -8598,7 +8718,7 @@ await client.Payouts.GetAsync(new GetPayoutsRequest { PayoutId = "payout_id" });
-**request:** `Payouts.GetPayoutsRequest` +**request:** `GetPayoutsRequest`
@@ -8610,7 +8730,7 @@ await client.Payouts.GetAsync(new GetPayoutsRequest { PayoutId = "payout_id" });
-
client.Payouts.ListEntriesAsync(Payouts.ListEntriesPayoutsRequest { ... }) -> Core.Pager +
client.Payouts.ListEntriesAsync(ListEntriesPayoutsRequest { ... }) -> Pager
@@ -8661,7 +8781,7 @@ await client.Payouts.ListEntriesAsync(
-**request:** `Payouts.ListEntriesPayoutsRequest` +**request:** `ListEntriesPayoutsRequest`
@@ -8674,7 +8794,7 @@ await client.Payouts.ListEntriesAsync(
## Refunds -
client.Refunds.ListAsync(Refunds.ListRefundsRequest { ... }) -> Core.Pager +
client.Refunds.ListAsync(ListRefundsRequest { ... }) -> Pager
@@ -8736,7 +8856,7 @@ await client.Refunds.ListAsync(
-**request:** `Refunds.ListRefundsRequest` +**request:** `ListRefundsRequest`
@@ -8748,7 +8868,7 @@ await client.Refunds.ListAsync(
-
client.Refunds.RefundPaymentAsync(Refunds.RefundPaymentRequest { ... }) -> RefundPaymentResponse +
client.Refunds.RefundPaymentAsync(RefundPaymentRequest { ... }) -> RefundPaymentResponse
@@ -8802,7 +8922,7 @@ await client.Refunds.RefundPaymentAsync(
-**request:** `Refunds.RefundPaymentRequest` +**request:** `RefundPaymentRequest`
@@ -8814,7 +8934,7 @@ await client.Refunds.RefundPaymentAsync(
-
client.Refunds.GetAsync(Refunds.GetRefundsRequest { ... }) -> GetPaymentRefundResponse +
client.Refunds.GetAsync(GetRefundsRequest { ... }) -> GetPaymentRefundResponse
@@ -8856,7 +8976,7 @@ await client.Refunds.GetAsync(new Square.Refunds.GetRefundsRequest { RefundId =
-**request:** `Refunds.GetRefundsRequest` +**request:** `GetRefundsRequest`
@@ -8912,7 +9032,7 @@ await client.Sites.ListAsync();
## Snippets -
client.Snippets.GetAsync(Snippets.GetSnippetsRequest { ... }) -> GetSnippetResponse +
client.Snippets.GetAsync(GetSnippetsRequest { ... }) -> GetSnippetResponse
@@ -8959,7 +9079,7 @@ await client.Snippets.GetAsync(new GetSnippetsRequest { SiteId = "site_id" });
-**request:** `Snippets.GetSnippetsRequest` +**request:** `GetSnippetsRequest`
@@ -8971,7 +9091,7 @@ await client.Snippets.GetAsync(new GetSnippetsRequest { SiteId = "site_id" });
-
client.Snippets.UpsertAsync(Snippets.UpsertSnippetRequest { ... }) -> UpsertSnippetResponse +
client.Snippets.UpsertAsync(UpsertSnippetRequest { ... }) -> UpsertSnippetResponse
@@ -9025,7 +9145,7 @@ await client.Snippets.UpsertAsync(
-**request:** `Snippets.UpsertSnippetRequest` +**request:** `UpsertSnippetRequest`
@@ -9037,7 +9157,7 @@ await client.Snippets.UpsertAsync(
-
client.Snippets.DeleteAsync(Snippets.DeleteSnippetsRequest { ... }) -> DeleteSnippetResponse +
client.Snippets.DeleteAsync(DeleteSnippetsRequest { ... }) -> DeleteSnippetResponse
@@ -9084,7 +9204,7 @@ await client.Snippets.DeleteAsync(new DeleteSnippetsRequest { SiteId = "site_id"
-**request:** `Snippets.DeleteSnippetsRequest` +**request:** `DeleteSnippetsRequest`
@@ -9097,7 +9217,7 @@ await client.Snippets.DeleteAsync(new DeleteSnippetsRequest { SiteId = "site_id"
## Subscriptions -
client.Subscriptions.CreateAsync(Subscriptions.CreateSubscriptionRequest { ... }) -> CreateSubscriptionResponse +
client.Subscriptions.CreateAsync(CreateSubscriptionRequest { ... }) -> CreateSubscriptionResponse
@@ -9162,7 +9282,7 @@ await client.Subscriptions.CreateAsync(
-**request:** `Subscriptions.CreateSubscriptionRequest` +**request:** `CreateSubscriptionRequest`
@@ -9174,7 +9294,7 @@ await client.Subscriptions.CreateAsync(
-
client.Subscriptions.BulkSwapPlanAsync(Subscriptions.BulkSwapPlanRequest { ... }) -> BulkSwapPlanResponse +
client.Subscriptions.BulkSwapPlanAsync(BulkSwapPlanRequest { ... }) -> BulkSwapPlanResponse
@@ -9224,7 +9344,7 @@ await client.Subscriptions.BulkSwapPlanAsync(
-**request:** `Subscriptions.BulkSwapPlanRequest` +**request:** `BulkSwapPlanRequest`
@@ -9236,7 +9356,7 @@ await client.Subscriptions.BulkSwapPlanAsync(
-
client.Subscriptions.SearchAsync(Subscriptions.SearchSubscriptionsRequest { ... }) -> SearchSubscriptionsResponse +
client.Subscriptions.SearchAsync(SearchSubscriptionsRequest { ... }) -> SearchSubscriptionsResponse
@@ -9304,7 +9424,7 @@ await client.Subscriptions.SearchAsync(
-**request:** `Subscriptions.SearchSubscriptionsRequest` +**request:** `SearchSubscriptionsRequest`
@@ -9316,7 +9436,7 @@ await client.Subscriptions.SearchAsync(
-
client.Subscriptions.GetAsync(Subscriptions.GetSubscriptionsRequest { ... }) -> GetSubscriptionResponse +
client.Subscriptions.GetAsync(GetSubscriptionsRequest { ... }) -> GetSubscriptionResponse
@@ -9364,7 +9484,7 @@ await client.Subscriptions.GetAsync(
-**request:** `Subscriptions.GetSubscriptionsRequest` +**request:** `GetSubscriptionsRequest`
@@ -9376,7 +9496,7 @@ await client.Subscriptions.GetAsync(
-
client.Subscriptions.UpdateAsync(Subscriptions.UpdateSubscriptionRequest { ... }) -> UpdateSubscriptionResponse +
client.Subscriptions.UpdateAsync(UpdateSubscriptionRequest { ... }) -> UpdateSubscriptionResponse
@@ -9425,7 +9545,7 @@ await client.Subscriptions.UpdateAsync(
-**request:** `Subscriptions.UpdateSubscriptionRequest` +**request:** `UpdateSubscriptionRequest`
@@ -9437,7 +9557,7 @@ await client.Subscriptions.UpdateAsync(
-
client.Subscriptions.DeleteActionAsync(Subscriptions.DeleteActionSubscriptionsRequest { ... }) -> DeleteSubscriptionActionResponse +
client.Subscriptions.DeleteActionAsync(DeleteActionSubscriptionsRequest { ... }) -> DeleteSubscriptionActionResponse
@@ -9485,7 +9605,7 @@ await client.Subscriptions.DeleteActionAsync(
-**request:** `Subscriptions.DeleteActionSubscriptionsRequest` +**request:** `DeleteActionSubscriptionsRequest`
@@ -9497,7 +9617,7 @@ await client.Subscriptions.DeleteActionAsync(
-
client.Subscriptions.ChangeBillingAnchorDateAsync(Subscriptions.ChangeBillingAnchorDateRequest { ... }) -> ChangeBillingAnchorDateResponse +
client.Subscriptions.ChangeBillingAnchorDateAsync(ChangeBillingAnchorDateRequest { ... }) -> ChangeBillingAnchorDateResponse
@@ -9546,7 +9666,7 @@ await client.Subscriptions.ChangeBillingAnchorDateAsync(
-**request:** `Subscriptions.ChangeBillingAnchorDateRequest` +**request:** `ChangeBillingAnchorDateRequest`
@@ -9558,7 +9678,7 @@ await client.Subscriptions.ChangeBillingAnchorDateAsync(
-
client.Subscriptions.CancelAsync(Subscriptions.CancelSubscriptionsRequest { ... }) -> CancelSubscriptionResponse +
client.Subscriptions.CancelAsync(CancelSubscriptionsRequest { ... }) -> CancelSubscriptionResponse
@@ -9604,7 +9724,7 @@ await client.Subscriptions.CancelAsync(
-**request:** `Subscriptions.CancelSubscriptionsRequest` +**request:** `CancelSubscriptionsRequest`
@@ -9616,7 +9736,7 @@ await client.Subscriptions.CancelAsync(
-
client.Subscriptions.ListEventsAsync(Subscriptions.ListEventsSubscriptionsRequest { ... }) -> Core.Pager +
client.Subscriptions.ListEventsAsync(ListEventsSubscriptionsRequest { ... }) -> Pager
@@ -9665,7 +9785,7 @@ await client.Subscriptions.ListEventsAsync(
-**request:** `Subscriptions.ListEventsSubscriptionsRequest` +**request:** `ListEventsSubscriptionsRequest`
@@ -9677,7 +9797,7 @@ await client.Subscriptions.ListEventsAsync(
-
client.Subscriptions.PauseAsync(Subscriptions.PauseSubscriptionRequest { ... }) -> PauseSubscriptionResponse +
client.Subscriptions.PauseAsync(PauseSubscriptionRequest { ... }) -> PauseSubscriptionResponse
@@ -9721,7 +9841,7 @@ await client.Subscriptions.PauseAsync(
-**request:** `Subscriptions.PauseSubscriptionRequest` +**request:** `PauseSubscriptionRequest`
@@ -9733,7 +9853,7 @@ await client.Subscriptions.PauseAsync(
-
client.Subscriptions.ResumeAsync(Subscriptions.ResumeSubscriptionRequest { ... }) -> ResumeSubscriptionResponse +
client.Subscriptions.ResumeAsync(ResumeSubscriptionRequest { ... }) -> ResumeSubscriptionResponse
@@ -9777,7 +9897,7 @@ await client.Subscriptions.ResumeAsync(
-**request:** `Subscriptions.ResumeSubscriptionRequest` +**request:** `ResumeSubscriptionRequest`
@@ -9789,7 +9909,7 @@ await client.Subscriptions.ResumeAsync(
-
client.Subscriptions.SwapPlanAsync(Subscriptions.SwapPlanRequest { ... }) -> SwapPlanResponse +
client.Subscriptions.SwapPlanAsync(SwapPlanRequest { ... }) -> SwapPlanResponse
@@ -9842,7 +9962,7 @@ await client.Subscriptions.SwapPlanAsync(
-**request:** `Subscriptions.SwapPlanRequest` +**request:** `SwapPlanRequest`
@@ -9953,7 +10073,7 @@ await client.TeamMembers.CreateAsync(
-
client.TeamMembers.BatchCreateAsync(Square.TeamMembers.BatchCreateTeamMembersRequest { ... }) -> BatchCreateTeamMembersResponse +
client.TeamMembers.BatchCreateAsync(BatchCreateTeamMembersRequest { ... }) -> BatchCreateTeamMembersResponse
@@ -10046,7 +10166,7 @@ await client.TeamMembers.BatchCreateAsync(
-**request:** `Square.TeamMembers.BatchCreateTeamMembersRequest` +**request:** `BatchCreateTeamMembersRequest`
@@ -10058,7 +10178,7 @@ await client.TeamMembers.BatchCreateAsync(
-
client.TeamMembers.BatchUpdateAsync(Square.TeamMembers.BatchUpdateTeamMembersRequest { ... }) -> BatchUpdateTeamMembersResponse +
client.TeamMembers.BatchUpdateAsync(BatchUpdateTeamMembersRequest { ... }) -> BatchUpdateTeamMembersResponse
@@ -10154,7 +10274,7 @@ await client.TeamMembers.BatchUpdateAsync(
-**request:** `Square.TeamMembers.BatchUpdateTeamMembersRequest` +**request:** `BatchUpdateTeamMembersRequest`
@@ -10166,7 +10286,7 @@ await client.TeamMembers.BatchUpdateAsync(
-
client.TeamMembers.SearchAsync(Square.TeamMembers.SearchTeamMembersRequest { ... }) -> SearchTeamMembersResponse +
client.TeamMembers.SearchAsync(SearchTeamMembersRequest { ... }) -> SearchTeamMembersResponse
@@ -10223,7 +10343,7 @@ await client.TeamMembers.SearchAsync(
-**request:** `Square.TeamMembers.SearchTeamMembersRequest` +**request:** `SearchTeamMembersRequest`
@@ -10235,7 +10355,7 @@ await client.TeamMembers.SearchAsync(
-
client.TeamMembers.GetAsync(Square.TeamMembers.GetTeamMembersRequest { ... }) -> GetTeamMemberResponse +
client.TeamMembers.GetAsync(GetTeamMembersRequest { ... }) -> GetTeamMemberResponse
@@ -10278,7 +10398,7 @@ await client.TeamMembers.GetAsync(new GetTeamMembersRequest { TeamMemberId = "te
-**request:** `Square.TeamMembers.GetTeamMembersRequest` +**request:** `GetTeamMembersRequest`
@@ -10290,7 +10410,7 @@ await client.TeamMembers.GetAsync(new GetTeamMembersRequest { TeamMemberId = "te
-
client.TeamMembers.UpdateAsync(Square.TeamMembers.UpdateTeamMembersRequest { ... }) -> UpdateTeamMemberResponse +
client.TeamMembers.UpdateAsync(UpdateTeamMembersRequest { ... }) -> UpdateTeamMemberResponse
@@ -10375,7 +10495,7 @@ await client.TeamMembers.UpdateAsync(
-**request:** `Square.TeamMembers.UpdateTeamMembersRequest` +**request:** `UpdateTeamMembersRequest`
@@ -10388,7 +10508,7 @@ await client.TeamMembers.UpdateAsync(
## Team -
client.Team.ListJobsAsync(Team.ListJobsRequest { ... }) -> ListJobsResponse +
client.Team.ListJobsAsync(ListJobsRequest { ... }) -> ListJobsResponse
@@ -10430,7 +10550,7 @@ await client.Team.ListJobsAsync(new ListJobsRequest { Cursor = "cursor" });
-**request:** `Team.ListJobsRequest` +**request:** `ListJobsRequest`
@@ -10442,7 +10562,7 @@ await client.Team.ListJobsAsync(new ListJobsRequest { Cursor = "cursor" });
-
client.Team.CreateJobAsync(Team.CreateJobRequest { ... }) -> CreateJobResponse +
client.Team.CreateJobAsync(CreateJobRequest { ... }) -> CreateJobResponse
@@ -10491,7 +10611,7 @@ await client.Team.CreateJobAsync(
-**request:** `Team.CreateJobRequest` +**request:** `CreateJobRequest`
@@ -10503,7 +10623,7 @@ await client.Team.CreateJobAsync(
-
client.Team.RetrieveJobAsync(Team.RetrieveJobRequest { ... }) -> RetrieveJobResponse +
client.Team.RetrieveJobAsync(RetrieveJobRequest { ... }) -> RetrieveJobResponse
@@ -10545,7 +10665,7 @@ await client.Team.RetrieveJobAsync(new RetrieveJobRequest { JobId = "job_id" });
-**request:** `Team.RetrieveJobRequest` +**request:** `RetrieveJobRequest`
@@ -10557,7 +10677,7 @@ await client.Team.RetrieveJobAsync(new RetrieveJobRequest { JobId = "job_id" });
-
client.Team.UpdateJobAsync(Team.UpdateJobRequest { ... }) -> UpdateJobResponse +
client.Team.UpdateJobAsync(UpdateJobRequest { ... }) -> UpdateJobResponse
@@ -10607,7 +10727,7 @@ await client.Team.UpdateJobAsync(
-**request:** `Team.UpdateJobRequest` +**request:** `UpdateJobRequest`
@@ -10620,7 +10740,7 @@ await client.Team.UpdateJobAsync(
## Terminal -
client.Terminal.DismissTerminalActionAsync(Square.Terminal.DismissTerminalActionRequest { ... }) -> DismissTerminalActionResponse +
client.Terminal.DismissTerminalActionAsync(DismissTerminalActionRequest { ... }) -> DismissTerminalActionResponse
@@ -10666,7 +10786,7 @@ await client.Terminal.DismissTerminalActionAsync(
-**request:** `Square.Terminal.DismissTerminalActionRequest` +**request:** `DismissTerminalActionRequest`
@@ -10678,7 +10798,7 @@ await client.Terminal.DismissTerminalActionAsync(
-
client.Terminal.DismissTerminalCheckoutAsync(Square.Terminal.DismissTerminalCheckoutRequest { ... }) -> DismissTerminalCheckoutResponse +
client.Terminal.DismissTerminalCheckoutAsync(DismissTerminalCheckoutRequest { ... }) -> DismissTerminalCheckoutResponse
@@ -10722,7 +10842,7 @@ await client.Terminal.DismissTerminalCheckoutAsync(
-**request:** `Square.Terminal.DismissTerminalCheckoutRequest` +**request:** `DismissTerminalCheckoutRequest`
@@ -10734,7 +10854,7 @@ await client.Terminal.DismissTerminalCheckoutAsync(
-
client.Terminal.DismissTerminalRefundAsync(Square.Terminal.DismissTerminalRefundRequest { ... }) -> DismissTerminalRefundResponse +
client.Terminal.DismissTerminalRefundAsync(DismissTerminalRefundRequest { ... }) -> DismissTerminalRefundResponse
@@ -10778,7 +10898,7 @@ await client.Terminal.DismissTerminalRefundAsync(
-**request:** `Square.Terminal.DismissTerminalRefundRequest` +**request:** `DismissTerminalRefundRequest`
@@ -10791,7 +10911,7 @@ await client.Terminal.DismissTerminalRefundAsync(
## TransferOrders -
client.TransferOrders.CreateAsync(TransferOrders.CreateTransferOrderRequest { ... }) -> CreateTransferOrderResponse +
client.TransferOrders.CreateAsync(CreateTransferOrderRequest { ... }) -> CreateTransferOrderResponse
@@ -10879,7 +10999,7 @@ await client.TransferOrders.CreateAsync(
-**request:** `TransferOrders.CreateTransferOrderRequest` +**request:** `CreateTransferOrderRequest`
@@ -10891,7 +11011,7 @@ await client.TransferOrders.CreateAsync(
-
client.TransferOrders.SearchAsync(TransferOrders.SearchTransferOrdersRequest { ... }) -> Core.Pager +
client.TransferOrders.SearchAsync(SearchTransferOrdersRequest { ... }) -> Pager
@@ -10963,7 +11083,7 @@ await client.TransferOrders.SearchAsync(
-**request:** `TransferOrders.SearchTransferOrdersRequest` +**request:** `SearchTransferOrdersRequest`
@@ -10975,7 +11095,7 @@ await client.TransferOrders.SearchAsync(
-
client.TransferOrders.GetAsync(TransferOrders.GetTransferOrdersRequest { ... }) -> RetrieveTransferOrderResponse +
client.TransferOrders.GetAsync(GetTransferOrdersRequest { ... }) -> RetrieveTransferOrderResponse
@@ -11025,7 +11145,7 @@ await client.TransferOrders.GetAsync(
-**request:** `TransferOrders.GetTransferOrdersRequest` +**request:** `GetTransferOrdersRequest`
@@ -11037,7 +11157,7 @@ await client.TransferOrders.GetAsync(
-
client.TransferOrders.UpdateAsync(TransferOrders.UpdateTransferOrderRequest { ... }) -> UpdateTransferOrderResponse +
client.TransferOrders.UpdateAsync(UpdateTransferOrderRequest { ... }) -> UpdateTransferOrderResponse
@@ -11107,7 +11227,7 @@ await client.TransferOrders.UpdateAsync(
-**request:** `TransferOrders.UpdateTransferOrderRequest` +**request:** `UpdateTransferOrderRequest`
@@ -11119,7 +11239,7 @@ await client.TransferOrders.UpdateAsync(
-
client.TransferOrders.DeleteAsync(TransferOrders.DeleteTransferOrdersRequest { ... }) -> DeleteTransferOrderResponse +
client.TransferOrders.DeleteAsync(DeleteTransferOrdersRequest { ... }) -> DeleteTransferOrderResponse
@@ -11167,7 +11287,7 @@ await client.TransferOrders.DeleteAsync(
-**request:** `TransferOrders.DeleteTransferOrdersRequest` +**request:** `DeleteTransferOrdersRequest`
@@ -11179,7 +11299,7 @@ await client.TransferOrders.DeleteAsync(
-
client.TransferOrders.CancelAsync(TransferOrders.CancelTransferOrderRequest { ... }) -> CancelTransferOrderResponse +
client.TransferOrders.CancelAsync(CancelTransferOrderRequest { ... }) -> CancelTransferOrderResponse
@@ -11237,7 +11357,7 @@ await client.TransferOrders.CancelAsync(
-**request:** `TransferOrders.CancelTransferOrderRequest` +**request:** `CancelTransferOrderRequest`
@@ -11249,7 +11369,7 @@ await client.TransferOrders.CancelAsync(
-
client.TransferOrders.ReceiveAsync(TransferOrders.ReceiveTransferOrderRequest { ... }) -> ReceiveTransferOrderResponse +
client.TransferOrders.ReceiveAsync(ReceiveTransferOrderRequest { ... }) -> ReceiveTransferOrderResponse
@@ -11332,7 +11452,7 @@ await client.TransferOrders.ReceiveAsync(
-**request:** `TransferOrders.ReceiveTransferOrderRequest` +**request:** `ReceiveTransferOrderRequest`
@@ -11344,7 +11464,7 @@ await client.TransferOrders.ReceiveAsync(
-
client.TransferOrders.StartAsync(TransferOrders.StartTransferOrderRequest { ... }) -> StartTransferOrderResponse +
client.TransferOrders.StartAsync(StartTransferOrderRequest { ... }) -> StartTransferOrderResponse
@@ -11400,7 +11520,7 @@ await client.TransferOrders.StartAsync(
-**request:** `TransferOrders.StartTransferOrderRequest` +**request:** `StartTransferOrderRequest`
@@ -11413,7 +11533,7 @@ await client.TransferOrders.StartAsync(
## Vendors -
client.Vendors.BatchCreateAsync(Vendors.BatchCreateVendorsRequest { ... }) -> BatchCreateVendorsResponse +
client.Vendors.BatchCreateAsync(BatchCreateVendorsRequest { ... }) -> BatchCreateVendorsResponse
@@ -11490,7 +11610,7 @@ await client.Vendors.BatchCreateAsync(
-**request:** `Vendors.BatchCreateVendorsRequest` +**request:** `BatchCreateVendorsRequest`
@@ -11502,7 +11622,7 @@ await client.Vendors.BatchCreateAsync(
-
client.Vendors.BatchGetAsync(Vendors.BatchGetVendorsRequest { ... }) -> BatchGetVendorsResponse +
client.Vendors.BatchGetAsync(BatchGetVendorsRequest { ... }) -> BatchGetVendorsResponse
@@ -11549,7 +11669,7 @@ await client.Vendors.BatchGetAsync(
-**request:** `Vendors.BatchGetVendorsRequest` +**request:** `BatchGetVendorsRequest`
@@ -11561,7 +11681,7 @@ await client.Vendors.BatchGetAsync(
-
client.Vendors.BatchUpdateAsync(Vendors.BatchUpdateVendorsRequest { ... }) -> BatchUpdateVendorsResponse +
client.Vendors.BatchUpdateAsync(BatchUpdateVendorsRequest { ... }) -> BatchUpdateVendorsResponse
@@ -11618,7 +11738,7 @@ await client.Vendors.BatchUpdateAsync(
-**request:** `Vendors.BatchUpdateVendorsRequest` +**request:** `BatchUpdateVendorsRequest`
@@ -11630,7 +11750,7 @@ await client.Vendors.BatchUpdateAsync(
-
client.Vendors.CreateAsync(Vendors.CreateVendorRequest { ... }) -> CreateVendorResponse +
client.Vendors.CreateAsync(CreateVendorRequest { ... }) -> CreateVendorResponse
@@ -11702,7 +11822,7 @@ await client.Vendors.CreateAsync(
-**request:** `Vendors.CreateVendorRequest` +**request:** `CreateVendorRequest`
@@ -11714,7 +11834,7 @@ await client.Vendors.CreateAsync(
-
client.Vendors.SearchAsync(Vendors.SearchVendorsRequest { ... }) -> SearchVendorsResponse +
client.Vendors.SearchAsync(SearchVendorsRequest { ... }) -> SearchVendorsResponse
@@ -11756,7 +11876,7 @@ await client.Vendors.SearchAsync(new SearchVendorsRequest());
-**request:** `Vendors.SearchVendorsRequest` +**request:** `SearchVendorsRequest`
@@ -11768,7 +11888,7 @@ await client.Vendors.SearchAsync(new SearchVendorsRequest());
-
client.Vendors.GetAsync(Vendors.GetVendorsRequest { ... }) -> GetVendorResponse +
client.Vendors.GetAsync(GetVendorsRequest { ... }) -> GetVendorResponse
@@ -11810,7 +11930,7 @@ await client.Vendors.GetAsync(new GetVendorsRequest { VendorId = "vendor_id" });
-**request:** `Vendors.GetVendorsRequest` +**request:** `GetVendorsRequest`
@@ -11822,7 +11942,7 @@ await client.Vendors.GetAsync(new GetVendorsRequest { VendorId = "vendor_id" });
-
client.Vendors.UpdateAsync(Vendors.UpdateVendorsRequest { ... }) -> UpdateVendorResponse +
client.Vendors.UpdateAsync(UpdateVendorsRequest { ... }) -> UpdateVendorResponse
@@ -11880,7 +12000,7 @@ await client.Vendors.UpdateAsync(
-**request:** `Vendors.UpdateVendorsRequest` +**request:** `UpdateVendorsRequest`
@@ -11893,7 +12013,7 @@ await client.Vendors.UpdateAsync(
## Bookings CustomAttributeDefinitions -
client.Bookings.CustomAttributeDefinitions.ListAsync(Square.Bookings.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest { ... }) -> Core.Pager +
client.Bookings.CustomAttributeDefinitions.ListAsync(ListCustomAttributeDefinitionsRequest { ... }) -> Pager
@@ -11944,7 +12064,7 @@ await client.Bookings.CustomAttributeDefinitions.ListAsync(
-**request:** `Square.Bookings.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest` +**request:** `ListCustomAttributeDefinitionsRequest`
@@ -11956,7 +12076,7 @@ await client.Bookings.CustomAttributeDefinitions.ListAsync(
-
client.Bookings.CustomAttributeDefinitions.CreateAsync(Square.Bookings.CustomAttributeDefinitions.CreateBookingCustomAttributeDefinitionRequest { ... }) -> CreateBookingCustomAttributeDefinitionResponse +
client.Bookings.CustomAttributeDefinitions.CreateAsync(CreateBookingCustomAttributeDefinitionRequest { ... }) -> CreateBookingCustomAttributeDefinitionResponse
@@ -12009,7 +12129,7 @@ await client.Bookings.CustomAttributeDefinitions.CreateAsync(
-**request:** `Square.Bookings.CustomAttributeDefinitions.CreateBookingCustomAttributeDefinitionRequest` +**request:** `CreateBookingCustomAttributeDefinitionRequest`
@@ -12021,7 +12141,7 @@ await client.Bookings.CustomAttributeDefinitions.CreateAsync(
-
client.Bookings.CustomAttributeDefinitions.GetAsync(Square.Bookings.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveBookingCustomAttributeDefinitionResponse +
client.Bookings.CustomAttributeDefinitions.GetAsync(GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveBookingCustomAttributeDefinitionResponse
@@ -12072,7 +12192,7 @@ await client.Bookings.CustomAttributeDefinitions.GetAsync(
-**request:** `Square.Bookings.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest` +**request:** `GetCustomAttributeDefinitionsRequest`
@@ -12084,7 +12204,7 @@ await client.Bookings.CustomAttributeDefinitions.GetAsync(
-
client.Bookings.CustomAttributeDefinitions.UpdateAsync(Square.Bookings.CustomAttributeDefinitions.UpdateBookingCustomAttributeDefinitionRequest { ... }) -> UpdateBookingCustomAttributeDefinitionResponse +
client.Bookings.CustomAttributeDefinitions.UpdateAsync(UpdateBookingCustomAttributeDefinitionRequest { ... }) -> UpdateBookingCustomAttributeDefinitionResponse
@@ -12138,7 +12258,7 @@ await client.Bookings.CustomAttributeDefinitions.UpdateAsync(
-**request:** `Square.Bookings.CustomAttributeDefinitions.UpdateBookingCustomAttributeDefinitionRequest` +**request:** `UpdateBookingCustomAttributeDefinitionRequest`
@@ -12150,7 +12270,7 @@ await client.Bookings.CustomAttributeDefinitions.UpdateAsync(
-
client.Bookings.CustomAttributeDefinitions.DeleteAsync(Square.Bookings.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteBookingCustomAttributeDefinitionResponse +
client.Bookings.CustomAttributeDefinitions.DeleteAsync(DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteBookingCustomAttributeDefinitionResponse
@@ -12203,7 +12323,7 @@ await client.Bookings.CustomAttributeDefinitions.DeleteAsync(
-**request:** `Square.Bookings.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest` +**request:** `DeleteCustomAttributeDefinitionsRequest`
@@ -12216,7 +12336,7 @@ await client.Bookings.CustomAttributeDefinitions.DeleteAsync(
## Bookings CustomAttributes -
client.Bookings.CustomAttributes.BatchDeleteAsync(Square.Bookings.CustomAttributes.BulkDeleteBookingCustomAttributesRequest { ... }) -> BulkDeleteBookingCustomAttributesResponse +
client.Bookings.CustomAttributes.BatchDeleteAsync(BulkDeleteBookingCustomAttributesRequest { ... }) -> BulkDeleteBookingCustomAttributesResponse
@@ -12275,7 +12395,7 @@ await client.Bookings.CustomAttributes.BatchDeleteAsync(
-**request:** `Square.Bookings.CustomAttributes.BulkDeleteBookingCustomAttributesRequest` +**request:** `BulkDeleteBookingCustomAttributesRequest`
@@ -12287,7 +12407,7 @@ await client.Bookings.CustomAttributes.BatchDeleteAsync(
-
client.Bookings.CustomAttributes.BatchUpsertAsync(Square.Bookings.CustomAttributes.BulkUpsertBookingCustomAttributesRequest { ... }) -> BulkUpsertBookingCustomAttributesResponse +
client.Bookings.CustomAttributes.BatchUpsertAsync(BulkUpsertBookingCustomAttributesRequest { ... }) -> BulkUpsertBookingCustomAttributesResponse
@@ -12350,7 +12470,7 @@ await client.Bookings.CustomAttributes.BatchUpsertAsync(
-**request:** `Square.Bookings.CustomAttributes.BulkUpsertBookingCustomAttributesRequest` +**request:** `BulkUpsertBookingCustomAttributesRequest`
@@ -12362,7 +12482,7 @@ await client.Bookings.CustomAttributes.BatchUpsertAsync(
-
client.Bookings.CustomAttributes.ListAsync(Square.Bookings.CustomAttributes.ListCustomAttributesRequest { ... }) -> Core.Pager +
client.Bookings.CustomAttributes.ListAsync(ListCustomAttributesRequest { ... }) -> Pager
@@ -12415,7 +12535,7 @@ await client.Bookings.CustomAttributes.ListAsync(
-**request:** `Square.Bookings.CustomAttributes.ListCustomAttributesRequest` +**request:** `ListCustomAttributesRequest`
@@ -12427,7 +12547,7 @@ await client.Bookings.CustomAttributes.ListAsync(
-
client.Bookings.CustomAttributes.GetAsync(Square.Bookings.CustomAttributes.GetCustomAttributesRequest { ... }) -> RetrieveBookingCustomAttributeResponse +
client.Bookings.CustomAttributes.GetAsync(GetCustomAttributesRequest { ... }) -> RetrieveBookingCustomAttributeResponse
@@ -12480,7 +12600,7 @@ await client.Bookings.CustomAttributes.GetAsync(
-**request:** `Square.Bookings.CustomAttributes.GetCustomAttributesRequest` +**request:** `GetCustomAttributesRequest`
@@ -12492,7 +12612,7 @@ await client.Bookings.CustomAttributes.GetAsync(
-
client.Bookings.CustomAttributes.UpsertAsync(Square.Bookings.CustomAttributes.UpsertBookingCustomAttributeRequest { ... }) -> UpsertBookingCustomAttributeResponse +
client.Bookings.CustomAttributes.UpsertAsync(UpsertBookingCustomAttributeRequest { ... }) -> UpsertBookingCustomAttributeResponse
@@ -12547,7 +12667,7 @@ await client.Bookings.CustomAttributes.UpsertAsync(
-**request:** `Square.Bookings.CustomAttributes.UpsertBookingCustomAttributeRequest` +**request:** `UpsertBookingCustomAttributeRequest`
@@ -12559,7 +12679,7 @@ await client.Bookings.CustomAttributes.UpsertAsync(
-
client.Bookings.CustomAttributes.DeleteAsync(Square.Bookings.CustomAttributes.DeleteCustomAttributesRequest { ... }) -> DeleteBookingCustomAttributeResponse +
client.Bookings.CustomAttributes.DeleteAsync(DeleteCustomAttributesRequest { ... }) -> DeleteBookingCustomAttributeResponse
@@ -12613,7 +12733,7 @@ await client.Bookings.CustomAttributes.DeleteAsync(
-**request:** `Square.Bookings.CustomAttributes.DeleteCustomAttributesRequest` +**request:** `DeleteCustomAttributesRequest`
@@ -12626,7 +12746,7 @@ await client.Bookings.CustomAttributes.DeleteAsync(
## Bookings LocationProfiles -
client.Bookings.LocationProfiles.ListAsync(Square.Bookings.LocationProfiles.ListLocationProfilesRequest { ... }) -> Core.Pager +
client.Bookings.LocationProfiles.ListAsync(ListLocationProfilesRequest { ... }) -> Pager
@@ -12670,7 +12790,7 @@ await client.Bookings.LocationProfiles.ListAsync(
-**request:** `Square.Bookings.LocationProfiles.ListLocationProfilesRequest` +**request:** `ListLocationProfilesRequest`
@@ -12683,7 +12803,7 @@ await client.Bookings.LocationProfiles.ListAsync(
## Bookings TeamMemberProfiles -
client.Bookings.TeamMemberProfiles.ListAsync(Square.Bookings.TeamMemberProfiles.ListTeamMemberProfilesRequest { ... }) -> Core.Pager +
client.Bookings.TeamMemberProfiles.ListAsync(ListTeamMemberProfilesRequest { ... }) -> Pager
@@ -12733,7 +12853,7 @@ await client.Bookings.TeamMemberProfiles.ListAsync(
-**request:** `Square.Bookings.TeamMemberProfiles.ListTeamMemberProfilesRequest` +**request:** `ListTeamMemberProfilesRequest`
@@ -12745,7 +12865,7 @@ await client.Bookings.TeamMemberProfiles.ListAsync(
-
client.Bookings.TeamMemberProfiles.GetAsync(Square.Bookings.TeamMemberProfiles.GetTeamMemberProfilesRequest { ... }) -> GetTeamMemberBookingProfileResponse +
client.Bookings.TeamMemberProfiles.GetAsync(GetTeamMemberProfilesRequest { ... }) -> GetTeamMemberBookingProfileResponse
@@ -12789,7 +12909,7 @@ await client.Bookings.TeamMemberProfiles.GetAsync(
-**request:** `Square.Bookings.TeamMemberProfiles.GetTeamMemberProfilesRequest` +**request:** `GetTeamMemberProfilesRequest`
@@ -12802,7 +12922,7 @@ await client.Bookings.TeamMemberProfiles.GetAsync(
## CashDrawers Shifts -
client.CashDrawers.Shifts.ListAsync(Square.CashDrawers.Shifts.ListShiftsRequest { ... }) -> Core.Pager +
client.CashDrawers.Shifts.ListAsync(ListShiftsRequest { ... }) -> Pager
@@ -12855,7 +12975,7 @@ await client.CashDrawers.Shifts.ListAsync(
-**request:** `Square.CashDrawers.Shifts.ListShiftsRequest` +**request:** `ListShiftsRequest`
@@ -12867,7 +12987,7 @@ await client.CashDrawers.Shifts.ListAsync(
-
client.CashDrawers.Shifts.GetAsync(Square.CashDrawers.Shifts.GetShiftsRequest { ... }) -> GetCashDrawerShiftResponse +
client.CashDrawers.Shifts.GetAsync(GetShiftsRequest { ... }) -> GetCashDrawerShiftResponse
@@ -12916,7 +13036,7 @@ await client.CashDrawers.Shifts.GetAsync(
-**request:** `Square.CashDrawers.Shifts.GetShiftsRequest` +**request:** `GetShiftsRequest`
@@ -12928,7 +13048,7 @@ await client.CashDrawers.Shifts.GetAsync(
-
client.CashDrawers.Shifts.ListEventsAsync(Square.CashDrawers.Shifts.ListEventsShiftsRequest { ... }) -> Core.Pager +
client.CashDrawers.Shifts.ListEventsAsync(ListEventsShiftsRequest { ... }) -> Pager
@@ -12978,7 +13098,7 @@ await client.CashDrawers.Shifts.ListEventsAsync(
-**request:** `Square.CashDrawers.Shifts.ListEventsShiftsRequest` +**request:** `ListEventsShiftsRequest`
@@ -12991,8 +13111,124 @@ await client.CashDrawers.Shifts.ListEventsAsync(
## Catalog Images +
client.Catalog.Images.CreateAsync(CreateImagesRequest { ... }) -> CreateCatalogImageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Uploads an image file to be represented by a [CatalogImage](entity:CatalogImage) object that can be linked to an existing +[CatalogObject](entity:CatalogObject) instance. The resulting `CatalogImage` is unattached to any `CatalogObject` if the `object_id` +is not specified. + +This `CreateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in +JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Catalog.Images.CreateAsync(new CreateImagesRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateImagesRequest` + +
+
+
+
+ + +
+
+
+ +
client.Catalog.Images.UpdateAsync(UpdateImagesRequest { ... }) -> UpdateCatalogImageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Uploads a new image file to replace the existing one in the specified [CatalogImage](entity:CatalogImage) object. + +This `UpdateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in +JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Catalog.Images.UpdateAsync(new UpdateImagesRequest { ImageId = "image_id" }); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `UpdateImagesRequest` + +
+
+
+
+ + +
+
+
+ ## Catalog Object -
client.Catalog.Object.UpsertAsync(Square.Catalog.Object.UpsertCatalogObjectRequest { ... }) -> UpsertCatalogObjectResponse +
client.Catalog.Object.UpsertAsync(UpsertCatalogObjectRequest { ... }) -> UpsertCatalogObjectResponse
@@ -13044,7 +13280,7 @@ await client.Catalog.Object.UpsertAsync(
-**request:** `Square.Catalog.Object.UpsertCatalogObjectRequest` +**request:** `UpsertCatalogObjectRequest`
@@ -13056,7 +13292,7 @@ await client.Catalog.Object.UpsertAsync(
-
client.Catalog.Object.GetAsync(Square.Catalog.Object.GetObjectRequest { ... }) -> GetCatalogObjectResponse +
client.Catalog.Object.GetAsync(GetObjectRequest { ... }) -> GetCatalogObjectResponse
@@ -13112,7 +13348,7 @@ await client.Catalog.Object.GetAsync(
-**request:** `Square.Catalog.Object.GetObjectRequest` +**request:** `GetObjectRequest`
@@ -13124,7 +13360,7 @@ await client.Catalog.Object.GetAsync(
-
client.Catalog.Object.DeleteAsync(Square.Catalog.Object.DeleteObjectRequest { ... }) -> DeleteCatalogObjectResponse +
client.Catalog.Object.DeleteAsync(DeleteObjectRequest { ... }) -> DeleteCatalogObjectResponse
@@ -13175,7 +13411,7 @@ await client.Catalog.Object.DeleteAsync(new DeleteObjectRequest { ObjectId = "ob
-**request:** `Square.Catalog.Object.DeleteObjectRequest` +**request:** `DeleteObjectRequest`
@@ -13188,7 +13424,7 @@ await client.Catalog.Object.DeleteAsync(new DeleteObjectRequest { ObjectId = "ob
## Checkout PaymentLinks -
client.Checkout.PaymentLinks.ListAsync(Square.Checkout.PaymentLinks.ListPaymentLinksRequest { ... }) -> Core.Pager +
client.Checkout.PaymentLinks.ListAsync(ListPaymentLinksRequest { ... }) -> Pager
@@ -13232,7 +13468,7 @@ await client.Checkout.PaymentLinks.ListAsync(
-**request:** `Square.Checkout.PaymentLinks.ListPaymentLinksRequest` +**request:** `ListPaymentLinksRequest`
@@ -13244,7 +13480,7 @@ await client.Checkout.PaymentLinks.ListAsync(
-
client.Checkout.PaymentLinks.CreateAsync(Square.Checkout.PaymentLinks.CreatePaymentLinkRequest { ... }) -> CreatePaymentLinkResponse +
client.Checkout.PaymentLinks.CreateAsync(CreatePaymentLinkRequest { ... }) -> CreatePaymentLinkResponse
@@ -13297,7 +13533,7 @@ await client.Checkout.PaymentLinks.CreateAsync(
-**request:** `Square.Checkout.PaymentLinks.CreatePaymentLinkRequest` +**request:** `CreatePaymentLinkRequest`
@@ -13309,7 +13545,7 @@ await client.Checkout.PaymentLinks.CreateAsync(
-
client.Checkout.PaymentLinks.GetAsync(Square.Checkout.PaymentLinks.GetPaymentLinksRequest { ... }) -> GetPaymentLinkResponse +
client.Checkout.PaymentLinks.GetAsync(GetPaymentLinksRequest { ... }) -> GetPaymentLinkResponse
@@ -13351,7 +13587,7 @@ await client.Checkout.PaymentLinks.GetAsync(new GetPaymentLinksRequest { Id = "i
-**request:** `Square.Checkout.PaymentLinks.GetPaymentLinksRequest` +**request:** `GetPaymentLinksRequest`
@@ -13363,7 +13599,7 @@ await client.Checkout.PaymentLinks.GetAsync(new GetPaymentLinksRequest { Id = "i
-
client.Checkout.PaymentLinks.UpdateAsync(Square.Checkout.PaymentLinks.UpdatePaymentLinkRequest { ... }) -> UpdatePaymentLinkResponse +
client.Checkout.PaymentLinks.UpdateAsync(UpdatePaymentLinkRequest { ... }) -> UpdatePaymentLinkResponse
@@ -13417,7 +13653,7 @@ await client.Checkout.PaymentLinks.UpdateAsync(
-**request:** `Square.Checkout.PaymentLinks.UpdatePaymentLinkRequest` +**request:** `UpdatePaymentLinkRequest`
@@ -13429,7 +13665,7 @@ await client.Checkout.PaymentLinks.UpdateAsync(
-
client.Checkout.PaymentLinks.DeleteAsync(Square.Checkout.PaymentLinks.DeletePaymentLinksRequest { ... }) -> DeletePaymentLinkResponse +
client.Checkout.PaymentLinks.DeleteAsync(DeletePaymentLinksRequest { ... }) -> DeletePaymentLinkResponse
@@ -13471,7 +13707,7 @@ await client.Checkout.PaymentLinks.DeleteAsync(new DeletePaymentLinksRequest { I
-**request:** `Square.Checkout.PaymentLinks.DeletePaymentLinksRequest` +**request:** `DeletePaymentLinksRequest`
@@ -13484,7 +13720,7 @@ await client.Checkout.PaymentLinks.DeleteAsync(new DeletePaymentLinksRequest { I
## Customers CustomAttributeDefinitions -
client.Customers.CustomAttributeDefinitions.ListAsync(Square.Customers.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest { ... }) -> Core.Pager +
client.Customers.CustomAttributeDefinitions.ListAsync(ListCustomAttributeDefinitionsRequest { ... }) -> Pager
@@ -13537,7 +13773,7 @@ await client.Customers.CustomAttributeDefinitions.ListAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest` +**request:** `ListCustomAttributeDefinitionsRequest`
@@ -13549,7 +13785,7 @@ await client.Customers.CustomAttributeDefinitions.ListAsync(
-
client.Customers.CustomAttributeDefinitions.CreateAsync(Square.Customers.CustomAttributeDefinitions.CreateCustomerCustomAttributeDefinitionRequest { ... }) -> CreateCustomerCustomAttributeDefinitionResponse +
client.Customers.CustomAttributeDefinitions.CreateAsync(CreateCustomerCustomAttributeDefinitionRequest { ... }) -> CreateCustomerCustomAttributeDefinitionResponse
@@ -13619,7 +13855,7 @@ await client.Customers.CustomAttributeDefinitions.CreateAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.CreateCustomerCustomAttributeDefinitionRequest` +**request:** `CreateCustomerCustomAttributeDefinitionRequest`
@@ -13631,7 +13867,7 @@ await client.Customers.CustomAttributeDefinitions.CreateAsync(
-
client.Customers.CustomAttributeDefinitions.GetAsync(Square.Customers.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest { ... }) -> GetCustomerCustomAttributeDefinitionResponse +
client.Customers.CustomAttributeDefinitions.GetAsync(GetCustomAttributeDefinitionsRequest { ... }) -> GetCustomerCustomAttributeDefinitionResponse
@@ -13683,7 +13919,7 @@ await client.Customers.CustomAttributeDefinitions.GetAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest` +**request:** `GetCustomAttributeDefinitionsRequest`
@@ -13695,7 +13931,7 @@ await client.Customers.CustomAttributeDefinitions.GetAsync(
-
client.Customers.CustomAttributeDefinitions.UpdateAsync(Square.Customers.CustomAttributeDefinitions.UpdateCustomerCustomAttributeDefinitionRequest { ... }) -> UpdateCustomerCustomAttributeDefinitionResponse +
client.Customers.CustomAttributeDefinitions.UpdateAsync(UpdateCustomerCustomAttributeDefinitionRequest { ... }) -> UpdateCustomerCustomAttributeDefinitionResponse
@@ -13753,7 +13989,7 @@ await client.Customers.CustomAttributeDefinitions.UpdateAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.UpdateCustomerCustomAttributeDefinitionRequest` +**request:** `UpdateCustomerCustomAttributeDefinitionRequest`
@@ -13765,7 +14001,7 @@ await client.Customers.CustomAttributeDefinitions.UpdateAsync(
-
client.Customers.CustomAttributeDefinitions.DeleteAsync(Square.Customers.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteCustomerCustomAttributeDefinitionResponse +
client.Customers.CustomAttributeDefinitions.DeleteAsync(DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteCustomerCustomAttributeDefinitionResponse
@@ -13817,7 +14053,7 @@ await client.Customers.CustomAttributeDefinitions.DeleteAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest` +**request:** `DeleteCustomAttributeDefinitionsRequest`
@@ -13829,7 +14065,7 @@ await client.Customers.CustomAttributeDefinitions.DeleteAsync(
-
client.Customers.CustomAttributeDefinitions.BatchUpsertAsync(Square.Customers.CustomAttributeDefinitions.BatchUpsertCustomerCustomAttributesRequest { ... }) -> BatchUpsertCustomerCustomAttributesResponse +
client.Customers.CustomAttributeDefinitions.BatchUpsertAsync(BatchUpsertCustomerCustomAttributesRequest { ... }) -> BatchUpsertCustomerCustomAttributesResponse
@@ -13946,7 +14182,7 @@ await client.Customers.CustomAttributeDefinitions.BatchUpsertAsync(
-**request:** `Square.Customers.CustomAttributeDefinitions.BatchUpsertCustomerCustomAttributesRequest` +**request:** `BatchUpsertCustomerCustomAttributesRequest`
@@ -13959,7 +14195,7 @@ await client.Customers.CustomAttributeDefinitions.BatchUpsertAsync(
## Customers Groups -
client.Customers.Groups.ListAsync(Square.Customers.Groups.ListGroupsRequest { ... }) -> Core.Pager +
client.Customers.Groups.ListAsync(ListGroupsRequest { ... }) -> Pager
@@ -14001,7 +14237,7 @@ await client.Customers.Groups.ListAsync(new ListGroupsRequest { Cursor = "cursor
-**request:** `Square.Customers.Groups.ListGroupsRequest` +**request:** `ListGroupsRequest`
@@ -14013,7 +14249,7 @@ await client.Customers.Groups.ListAsync(new ListGroupsRequest { Cursor = "cursor
-
client.Customers.Groups.CreateAsync(Square.Customers.Groups.CreateCustomerGroupRequest { ... }) -> CreateCustomerGroupResponse +
client.Customers.Groups.CreateAsync(CreateCustomerGroupRequest { ... }) -> CreateCustomerGroupResponse
@@ -14059,7 +14295,7 @@ await client.Customers.Groups.CreateAsync(
-**request:** `Square.Customers.Groups.CreateCustomerGroupRequest` +**request:** `CreateCustomerGroupRequest`
@@ -14071,7 +14307,7 @@ await client.Customers.Groups.CreateAsync(
-
client.Customers.Groups.GetAsync(Square.Customers.Groups.GetGroupsRequest { ... }) -> GetCustomerGroupResponse +
client.Customers.Groups.GetAsync(GetGroupsRequest { ... }) -> GetCustomerGroupResponse
@@ -14113,7 +14349,7 @@ await client.Customers.Groups.GetAsync(new GetGroupsRequest { GroupId = "group_i
-**request:** `Square.Customers.Groups.GetGroupsRequest` +**request:** `GetGroupsRequest`
@@ -14125,7 +14361,7 @@ await client.Customers.Groups.GetAsync(new GetGroupsRequest { GroupId = "group_i
-
client.Customers.Groups.UpdateAsync(Square.Customers.Groups.UpdateCustomerGroupRequest { ... }) -> UpdateCustomerGroupResponse +
client.Customers.Groups.UpdateAsync(UpdateCustomerGroupRequest { ... }) -> UpdateCustomerGroupResponse
@@ -14173,7 +14409,7 @@ await client.Customers.Groups.UpdateAsync(
-**request:** `Square.Customers.Groups.UpdateCustomerGroupRequest` +**request:** `UpdateCustomerGroupRequest`
@@ -14185,7 +14421,7 @@ await client.Customers.Groups.UpdateAsync(
-
client.Customers.Groups.DeleteAsync(Square.Customers.Groups.DeleteGroupsRequest { ... }) -> DeleteCustomerGroupResponse +
client.Customers.Groups.DeleteAsync(DeleteGroupsRequest { ... }) -> DeleteCustomerGroupResponse
@@ -14227,7 +14463,7 @@ await client.Customers.Groups.DeleteAsync(new DeleteGroupsRequest { GroupId = "g
-**request:** `Square.Customers.Groups.DeleteGroupsRequest` +**request:** `DeleteGroupsRequest`
@@ -14239,7 +14475,7 @@ await client.Customers.Groups.DeleteAsync(new DeleteGroupsRequest { GroupId = "g
-
client.Customers.Groups.AddAsync(Square.Customers.Groups.AddGroupsRequest { ... }) -> AddGroupToCustomerResponse +
client.Customers.Groups.AddAsync(AddGroupsRequest { ... }) -> AddGroupToCustomerResponse
@@ -14286,7 +14522,7 @@ await client.Customers.Groups.AddAsync(
-**request:** `Square.Customers.Groups.AddGroupsRequest` +**request:** `AddGroupsRequest`
@@ -14298,7 +14534,7 @@ await client.Customers.Groups.AddAsync(
-
client.Customers.Groups.RemoveAsync(Square.Customers.Groups.RemoveGroupsRequest { ... }) -> RemoveGroupFromCustomerResponse +
client.Customers.Groups.RemoveAsync(RemoveGroupsRequest { ... }) -> RemoveGroupFromCustomerResponse
@@ -14345,7 +14581,7 @@ await client.Customers.Groups.RemoveAsync(
-**request:** `Square.Customers.Groups.RemoveGroupsRequest` +**request:** `RemoveGroupsRequest`
@@ -14358,7 +14594,7 @@ await client.Customers.Groups.RemoveAsync(
## Customers Segments -
client.Customers.Segments.ListAsync(Square.Customers.Segments.ListSegmentsRequest { ... }) -> Core.Pager +
client.Customers.Segments.ListAsync(ListSegmentsRequest { ... }) -> Pager
@@ -14400,7 +14636,7 @@ await client.Customers.Segments.ListAsync(new ListSegmentsRequest { Cursor = "cu
-**request:** `Square.Customers.Segments.ListSegmentsRequest` +**request:** `ListSegmentsRequest`
@@ -14412,7 +14648,7 @@ await client.Customers.Segments.ListAsync(new ListSegmentsRequest { Cursor = "cu
-
client.Customers.Segments.GetAsync(Square.Customers.Segments.GetSegmentsRequest { ... }) -> GetCustomerSegmentResponse +
client.Customers.Segments.GetAsync(GetSegmentsRequest { ... }) -> GetCustomerSegmentResponse
@@ -14454,7 +14690,7 @@ await client.Customers.Segments.GetAsync(new GetSegmentsRequest { SegmentId = "s
-**request:** `Square.Customers.Segments.GetSegmentsRequest` +**request:** `GetSegmentsRequest`
@@ -14467,7 +14703,7 @@ await client.Customers.Segments.GetAsync(new GetSegmentsRequest { SegmentId = "s
## Customers Cards -
client.Customers.Cards.CreateAsync(Square.Customers.Cards.CreateCustomerCardRequest { ... }) -> CreateCustomerCardResponse +
client.Customers.Cards.CreateAsync(CreateCustomerCardRequest { ... }) -> CreateCustomerCardResponse
@@ -14529,7 +14765,7 @@ await client.Customers.Cards.CreateAsync(
-**request:** `Square.Customers.Cards.CreateCustomerCardRequest` +**request:** `CreateCustomerCardRequest`
@@ -14541,7 +14777,7 @@ await client.Customers.Cards.CreateAsync(
-
client.Customers.Cards.DeleteAsync(Square.Customers.Cards.DeleteCardsRequest { ... }) -> DeleteCustomerCardResponse +
client.Customers.Cards.DeleteAsync(DeleteCardsRequest { ... }) -> DeleteCustomerCardResponse
@@ -14585,7 +14821,7 @@ await client.Customers.Cards.DeleteAsync(
-**request:** `Square.Customers.Cards.DeleteCardsRequest` +**request:** `DeleteCardsRequest`
@@ -14598,7 +14834,7 @@ await client.Customers.Cards.DeleteAsync(
## Customers CustomAttributes -
client.Customers.CustomAttributes.ListAsync(Square.Customers.CustomAttributes.ListCustomAttributesRequest { ... }) -> Core.Pager +
client.Customers.CustomAttributes.ListAsync(ListCustomAttributesRequest { ... }) -> Pager
@@ -14655,7 +14891,7 @@ await client.Customers.CustomAttributes.ListAsync(
-**request:** `Square.Customers.CustomAttributes.ListCustomAttributesRequest` +**request:** `ListCustomAttributesRequest`
@@ -14667,7 +14903,7 @@ await client.Customers.CustomAttributes.ListAsync(
-
client.Customers.CustomAttributes.GetAsync(Square.Customers.CustomAttributes.GetCustomAttributesRequest { ... }) -> GetCustomerCustomAttributeResponse +
client.Customers.CustomAttributes.GetAsync(GetCustomAttributesRequest { ... }) -> GetCustomerCustomAttributeResponse
@@ -14724,7 +14960,7 @@ await client.Customers.CustomAttributes.GetAsync(
-**request:** `Square.Customers.CustomAttributes.GetCustomAttributesRequest` +**request:** `GetCustomAttributesRequest`
@@ -14736,7 +14972,7 @@ await client.Customers.CustomAttributes.GetAsync(
-
client.Customers.CustomAttributes.UpsertAsync(Square.Customers.CustomAttributes.UpsertCustomerCustomAttributeRequest { ... }) -> UpsertCustomerCustomAttributeResponse +
client.Customers.CustomAttributes.UpsertAsync(UpsertCustomerCustomAttributeRequest { ... }) -> UpsertCustomerCustomAttributeResponse
@@ -14793,7 +15029,7 @@ await client.Customers.CustomAttributes.UpsertAsync(
-**request:** `Square.Customers.CustomAttributes.UpsertCustomerCustomAttributeRequest` +**request:** `UpsertCustomerCustomAttributeRequest`
@@ -14805,7 +15041,7 @@ await client.Customers.CustomAttributes.UpsertAsync(
-
client.Customers.CustomAttributes.DeleteAsync(Square.Customers.CustomAttributes.DeleteCustomAttributesRequest { ... }) -> DeleteCustomerCustomAttributeResponse +
client.Customers.CustomAttributes.DeleteAsync(DeleteCustomAttributesRequest { ... }) -> DeleteCustomerCustomAttributeResponse
@@ -14857,7 +15093,7 @@ await client.Customers.CustomAttributes.DeleteAsync(
-**request:** `Square.Customers.CustomAttributes.DeleteCustomAttributesRequest` +**request:** `DeleteCustomAttributesRequest`
@@ -14870,7 +15106,7 @@ await client.Customers.CustomAttributes.DeleteAsync(
## Devices Codes -
client.Devices.Codes.ListAsync(Square.Devices.Codes.ListCodesRequest { ... }) -> Core.Pager +
client.Devices.Codes.ListAsync(ListCodesRequest { ... }) -> Pager
@@ -14920,7 +15156,7 @@ await client.Devices.Codes.ListAsync(
-**request:** `Square.Devices.Codes.ListCodesRequest` +**request:** `ListCodesRequest`
@@ -14932,7 +15168,7 @@ await client.Devices.Codes.ListAsync(
-
client.Devices.Codes.CreateAsync(Square.Devices.Codes.CreateDeviceCodeRequest { ... }) -> CreateDeviceCodeResponse +
client.Devices.Codes.CreateAsync(CreateDeviceCodeRequest { ... }) -> CreateDeviceCodeResponse
@@ -14986,7 +15222,7 @@ await client.Devices.Codes.CreateAsync(
-**request:** `Square.Devices.Codes.CreateDeviceCodeRequest` +**request:** `CreateDeviceCodeRequest`
@@ -14998,7 +15234,7 @@ await client.Devices.Codes.CreateAsync(
-
client.Devices.Codes.GetAsync(Square.Devices.Codes.GetCodesRequest { ... }) -> GetDeviceCodeResponse +
client.Devices.Codes.GetAsync(GetCodesRequest { ... }) -> GetDeviceCodeResponse
@@ -15040,7 +15276,7 @@ await client.Devices.Codes.GetAsync(new GetCodesRequest { Id = "id" });
-**request:** `Square.Devices.Codes.GetCodesRequest` +**request:** `GetCodesRequest`
@@ -15053,7 +15289,7 @@ await client.Devices.Codes.GetAsync(new GetCodesRequest { Id = "id" });
## Disputes Evidence -
client.Disputes.Evidence.ListAsync(Square.Disputes.Evidence.ListEvidenceRequest { ... }) -> Core.Pager +
client.Disputes.Evidence.ListAsync(ListEvidenceRequest { ... }) -> Pager
@@ -15097,7 +15333,7 @@ await client.Disputes.Evidence.ListAsync(
-**request:** `Square.Disputes.Evidence.ListEvidenceRequest` +**request:** `ListEvidenceRequest`
@@ -15109,7 +15345,7 @@ await client.Disputes.Evidence.ListAsync(
-
client.Disputes.Evidence.GetAsync(Square.Disputes.Evidence.GetEvidenceRequest { ... }) -> GetDisputeEvidenceResponse +
client.Disputes.Evidence.GetAsync(GetEvidenceRequest { ... }) -> GetDisputeEvidenceResponse
@@ -15155,7 +15391,7 @@ await client.Disputes.Evidence.GetAsync(
-**request:** `Square.Disputes.Evidence.GetEvidenceRequest` +**request:** `GetEvidenceRequest`
@@ -15167,7 +15403,7 @@ await client.Disputes.Evidence.GetAsync(
-
client.Disputes.Evidence.DeleteAsync(Square.Disputes.Evidence.DeleteEvidenceRequest { ... }) -> DeleteDisputeEvidenceResponse +
client.Disputes.Evidence.DeleteAsync(DeleteEvidenceRequest { ... }) -> DeleteDisputeEvidenceResponse
@@ -15212,7 +15448,7 @@ await client.Disputes.Evidence.DeleteAsync(
-**request:** `Square.Disputes.Evidence.DeleteEvidenceRequest` +**request:** `DeleteEvidenceRequest`
@@ -15225,7 +15461,7 @@ await client.Disputes.Evidence.DeleteAsync(
## GiftCards Activities -
client.GiftCards.Activities.ListAsync(Square.GiftCards.Activities.ListActivitiesRequest { ... }) -> Core.Pager +
client.GiftCards.Activities.ListAsync(ListActivitiesRequest { ... }) -> Pager
@@ -15282,7 +15518,7 @@ await client.GiftCards.Activities.ListAsync(
-**request:** `Square.GiftCards.Activities.ListActivitiesRequest` +**request:** `ListActivitiesRequest`
@@ -15294,7 +15530,7 @@ await client.GiftCards.Activities.ListAsync(
-
client.GiftCards.Activities.CreateAsync(Square.GiftCards.Activities.CreateGiftCardActivityRequest { ... }) -> CreateGiftCardActivityResponse +
client.GiftCards.Activities.CreateAsync(CreateGiftCardActivityRequest { ... }) -> CreateGiftCardActivityResponse
@@ -15353,7 +15589,7 @@ await client.GiftCards.Activities.CreateAsync(
-**request:** `Square.GiftCards.Activities.CreateGiftCardActivityRequest` +**request:** `CreateGiftCardActivityRequest`
@@ -15366,7 +15602,7 @@ await client.GiftCards.Activities.CreateAsync(
## Labor BreakTypes -
client.Labor.BreakTypes.ListAsync(Square.Labor.BreakTypes.ListBreakTypesRequest { ... }) -> Core.Pager +
client.Labor.BreakTypes.ListAsync(ListBreakTypesRequest { ... }) -> Pager
@@ -15415,7 +15651,7 @@ await client.Labor.BreakTypes.ListAsync(
-**request:** `Square.Labor.BreakTypes.ListBreakTypesRequest` +**request:** `ListBreakTypesRequest`
@@ -15427,7 +15663,7 @@ await client.Labor.BreakTypes.ListAsync(
-
client.Labor.BreakTypes.CreateAsync(Square.Labor.BreakTypes.CreateBreakTypeRequest { ... }) -> CreateBreakTypeResponse +
client.Labor.BreakTypes.CreateAsync(CreateBreakTypeRequest { ... }) -> CreateBreakTypeResponse
@@ -15494,7 +15730,7 @@ await client.Labor.BreakTypes.CreateAsync(
-**request:** `Square.Labor.BreakTypes.CreateBreakTypeRequest` +**request:** `CreateBreakTypeRequest`
@@ -15506,7 +15742,7 @@ await client.Labor.BreakTypes.CreateAsync(
-
client.Labor.BreakTypes.GetAsync(Square.Labor.BreakTypes.GetBreakTypesRequest { ... }) -> GetBreakTypeResponse +
client.Labor.BreakTypes.GetAsync(GetBreakTypesRequest { ... }) -> GetBreakTypeResponse
@@ -15548,7 +15784,7 @@ await client.Labor.BreakTypes.GetAsync(new GetBreakTypesRequest { Id = "id" });
-**request:** `Square.Labor.BreakTypes.GetBreakTypesRequest` +**request:** `GetBreakTypesRequest`
@@ -15560,7 +15796,7 @@ await client.Labor.BreakTypes.GetAsync(new GetBreakTypesRequest { Id = "id" });
-
client.Labor.BreakTypes.UpdateAsync(Square.Labor.BreakTypes.UpdateBreakTypeRequest { ... }) -> UpdateBreakTypeResponse +
client.Labor.BreakTypes.UpdateAsync(UpdateBreakTypeRequest { ... }) -> UpdateBreakTypeResponse
@@ -15615,7 +15851,7 @@ await client.Labor.BreakTypes.UpdateAsync(
-**request:** `Square.Labor.BreakTypes.UpdateBreakTypeRequest` +**request:** `UpdateBreakTypeRequest`
@@ -15627,7 +15863,7 @@ await client.Labor.BreakTypes.UpdateAsync(
-
client.Labor.BreakTypes.DeleteAsync(Square.Labor.BreakTypes.DeleteBreakTypesRequest { ... }) -> DeleteBreakTypeResponse +
client.Labor.BreakTypes.DeleteAsync(DeleteBreakTypesRequest { ... }) -> DeleteBreakTypeResponse
@@ -15671,7 +15907,7 @@ await client.Labor.BreakTypes.DeleteAsync(new DeleteBreakTypesRequest { Id = "id
-**request:** `Square.Labor.BreakTypes.DeleteBreakTypesRequest` +**request:** `DeleteBreakTypesRequest`
@@ -15684,7 +15920,7 @@ await client.Labor.BreakTypes.DeleteAsync(new DeleteBreakTypesRequest { Id = "id
## Labor EmployeeWages -
client.Labor.EmployeeWages.ListAsync(Square.Labor.EmployeeWages.ListEmployeeWagesRequest { ... }) -> Core.Pager +
client.Labor.EmployeeWages.ListAsync(ListEmployeeWagesRequest { ... }) -> Pager
@@ -15733,7 +15969,7 @@ await client.Labor.EmployeeWages.ListAsync(
-**request:** `Square.Labor.EmployeeWages.ListEmployeeWagesRequest` +**request:** `ListEmployeeWagesRequest`
@@ -15745,7 +15981,7 @@ await client.Labor.EmployeeWages.ListAsync(
-
client.Labor.EmployeeWages.GetAsync(Square.Labor.EmployeeWages.GetEmployeeWagesRequest { ... }) -> GetEmployeeWageResponse +
client.Labor.EmployeeWages.GetAsync(GetEmployeeWagesRequest { ... }) -> GetEmployeeWageResponse
@@ -15787,7 +16023,7 @@ await client.Labor.EmployeeWages.GetAsync(new GetEmployeeWagesRequest { Id = "id
-**request:** `Square.Labor.EmployeeWages.GetEmployeeWagesRequest` +**request:** `GetEmployeeWagesRequest`
@@ -15800,7 +16036,7 @@ await client.Labor.EmployeeWages.GetAsync(new GetEmployeeWagesRequest { Id = "id
## Labor Shifts -
client.Labor.Shifts.CreateAsync(Square.Labor.Shifts.CreateShiftRequest { ... }) -> CreateShiftResponse +
client.Labor.Shifts.CreateAsync(CreateShiftRequest { ... }) -> CreateShiftResponse
@@ -15890,7 +16126,7 @@ await client.Labor.Shifts.CreateAsync(
-**request:** `Square.Labor.Shifts.CreateShiftRequest` +**request:** `CreateShiftRequest`
@@ -15902,7 +16138,7 @@ await client.Labor.Shifts.CreateAsync(
-
client.Labor.Shifts.SearchAsync(Square.Labor.Shifts.SearchShiftsRequest { ... }) -> SearchShiftsResponse +
client.Labor.Shifts.SearchAsync(SearchShiftsRequest { ... }) -> SearchShiftsResponse
@@ -15974,7 +16210,7 @@ await client.Labor.Shifts.SearchAsync(
-**request:** `Square.Labor.Shifts.SearchShiftsRequest` +**request:** `SearchShiftsRequest`
@@ -15986,7 +16222,7 @@ await client.Labor.Shifts.SearchAsync(
-
client.Labor.Shifts.GetAsync(Square.Labor.Shifts.GetShiftsRequest { ... }) -> GetShiftResponse +
client.Labor.Shifts.GetAsync(GetShiftsRequest { ... }) -> GetShiftResponse
@@ -16028,7 +16264,7 @@ await client.Labor.Shifts.GetAsync(new Square.Labor.Shifts.GetShiftsRequest { Id
-**request:** `Square.Labor.Shifts.GetShiftsRequest` +**request:** `GetShiftsRequest`
@@ -16040,7 +16276,7 @@ await client.Labor.Shifts.GetAsync(new Square.Labor.Shifts.GetShiftsRequest { Id
-
client.Labor.Shifts.UpdateAsync(Square.Labor.Shifts.UpdateShiftRequest { ... }) -> UpdateShiftResponse +
client.Labor.Shifts.UpdateAsync(UpdateShiftRequest { ... }) -> UpdateShiftResponse
@@ -16121,7 +16357,7 @@ await client.Labor.Shifts.UpdateAsync(
-**request:** `Square.Labor.Shifts.UpdateShiftRequest` +**request:** `UpdateShiftRequest`
@@ -16133,7 +16369,7 @@ await client.Labor.Shifts.UpdateAsync(
-
client.Labor.Shifts.DeleteAsync(Square.Labor.Shifts.DeleteShiftsRequest { ... }) -> DeleteShiftResponse +
client.Labor.Shifts.DeleteAsync(DeleteShiftsRequest { ... }) -> DeleteShiftResponse
@@ -16175,7 +16411,7 @@ await client.Labor.Shifts.DeleteAsync(new DeleteShiftsRequest { Id = "id" });
-**request:** `Square.Labor.Shifts.DeleteShiftsRequest` +**request:** `DeleteShiftsRequest`
@@ -16188,7 +16424,7 @@ await client.Labor.Shifts.DeleteAsync(new DeleteShiftsRequest { Id = "id" });
## Labor TeamMemberWages -
client.Labor.TeamMemberWages.ListAsync(Square.Labor.TeamMemberWages.ListTeamMemberWagesRequest { ... }) -> Core.Pager +
client.Labor.TeamMemberWages.ListAsync(ListTeamMemberWagesRequest { ... }) -> Pager
@@ -16237,7 +16473,7 @@ await client.Labor.TeamMemberWages.ListAsync(
-**request:** `Square.Labor.TeamMemberWages.ListTeamMemberWagesRequest` +**request:** `ListTeamMemberWagesRequest`
@@ -16249,7 +16485,7 @@ await client.Labor.TeamMemberWages.ListAsync(
-
client.Labor.TeamMemberWages.GetAsync(Square.Labor.TeamMemberWages.GetTeamMemberWagesRequest { ... }) -> GetTeamMemberWageResponse +
client.Labor.TeamMemberWages.GetAsync(GetTeamMemberWagesRequest { ... }) -> GetTeamMemberWageResponse
@@ -16291,7 +16527,7 @@ await client.Labor.TeamMemberWages.GetAsync(new GetTeamMemberWagesRequest { Id =
-**request:** `Square.Labor.TeamMemberWages.GetTeamMemberWagesRequest` +**request:** `GetTeamMemberWagesRequest`
@@ -16304,7 +16540,7 @@ await client.Labor.TeamMemberWages.GetAsync(new GetTeamMemberWagesRequest { Id =
## Labor WorkweekConfigs -
client.Labor.WorkweekConfigs.ListAsync(Square.Labor.WorkweekConfigs.ListWorkweekConfigsRequest { ... }) -> Core.Pager +
client.Labor.WorkweekConfigs.ListAsync(ListWorkweekConfigsRequest { ... }) -> Pager
@@ -16348,7 +16584,7 @@ await client.Labor.WorkweekConfigs.ListAsync(
-**request:** `Square.Labor.WorkweekConfigs.ListWorkweekConfigsRequest` +**request:** `ListWorkweekConfigsRequest`
@@ -16360,7 +16596,7 @@ await client.Labor.WorkweekConfigs.ListAsync(
-
client.Labor.WorkweekConfigs.GetAsync(Square.Labor.WorkweekConfigs.UpdateWorkweekConfigRequest { ... }) -> UpdateWorkweekConfigResponse +
client.Labor.WorkweekConfigs.GetAsync(UpdateWorkweekConfigRequest { ... }) -> UpdateWorkweekConfigResponse
@@ -16413,7 +16649,7 @@ await client.Labor.WorkweekConfigs.GetAsync(
-**request:** `Square.Labor.WorkweekConfigs.UpdateWorkweekConfigRequest` +**request:** `UpdateWorkweekConfigRequest`
@@ -16426,7 +16662,7 @@ await client.Labor.WorkweekConfigs.GetAsync(
## Locations CustomAttributeDefinitions -
client.Locations.CustomAttributeDefinitions.ListAsync(Square.Locations.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest { ... }) -> Core.Pager +
client.Locations.CustomAttributeDefinitions.ListAsync(ListCustomAttributeDefinitionsRequest { ... }) -> Pager
@@ -16478,7 +16714,7 @@ await client.Locations.CustomAttributeDefinitions.ListAsync(
-**request:** `Square.Locations.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest` +**request:** `ListCustomAttributeDefinitionsRequest`
@@ -16490,7 +16726,7 @@ await client.Locations.CustomAttributeDefinitions.ListAsync(
-
client.Locations.CustomAttributeDefinitions.CreateAsync(Square.Locations.CustomAttributeDefinitions.CreateLocationCustomAttributeDefinitionRequest { ... }) -> CreateLocationCustomAttributeDefinitionResponse +
client.Locations.CustomAttributeDefinitions.CreateAsync(CreateLocationCustomAttributeDefinitionRequest { ... }) -> CreateLocationCustomAttributeDefinitionResponse
@@ -16556,7 +16792,7 @@ await client.Locations.CustomAttributeDefinitions.CreateAsync(
-**request:** `Square.Locations.CustomAttributeDefinitions.CreateLocationCustomAttributeDefinitionRequest` +**request:** `CreateLocationCustomAttributeDefinitionRequest`
@@ -16568,7 +16804,7 @@ await client.Locations.CustomAttributeDefinitions.CreateAsync(
-
client.Locations.CustomAttributeDefinitions.GetAsync(Square.Locations.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveLocationCustomAttributeDefinitionResponse +
client.Locations.CustomAttributeDefinitions.GetAsync(GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveLocationCustomAttributeDefinitionResponse
@@ -16618,7 +16854,7 @@ await client.Locations.CustomAttributeDefinitions.GetAsync(
-**request:** `Square.Locations.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest` +**request:** `GetCustomAttributeDefinitionsRequest`
@@ -16630,7 +16866,7 @@ await client.Locations.CustomAttributeDefinitions.GetAsync(
-
client.Locations.CustomAttributeDefinitions.UpdateAsync(Square.Locations.CustomAttributeDefinitions.UpdateLocationCustomAttributeDefinitionRequest { ... }) -> UpdateLocationCustomAttributeDefinitionResponse +
client.Locations.CustomAttributeDefinitions.UpdateAsync(UpdateLocationCustomAttributeDefinitionRequest { ... }) -> UpdateLocationCustomAttributeDefinitionResponse
@@ -16685,7 +16921,7 @@ await client.Locations.CustomAttributeDefinitions.UpdateAsync(
-**request:** `Square.Locations.CustomAttributeDefinitions.UpdateLocationCustomAttributeDefinitionRequest` +**request:** `UpdateLocationCustomAttributeDefinitionRequest`
@@ -16697,7 +16933,7 @@ await client.Locations.CustomAttributeDefinitions.UpdateAsync(
-
client.Locations.CustomAttributeDefinitions.DeleteAsync(Square.Locations.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteLocationCustomAttributeDefinitionResponse +
client.Locations.CustomAttributeDefinitions.DeleteAsync(DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteLocationCustomAttributeDefinitionResponse
@@ -16747,7 +16983,7 @@ await client.Locations.CustomAttributeDefinitions.DeleteAsync(
-**request:** `Square.Locations.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest` +**request:** `DeleteCustomAttributeDefinitionsRequest`
@@ -16760,7 +16996,7 @@ await client.Locations.CustomAttributeDefinitions.DeleteAsync(
## Locations CustomAttributes -
client.Locations.CustomAttributes.BatchDeleteAsync(Square.Locations.CustomAttributes.BulkDeleteLocationCustomAttributesRequest { ... }) -> BulkDeleteLocationCustomAttributesResponse +
client.Locations.CustomAttributes.BatchDeleteAsync(BulkDeleteLocationCustomAttributesRequest { ... }) -> BulkDeleteLocationCustomAttributesResponse
@@ -16835,7 +17071,7 @@ await client.Locations.CustomAttributes.BatchDeleteAsync(
-**request:** `Square.Locations.CustomAttributes.BulkDeleteLocationCustomAttributesRequest` +**request:** `BulkDeleteLocationCustomAttributesRequest`
@@ -16847,7 +17083,7 @@ await client.Locations.CustomAttributes.BatchDeleteAsync(
-
client.Locations.CustomAttributes.BatchUpsertAsync(Square.Locations.CustomAttributes.BulkUpsertLocationCustomAttributesRequest { ... }) -> BulkUpsertLocationCustomAttributesResponse +
client.Locations.CustomAttributes.BatchUpsertAsync(BulkUpsertLocationCustomAttributesRequest { ... }) -> BulkUpsertLocationCustomAttributesResponse
@@ -16944,7 +17180,7 @@ await client.Locations.CustomAttributes.BatchUpsertAsync(
-**request:** `Square.Locations.CustomAttributes.BulkUpsertLocationCustomAttributesRequest` +**request:** `BulkUpsertLocationCustomAttributesRequest`
@@ -16956,7 +17192,7 @@ await client.Locations.CustomAttributes.BatchUpsertAsync(
-
client.Locations.CustomAttributes.ListAsync(Square.Locations.CustomAttributes.ListCustomAttributesRequest { ... }) -> Core.Pager +
client.Locations.CustomAttributes.ListAsync(ListCustomAttributesRequest { ... }) -> Pager
@@ -17012,7 +17248,7 @@ await client.Locations.CustomAttributes.ListAsync(
-**request:** `Square.Locations.CustomAttributes.ListCustomAttributesRequest` +**request:** `ListCustomAttributesRequest`
@@ -17024,7 +17260,7 @@ await client.Locations.CustomAttributes.ListAsync(
-
client.Locations.CustomAttributes.GetAsync(Square.Locations.CustomAttributes.GetCustomAttributesRequest { ... }) -> RetrieveLocationCustomAttributeResponse +
client.Locations.CustomAttributes.GetAsync(GetCustomAttributesRequest { ... }) -> RetrieveLocationCustomAttributeResponse
@@ -17078,7 +17314,7 @@ await client.Locations.CustomAttributes.GetAsync(
-**request:** `Square.Locations.CustomAttributes.GetCustomAttributesRequest` +**request:** `GetCustomAttributesRequest`
@@ -17090,7 +17326,7 @@ await client.Locations.CustomAttributes.GetAsync(
-
client.Locations.CustomAttributes.UpsertAsync(Square.Locations.CustomAttributes.UpsertLocationCustomAttributeRequest { ... }) -> UpsertLocationCustomAttributeResponse +
client.Locations.CustomAttributes.UpsertAsync(UpsertLocationCustomAttributeRequest { ... }) -> UpsertLocationCustomAttributeResponse
@@ -17144,7 +17380,7 @@ await client.Locations.CustomAttributes.UpsertAsync(
-**request:** `Square.Locations.CustomAttributes.UpsertLocationCustomAttributeRequest` +**request:** `UpsertLocationCustomAttributeRequest`
@@ -17156,7 +17392,7 @@ await client.Locations.CustomAttributes.UpsertAsync(
-
client.Locations.CustomAttributes.DeleteAsync(Square.Locations.CustomAttributes.DeleteCustomAttributesRequest { ... }) -> DeleteLocationCustomAttributeResponse +
client.Locations.CustomAttributes.DeleteAsync(DeleteCustomAttributesRequest { ... }) -> DeleteLocationCustomAttributeResponse
@@ -17206,7 +17442,7 @@ await client.Locations.CustomAttributes.DeleteAsync(
-**request:** `Square.Locations.CustomAttributes.DeleteCustomAttributesRequest` +**request:** `DeleteCustomAttributesRequest`
@@ -17219,7 +17455,7 @@ await client.Locations.CustomAttributes.DeleteAsync(
## Locations Transactions -
client.Locations.Transactions.ListAsync(Square.Locations.Transactions.ListTransactionsRequest { ... }) -> ListTransactionsResponse +
client.Locations.Transactions.ListAsync(ListTransactionsRequest { ... }) -> ListTransactionsResponse
@@ -17275,7 +17511,7 @@ await client.Locations.Transactions.ListAsync(
-**request:** `Square.Locations.Transactions.ListTransactionsRequest` +**request:** `ListTransactionsRequest`
@@ -17287,7 +17523,7 @@ await client.Locations.Transactions.ListAsync(
-
client.Locations.Transactions.GetAsync(Square.Locations.Transactions.GetTransactionsRequest { ... }) -> GetTransactionResponse +
client.Locations.Transactions.GetAsync(GetTransactionsRequest { ... }) -> GetTransactionResponse
@@ -17331,7 +17567,7 @@ await client.Locations.Transactions.GetAsync(
-**request:** `Square.Locations.Transactions.GetTransactionsRequest` +**request:** `GetTransactionsRequest`
@@ -17343,7 +17579,7 @@ await client.Locations.Transactions.GetAsync(
-
client.Locations.Transactions.CaptureAsync(Square.Locations.Transactions.CaptureTransactionsRequest { ... }) -> CaptureTransactionResponse +
client.Locations.Transactions.CaptureAsync(CaptureTransactionsRequest { ... }) -> CaptureTransactionResponse
@@ -17392,7 +17628,7 @@ await client.Locations.Transactions.CaptureAsync(
-**request:** `Square.Locations.Transactions.CaptureTransactionsRequest` +**request:** `CaptureTransactionsRequest`
@@ -17404,7 +17640,7 @@ await client.Locations.Transactions.CaptureAsync(
-
client.Locations.Transactions.VoidAsync(Square.Locations.Transactions.VoidTransactionsRequest { ... }) -> VoidTransactionResponse +
client.Locations.Transactions.VoidAsync(VoidTransactionsRequest { ... }) -> VoidTransactionResponse
@@ -17453,7 +17689,7 @@ await client.Locations.Transactions.VoidAsync(
-**request:** `Square.Locations.Transactions.VoidTransactionsRequest` +**request:** `VoidTransactionsRequest`
@@ -17466,7 +17702,7 @@ await client.Locations.Transactions.VoidAsync(
## Loyalty Accounts -
client.Loyalty.Accounts.CreateAsync(Square.Loyalty.Accounts.CreateLoyaltyAccountRequest { ... }) -> CreateLoyaltyAccountResponse +
client.Loyalty.Accounts.CreateAsync(CreateLoyaltyAccountRequest { ... }) -> CreateLoyaltyAccountResponse
@@ -17518,7 +17754,7 @@ await client.Loyalty.Accounts.CreateAsync(
-**request:** `Square.Loyalty.Accounts.CreateLoyaltyAccountRequest` +**request:** `CreateLoyaltyAccountRequest`
@@ -17530,7 +17766,7 @@ await client.Loyalty.Accounts.CreateAsync(
-
client.Loyalty.Accounts.SearchAsync(Square.Loyalty.Accounts.SearchLoyaltyAccountsRequest { ... }) -> SearchLoyaltyAccountsResponse +
client.Loyalty.Accounts.SearchAsync(SearchLoyaltyAccountsRequest { ... }) -> SearchLoyaltyAccountsResponse
@@ -17588,7 +17824,7 @@ await client.Loyalty.Accounts.SearchAsync(
-**request:** `Square.Loyalty.Accounts.SearchLoyaltyAccountsRequest` +**request:** `SearchLoyaltyAccountsRequest`
@@ -17600,7 +17836,7 @@ await client.Loyalty.Accounts.SearchAsync(
-
client.Loyalty.Accounts.GetAsync(Square.Loyalty.Accounts.GetAccountsRequest { ... }) -> GetLoyaltyAccountResponse +
client.Loyalty.Accounts.GetAsync(GetAccountsRequest { ... }) -> GetLoyaltyAccountResponse
@@ -17642,7 +17878,7 @@ await client.Loyalty.Accounts.GetAsync(new GetAccountsRequest { AccountId = "acc
-**request:** `Square.Loyalty.Accounts.GetAccountsRequest` +**request:** `GetAccountsRequest`
@@ -17654,7 +17890,7 @@ await client.Loyalty.Accounts.GetAsync(new GetAccountsRequest { AccountId = "acc
-
client.Loyalty.Accounts.AccumulatePointsAsync(Square.Loyalty.Accounts.AccumulateLoyaltyPointsRequest { ... }) -> AccumulateLoyaltyPointsResponse +
client.Loyalty.Accounts.AccumulatePointsAsync(AccumulateLoyaltyPointsRequest { ... }) -> AccumulateLoyaltyPointsResponse
@@ -17720,7 +17956,7 @@ await client.Loyalty.Accounts.AccumulatePointsAsync(
-**request:** `Square.Loyalty.Accounts.AccumulateLoyaltyPointsRequest` +**request:** `AccumulateLoyaltyPointsRequest`
@@ -17732,7 +17968,7 @@ await client.Loyalty.Accounts.AccumulatePointsAsync(
-
client.Loyalty.Accounts.AdjustAsync(Square.Loyalty.Accounts.AdjustLoyaltyPointsRequest { ... }) -> AdjustLoyaltyPointsResponse +
client.Loyalty.Accounts.AdjustAsync(AdjustLoyaltyPointsRequest { ... }) -> AdjustLoyaltyPointsResponse
@@ -17789,7 +18025,7 @@ await client.Loyalty.Accounts.AdjustAsync(
-**request:** `Square.Loyalty.Accounts.AdjustLoyaltyPointsRequest` +**request:** `AdjustLoyaltyPointsRequest`
@@ -17845,7 +18081,7 @@ await client.Loyalty.Programs.ListAsync();
-
client.Loyalty.Programs.GetAsync(Square.Loyalty.Programs.GetProgramsRequest { ... }) -> GetLoyaltyProgramResponse +
client.Loyalty.Programs.GetAsync(GetProgramsRequest { ... }) -> GetLoyaltyProgramResponse
@@ -17889,7 +18125,7 @@ await client.Loyalty.Programs.GetAsync(new GetProgramsRequest { ProgramId = "pro
-**request:** `Square.Loyalty.Programs.GetProgramsRequest` +**request:** `GetProgramsRequest`
@@ -17901,7 +18137,7 @@ await client.Loyalty.Programs.GetAsync(new GetProgramsRequest { ProgramId = "pro
-
client.Loyalty.Programs.CalculateAsync(Square.Loyalty.Programs.CalculateLoyaltyPointsRequest { ... }) -> CalculateLoyaltyPointsResponse +
client.Loyalty.Programs.CalculateAsync(CalculateLoyaltyPointsRequest { ... }) -> CalculateLoyaltyPointsResponse
@@ -17964,7 +18200,7 @@ await client.Loyalty.Programs.CalculateAsync(
-**request:** `Square.Loyalty.Programs.CalculateLoyaltyPointsRequest` +**request:** `CalculateLoyaltyPointsRequest`
@@ -17977,7 +18213,7 @@ await client.Loyalty.Programs.CalculateAsync(
## Loyalty Rewards -
client.Loyalty.Rewards.CreateAsync(Square.Loyalty.Rewards.CreateLoyaltyRewardRequest { ... }) -> CreateLoyaltyRewardResponse +
client.Loyalty.Rewards.CreateAsync(CreateLoyaltyRewardRequest { ... }) -> CreateLoyaltyRewardResponse
@@ -18037,7 +18273,7 @@ await client.Loyalty.Rewards.CreateAsync(
-**request:** `Square.Loyalty.Rewards.CreateLoyaltyRewardRequest` +**request:** `CreateLoyaltyRewardRequest`
@@ -18049,7 +18285,7 @@ await client.Loyalty.Rewards.CreateAsync(
-
client.Loyalty.Rewards.SearchAsync(Square.Loyalty.Rewards.SearchLoyaltyRewardsRequest { ... }) -> SearchLoyaltyRewardsResponse +
client.Loyalty.Rewards.SearchAsync(SearchLoyaltyRewardsRequest { ... }) -> SearchLoyaltyRewardsResponse
@@ -18106,7 +18342,7 @@ await client.Loyalty.Rewards.SearchAsync(
-**request:** `Square.Loyalty.Rewards.SearchLoyaltyRewardsRequest` +**request:** `SearchLoyaltyRewardsRequest`
@@ -18118,7 +18354,7 @@ await client.Loyalty.Rewards.SearchAsync(
-
client.Loyalty.Rewards.GetAsync(Square.Loyalty.Rewards.GetRewardsRequest { ... }) -> GetLoyaltyRewardResponse +
client.Loyalty.Rewards.GetAsync(GetRewardsRequest { ... }) -> GetLoyaltyRewardResponse
@@ -18160,7 +18396,7 @@ await client.Loyalty.Rewards.GetAsync(new GetRewardsRequest { RewardId = "reward
-**request:** `Square.Loyalty.Rewards.GetRewardsRequest` +**request:** `GetRewardsRequest`
@@ -18172,7 +18408,7 @@ await client.Loyalty.Rewards.GetAsync(new GetRewardsRequest { RewardId = "reward
-
client.Loyalty.Rewards.DeleteAsync(Square.Loyalty.Rewards.DeleteRewardsRequest { ... }) -> DeleteLoyaltyRewardResponse +
client.Loyalty.Rewards.DeleteAsync(DeleteRewardsRequest { ... }) -> DeleteLoyaltyRewardResponse
@@ -18222,7 +18458,7 @@ await client.Loyalty.Rewards.DeleteAsync(new DeleteRewardsRequest { RewardId = "
-**request:** `Square.Loyalty.Rewards.DeleteRewardsRequest` +**request:** `DeleteRewardsRequest`
@@ -18234,7 +18470,7 @@ await client.Loyalty.Rewards.DeleteAsync(new DeleteRewardsRequest { RewardId = "
-
client.Loyalty.Rewards.RedeemAsync(Square.Loyalty.Rewards.RedeemLoyaltyRewardRequest { ... }) -> RedeemLoyaltyRewardResponse +
client.Loyalty.Rewards.RedeemAsync(RedeemLoyaltyRewardRequest { ... }) -> RedeemLoyaltyRewardResponse
@@ -18293,7 +18529,7 @@ await client.Loyalty.Rewards.RedeemAsync(
-**request:** `Square.Loyalty.Rewards.RedeemLoyaltyRewardRequest` +**request:** `RedeemLoyaltyRewardRequest`
@@ -18306,7 +18542,7 @@ await client.Loyalty.Rewards.RedeemAsync(
## Loyalty Programs Promotions -
client.Loyalty.Programs.Promotions.ListAsync(Square.Loyalty.Programs.Promotions.ListPromotionsRequest { ... }) -> Core.Pager +
client.Loyalty.Programs.Promotions.ListAsync(ListPromotionsRequest { ... }) -> Pager
@@ -18357,7 +18593,7 @@ await client.Loyalty.Programs.Promotions.ListAsync(
-**request:** `Square.Loyalty.Programs.Promotions.ListPromotionsRequest` +**request:** `ListPromotionsRequest`
@@ -18369,7 +18605,7 @@ await client.Loyalty.Programs.Promotions.ListAsync(
-
client.Loyalty.Programs.Promotions.CreateAsync(Square.Loyalty.Programs.Promotions.CreateLoyaltyPromotionRequest { ... }) -> CreateLoyaltyPromotionResponse +
client.Loyalty.Programs.Promotions.CreateAsync(CreateLoyaltyPromotionRequest { ... }) -> CreateLoyaltyPromotionResponse
@@ -18448,7 +18684,7 @@ await client.Loyalty.Programs.Promotions.CreateAsync(
-**request:** `Square.Loyalty.Programs.Promotions.CreateLoyaltyPromotionRequest` +**request:** `CreateLoyaltyPromotionRequest`
@@ -18460,7 +18696,7 @@ await client.Loyalty.Programs.Promotions.CreateAsync(
-
client.Loyalty.Programs.Promotions.GetAsync(Square.Loyalty.Programs.Promotions.GetPromotionsRequest { ... }) -> GetLoyaltyPromotionResponse +
client.Loyalty.Programs.Promotions.GetAsync(GetPromotionsRequest { ... }) -> GetLoyaltyPromotionResponse
@@ -18504,7 +18740,7 @@ await client.Loyalty.Programs.Promotions.GetAsync(
-**request:** `Square.Loyalty.Programs.Promotions.GetPromotionsRequest` +**request:** `GetPromotionsRequest`
@@ -18516,7 +18752,7 @@ await client.Loyalty.Programs.Promotions.GetAsync(
-
client.Loyalty.Programs.Promotions.CancelAsync(Square.Loyalty.Programs.Promotions.CancelPromotionsRequest { ... }) -> CancelLoyaltyPromotionResponse +
client.Loyalty.Programs.Promotions.CancelAsync(CancelPromotionsRequest { ... }) -> CancelLoyaltyPromotionResponse
@@ -18565,7 +18801,7 @@ await client.Loyalty.Programs.Promotions.CancelAsync(
-**request:** `Square.Loyalty.Programs.Promotions.CancelPromotionsRequest` +**request:** `CancelPromotionsRequest`
@@ -18578,7 +18814,7 @@ await client.Loyalty.Programs.Promotions.CancelAsync(
## Merchants CustomAttributeDefinitions -
client.Merchants.CustomAttributeDefinitions.ListAsync(Square.Merchants.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest { ... }) -> Core.Pager +
client.Merchants.CustomAttributeDefinitions.ListAsync(ListCustomAttributeDefinitionsRequest { ... }) -> Pager
@@ -18630,7 +18866,7 @@ await client.Merchants.CustomAttributeDefinitions.ListAsync(
-**request:** `Square.Merchants.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest` +**request:** `ListCustomAttributeDefinitionsRequest`
@@ -18642,7 +18878,7 @@ await client.Merchants.CustomAttributeDefinitions.ListAsync(
-
client.Merchants.CustomAttributeDefinitions.CreateAsync(Square.Merchants.CustomAttributeDefinitions.CreateMerchantCustomAttributeDefinitionRequest { ... }) -> CreateMerchantCustomAttributeDefinitionResponse +
client.Merchants.CustomAttributeDefinitions.CreateAsync(CreateMerchantCustomAttributeDefinitionRequest { ... }) -> CreateMerchantCustomAttributeDefinitionResponse
@@ -18708,7 +18944,7 @@ await client.Merchants.CustomAttributeDefinitions.CreateAsync(
-**request:** `Square.Merchants.CustomAttributeDefinitions.CreateMerchantCustomAttributeDefinitionRequest` +**request:** `CreateMerchantCustomAttributeDefinitionRequest`
@@ -18720,7 +18956,7 @@ await client.Merchants.CustomAttributeDefinitions.CreateAsync(
-
client.Merchants.CustomAttributeDefinitions.GetAsync(Square.Merchants.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveMerchantCustomAttributeDefinitionResponse +
client.Merchants.CustomAttributeDefinitions.GetAsync(GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveMerchantCustomAttributeDefinitionResponse
@@ -18770,7 +19006,7 @@ await client.Merchants.CustomAttributeDefinitions.GetAsync(
-**request:** `Square.Merchants.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest` +**request:** `GetCustomAttributeDefinitionsRequest`
@@ -18782,7 +19018,7 @@ await client.Merchants.CustomAttributeDefinitions.GetAsync(
-
client.Merchants.CustomAttributeDefinitions.UpdateAsync(Square.Merchants.CustomAttributeDefinitions.UpdateMerchantCustomAttributeDefinitionRequest { ... }) -> UpdateMerchantCustomAttributeDefinitionResponse +
client.Merchants.CustomAttributeDefinitions.UpdateAsync(UpdateMerchantCustomAttributeDefinitionRequest { ... }) -> UpdateMerchantCustomAttributeDefinitionResponse
@@ -18837,7 +19073,7 @@ await client.Merchants.CustomAttributeDefinitions.UpdateAsync(
-**request:** `Square.Merchants.CustomAttributeDefinitions.UpdateMerchantCustomAttributeDefinitionRequest` +**request:** `UpdateMerchantCustomAttributeDefinitionRequest`
@@ -18849,7 +19085,7 @@ await client.Merchants.CustomAttributeDefinitions.UpdateAsync(
-
client.Merchants.CustomAttributeDefinitions.DeleteAsync(Square.Merchants.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteMerchantCustomAttributeDefinitionResponse +
client.Merchants.CustomAttributeDefinitions.DeleteAsync(DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteMerchantCustomAttributeDefinitionResponse
@@ -18899,7 +19135,7 @@ await client.Merchants.CustomAttributeDefinitions.DeleteAsync(
-**request:** `Square.Merchants.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest` +**request:** `DeleteCustomAttributeDefinitionsRequest`
@@ -18912,7 +19148,7 @@ await client.Merchants.CustomAttributeDefinitions.DeleteAsync(
## Merchants CustomAttributes -
client.Merchants.CustomAttributes.BatchDeleteAsync(Square.Merchants.CustomAttributes.BulkDeleteMerchantCustomAttributesRequest { ... }) -> BulkDeleteMerchantCustomAttributesResponse +
client.Merchants.CustomAttributes.BatchDeleteAsync(BulkDeleteMerchantCustomAttributesRequest { ... }) -> BulkDeleteMerchantCustomAttributesResponse
@@ -18980,7 +19216,7 @@ await client.Merchants.CustomAttributes.BatchDeleteAsync(
-**request:** `Square.Merchants.CustomAttributes.BulkDeleteMerchantCustomAttributesRequest` +**request:** `BulkDeleteMerchantCustomAttributesRequest`
@@ -18992,7 +19228,7 @@ await client.Merchants.CustomAttributes.BatchDeleteAsync(
-
client.Merchants.CustomAttributes.BatchUpsertAsync(Square.Merchants.CustomAttributes.BulkUpsertMerchantCustomAttributesRequest { ... }) -> BulkUpsertMerchantCustomAttributesResponse +
client.Merchants.CustomAttributes.BatchUpsertAsync(BulkUpsertMerchantCustomAttributesRequest { ... }) -> BulkUpsertMerchantCustomAttributesResponse
@@ -19077,7 +19313,7 @@ await client.Merchants.CustomAttributes.BatchUpsertAsync(
-**request:** `Square.Merchants.CustomAttributes.BulkUpsertMerchantCustomAttributesRequest` +**request:** `BulkUpsertMerchantCustomAttributesRequest`
@@ -19089,7 +19325,7 @@ await client.Merchants.CustomAttributes.BatchUpsertAsync(
-
client.Merchants.CustomAttributes.ListAsync(Square.Merchants.CustomAttributes.ListCustomAttributesRequest { ... }) -> Core.Pager +
client.Merchants.CustomAttributes.ListAsync(ListCustomAttributesRequest { ... }) -> Pager
@@ -19145,7 +19381,7 @@ await client.Merchants.CustomAttributes.ListAsync(
-**request:** `Square.Merchants.CustomAttributes.ListCustomAttributesRequest` +**request:** `ListCustomAttributesRequest`
@@ -19157,7 +19393,7 @@ await client.Merchants.CustomAttributes.ListAsync(
-
client.Merchants.CustomAttributes.GetAsync(Square.Merchants.CustomAttributes.GetCustomAttributesRequest { ... }) -> RetrieveMerchantCustomAttributeResponse +
client.Merchants.CustomAttributes.GetAsync(GetCustomAttributesRequest { ... }) -> RetrieveMerchantCustomAttributeResponse
@@ -19211,7 +19447,7 @@ await client.Merchants.CustomAttributes.GetAsync(
-**request:** `Square.Merchants.CustomAttributes.GetCustomAttributesRequest` +**request:** `GetCustomAttributesRequest`
@@ -19223,7 +19459,7 @@ await client.Merchants.CustomAttributes.GetAsync(
-
client.Merchants.CustomAttributes.UpsertAsync(Square.Merchants.CustomAttributes.UpsertMerchantCustomAttributeRequest { ... }) -> UpsertMerchantCustomAttributeResponse +
client.Merchants.CustomAttributes.UpsertAsync(UpsertMerchantCustomAttributeRequest { ... }) -> UpsertMerchantCustomAttributeResponse
@@ -19277,7 +19513,7 @@ await client.Merchants.CustomAttributes.UpsertAsync(
-**request:** `Square.Merchants.CustomAttributes.UpsertMerchantCustomAttributeRequest` +**request:** `UpsertMerchantCustomAttributeRequest`
@@ -19289,7 +19525,7 @@ await client.Merchants.CustomAttributes.UpsertAsync(
-
client.Merchants.CustomAttributes.DeleteAsync(Square.Merchants.CustomAttributes.DeleteCustomAttributesRequest { ... }) -> DeleteMerchantCustomAttributeResponse +
client.Merchants.CustomAttributes.DeleteAsync(DeleteCustomAttributesRequest { ... }) -> DeleteMerchantCustomAttributeResponse
@@ -19339,7 +19575,7 @@ await client.Merchants.CustomAttributes.DeleteAsync(
-**request:** `Square.Merchants.CustomAttributes.DeleteCustomAttributesRequest` +**request:** `DeleteCustomAttributesRequest`
@@ -19352,7 +19588,7 @@ await client.Merchants.CustomAttributes.DeleteAsync(
## Orders CustomAttributeDefinitions -
client.Orders.CustomAttributeDefinitions.ListAsync(Square.Orders.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest { ... }) -> Core.Pager +
client.Orders.CustomAttributeDefinitions.ListAsync(ListCustomAttributeDefinitionsRequest { ... }) -> Pager
@@ -19406,7 +19642,7 @@ await client.Orders.CustomAttributeDefinitions.ListAsync(
-**request:** `Square.Orders.CustomAttributeDefinitions.ListCustomAttributeDefinitionsRequest` +**request:** `ListCustomAttributeDefinitionsRequest`
@@ -19418,7 +19654,7 @@ await client.Orders.CustomAttributeDefinitions.ListAsync(
-
client.Orders.CustomAttributeDefinitions.CreateAsync(Square.Orders.CustomAttributeDefinitions.CreateOrderCustomAttributeDefinitionRequest { ... }) -> CreateOrderCustomAttributeDefinitionResponse +
client.Orders.CustomAttributeDefinitions.CreateAsync(CreateOrderCustomAttributeDefinitionRequest { ... }) -> CreateOrderCustomAttributeDefinitionResponse
@@ -19483,7 +19719,7 @@ await client.Orders.CustomAttributeDefinitions.CreateAsync(
-**request:** `Square.Orders.CustomAttributeDefinitions.CreateOrderCustomAttributeDefinitionRequest` +**request:** `CreateOrderCustomAttributeDefinitionRequest`
@@ -19495,7 +19731,7 @@ await client.Orders.CustomAttributeDefinitions.CreateAsync(
-
client.Orders.CustomAttributeDefinitions.GetAsync(Square.Orders.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveOrderCustomAttributeDefinitionResponse +
client.Orders.CustomAttributeDefinitions.GetAsync(GetCustomAttributeDefinitionsRequest { ... }) -> RetrieveOrderCustomAttributeDefinitionResponse
@@ -19547,7 +19783,7 @@ await client.Orders.CustomAttributeDefinitions.GetAsync(
-**request:** `Square.Orders.CustomAttributeDefinitions.GetCustomAttributeDefinitionsRequest` +**request:** `GetCustomAttributeDefinitionsRequest`
@@ -19559,7 +19795,7 @@ await client.Orders.CustomAttributeDefinitions.GetAsync(
-
client.Orders.CustomAttributeDefinitions.UpdateAsync(Square.Orders.CustomAttributeDefinitions.UpdateOrderCustomAttributeDefinitionRequest { ... }) -> UpdateOrderCustomAttributeDefinitionResponse +
client.Orders.CustomAttributeDefinitions.UpdateAsync(UpdateOrderCustomAttributeDefinitionRequest { ... }) -> UpdateOrderCustomAttributeDefinitionResponse
@@ -19615,7 +19851,7 @@ await client.Orders.CustomAttributeDefinitions.UpdateAsync(
-**request:** `Square.Orders.CustomAttributeDefinitions.UpdateOrderCustomAttributeDefinitionRequest` +**request:** `UpdateOrderCustomAttributeDefinitionRequest`
@@ -19627,7 +19863,7 @@ await client.Orders.CustomAttributeDefinitions.UpdateAsync(
-
client.Orders.CustomAttributeDefinitions.DeleteAsync(Square.Orders.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteOrderCustomAttributeDefinitionResponse +
client.Orders.CustomAttributeDefinitions.DeleteAsync(DeleteCustomAttributeDefinitionsRequest { ... }) -> DeleteOrderCustomAttributeDefinitionResponse
@@ -19676,7 +19912,7 @@ await client.Orders.CustomAttributeDefinitions.DeleteAsync(
-**request:** `Square.Orders.CustomAttributeDefinitions.DeleteCustomAttributeDefinitionsRequest` +**request:** `DeleteCustomAttributeDefinitionsRequest`
@@ -19689,7 +19925,7 @@ await client.Orders.CustomAttributeDefinitions.DeleteAsync(
## Orders CustomAttributes -
client.Orders.CustomAttributes.BatchDeleteAsync(Square.Orders.CustomAttributes.BulkDeleteOrderCustomAttributesRequest { ... }) -> BulkDeleteOrderCustomAttributesResponse +
client.Orders.CustomAttributes.BatchDeleteAsync(BulkDeleteOrderCustomAttributesRequest { ... }) -> BulkDeleteOrderCustomAttributesResponse
@@ -19770,7 +20006,7 @@ await client.Orders.CustomAttributes.BatchDeleteAsync(
-**request:** `Square.Orders.CustomAttributes.BulkDeleteOrderCustomAttributesRequest` +**request:** `BulkDeleteOrderCustomAttributesRequest`
@@ -19782,7 +20018,7 @@ await client.Orders.CustomAttributes.BatchDeleteAsync(
-
client.Orders.CustomAttributes.BatchUpsertAsync(Square.Orders.CustomAttributes.BulkUpsertOrderCustomAttributesRequest { ... }) -> BulkUpsertOrderCustomAttributesResponse +
client.Orders.CustomAttributes.BatchUpsertAsync(BulkUpsertOrderCustomAttributesRequest { ... }) -> BulkUpsertOrderCustomAttributesResponse
@@ -19873,7 +20109,7 @@ await client.Orders.CustomAttributes.BatchUpsertAsync(
-**request:** `Square.Orders.CustomAttributes.BulkUpsertOrderCustomAttributesRequest` +**request:** `BulkUpsertOrderCustomAttributesRequest`
@@ -19885,7 +20121,7 @@ await client.Orders.CustomAttributes.BatchUpsertAsync(
-
client.Orders.CustomAttributes.ListAsync(Square.Orders.CustomAttributes.ListCustomAttributesRequest { ... }) -> Core.Pager +
client.Orders.CustomAttributes.ListAsync(ListCustomAttributesRequest { ... }) -> Pager
@@ -19943,7 +20179,7 @@ await client.Orders.CustomAttributes.ListAsync(
-**request:** `Square.Orders.CustomAttributes.ListCustomAttributesRequest` +**request:** `ListCustomAttributesRequest`
@@ -19955,7 +20191,7 @@ await client.Orders.CustomAttributes.ListAsync(
-
client.Orders.CustomAttributes.GetAsync(Square.Orders.CustomAttributes.GetCustomAttributesRequest { ... }) -> RetrieveOrderCustomAttributeResponse +
client.Orders.CustomAttributes.GetAsync(GetCustomAttributesRequest { ... }) -> RetrieveOrderCustomAttributeResponse
@@ -20012,7 +20248,7 @@ await client.Orders.CustomAttributes.GetAsync(
-**request:** `Square.Orders.CustomAttributes.GetCustomAttributesRequest` +**request:** `GetCustomAttributesRequest`
@@ -20024,7 +20260,7 @@ await client.Orders.CustomAttributes.GetAsync(
-
client.Orders.CustomAttributes.UpsertAsync(Square.Orders.CustomAttributes.UpsertOrderCustomAttributeRequest { ... }) -> UpsertOrderCustomAttributeResponse +
client.Orders.CustomAttributes.UpsertAsync(UpsertOrderCustomAttributeRequest { ... }) -> UpsertOrderCustomAttributeResponse
@@ -20086,7 +20322,7 @@ await client.Orders.CustomAttributes.UpsertAsync(
-**request:** `Square.Orders.CustomAttributes.UpsertOrderCustomAttributeRequest` +**request:** `UpsertOrderCustomAttributeRequest`
@@ -20098,7 +20334,7 @@ await client.Orders.CustomAttributes.UpsertAsync(
-
client.Orders.CustomAttributes.DeleteAsync(Square.Orders.CustomAttributes.DeleteCustomAttributesRequest { ... }) -> DeleteOrderCustomAttributeResponse +
client.Orders.CustomAttributes.DeleteAsync(DeleteCustomAttributesRequest { ... }) -> DeleteOrderCustomAttributeResponse
@@ -20150,7 +20386,7 @@ await client.Orders.CustomAttributes.DeleteAsync(
-**request:** `Square.Orders.CustomAttributes.DeleteCustomAttributesRequest` +**request:** `DeleteCustomAttributesRequest`
@@ -20163,7 +20399,7 @@ await client.Orders.CustomAttributes.DeleteAsync(
## TeamMembers WageSetting -
client.TeamMembers.WageSetting.GetAsync(Square.TeamMembers.WageSetting.GetWageSettingRequest { ... }) -> GetWageSettingResponse +
client.TeamMembers.WageSetting.GetAsync(GetWageSettingRequest { ... }) -> GetWageSettingResponse
@@ -20212,7 +20448,7 @@ await client.TeamMembers.WageSetting.GetAsync(
-**request:** `Square.TeamMembers.WageSetting.GetWageSettingRequest` +**request:** `GetWageSettingRequest`
@@ -20224,7 +20460,7 @@ await client.TeamMembers.WageSetting.GetAsync(
-
client.TeamMembers.WageSetting.UpdateAsync(Square.TeamMembers.WageSetting.UpdateWageSettingRequest { ... }) -> UpdateWageSettingResponse +
client.TeamMembers.WageSetting.UpdateAsync(UpdateWageSettingRequest { ... }) -> UpdateWageSettingResponse
@@ -20298,7 +20534,7 @@ await client.TeamMembers.WageSetting.UpdateAsync(
-**request:** `Square.TeamMembers.WageSetting.UpdateWageSettingRequest` +**request:** `UpdateWageSettingRequest`
@@ -20311,7 +20547,7 @@ await client.TeamMembers.WageSetting.UpdateAsync(
## Terminal Actions -
client.Terminal.Actions.CreateAsync(Square.Terminal.Actions.CreateTerminalActionRequest { ... }) -> CreateTerminalActionResponse +
client.Terminal.Actions.CreateAsync(CreateTerminalActionRequest { ... }) -> CreateTerminalActionResponse
@@ -20369,7 +20605,7 @@ await client.Terminal.Actions.CreateAsync(
-**request:** `Square.Terminal.Actions.CreateTerminalActionRequest` +**request:** `CreateTerminalActionRequest`
@@ -20381,7 +20617,7 @@ await client.Terminal.Actions.CreateAsync(
-
client.Terminal.Actions.SearchAsync(Square.Terminal.Actions.SearchTerminalActionsRequest { ... }) -> SearchTerminalActionsResponse +
client.Terminal.Actions.SearchAsync(SearchTerminalActionsRequest { ... }) -> SearchTerminalActionsResponse
@@ -20436,7 +20672,7 @@ await client.Terminal.Actions.SearchAsync(
-**request:** `Square.Terminal.Actions.SearchTerminalActionsRequest` +**request:** `SearchTerminalActionsRequest`
@@ -20448,7 +20684,7 @@ await client.Terminal.Actions.SearchAsync(
-
client.Terminal.Actions.GetAsync(Square.Terminal.Actions.GetActionsRequest { ... }) -> GetTerminalActionResponse +
client.Terminal.Actions.GetAsync(GetActionsRequest { ... }) -> GetTerminalActionResponse
@@ -20490,7 +20726,7 @@ await client.Terminal.Actions.GetAsync(new GetActionsRequest { ActionId = "actio
-**request:** `Square.Terminal.Actions.GetActionsRequest` +**request:** `GetActionsRequest`
@@ -20502,7 +20738,7 @@ await client.Terminal.Actions.GetAsync(new GetActionsRequest { ActionId = "actio
-
client.Terminal.Actions.CancelAsync(Square.Terminal.Actions.CancelActionsRequest { ... }) -> CancelTerminalActionResponse +
client.Terminal.Actions.CancelAsync(CancelActionsRequest { ... }) -> CancelTerminalActionResponse
@@ -20544,7 +20780,7 @@ await client.Terminal.Actions.CancelAsync(new CancelActionsRequest { ActionId =
-**request:** `Square.Terminal.Actions.CancelActionsRequest` +**request:** `CancelActionsRequest`
@@ -20557,7 +20793,7 @@ await client.Terminal.Actions.CancelAsync(new CancelActionsRequest { ActionId =
## Terminal Checkouts -
client.Terminal.Checkouts.CreateAsync(Square.Terminal.Checkouts.CreateTerminalCheckoutRequest { ... }) -> CreateTerminalCheckoutResponse +
client.Terminal.Checkouts.CreateAsync(CreateTerminalCheckoutRequest { ... }) -> CreateTerminalCheckoutResponse
@@ -20615,7 +20851,7 @@ await client.Terminal.Checkouts.CreateAsync(
-**request:** `Square.Terminal.Checkouts.CreateTerminalCheckoutRequest` +**request:** `CreateTerminalCheckoutRequest`
@@ -20627,7 +20863,7 @@ await client.Terminal.Checkouts.CreateAsync(
-
client.Terminal.Checkouts.SearchAsync(Square.Terminal.Checkouts.SearchTerminalCheckoutsRequest { ... }) -> SearchTerminalCheckoutsResponse +
client.Terminal.Checkouts.SearchAsync(SearchTerminalCheckoutsRequest { ... }) -> SearchTerminalCheckoutsResponse
@@ -20678,7 +20914,7 @@ await client.Terminal.Checkouts.SearchAsync(
-**request:** `Square.Terminal.Checkouts.SearchTerminalCheckoutsRequest` +**request:** `SearchTerminalCheckoutsRequest`
@@ -20690,7 +20926,7 @@ await client.Terminal.Checkouts.SearchAsync(
-
client.Terminal.Checkouts.GetAsync(Square.Terminal.Checkouts.GetCheckoutsRequest { ... }) -> GetTerminalCheckoutResponse +
client.Terminal.Checkouts.GetAsync(GetCheckoutsRequest { ... }) -> GetTerminalCheckoutResponse
@@ -20732,7 +20968,7 @@ await client.Terminal.Checkouts.GetAsync(new GetCheckoutsRequest { CheckoutId =
-**request:** `Square.Terminal.Checkouts.GetCheckoutsRequest` +**request:** `GetCheckoutsRequest`
@@ -20744,7 +20980,7 @@ await client.Terminal.Checkouts.GetAsync(new GetCheckoutsRequest { CheckoutId =
-
client.Terminal.Checkouts.CancelAsync(Square.Terminal.Checkouts.CancelCheckoutsRequest { ... }) -> CancelTerminalCheckoutResponse +
client.Terminal.Checkouts.CancelAsync(CancelCheckoutsRequest { ... }) -> CancelTerminalCheckoutResponse
@@ -20788,7 +21024,7 @@ await client.Terminal.Checkouts.CancelAsync(
-**request:** `Square.Terminal.Checkouts.CancelCheckoutsRequest` +**request:** `CancelCheckoutsRequest`
@@ -20801,7 +21037,7 @@ await client.Terminal.Checkouts.CancelAsync(
## Terminal Refunds -
client.Terminal.Refunds.CreateAsync(Square.Terminal.Refunds.CreateTerminalRefundRequest { ... }) -> CreateTerminalRefundResponse +
client.Terminal.Refunds.CreateAsync(CreateTerminalRefundRequest { ... }) -> CreateTerminalRefundResponse
@@ -20855,7 +21091,7 @@ await client.Terminal.Refunds.CreateAsync(
-**request:** `Square.Terminal.Refunds.CreateTerminalRefundRequest` +**request:** `CreateTerminalRefundRequest`
@@ -20867,7 +21103,7 @@ await client.Terminal.Refunds.CreateAsync(
-
client.Terminal.Refunds.SearchAsync(Square.Terminal.Refunds.SearchTerminalRefundsRequest { ... }) -> SearchTerminalRefundsResponse +
client.Terminal.Refunds.SearchAsync(SearchTerminalRefundsRequest { ... }) -> SearchTerminalRefundsResponse
@@ -20918,7 +21154,7 @@ await client.Terminal.Refunds.SearchAsync(
-**request:** `Square.Terminal.Refunds.SearchTerminalRefundsRequest` +**request:** `SearchTerminalRefundsRequest`
@@ -20930,7 +21166,7 @@ await client.Terminal.Refunds.SearchAsync(
-
client.Terminal.Refunds.GetAsync(Square.Terminal.Refunds.GetRefundsRequest { ... }) -> GetTerminalRefundResponse +
client.Terminal.Refunds.GetAsync(GetRefundsRequest { ... }) -> GetTerminalRefundResponse
@@ -20974,7 +21210,7 @@ await client.Terminal.Refunds.GetAsync(
-**request:** `Square.Terminal.Refunds.GetRefundsRequest` +**request:** `GetRefundsRequest`
@@ -20986,7 +21222,7 @@ await client.Terminal.Refunds.GetAsync(
-
client.Terminal.Refunds.CancelAsync(Square.Terminal.Refunds.CancelRefundsRequest { ... }) -> CancelTerminalRefundResponse +
client.Terminal.Refunds.CancelAsync(CancelRefundsRequest { ... }) -> CancelTerminalRefundResponse
@@ -21030,7 +21266,7 @@ await client.Terminal.Refunds.CancelAsync(
-**request:** `Square.Terminal.Refunds.CancelRefundsRequest` +**request:** `CancelRefundsRequest`
@@ -21043,7 +21279,7 @@ await client.Terminal.Refunds.CancelAsync(
## Webhooks EventTypes -
client.Webhooks.EventTypes.ListAsync(Square.Webhooks.EventTypes.ListEventTypesRequest { ... }) -> ListWebhookEventTypesResponse +
client.Webhooks.EventTypes.ListAsync(ListEventTypesRequest { ... }) -> ListWebhookEventTypesResponse
@@ -21087,7 +21323,7 @@ await client.Webhooks.EventTypes.ListAsync(
-**request:** `Square.Webhooks.EventTypes.ListEventTypesRequest` +**request:** `ListEventTypesRequest`
@@ -21100,7 +21336,7 @@ await client.Webhooks.EventTypes.ListAsync(
## Webhooks Subscriptions -
client.Webhooks.Subscriptions.ListAsync(Square.Webhooks.Subscriptions.ListSubscriptionsRequest { ... }) -> Core.Pager +
client.Webhooks.Subscriptions.ListAsync(ListSubscriptionsRequest { ... }) -> Pager
@@ -21150,7 +21386,7 @@ await client.Webhooks.Subscriptions.ListAsync(
-**request:** `Square.Webhooks.Subscriptions.ListSubscriptionsRequest` +**request:** `ListSubscriptionsRequest`
@@ -21162,7 +21398,7 @@ await client.Webhooks.Subscriptions.ListAsync(
-
client.Webhooks.Subscriptions.CreateAsync(Square.Webhooks.Subscriptions.CreateWebhookSubscriptionRequest { ... }) -> CreateWebhookSubscriptionResponse +
client.Webhooks.Subscriptions.CreateAsync(CreateWebhookSubscriptionRequest { ... }) -> CreateWebhookSubscriptionResponse
@@ -21216,7 +21452,7 @@ await client.Webhooks.Subscriptions.CreateAsync(
-**request:** `Square.Webhooks.Subscriptions.CreateWebhookSubscriptionRequest` +**request:** `CreateWebhookSubscriptionRequest`
@@ -21228,7 +21464,7 @@ await client.Webhooks.Subscriptions.CreateAsync(
-
client.Webhooks.Subscriptions.GetAsync(Square.Webhooks.Subscriptions.GetSubscriptionsRequest { ... }) -> GetWebhookSubscriptionResponse +
client.Webhooks.Subscriptions.GetAsync(GetSubscriptionsRequest { ... }) -> GetWebhookSubscriptionResponse
@@ -21272,7 +21508,7 @@ await client.Webhooks.Subscriptions.GetAsync(
-**request:** `Square.Webhooks.Subscriptions.GetSubscriptionsRequest` +**request:** `GetSubscriptionsRequest`
@@ -21284,7 +21520,7 @@ await client.Webhooks.Subscriptions.GetAsync(
-
client.Webhooks.Subscriptions.UpdateAsync(Square.Webhooks.Subscriptions.UpdateWebhookSubscriptionRequest { ... }) -> UpdateWebhookSubscriptionResponse +
client.Webhooks.Subscriptions.UpdateAsync(UpdateWebhookSubscriptionRequest { ... }) -> UpdateWebhookSubscriptionResponse
@@ -21336,7 +21572,7 @@ await client.Webhooks.Subscriptions.UpdateAsync(
-**request:** `Square.Webhooks.Subscriptions.UpdateWebhookSubscriptionRequest` +**request:** `UpdateWebhookSubscriptionRequest`
@@ -21348,7 +21584,7 @@ await client.Webhooks.Subscriptions.UpdateAsync(
-
client.Webhooks.Subscriptions.DeleteAsync(Square.Webhooks.Subscriptions.DeleteSubscriptionsRequest { ... }) -> DeleteWebhookSubscriptionResponse +
client.Webhooks.Subscriptions.DeleteAsync(DeleteSubscriptionsRequest { ... }) -> DeleteWebhookSubscriptionResponse
@@ -21392,7 +21628,7 @@ await client.Webhooks.Subscriptions.DeleteAsync(
-**request:** `Square.Webhooks.Subscriptions.DeleteSubscriptionsRequest` +**request:** `DeleteSubscriptionsRequest`
@@ -21404,7 +21640,7 @@ await client.Webhooks.Subscriptions.DeleteAsync(
-
client.Webhooks.Subscriptions.UpdateSignatureKeyAsync(Square.Webhooks.Subscriptions.UpdateWebhookSubscriptionSignatureKeyRequest { ... }) -> UpdateWebhookSubscriptionSignatureKeyResponse +
client.Webhooks.Subscriptions.UpdateSignatureKeyAsync(UpdateWebhookSubscriptionSignatureKeyRequest { ... }) -> UpdateWebhookSubscriptionSignatureKeyResponse
@@ -21452,7 +21688,7 @@ await client.Webhooks.Subscriptions.UpdateSignatureKeyAsync(
-**request:** `Square.Webhooks.Subscriptions.UpdateWebhookSubscriptionSignatureKeyRequest` +**request:** `UpdateWebhookSubscriptionSignatureKeyRequest`
@@ -21464,7 +21700,7 @@ await client.Webhooks.Subscriptions.UpdateSignatureKeyAsync(
-
client.Webhooks.Subscriptions.TestAsync(Square.Webhooks.Subscriptions.TestWebhookSubscriptionRequest { ... }) -> TestWebhookSubscriptionResponse +
client.Webhooks.Subscriptions.TestAsync(TestWebhookSubscriptionRequest { ... }) -> TestWebhookSubscriptionResponse
@@ -21512,7 +21748,7 @@ await client.Webhooks.Subscriptions.TestAsync(
-**request:** `Square.Webhooks.Subscriptions.TestWebhookSubscriptionRequest` +**request:** `TestWebhookSubscriptionRequest`
diff --git a/src/Square.Test/Core/RawClientTests/MultipartFormTests.cs b/src/Square.Test/Core/RawClientTests/MultipartFormTests.cs index d73f0413..53ca9c1b 100644 --- a/src/Square.Test/Core/RawClientTests/MultipartFormTests.cs +++ b/src/Square.Test/Core/RawClientTests/MultipartFormTests.cs @@ -1055,9 +1055,9 @@ private static string GetBoundary(MultipartFormDataContent content) .Value?.Trim('"') ?? throw new global::System.Exception("Boundary not found"); } - private static MultipartFormRequest CreateMultipartFormRequest() + private static Square.Core.MultipartFormRequest CreateMultipartFormRequest() { - return new MultipartFormRequest + return new Square.Core.MultipartFormRequest { BaseUrl = "https://localhost", Method = HttpMethod.Post, diff --git a/src/Square.Test/Core/RawClientTests/QueryParameterTests.cs b/src/Square.Test/Core/RawClientTests/QueryParameterTests.cs index c137283c..939d321c 100644 --- a/src/Square.Test/Core/RawClientTests/QueryParameterTests.cs +++ b/src/Square.Test/Core/RawClientTests/QueryParameterTests.cs @@ -27,7 +27,7 @@ public void SetUp() } [Test] - public void CreateRequest_QueryParametersEscaping() + public async SystemTask CreateRequest_QueryParametersEscaping() { _server .Given(WireMockRequest.Create().WithPath("/test").WithParam("foo", "bar").UsingGet()) @@ -47,7 +47,8 @@ public void CreateRequest_QueryParametersEscaping() Options = new RequestOptions(), }; - var url = _rawClient.CreateHttpRequest(request).RequestUri!.AbsoluteUri; + var httpRequest = await _rawClient.CreateHttpRequestAsync(request).ConfigureAwait(false); + var url = httpRequest.RequestUri!.AbsoluteUri; Assert.That(url, Does.Contain("sample=value")); Assert.That(url, Does.Contain("email=bob%2Btest%40example.com")); diff --git a/src/Square.Test/Core/RawClientTests/RetriesTests.cs b/src/Square.Test/Core/RawClientTests/RetriesTests.cs index 78018216..8a525c44 100644 --- a/src/Square.Test/Core/RawClientTests/RetriesTests.cs +++ b/src/Square.Test/Core/RawClientTests/RetriesTests.cs @@ -145,7 +145,7 @@ public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest .WillSetStateTo("Server Error") .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); - var request = new MultipartFormRequest + var request = new Square.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -186,7 +186,7 @@ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_Wi .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new MultipartFormRequest + var request = new Square.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -205,6 +205,119 @@ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_Wi }); } + [Test] + public async SystemTask SendRequestAsync_ShouldRespectRetryAfterHeader_WithSecondsValue() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfter") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse.Create().WithStatusCode(429).WithHeader("Retry-After", "1") + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfter") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRespectRetryAfterHeader_WithHttpDateValue() + { + var retryAfterDate = DateTimeOffset.UtcNow.AddSeconds(1).ToString("R"); + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfterDate") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse + .Create() + .WithStatusCode(429) + .WithHeader("Retry-After", retryAfterDate) + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfterDate") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRespectXRateLimitResetHeader() + { + var resetTime = DateTimeOffset.UtcNow.AddSeconds(1).ToUnixTimeSeconds().ToString(); + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RateLimitReset") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse + .Create() + .WithStatusCode(429) + .WithHeader("X-RateLimit-Reset", resetTime) + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RateLimitReset") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + [TearDown] public void TearDown() { diff --git a/src/Square.Test/Square.Test.csproj b/src/Square.Test/Square.Test.csproj index 383a3938..caa978f3 100644 --- a/src/Square.Test/Square.Test.csproj +++ b/src/Square.Test/Square.Test.csproj @@ -8,6 +8,7 @@ true true + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -26,8 +27,10 @@ + + diff --git a/src/Square.Test/Unit/MockServer/ApplePay/RegisterDomainTest.cs b/src/Square.Test/Unit/MockServer/ApplePay/RegisterDomainTest.cs index da9e7950..9cb0fd6e 100644 --- a/src/Square.Test/Unit/MockServer/ApplePay/RegisterDomainTest.cs +++ b/src/Square.Test/Unit/MockServer/ApplePay/RegisterDomainTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.ApplePay; diff --git a/src/Square.Test/Unit/MockServer/BankAccounts/GetByV1IdTest.cs b/src/Square.Test/Unit/MockServer/BankAccounts/GetByV1IdTest.cs index a74f2174..675b37a6 100644 --- a/src/Square.Test/Unit/MockServer/BankAccounts/GetByV1IdTest.cs +++ b/src/Square.Test/Unit/MockServer/BankAccounts/GetByV1IdTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.BankAccounts; diff --git a/src/Square.Test/Unit/MockServer/BankAccounts/GetTest.cs b/src/Square.Test/Unit/MockServer/BankAccounts/GetTest.cs index a7cc6f74..ba777be5 100644 --- a/src/Square.Test/Unit/MockServer/BankAccounts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/BankAccounts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.BankAccounts; diff --git a/src/Square.Test/Unit/MockServer/BankAccounts/ListTest.cs b/src/Square.Test/Unit/MockServer/BankAccounts/ListTest.cs index e5994174..682a042e 100644 --- a/src/Square.Test/Unit/MockServer/BankAccounts/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/BankAccounts/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.BankAccounts; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveBookingsTest.cs b/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveBookingsTest.cs index 33364d62..a0fdf15c 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveBookingsTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveBookingsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveTeamMemberBookingProfilesTest.cs b/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveTeamMemberBookingProfilesTest.cs index 7b32f6da..ff7015d4 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveTeamMemberBookingProfilesTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/BulkRetrieveTeamMemberBookingProfilesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CancelTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CancelTest.cs index 03616cd0..cd898149 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CreateTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CreateTest.cs index 141160de..4b409648 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/CreateTest.cs index 75aee425..2d8be8ef 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.CustomAttributeDefinitions; @@ -24,7 +23,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoriteShampoo", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Shampoo", "description": "The favorite shampoo of the customer.", diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/DeleteTest.cs index 7daa2596..d0c6634b 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/GetTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/GetTest.cs index deed5301..3fcef4af 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -17,7 +16,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoriteShampoo", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite shampoo", "description": "The favorite shampoo of the customer.", diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/ListTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/ListTest.cs index 7b82086b..d33cfa08 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Test.Unit.MockServer; @@ -16,7 +15,7 @@ public async Task MockServerTest() { "key": "favoriteShampoo", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite shampoo", "description": "Update the description as desired.", @@ -28,7 +27,7 @@ public async Task MockServerTest() { "key": "partySize", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Party size", "description": "Number of people in the party for dine-in", diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/UpdateTest.cs index cd4771d9..07ca4a6b 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributeDefinitions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.CustomAttributeDefinitions; @@ -24,7 +23,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoriteShampoo", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite shampoo", "description": "Update the description as desired.", diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchDeleteTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchDeleteTest.cs index 9b787066..39b773e5 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchDeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchDeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.CustomAttributes; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchUpsertTest.cs index 75e0fe31..061dcf13 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.CustomAttributes; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/DeleteTest.cs index d45b711c..96fb9549 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/GetTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/GetTest.cs index 86499e0f..4665da89 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/ListTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/ListTest.cs index 705439e5..d22e7906 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/UpsertTest.cs index 85fb2f34..94588a0a 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/CustomAttributes/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.CustomAttributes; diff --git a/src/Square.Test/Unit/MockServer/Bookings/GetBusinessProfileTest.cs b/src/Square.Test/Unit/MockServer/Bookings/GetBusinessProfileTest.cs index b4eed094..f468fd7f 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/GetBusinessProfileTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/GetBusinessProfileTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Bookings/GetTest.cs b/src/Square.Test/Unit/MockServer/Bookings/GetTest.cs index 5923a119..8bbe9e54 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/ListTest.cs b/src/Square.Test/Unit/MockServer/Bookings/ListTest.cs index 9d53f225..bb8bd10a 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Bookings; using Square.Test.Unit.MockServer; @@ -39,6 +38,7 @@ public async Task MockServerTest() "source": "FIRST_PARTY_MERCHANT" } ], + "cursor": "cursor", "errors": [ { "category": "API_ERROR", diff --git a/src/Square.Test/Unit/MockServer/Bookings/LocationProfiles/ListTest.cs b/src/Square.Test/Unit/MockServer/Bookings/LocationProfiles/ListTest.cs index 6846ca65..919bd178 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/LocationProfiles/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/LocationProfiles/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Bookings.LocationProfiles; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Bookings/RetrieveLocationBookingProfileTest.cs b/src/Square.Test/Unit/MockServer/Bookings/RetrieveLocationBookingProfileTest.cs index 872e2826..45c9843e 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/RetrieveLocationBookingProfileTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/RetrieveLocationBookingProfileTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/SearchAvailabilityTest.cs b/src/Square.Test/Unit/MockServer/Bookings/SearchAvailabilityTest.cs index 9e3a673a..a4034958 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/SearchAvailabilityTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/SearchAvailabilityTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/GetTest.cs b/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/GetTest.cs index c28e61ee..aa15ee56 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings.TeamMemberProfiles; diff --git a/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/ListTest.cs b/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/ListTest.cs index 2cbb0d42..425f6fa4 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/TeamMemberProfiles/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Bookings.TeamMemberProfiles; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Bookings/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Bookings/UpdateTest.cs index 104c0bb3..5680f27f 100644 --- a/src/Square.Test/Unit/MockServer/Bookings/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Bookings/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Bookings; diff --git a/src/Square.Test/Unit/MockServer/Cards/CreateTest.cs b/src/Square.Test/Unit/MockServer/Cards/CreateTest.cs index 3edc6eb8..907cee98 100644 --- a/src/Square.Test/Unit/MockServer/Cards/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Cards/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Cards; diff --git a/src/Square.Test/Unit/MockServer/Cards/DisableTest.cs b/src/Square.Test/Unit/MockServer/Cards/DisableTest.cs index a0d7f618..d8f79164 100644 --- a/src/Square.Test/Unit/MockServer/Cards/DisableTest.cs +++ b/src/Square.Test/Unit/MockServer/Cards/DisableTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Cards; diff --git a/src/Square.Test/Unit/MockServer/Cards/GetTest.cs b/src/Square.Test/Unit/MockServer/Cards/GetTest.cs index 8118dfe3..99709592 100644 --- a/src/Square.Test/Unit/MockServer/Cards/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Cards/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Cards; diff --git a/src/Square.Test/Unit/MockServer/Cards/ListTest.cs b/src/Square.Test/Unit/MockServer/Cards/ListTest.cs index 0d21658d..c0c474b2 100644 --- a/src/Square.Test/Unit/MockServer/Cards/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Cards/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Cards; diff --git a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/GetTest.cs b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/GetTest.cs index ed217d7a..c4902600 100644 --- a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListEventsTest.cs b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListEventsTest.cs index c39d8fca..a5295991 100644 --- a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.CashDrawers.Shifts; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListTest.cs b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListTest.cs index a6fa96de..bfffe6d2 100644 --- a/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/CashDrawers/Shifts/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.CashDrawers.Shifts; diff --git a/src/Square.Test/Unit/MockServer/Catalog/BatchDeleteTest.cs b/src/Square.Test/Unit/MockServer/Catalog/BatchDeleteTest.cs index a368f548..77c18547 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/BatchDeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/BatchDeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/BatchGetTest.cs b/src/Square.Test/Unit/MockServer/Catalog/BatchGetTest.cs index dc4a3d0a..a7f6ac14 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/BatchGetTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/BatchGetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Catalog/BatchUpsertTest.cs index ab79f0e3..c7732c62 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/InfoTest.cs b/src/Square.Test/Unit/MockServer/Catalog/InfoTest.cs index ac24e6c4..84e3be2d 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/InfoTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/InfoTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Catalog/ListTest.cs b/src/Square.Test/Unit/MockServer/Catalog/ListTest.cs index 93d23ebd..218d18f4 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Catalog; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Catalog/Object/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Catalog/Object/DeleteTest.cs index 0a2bedc7..4ac4c8e0 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/Object/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/Object/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog.Object; diff --git a/src/Square.Test/Unit/MockServer/Catalog/Object/GetTest.cs b/src/Square.Test/Unit/MockServer/Catalog/Object/GetTest.cs index 20718b49..a1d1dc88 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/Object/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/Object/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog.Object; diff --git a/src/Square.Test/Unit/MockServer/Catalog/Object/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Catalog/Object/UpsertTest.cs index e5255aaf..97e6b6dc 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/Object/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/Object/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog.Object; diff --git a/src/Square.Test/Unit/MockServer/Catalog/SearchItemsTest.cs b/src/Square.Test/Unit/MockServer/Catalog/SearchItemsTest.cs index 12cad91b..35716559 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/SearchItemsTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/SearchItemsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/SearchTest.cs b/src/Square.Test/Unit/MockServer/Catalog/SearchTest.cs index c299d452..a21e1e05 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/UpdateItemModifierListsTest.cs b/src/Square.Test/Unit/MockServer/Catalog/UpdateItemModifierListsTest.cs index f196be92..f8b50e52 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/UpdateItemModifierListsTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/UpdateItemModifierListsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Catalog/UpdateItemTaxesTest.cs b/src/Square.Test/Unit/MockServer/Catalog/UpdateItemTaxesTest.cs index 34becedd..fa88f914 100644 --- a/src/Square.Test/Unit/MockServer/Catalog/UpdateItemTaxesTest.cs +++ b/src/Square.Test/Unit/MockServer/Catalog/UpdateItemTaxesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Catalog; diff --git a/src/Square.Test/Unit/MockServer/Channels/BulkRetrieveTest.cs b/src/Square.Test/Unit/MockServer/Channels/BulkRetrieveTest.cs index 5945c535..a106fb66 100644 --- a/src/Square.Test/Unit/MockServer/Channels/BulkRetrieveTest.cs +++ b/src/Square.Test/Unit/MockServer/Channels/BulkRetrieveTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Channels; diff --git a/src/Square.Test/Unit/MockServer/Channels/GetTest.cs b/src/Square.Test/Unit/MockServer/Channels/GetTest.cs index 06c3cbd3..41ec78ff 100644 --- a/src/Square.Test/Unit/MockServer/Channels/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Channels/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Channels; diff --git a/src/Square.Test/Unit/MockServer/Channels/ListTest.cs b/src/Square.Test/Unit/MockServer/Channels/ListTest.cs index 11a29025..62594f63 100644 --- a/src/Square.Test/Unit/MockServer/Channels/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Channels/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Channels; diff --git a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/CreateTest.cs b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/CreateTest.cs index 64d86f04..8867631e 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout.PaymentLinks; diff --git a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/DeleteTest.cs index 85615cca..83349064 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout.PaymentLinks; diff --git a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/GetTest.cs b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/GetTest.cs index 30596f04..9766b582 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout.PaymentLinks; diff --git a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/ListTest.cs b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/ListTest.cs index 90424b40..cdedd515 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Checkout.PaymentLinks; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/UpdateTest.cs index 7f390027..9623dd09 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/PaymentLinks/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout.PaymentLinks; diff --git a/src/Square.Test/Unit/MockServer/Checkout/RetrieveLocationSettingsTest.cs b/src/Square.Test/Unit/MockServer/Checkout/RetrieveLocationSettingsTest.cs index 82f180b2..1d6dbfff 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/RetrieveLocationSettingsTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/RetrieveLocationSettingsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout; diff --git a/src/Square.Test/Unit/MockServer/Checkout/RetrieveMerchantSettingsTest.cs b/src/Square.Test/Unit/MockServer/Checkout/RetrieveMerchantSettingsTest.cs index 8a3f8ca1..5da67d7c 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/RetrieveMerchantSettingsTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/RetrieveMerchantSettingsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Checkout/UpdateLocationSettingsTest.cs b/src/Square.Test/Unit/MockServer/Checkout/UpdateLocationSettingsTest.cs index 3b7d9be8..60f4338e 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/UpdateLocationSettingsTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/UpdateLocationSettingsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout; diff --git a/src/Square.Test/Unit/MockServer/Checkout/UpdateMerchantSettingsTest.cs b/src/Square.Test/Unit/MockServer/Checkout/UpdateMerchantSettingsTest.cs index b02e0b1b..cba35d98 100644 --- a/src/Square.Test/Unit/MockServer/Checkout/UpdateMerchantSettingsTest.cs +++ b/src/Square.Test/Unit/MockServer/Checkout/UpdateMerchantSettingsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Checkout; diff --git a/src/Square.Test/Unit/MockServer/Customers/BatchCreateTest.cs b/src/Square.Test/Unit/MockServer/Customers/BatchCreateTest.cs index 1f9ed093..cc347aff 100644 --- a/src/Square.Test/Unit/MockServer/Customers/BatchCreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/BatchCreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/BulkDeleteCustomersTest.cs b/src/Square.Test/Unit/MockServer/Customers/BulkDeleteCustomersTest.cs index 0fcf421c..46aae788 100644 --- a/src/Square.Test/Unit/MockServer/Customers/BulkDeleteCustomersTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/BulkDeleteCustomersTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/BulkRetrieveCustomersTest.cs b/src/Square.Test/Unit/MockServer/Customers/BulkRetrieveCustomersTest.cs index 0c1a305c..83439c33 100644 --- a/src/Square.Test/Unit/MockServer/Customers/BulkRetrieveCustomersTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/BulkRetrieveCustomersTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/BulkUpdateCustomersTest.cs b/src/Square.Test/Unit/MockServer/Customers/BulkUpdateCustomersTest.cs index 6fdca7a9..1b31222c 100644 --- a/src/Square.Test/Unit/MockServer/Customers/BulkUpdateCustomersTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/BulkUpdateCustomersTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Cards/CreateTest.cs b/src/Square.Test/Unit/MockServer/Customers/Cards/CreateTest.cs index 7205b636..43d11652 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Cards/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Cards/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Cards/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Customers/Cards/DeleteTest.cs index fb67688d..791ff1b7 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Cards/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Cards/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CreateTest.cs b/src/Square.Test/Unit/MockServer/Customers/CreateTest.cs index a51bc68b..6e12d65f 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/BatchUpsertTest.cs index c1a46704..087d1aef 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/CreateTest.cs index bf0fa62b..9a72e3ea 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -18,7 +17,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoritemovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Movie", "description": "The favorite movie of the customer.", @@ -32,7 +31,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoritemovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Movie", "description": "The favorite movie of the customer.", diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/DeleteTest.cs index 6e3303a4..aeea620f 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/GetTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/GetTest.cs index ad42e417..94d887dc 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -17,7 +16,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoritemovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Movie", "description": "The favorite movie of the customer.", diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/ListTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/ListTest.cs index bfa76c3e..bab92ee3 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Test.Unit.MockServer; @@ -16,7 +15,7 @@ public async Task MockServerTest() { "key": "favoritemovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Movie", "description": "Update the description as desired.", @@ -28,7 +27,7 @@ public async Task MockServerTest() { "key": "ownsmovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" }, "name": "Owns Movie", "description": "Customer owns movie.", diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/UpdateTest.cs index f3bb2358..e86feb53 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributeDefinitions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -27,7 +26,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "favoritemovie", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Favorite Movie", "description": "Update the description as desired.", diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/DeleteTest.cs index e6bec06b..fbae2fe3 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/GetTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/GetTest.cs index 6e95af06..b75cad5c 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/ListTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/ListTest.cs index ade2741c..00caf339 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/UpsertTest.cs index 458ebcc8..aafbb360 100644 --- a/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/CustomAttributes/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Customers/DeleteTest.cs index 69e51d87..0913c86e 100644 --- a/src/Square.Test/Unit/MockServer/Customers/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/GetTest.cs b/src/Square.Test/Unit/MockServer/Customers/GetTest.cs index aaf5993d..a1798c64 100644 --- a/src/Square.Test/Unit/MockServer/Customers/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/AddTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/AddTest.cs index b4911590..3f2f8b40 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/AddTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/AddTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/CreateTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/CreateTest.cs index 1e91ea54..a00f588c 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/DeleteTest.cs index 9bc7bdc8..f1c51d2e 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/GetTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/GetTest.cs index 21fb6e0c..8cdba151 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/ListTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/ListTest.cs index a60790df..bfcfa3a0 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Customers.Groups; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/RemoveTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/RemoveTest.cs index 27b81363..c4d49908 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/RemoveTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/RemoveTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Groups/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Customers/Groups/UpdateTest.cs index 7d27c71a..84244c2b 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Groups/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Groups/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/ListTest.cs b/src/Square.Test/Unit/MockServer/Customers/ListTest.cs index b712fb08..a28f2c0b 100644 --- a/src/Square.Test/Unit/MockServer/Customers/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Customers; diff --git a/src/Square.Test/Unit/MockServer/Customers/SearchTest.cs b/src/Square.Test/Unit/MockServer/Customers/SearchTest.cs index 8d118058..4a833fdc 100644 --- a/src/Square.Test/Unit/MockServer/Customers/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Segments/GetTest.cs b/src/Square.Test/Unit/MockServer/Customers/Segments/GetTest.cs index 839adf38..ca48b7b0 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Segments/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Segments/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Customers/Segments/ListTest.cs b/src/Square.Test/Unit/MockServer/Customers/Segments/ListTest.cs index f59037a9..be039f11 100644 --- a/src/Square.Test/Unit/MockServer/Customers/Segments/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/Segments/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Customers.Segments; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Customers/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Customers/UpdateTest.cs index c7a85f1a..54f49a1c 100644 --- a/src/Square.Test/Unit/MockServer/Customers/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Customers/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Devices/Codes/CreateTest.cs b/src/Square.Test/Unit/MockServer/Devices/Codes/CreateTest.cs index 7ffd6750..80008b25 100644 --- a/src/Square.Test/Unit/MockServer/Devices/Codes/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Devices/Codes/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Devices/Codes/GetTest.cs b/src/Square.Test/Unit/MockServer/Devices/Codes/GetTest.cs index 911fe85e..703e9640 100644 --- a/src/Square.Test/Unit/MockServer/Devices/Codes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Devices/Codes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Devices/Codes/ListTest.cs b/src/Square.Test/Unit/MockServer/Devices/Codes/ListTest.cs index a167d58f..285c6aee 100644 --- a/src/Square.Test/Unit/MockServer/Devices/Codes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Devices/Codes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Devices.Codes; diff --git a/src/Square.Test/Unit/MockServer/Devices/GetTest.cs b/src/Square.Test/Unit/MockServer/Devices/GetTest.cs index de5a1c6a..9ad03825 100644 --- a/src/Square.Test/Unit/MockServer/Devices/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Devices/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -29,7 +28,7 @@ public async Task MockServerTest() "type": "TERMINAL", "manufacturer": "Square", "model": "T2", - "name": "0995-01-01T00:00:00.000Z", + "name": "Square Terminal 995", "manufacturers_id": "995CS397A6475287", "updated_at": "2023-09-29T13:12:22.365Z", "version": "5.41.0085", diff --git a/src/Square.Test/Unit/MockServer/Devices/ListTest.cs b/src/Square.Test/Unit/MockServer/Devices/ListTest.cs index fa8cc09d..a4bd74eb 100644 --- a/src/Square.Test/Unit/MockServer/Devices/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Devices/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Devices; @@ -29,7 +28,7 @@ public async Task MockServerTest() "type": "TERMINAL", "manufacturer": "Square", "model": "Square Terminal (1st Gen, v2)", - "name": "5287-01-01T00:00:00.000Z", + "name": "Square Terminal 5287", "manufacturers_id": "995CS397A6475287", "updated_at": "2025-08-19T13:04:56.335Z", "version": "5.57.0067", @@ -86,7 +85,7 @@ public async Task MockServerTest() "type": "HANDHELD", "manufacturer": "Square", "model": "Square Handheld (1st Gen, v1)", - "name": "3559-01-01T00:00:00.000Z", + "name": "Square Terminal 3559", "manufacturers_id": "998WS21803L03559", "updated_at": "2025-08-19T12:39:56.335Z", "version": "7.21.0017", diff --git a/src/Square.Test/Unit/MockServer/Disputes/AcceptTest.cs b/src/Square.Test/Unit/MockServer/Disputes/AcceptTest.cs index a5c35be5..1c3355dc 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/AcceptTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/AcceptTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Disputes/CreateEvidenceTextTest.cs b/src/Square.Test/Unit/MockServer/Disputes/CreateEvidenceTextTest.cs index 7fb73648..a041fd57 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/CreateEvidenceTextTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/CreateEvidenceTextTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Disputes/Evidence/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Disputes/Evidence/DeleteTest.cs index edd6739a..3a2de34f 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/Evidence/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/Evidence/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Disputes/Evidence/GetTest.cs b/src/Square.Test/Unit/MockServer/Disputes/Evidence/GetTest.cs index c9c64de0..08cc09fd 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/Evidence/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/Evidence/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Disputes/Evidence/ListTest.cs b/src/Square.Test/Unit/MockServer/Disputes/Evidence/ListTest.cs index 149aefa9..0d9e5740 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/Evidence/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/Evidence/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Disputes.Evidence; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Disputes/GetTest.cs b/src/Square.Test/Unit/MockServer/Disputes/GetTest.cs index c2aa359b..27215e7d 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Disputes/ListTest.cs b/src/Square.Test/Unit/MockServer/Disputes/ListTest.cs index f000972c..d1aae50e 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Disputes; diff --git a/src/Square.Test/Unit/MockServer/Disputes/SubmitEvidenceTest.cs b/src/Square.Test/Unit/MockServer/Disputes/SubmitEvidenceTest.cs index 2217c026..4569deaf 100644 --- a/src/Square.Test/Unit/MockServer/Disputes/SubmitEvidenceTest.cs +++ b/src/Square.Test/Unit/MockServer/Disputes/SubmitEvidenceTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Employees/GetTest.cs b/src/Square.Test/Unit/MockServer/Employees/GetTest.cs index 01a5d6f1..3434ff36 100644 --- a/src/Square.Test/Unit/MockServer/Employees/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Employees/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Employees/ListTest.cs b/src/Square.Test/Unit/MockServer/Employees/ListTest.cs index 381430b1..07e6fa1d 100644 --- a/src/Square.Test/Unit/MockServer/Employees/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Employees/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Employees; diff --git a/src/Square.Test/Unit/MockServer/Events/DisableEventsTest.cs b/src/Square.Test/Unit/MockServer/Events/DisableEventsTest.cs index 294e02e2..77eda47d 100644 --- a/src/Square.Test/Unit/MockServer/Events/DisableEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/Events/DisableEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Events/EnableEventsTest.cs b/src/Square.Test/Unit/MockServer/Events/EnableEventsTest.cs index ab215498..fd5e2f95 100644 --- a/src/Square.Test/Unit/MockServer/Events/EnableEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/Events/EnableEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Events/ListEventTypesTest.cs b/src/Square.Test/Unit/MockServer/Events/ListEventTypesTest.cs index f957d22c..19af069a 100644 --- a/src/Square.Test/Unit/MockServer/Events/ListEventTypesTest.cs +++ b/src/Square.Test/Unit/MockServer/Events/ListEventTypesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Events/SearchEventsTest.cs b/src/Square.Test/Unit/MockServer/Events/SearchEventsTest.cs index ca04d39a..91abe13e 100644 --- a/src/Square.Test/Unit/MockServer/Events/SearchEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/Events/SearchEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/Activities/CreateTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/Activities/CreateTest.cs index e828efc9..e54daf4e 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/Activities/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/Activities/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/Activities/ListTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/Activities/ListTest.cs index e0ecdfe2..ecc09f9c 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/Activities/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/Activities/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.GiftCards.Activities; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/CreateTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/CreateTest.cs index 13f14965..95df35a6 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/GetFromGanTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/GetFromGanTest.cs index cbade65f..04f32aa9 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/GetFromGanTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/GetFromGanTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/GetFromNonceTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/GetFromNonceTest.cs index 73729635..d2c0d8d2 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/GetFromNonceTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/GetFromNonceTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/GetTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/GetTest.cs index ac688ea4..ebfd1279 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/LinkCustomerTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/LinkCustomerTest.cs index b428ed6b..e81e0c52 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/LinkCustomerTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/LinkCustomerTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/ListTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/ListTest.cs index b36547f9..80bfbb2d 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.GiftCards; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/GiftCards/UnlinkCustomerTest.cs b/src/Square.Test/Unit/MockServer/GiftCards/UnlinkCustomerTest.cs index 4a5c7ce9..f277c084 100644 --- a/src/Square.Test/Unit/MockServer/GiftCards/UnlinkCustomerTest.cs +++ b/src/Square.Test/Unit/MockServer/GiftCards/UnlinkCustomerTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/BatchCreateChangesTest.cs b/src/Square.Test/Unit/MockServer/Inventory/BatchCreateChangesTest.cs index 45b9f10d..3e5b4ad0 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/BatchCreateChangesTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/BatchCreateChangesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/BatchGetChangesTest.cs b/src/Square.Test/Unit/MockServer/Inventory/BatchGetChangesTest.cs index 233eecfb..83b038a7 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/BatchGetChangesTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/BatchGetChangesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Inventory/BatchGetCountsTest.cs b/src/Square.Test/Unit/MockServer/Inventory/BatchGetCountsTest.cs index cc3ed21b..f057ab57 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/BatchGetCountsTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/BatchGetCountsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Inventory/ChangesTest.cs b/src/Square.Test/Unit/MockServer/Inventory/ChangesTest.cs index 227d04d7..f9077f69 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/ChangesTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/ChangesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Inventory; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchChangeTest.cs b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchChangeTest.cs index 4993b041..d2eeb947 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchChangeTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchChangeTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetChangesTest.cs b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetChangesTest.cs index 210c497e..637cd2c9 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetChangesTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetChangesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetCountsTest.cs b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetCountsTest.cs index 12fc000e..ddfc77f9 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetCountsTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedBatchGetCountsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetAdjustmentTest.cs b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetAdjustmentTest.cs index 29e871b4..7085e620 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetAdjustmentTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetAdjustmentTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetPhysicalCountTest.cs b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetPhysicalCountTest.cs index 4b19cf78..185e6b8f 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetPhysicalCountTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/DeprecatedGetPhysicalCountTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/GetAdjustmentTest.cs b/src/Square.Test/Unit/MockServer/Inventory/GetAdjustmentTest.cs index 7a3aa225..668c5d97 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/GetAdjustmentTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/GetAdjustmentTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/GetPhysicalCountTest.cs b/src/Square.Test/Unit/MockServer/Inventory/GetPhysicalCountTest.cs index c8172005..5482720d 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/GetPhysicalCountTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/GetPhysicalCountTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Inventory/GetTest.cs b/src/Square.Test/Unit/MockServer/Inventory/GetTest.cs index 5153d080..c2c7fddc 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Inventory; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Inventory/GetTransferTest.cs b/src/Square.Test/Unit/MockServer/Inventory/GetTransferTest.cs index 46881138..b4855a1e 100644 --- a/src/Square.Test/Unit/MockServer/Inventory/GetTransferTest.cs +++ b/src/Square.Test/Unit/MockServer/Inventory/GetTransferTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/CancelTest.cs b/src/Square.Test/Unit/MockServer/Invoices/CancelTest.cs index 346d6637..491f45ac 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/CreateTest.cs b/src/Square.Test/Unit/MockServer/Invoices/CreateTest.cs index b150e2f0..f20c672a 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/DeleteInvoiceAttachmentTest.cs b/src/Square.Test/Unit/MockServer/Invoices/DeleteInvoiceAttachmentTest.cs index b5d9c002..3eafac8e 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/DeleteInvoiceAttachmentTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/DeleteInvoiceAttachmentTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Invoices/DeleteTest.cs index 5ff36a7d..66057264 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/GetTest.cs b/src/Square.Test/Unit/MockServer/Invoices/GetTest.cs index 9cdb5641..343cbeea 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/ListTest.cs b/src/Square.Test/Unit/MockServer/Invoices/ListTest.cs index 3757ce26..e0f07dd4 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Invoices; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Invoices/PublishTest.cs b/src/Square.Test/Unit/MockServer/Invoices/PublishTest.cs index 895cb4c4..0b812673 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/PublishTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/PublishTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/SearchTest.cs b/src/Square.Test/Unit/MockServer/Invoices/SearchTest.cs index 120a0f42..93f1aab1 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Invoices/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Invoices/UpdateTest.cs index 62d169b5..7e5a4c42 100644 --- a/src/Square.Test/Unit/MockServer/Invoices/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Invoices/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/CreateTest.cs b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/CreateTest.cs index 9b7757a2..e17232ea 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/DeleteTest.cs index b3157e9c..2fb82906 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/GetTest.cs b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/GetTest.cs index 92b0d95f..357d19a2 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/ListTest.cs b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/ListTest.cs index eb6443da..a92ac48d 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Labor.BreakTypes; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/UpdateTest.cs index f5c3b0ec..94e39105 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BreakTypes/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BreakTypes/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/BulkPublishScheduledShiftsTest.cs b/src/Square.Test/Unit/MockServer/Labor/BulkPublishScheduledShiftsTest.cs index c8c199ba..a1a1eccd 100644 --- a/src/Square.Test/Unit/MockServer/Labor/BulkPublishScheduledShiftsTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/BulkPublishScheduledShiftsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/CreateScheduledShiftTest.cs b/src/Square.Test/Unit/MockServer/Labor/CreateScheduledShiftTest.cs index cb74677b..c3f56465 100644 --- a/src/Square.Test/Unit/MockServer/Labor/CreateScheduledShiftTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/CreateScheduledShiftTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/CreateTimecardTest.cs b/src/Square.Test/Unit/MockServer/Labor/CreateTimecardTest.cs index 0fbc9ea8..36a0dc8d 100644 --- a/src/Square.Test/Unit/MockServer/Labor/CreateTimecardTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/CreateTimecardTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/DeleteTimecardTest.cs b/src/Square.Test/Unit/MockServer/Labor/DeleteTimecardTest.cs index 52439dff..d276bb8d 100644 --- a/src/Square.Test/Unit/MockServer/Labor/DeleteTimecardTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/DeleteTimecardTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/GetTest.cs b/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/GetTest.cs index 7a876831..d11f48c2 100644 --- a/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/ListTest.cs b/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/ListTest.cs index 44a61954..edfabcec 100644 --- a/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/EmployeeWages/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Labor.EmployeeWages; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Labor/PublishScheduledShiftTest.cs b/src/Square.Test/Unit/MockServer/Labor/PublishScheduledShiftTest.cs index b32752a9..2c0f0cf3 100644 --- a/src/Square.Test/Unit/MockServer/Labor/PublishScheduledShiftTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/PublishScheduledShiftTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/RetrieveScheduledShiftTest.cs b/src/Square.Test/Unit/MockServer/Labor/RetrieveScheduledShiftTest.cs index 442ada99..8b75fcde 100644 --- a/src/Square.Test/Unit/MockServer/Labor/RetrieveScheduledShiftTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/RetrieveScheduledShiftTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/RetrieveTimecardTest.cs b/src/Square.Test/Unit/MockServer/Labor/RetrieveTimecardTest.cs index 6f80fc80..a6c61e0a 100644 --- a/src/Square.Test/Unit/MockServer/Labor/RetrieveTimecardTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/RetrieveTimecardTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/SearchScheduledShiftsTest.cs b/src/Square.Test/Unit/MockServer/Labor/SearchScheduledShiftsTest.cs index 842950b8..09883820 100644 --- a/src/Square.Test/Unit/MockServer/Labor/SearchScheduledShiftsTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/SearchScheduledShiftsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/SearchTimecardsTest.cs b/src/Square.Test/Unit/MockServer/Labor/SearchTimecardsTest.cs index 1cee36f9..1feadf0f 100644 --- a/src/Square.Test/Unit/MockServer/Labor/SearchTimecardsTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/SearchTimecardsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/Shifts/CreateTest.cs b/src/Square.Test/Unit/MockServer/Labor/Shifts/CreateTest.cs index 7bb46cde..e109ff6a 100644 --- a/src/Square.Test/Unit/MockServer/Labor/Shifts/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/Shifts/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/Shifts/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Labor/Shifts/DeleteTest.cs index ae808997..f724f169 100644 --- a/src/Square.Test/Unit/MockServer/Labor/Shifts/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/Shifts/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/Shifts/GetTest.cs b/src/Square.Test/Unit/MockServer/Labor/Shifts/GetTest.cs index 105b43eb..0ab650cb 100644 --- a/src/Square.Test/Unit/MockServer/Labor/Shifts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/Shifts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/Shifts/SearchTest.cs b/src/Square.Test/Unit/MockServer/Labor/Shifts/SearchTest.cs index 40f79fa3..2d6aeaa3 100644 --- a/src/Square.Test/Unit/MockServer/Labor/Shifts/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/Shifts/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/Shifts/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Labor/Shifts/UpdateTest.cs index df16394e..c3bc794c 100644 --- a/src/Square.Test/Unit/MockServer/Labor/Shifts/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/Shifts/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/GetTest.cs b/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/GetTest.cs index fa0db127..49108a5e 100644 --- a/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/ListTest.cs b/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/ListTest.cs index 84025d08..1d13fca4 100644 --- a/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/TeamMemberWages/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Labor.TeamMemberWages; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Labor/UpdateScheduledShiftTest.cs b/src/Square.Test/Unit/MockServer/Labor/UpdateScheduledShiftTest.cs index 3aff0684..ede3c05e 100644 --- a/src/Square.Test/Unit/MockServer/Labor/UpdateScheduledShiftTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/UpdateScheduledShiftTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/UpdateTimecardTest.cs b/src/Square.Test/Unit/MockServer/Labor/UpdateTimecardTest.cs index c9321e3d..c7ccc907 100644 --- a/src/Square.Test/Unit/MockServer/Labor/UpdateTimecardTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/UpdateTimecardTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/GetTest.cs b/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/GetTest.cs index b32cb039..b409756f 100644 --- a/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/ListTest.cs b/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/ListTest.cs index d3b38c5e..ef86f111 100644 --- a/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Labor/WorkweekConfigs/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Labor.WorkweekConfigs; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Locations/CheckoutsTest.cs b/src/Square.Test/Unit/MockServer/Locations/CheckoutsTest.cs index 39a5be95..ef6b0aaf 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CheckoutsTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CheckoutsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CreateTest.cs b/src/Square.Test/Unit/MockServer/Locations/CreateTest.cs index 84684b9d..f58ee9cd 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/CreateTest.cs index be476a16..1b63df0c 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -18,7 +17,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "bestseller", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Bestseller", "description": "Bestselling item at location", @@ -32,7 +31,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "bestseller", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Bestseller", "description": "Bestselling item at location", diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/DeleteTest.cs index b2d8223e..1deb6e60 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/GetTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/GetTest.cs index 8a1423a1..c486aa41 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -17,7 +16,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "bestseller", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Bestseller", "description": "Bestselling item at location", diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/ListTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/ListTest.cs index 0680a3b3..28b104c4 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; @@ -17,7 +16,7 @@ public async Task MockServerTest() { "key": "phone-number", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.PhoneNumber" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.PhoneNumber" }, "name": "phone number", "description": "Location's phone number", @@ -29,7 +28,7 @@ public async Task MockServerTest() { "key": "bestseller", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Bestseller", "description": "Bestselling item at location", diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/UpdateTest.cs index 849c4cbe..bc87741d 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributeDefinitions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -27,7 +26,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "bestseller", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Bestseller", "description": "Update the description as desired.", diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchDeleteTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchDeleteTest.cs index bc2f95e0..4cf99359 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchDeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchDeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchUpsertTest.cs index f2f25636..c9649f13 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/DeleteTest.cs index 73e28af8..540548b8 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/GetTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/GetTest.cs index ebcd1f3a..b4f22138 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/ListTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/ListTest.cs index 8329c50e..155b5eba 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/UpsertTest.cs index 665be7cb..d1815090 100644 --- a/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/CustomAttributes/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/GetTest.cs b/src/Square.Test/Unit/MockServer/Locations/GetTest.cs index 9d480732..0e174ded 100644 --- a/src/Square.Test/Unit/MockServer/Locations/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/ListTest.cs b/src/Square.Test/Unit/MockServer/Locations/ListTest.cs index 70f0a839..391dee34 100644 --- a/src/Square.Test/Unit/MockServer/Locations/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/Transactions/CaptureTest.cs b/src/Square.Test/Unit/MockServer/Locations/Transactions/CaptureTest.cs index 79c820f7..adeede3b 100644 --- a/src/Square.Test/Unit/MockServer/Locations/Transactions/CaptureTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/Transactions/CaptureTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/Transactions/GetTest.cs b/src/Square.Test/Unit/MockServer/Locations/Transactions/GetTest.cs index 77fc9590..6167f15a 100644 --- a/src/Square.Test/Unit/MockServer/Locations/Transactions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/Transactions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/Transactions/ListTest.cs b/src/Square.Test/Unit/MockServer/Locations/Transactions/ListTest.cs index 5bd18c1a..ae6e6d96 100644 --- a/src/Square.Test/Unit/MockServer/Locations/Transactions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/Transactions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/Transactions/VoidTest.cs b/src/Square.Test/Unit/MockServer/Locations/Transactions/VoidTest.cs index 1d869662..0a167fc6 100644 --- a/src/Square.Test/Unit/MockServer/Locations/Transactions/VoidTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/Transactions/VoidTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Locations/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Locations/UpdateTest.cs index eec2ca50..5a3b1b85 100644 --- a/src/Square.Test/Unit/MockServer/Locations/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Locations/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AccumulatePointsTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AccumulatePointsTest.cs index 50c52b96..6ef52244 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AccumulatePointsTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AccumulatePointsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AdjustTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AdjustTest.cs index 9157a05c..70eb3f4b 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AdjustTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/AdjustTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/CreateTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/CreateTest.cs index 3e2ec0f1..7e401587 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/GetTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/GetTest.cs index 457a59b8..ff20fd33 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/SearchTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/SearchTest.cs index 45bd0ac3..fbe18698 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Accounts/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Accounts/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/CalculateTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/CalculateTest.cs index 4d7a8f6e..26341577 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/CalculateTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/CalculateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/GetTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/GetTest.cs index 7e4bb0f5..c9670958 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/ListTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/ListTest.cs index 535263ce..488da3bd 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CancelTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CancelTest.cs index 0d3120d5..c7e21e75 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CreateTest.cs index 4a400410..970cd5ab 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/GetTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/GetTest.cs index e44edd21..c2ffd13b 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/ListTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/ListTest.cs index b97eb70e..e47b1b54 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Programs/Promotions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Loyalty.Programs.Promotions; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/CreateTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/CreateTest.cs index 22eaa3c1..8c8c0b41 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/DeleteTest.cs index 9e2cda7e..f52e709f 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/GetTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/GetTest.cs index dd072e63..9f6880e0 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/RedeemTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/RedeemTest.cs index c456bb68..9161f1b7 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/RedeemTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/RedeemTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/SearchTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/SearchTest.cs index ff19c700..25e8fd63 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/Rewards/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/Rewards/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Loyalty/SearchEventsTest.cs b/src/Square.Test/Unit/MockServer/Loyalty/SearchEventsTest.cs index fd9fa3b6..1ca46184 100644 --- a/src/Square.Test/Unit/MockServer/Loyalty/SearchEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/Loyalty/SearchEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/CreateTest.cs index fcb47ea0..1b42df0c 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -18,7 +17,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "alternative_seller_name", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", @@ -32,7 +31,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "alternative_seller_name", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/DeleteTest.cs index edacaed2..edf3cd0c 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/GetTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/GetTest.cs index d8786c4b..31909328 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -17,7 +16,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "alternative_seller_name", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/ListTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/ListTest.cs index 5a67fc92..67540dc8 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; @@ -17,7 +16,7 @@ public async Task MockServerTest() { "key": "has_seen_tutorial", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" }, "name": "NAME", "description": "Whether the merchant has seen the tutorial screen for using the app.", @@ -29,7 +28,7 @@ public async Task MockServerTest() { "key": "alternative_seller_name", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/UpdateTest.cs index 1a0a0d28..2fb5af3d 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributeDefinitions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -27,7 +26,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "alternative_seller_name", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "name": "Alternative Merchant Name", "description": "Update the description as desired.", diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchDeleteTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchDeleteTest.cs index 8a985188..1c58f17c 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchDeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchDeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchUpsertTest.cs index 4409c323..81a461d3 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/DeleteTest.cs index 84c10552..d9742968 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/GetTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/GetTest.cs index 19032cd3..51375141 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/ListTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/ListTest.cs index 7e4e8bfe..ca0a512d 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/UpsertTest.cs index 9193edf2..7e14343b 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/CustomAttributes/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/GetTest.cs b/src/Square.Test/Unit/MockServer/Merchants/GetTest.cs index bcfcbed2..088c611c 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Merchants/ListTest.cs b/src/Square.Test/Unit/MockServer/Merchants/ListTest.cs index afa16651..67a51061 100644 --- a/src/Square.Test/Unit/MockServer/Merchants/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Merchants/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Merchants; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Mobile/AuthorizationCodeTest.cs b/src/Square.Test/Unit/MockServer/Mobile/AuthorizationCodeTest.cs index c5c3e2b8..1d89e56d 100644 --- a/src/Square.Test/Unit/MockServer/Mobile/AuthorizationCodeTest.cs +++ b/src/Square.Test/Unit/MockServer/Mobile/AuthorizationCodeTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/OAuth/ObtainTokenTest.cs b/src/Square.Test/Unit/MockServer/OAuth/ObtainTokenTest.cs index e9642332..bb227aa7 100644 --- a/src/Square.Test/Unit/MockServer/OAuth/ObtainTokenTest.cs +++ b/src/Square.Test/Unit/MockServer/OAuth/ObtainTokenTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/OAuth/RetrieveTokenStatusTest.cs b/src/Square.Test/Unit/MockServer/OAuth/RetrieveTokenStatusTest.cs index 0eaf958b..698da265 100644 --- a/src/Square.Test/Unit/MockServer/OAuth/RetrieveTokenStatusTest.cs +++ b/src/Square.Test/Unit/MockServer/OAuth/RetrieveTokenStatusTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/OAuth/RevokeTokenTest.cs b/src/Square.Test/Unit/MockServer/OAuth/RevokeTokenTest.cs index 29537164..ea590187 100644 --- a/src/Square.Test/Unit/MockServer/OAuth/RevokeTokenTest.cs +++ b/src/Square.Test/Unit/MockServer/OAuth/RevokeTokenTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/BatchGetTest.cs b/src/Square.Test/Unit/MockServer/Orders/BatchGetTest.cs index bd4efc85..8dcd3957 100644 --- a/src/Square.Test/Unit/MockServer/Orders/BatchGetTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/BatchGetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CalculateTest.cs b/src/Square.Test/Unit/MockServer/Orders/CalculateTest.cs index c2b3e9b1..8ba8c36d 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CalculateTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CalculateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CloneTest.cs b/src/Square.Test/Unit/MockServer/Orders/CloneTest.cs index fae430bb..db904c71 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CloneTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CloneTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CreateTest.cs b/src/Square.Test/Unit/MockServer/Orders/CreateTest.cs index 098b8683..7e285417 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/CreateTest.cs index 0c40e88b..447e8d9a 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -18,7 +17,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "cover-count", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Cover count", "description": "The number of people seated at a table", @@ -33,7 +32,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "cover-count", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Cover count", "description": "The number of people seated at a table", diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/DeleteTest.cs index ad42004c..3f752c7d 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/GetTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/GetTest.cs index d0676c90..00b1c756 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -17,7 +16,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "cover-count", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Cover count", "description": "The number of people seated at a table", diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/ListTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/ListTest.cs index 3cc7a6ea..aa2699ea 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; @@ -17,7 +16,7 @@ public async Task MockServerTest() { "key": "cover-count", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Cover count", "description": "The number of people seated at a table", @@ -29,7 +28,7 @@ public async Task MockServerTest() { "key": "seat-number", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Seat number", "description": "The identifier for a particular seat", @@ -41,7 +40,7 @@ public async Task MockServerTest() { "key": "table-number", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Table number", "description": "The identifier for a particular table", diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/UpdateTest.cs index 11493258..68610d8b 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributeDefinitions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -29,7 +28,7 @@ public async Task MockServerTest() "custom_attribute_definition": { "key": "cover-count", "schema": { - "\\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "name": "Cover count", "description": "The number of people seated at a table", diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchDeleteTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchDeleteTest.cs index 81915b25..7e79e399 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchDeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchDeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchUpsertTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchUpsertTest.cs index 60d1bf16..9ad8017e 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchUpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/BatchUpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/DeleteTest.cs index 35446491..205a48cf 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/GetTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/GetTest.cs index 031c89ad..c61d79af 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/ListTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/ListTest.cs index 94ee786e..136fc536 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/UpsertTest.cs index b5cfb09c..6e06103c 100644 --- a/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/CustomAttributes/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/GetTest.cs b/src/Square.Test/Unit/MockServer/Orders/GetTest.cs index 9089a3f5..894f57a6 100644 --- a/src/Square.Test/Unit/MockServer/Orders/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/PayTest.cs b/src/Square.Test/Unit/MockServer/Orders/PayTest.cs index 3a09552c..67babe05 100644 --- a/src/Square.Test/Unit/MockServer/Orders/PayTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/PayTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/SearchTest.cs b/src/Square.Test/Unit/MockServer/Orders/SearchTest.cs index aa0e6976..b446b815 100644 --- a/src/Square.Test/Unit/MockServer/Orders/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Orders/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Orders/UpdateTest.cs index 19f2ec4c..f72f5c23 100644 --- a/src/Square.Test/Unit/MockServer/Orders/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Orders/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/CancelByIdempotencyKeyTest.cs b/src/Square.Test/Unit/MockServer/Payments/CancelByIdempotencyKeyTest.cs index b763a4ba..86c2b3b7 100644 --- a/src/Square.Test/Unit/MockServer/Payments/CancelByIdempotencyKeyTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/CancelByIdempotencyKeyTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/CancelTest.cs b/src/Square.Test/Unit/MockServer/Payments/CancelTest.cs index f7eb8c1a..ecf3c64f 100644 --- a/src/Square.Test/Unit/MockServer/Payments/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/CompleteTest.cs b/src/Square.Test/Unit/MockServer/Payments/CompleteTest.cs index abb84b20..7ddcf017 100644 --- a/src/Square.Test/Unit/MockServer/Payments/CompleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/CompleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/CreateTest.cs b/src/Square.Test/Unit/MockServer/Payments/CreateTest.cs index f80eb9be..524ad26f 100644 --- a/src/Square.Test/Unit/MockServer/Payments/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/GetTest.cs b/src/Square.Test/Unit/MockServer/Payments/GetTest.cs index c14a3832..d74495f5 100644 --- a/src/Square.Test/Unit/MockServer/Payments/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payments/ListTest.cs b/src/Square.Test/Unit/MockServer/Payments/ListTest.cs index d29b1414..45f3d615 100644 --- a/src/Square.Test/Unit/MockServer/Payments/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Payments; diff --git a/src/Square.Test/Unit/MockServer/Payments/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Payments/UpdateTest.cs index 637d0cf9..cc63afa6 100644 --- a/src/Square.Test/Unit/MockServer/Payments/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Payments/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payouts/GetTest.cs b/src/Square.Test/Unit/MockServer/Payouts/GetTest.cs index d61c7c2c..84c34b83 100644 --- a/src/Square.Test/Unit/MockServer/Payouts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Payouts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Payouts/ListEntriesTest.cs b/src/Square.Test/Unit/MockServer/Payouts/ListEntriesTest.cs index d060b687..76edea36 100644 --- a/src/Square.Test/Unit/MockServer/Payouts/ListEntriesTest.cs +++ b/src/Square.Test/Unit/MockServer/Payouts/ListEntriesTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Payouts; diff --git a/src/Square.Test/Unit/MockServer/Payouts/ListTest.cs b/src/Square.Test/Unit/MockServer/Payouts/ListTest.cs index e3cf9232..b570aabc 100644 --- a/src/Square.Test/Unit/MockServer/Payouts/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Payouts/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Payouts; diff --git a/src/Square.Test/Unit/MockServer/Refunds/GetTest.cs b/src/Square.Test/Unit/MockServer/Refunds/GetTest.cs index 5d44531b..30c1704d 100644 --- a/src/Square.Test/Unit/MockServer/Refunds/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Refunds/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Refunds/ListTest.cs b/src/Square.Test/Unit/MockServer/Refunds/ListTest.cs index 40bdb489..c37f0814 100644 --- a/src/Square.Test/Unit/MockServer/Refunds/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Refunds/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Refunds; diff --git a/src/Square.Test/Unit/MockServer/Refunds/RefundPaymentTest.cs b/src/Square.Test/Unit/MockServer/Refunds/RefundPaymentTest.cs index 16ba8148..87f3af94 100644 --- a/src/Square.Test/Unit/MockServer/Refunds/RefundPaymentTest.cs +++ b/src/Square.Test/Unit/MockServer/Refunds/RefundPaymentTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Sites/ListTest.cs b/src/Square.Test/Unit/MockServer/Sites/ListTest.cs index dd10af6c..b9a264b3 100644 --- a/src/Square.Test/Unit/MockServer/Sites/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Sites/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Snippets/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Snippets/DeleteTest.cs index 82fe0357..f0f091e3 100644 --- a/src/Square.Test/Unit/MockServer/Snippets/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Snippets/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Snippets/GetTest.cs b/src/Square.Test/Unit/MockServer/Snippets/GetTest.cs index 3ac66e2f..e238aa40 100644 --- a/src/Square.Test/Unit/MockServer/Snippets/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Snippets/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Snippets/UpsertTest.cs b/src/Square.Test/Unit/MockServer/Snippets/UpsertTest.cs index 64eb911c..3e0a8c00 100644 --- a/src/Square.Test/Unit/MockServer/Snippets/UpsertTest.cs +++ b/src/Square.Test/Unit/MockServer/Snippets/UpsertTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/BulkSwapPlanTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/BulkSwapPlanTest.cs index 616c11d1..53a71986 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/BulkSwapPlanTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/BulkSwapPlanTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/CancelTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/CancelTest.cs index a1a4bd45..7e3eac64 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/ChangeBillingAnchorDateTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/ChangeBillingAnchorDateTest.cs index b83a4546..debba093 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/ChangeBillingAnchorDateTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/ChangeBillingAnchorDateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/CreateTest.cs index 6f01fd7e..850da1a4 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/DeleteActionTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/DeleteActionTest.cs index dd60b0ec..9df546f8 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/DeleteActionTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/DeleteActionTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/GetTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/GetTest.cs index 2dcf4102..d2c65fb1 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/ListEventsTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/ListEventsTest.cs index 5a700438..a7314af4 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/ListEventsTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/ListEventsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square.Subscriptions; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/PauseTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/PauseTest.cs index 33ccb6a6..ab357f19 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/PauseTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/PauseTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/ResumeTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/ResumeTest.cs index 180845fb..faf5d56c 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/ResumeTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/ResumeTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/SearchTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/SearchTest.cs index 0a1cdbba..b9fabf35 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/SwapPlanTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/SwapPlanTest.cs index da634405..52f0a861 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/SwapPlanTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/SwapPlanTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Subscriptions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Subscriptions/UpdateTest.cs index e02784b3..7b308120 100644 --- a/src/Square.Test/Unit/MockServer/Subscriptions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Subscriptions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Team/CreateJobTest.cs b/src/Square.Test/Unit/MockServer/Team/CreateJobTest.cs index be631116..e139369b 100644 --- a/src/Square.Test/Unit/MockServer/Team/CreateJobTest.cs +++ b/src/Square.Test/Unit/MockServer/Team/CreateJobTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Team/ListJobsTest.cs b/src/Square.Test/Unit/MockServer/Team/ListJobsTest.cs index 9d66512c..d756ab52 100644 --- a/src/Square.Test/Unit/MockServer/Team/ListJobsTest.cs +++ b/src/Square.Test/Unit/MockServer/Team/ListJobsTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Team/RetrieveJobTest.cs b/src/Square.Test/Unit/MockServer/Team/RetrieveJobTest.cs index ceca6aa6..a1ab6645 100644 --- a/src/Square.Test/Unit/MockServer/Team/RetrieveJobTest.cs +++ b/src/Square.Test/Unit/MockServer/Team/RetrieveJobTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Team/UpdateJobTest.cs b/src/Square.Test/Unit/MockServer/Team/UpdateJobTest.cs index 1e21143c..b18878b0 100644 --- a/src/Square.Test/Unit/MockServer/Team/UpdateJobTest.cs +++ b/src/Square.Test/Unit/MockServer/Team/UpdateJobTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/BatchCreateTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/BatchCreateTest.cs index 1a4cbc52..36dc27c1 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/BatchCreateTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/BatchCreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/BatchUpdateTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/BatchUpdateTest.cs index b0150fb3..65000b71 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/BatchUpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/BatchUpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/CreateTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/CreateTest.cs index 2f48e40b..98254908 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/GetTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/GetTest.cs index f3f4fc58..47301107 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/SearchTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/SearchTest.cs index 0eabb4df..bc965400 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/UpdateTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/UpdateTest.cs index 464d4930..1fa67c87 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/GetTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/GetTest.cs index 806156de..a70e6bfc 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/UpdateTest.cs b/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/UpdateTest.cs index 9ce14c3a..7d1804da 100644 --- a/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/TeamMembers/WageSetting/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Actions/CancelTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Actions/CancelTest.cs index 584d6ab5..e68bef29 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Actions/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Actions/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Actions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Actions/CreateTest.cs index b5da3676..f5570903 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Actions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Actions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Actions/GetTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Actions/GetTest.cs index 088a1ae4..7f215e9f 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Actions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Actions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Actions/SearchTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Actions/SearchTest.cs index 7b643032..dba5bd74 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Actions/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Actions/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CancelTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CancelTest.cs index a7b52027..9761df62 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CreateTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CreateTest.cs index 4cd3ecd8..f9882519 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/GetTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/GetTest.cs index 4f6c7306..2062f4c4 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/SearchTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/SearchTest.cs index a11b0a8c..4c3b376a 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Checkouts/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Checkouts/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalActionTest.cs b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalActionTest.cs index 64d67707..ecac1c21 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalActionTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalActionTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalCheckoutTest.cs b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalCheckoutTest.cs index 4c723650..5f9a4b41 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalCheckoutTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalCheckoutTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalRefundTest.cs b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalRefundTest.cs index 30855188..c71b36ee 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalRefundTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/DismissTerminalRefundTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Refunds/CancelTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Refunds/CancelTest.cs index 13004ba8..8f2c7cc4 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Refunds/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Refunds/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Refunds/CreateTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Refunds/CreateTest.cs index 0d72ce1a..ea8b1162 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Refunds/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Refunds/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Refunds/GetTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Refunds/GetTest.cs index b3cd0d46..dbc15b33 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Refunds/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Refunds/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Terminal/Refunds/SearchTest.cs b/src/Square.Test/Unit/MockServer/Terminal/Refunds/SearchTest.cs index e46ed815..a66e5bb2 100644 --- a/src/Square.Test/Unit/MockServer/Terminal/Refunds/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Terminal/Refunds/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/CancelTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/CancelTest.cs index b5aa0059..7088abb8 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/CancelTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/CancelTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/CreateTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/CreateTest.cs index 3a663a82..8e8c2367 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/DeleteTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/DeleteTest.cs index 84d77e7e..fd5a12d8 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/GetTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/GetTest.cs index ce16ed92..4e712e00 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/ReceiveTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/ReceiveTest.cs index 757fc0c4..43cccec3 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/ReceiveTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/ReceiveTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/SearchTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/SearchTest.cs index 1363afd4..55184dd5 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/StartTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/StartTest.cs index c6fc4df9..80a89e2f 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/StartTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/StartTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/TransferOrders/UpdateTest.cs b/src/Square.Test/Unit/MockServer/TransferOrders/UpdateTest.cs index 4c347067..03454c21 100644 --- a/src/Square.Test/Unit/MockServer/TransferOrders/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/TransferOrders/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/V1Transactions/V1ListOrdersTest.cs b/src/Square.Test/Unit/MockServer/V1Transactions/V1ListOrdersTest.cs index f52eac37..802a6629 100644 --- a/src/Square.Test/Unit/MockServer/V1Transactions/V1ListOrdersTest.cs +++ b/src/Square.Test/Unit/MockServer/V1Transactions/V1ListOrdersTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/V1Transactions/V1RetrieveOrderTest.cs b/src/Square.Test/Unit/MockServer/V1Transactions/V1RetrieveOrderTest.cs index 2bf0f90c..6163e611 100644 --- a/src/Square.Test/Unit/MockServer/V1Transactions/V1RetrieveOrderTest.cs +++ b/src/Square.Test/Unit/MockServer/V1Transactions/V1RetrieveOrderTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/V1Transactions/V1UpdateOrderTest.cs b/src/Square.Test/Unit/MockServer/V1Transactions/V1UpdateOrderTest.cs index 7d6a2683..316a7054 100644 --- a/src/Square.Test/Unit/MockServer/V1Transactions/V1UpdateOrderTest.cs +++ b/src/Square.Test/Unit/MockServer/V1Transactions/V1UpdateOrderTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/BatchCreateTest.cs b/src/Square.Test/Unit/MockServer/Vendors/BatchCreateTest.cs index 0f7281fe..e9bb7660 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/BatchCreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/BatchCreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/BatchGetTest.cs b/src/Square.Test/Unit/MockServer/Vendors/BatchGetTest.cs index 957fa59e..9ed4f5bd 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/BatchGetTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/BatchGetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/BatchUpdateTest.cs b/src/Square.Test/Unit/MockServer/Vendors/BatchUpdateTest.cs index 3c711aed..10ad37db 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/BatchUpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/BatchUpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/CreateTest.cs b/src/Square.Test/Unit/MockServer/Vendors/CreateTest.cs index eb5019e3..c04d8150 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/GetTest.cs b/src/Square.Test/Unit/MockServer/Vendors/GetTest.cs index 65bf8c84..c70ca1c6 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/SearchTest.cs b/src/Square.Test/Unit/MockServer/Vendors/SearchTest.cs index e2336f15..9086cab5 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/SearchTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/SearchTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Vendors/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Vendors/UpdateTest.cs index a748ad66..78c9948e 100644 --- a/src/Square.Test/Unit/MockServer/Vendors/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Vendors/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/EventTypes/ListTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/EventTypes/ListTest.cs index f9c71a44..60715e25 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/EventTypes/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/EventTypes/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/CreateTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/CreateTest.cs index 2a8b68ec..4aaf6283 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/CreateTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/CreateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -49,8 +48,8 @@ public async Task MockServerTest() "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "1k9bIJKCeTmSQwyagtNRLg", - "created_at": "2022-01-10T23:29:48.000Z", - "updated_at": "2022-01-10T23:29:48.000Z" + "created_at": "2022-01-10 23:29:48 +0000 UTC", + "updated_at": "2022-01-10 23:29:48 +0000 UTC" } } """; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/DeleteTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/DeleteTest.cs index 41a86fa0..9d7ed23f 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/DeleteTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/DeleteTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/GetTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/GetTest.cs index 11ca2e4e..5569680d 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/GetTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/GetTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -33,8 +32,8 @@ public async Task MockServerTest() "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "1k9bIJKCeTmSQwyagtNRLg", - "created_at": "2022-01-10T23:29:48.000Z", - "updated_at": "2022-01-10T23:29:48.000Z" + "created_at": "2022-01-10 23:29:48 +0000 UTC", + "updated_at": "2022-01-10 23:29:48 +0000 UTC" } } """; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/ListTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/ListTest.cs index 48f719fd..cbdd3f78 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/ListTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/ListTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Test.Unit.MockServer; @@ -34,8 +33,8 @@ public async Task MockServerTest() "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "signature_key", - "created_at": "2022-01-10T23:29:48.000Z", - "updated_at": "2022-01-10T23:29:48.000Z" + "created_at": "2022-01-10 23:29:48 +0000 UTC", + "updated_at": "2022-01-10 23:29:48 +0000 UTC" } ], "cursor": "cursor" diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/TestTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/TestTest.cs index 77428c31..f698309a 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/TestTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/TestTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateSignatureKeyTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateSignatureKeyTest.cs index 7a5adf03..8a2f86f3 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateSignatureKeyTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateSignatureKeyTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; diff --git a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateTest.cs b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateTest.cs index a883102e..4c9723db 100644 --- a/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateTest.cs +++ b/src/Square.Test/Unit/MockServer/Webhooks/Subscriptions/UpdateTest.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using NUnit.Framework; using Square; using Square.Core; @@ -43,8 +42,8 @@ public async Task MockServerTest() "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "signature_key", - "created_at": "2022-01-10T23:29:48.000Z", - "updated_at": "2022-01-10T23:45:51.000Z" + "created_at": "2022-01-10 23:29:48 +0000 UTC", + "updated_at": "2022-01-10 23:45:51 +0000 UTC" } } """; diff --git a/src/Square/ApplePay/ApplePayClient.cs b/src/Square/ApplePay/ApplePayClient.cs index 2855768b..8a61a33d 100644 --- a/src/Square/ApplePay/ApplePayClient.cs +++ b/src/Square/ApplePay/ApplePayClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/BankAccounts/BankAccountsClient.cs b/src/Square/BankAccounts/BankAccountsClient.cs index 6bdb1807..917d5c34 100644 --- a/src/Square/BankAccounts/BankAccountsClient.cs +++ b/src/Square/BankAccounts/BankAccountsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -112,8 +109,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.BankAccounts?.ToList(), + response => response.Cursor, + response => response.BankAccounts?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Bookings/BookingsClient.cs b/src/Square/Bookings/BookingsClient.cs index b514ad78..b9e2fa47 100644 --- a/src/Square/Bookings/BookingsClient.cs +++ b/src/Square/Bookings/BookingsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Bookings.LocationProfiles; using Square.Bookings.TeamMemberProfiles; @@ -155,8 +152,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Bookings?.ToList(), + response => response.Cursor, + response => response.Bookings?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Bookings/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs b/src/Square/Bookings/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs index 57cc3aec..34916f2b 100644 --- a/src/Square/Bookings/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs +++ b/src/Square/Bookings/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -115,8 +112,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributeDefinitions?.ToList(), + response => response.Cursor, + response => response.CustomAttributeDefinitions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Bookings/CustomAttributes/CustomAttributesClient.cs b/src/Square/Bookings/CustomAttributes/CustomAttributesClient.cs index 6411d330..82078c41 100644 --- a/src/Square/Bookings/CustomAttributes/CustomAttributesClient.cs +++ b/src/Square/Bookings/CustomAttributes/CustomAttributesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -262,8 +259,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributes?.ToList(), + response => response.Cursor, + response => response.CustomAttributes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Bookings/LocationProfiles/LocationProfilesClient.cs b/src/Square/Bookings/LocationProfiles/LocationProfilesClient.cs index 473122a2..1fce5c33 100644 --- a/src/Square/Bookings/LocationProfiles/LocationProfilesClient.cs +++ b/src/Square/Bookings/LocationProfiles/LocationProfilesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -103,8 +100,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.LocationBookingProfiles?.ToList(), + response => response.Cursor, + response => response.LocationBookingProfiles?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Bookings/TeamMemberProfiles/TeamMemberProfilesClient.cs b/src/Square/Bookings/TeamMemberProfiles/TeamMemberProfilesClient.cs index 8af18762..af57a494 100644 --- a/src/Square/Bookings/TeamMemberProfiles/TeamMemberProfilesClient.cs +++ b/src/Square/Bookings/TeamMemberProfiles/TeamMemberProfilesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -117,8 +114,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.TeamMemberBookingProfiles?.ToList(), + response => response.Cursor, + response => response.TeamMemberBookingProfiles?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Cards/CardsClient.cs b/src/Square/Cards/CardsClient.cs index a5e2dce9..0d0379e2 100644 --- a/src/Square/Cards/CardsClient.cs +++ b/src/Square/Cards/CardsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -124,8 +121,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Cards?.ToList(), + response => response.Cursor, + response => response.Cards?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/CashDrawers/Shifts/ShiftsClient.cs b/src/Square/CashDrawers/Shifts/ShiftsClient.cs index c3092073..0528386a 100644 --- a/src/Square/CashDrawers/Shifts/ShiftsClient.cs +++ b/src/Square/CashDrawers/Shifts/ShiftsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -184,8 +181,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CashDrawerShifts?.ToList(), + response => response.Cursor, + response => response.CashDrawerShifts?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -291,8 +288,8 @@ public async Task> ListEventsAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CashDrawerShiftEvents?.ToList(), + response => response.Cursor, + response => response.CashDrawerShiftEvents?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Catalog/CatalogClient.cs b/src/Square/Catalog/CatalogClient.cs index 5896dbe4..05c0469a 100644 --- a/src/Square/Catalog/CatalogClient.cs +++ b/src/Square/Catalog/CatalogClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Catalog.Images; using Square.Catalog.Object; @@ -387,8 +384,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Objects?.ToList(), + response => response.Cursor, + response => response.Objects?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Catalog/Images/ImagesClient.cs b/src/Square/Catalog/Images/ImagesClient.cs index 7cbc8089..4e164e69 100644 --- a/src/Square/Catalog/Images/ImagesClient.cs +++ b/src/Square/Catalog/Images/ImagesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -24,6 +21,9 @@ internal ImagesClient(RawClient client) /// This `CreateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in /// JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. /// + /// + /// await client.Catalog.Images.CreateAsync(new CreateImagesRequest()); + /// public async Task CreateAsync( CreateImagesRequest request, RequestOptions? options = null, @@ -75,6 +75,9 @@ public async Task CreateAsync( /// This `UpdateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in /// JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. /// + /// + /// await client.Catalog.Images.UpdateAsync(new UpdateImagesRequest { ImageId = "image_id" }); + /// public async Task UpdateAsync( UpdateImagesRequest request, RequestOptions? options = null, diff --git a/src/Square/Catalog/Object/ObjectClient.cs b/src/Square/Catalog/Object/ObjectClient.cs index d535ec4c..a564a43c 100644 --- a/src/Square/Catalog/Object/ObjectClient.cs +++ b/src/Square/Catalog/Object/ObjectClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Channels/ChannelsClient.cs b/src/Square/Channels/ChannelsClient.cs index c49dedd0..48ad46eb 100644 --- a/src/Square/Channels/ChannelsClient.cs +++ b/src/Square/Channels/ChannelsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -116,8 +113,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Channels?.ToList(), + response => response.Cursor, + response => response.Channels?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Checkout/CheckoutClient.cs b/src/Square/Checkout/CheckoutClient.cs index 96aea55d..53384306 100644 --- a/src/Square/Checkout/CheckoutClient.cs +++ b/src/Square/Checkout/CheckoutClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Checkout.PaymentLinks; using Square.Core; diff --git a/src/Square/Checkout/PaymentLinks/PaymentLinksClient.cs b/src/Square/Checkout/PaymentLinks/PaymentLinksClient.cs index d8270a4f..8fd2a557 100644 --- a/src/Square/Checkout/PaymentLinks/PaymentLinksClient.cs +++ b/src/Square/Checkout/PaymentLinks/PaymentLinksClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -103,8 +100,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.PaymentLinks?.ToList(), + response => response.Cursor, + response => response.PaymentLinks?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Core/Extensions.cs b/src/Square/Core/Extensions.cs index 26379382..17671b61 100644 --- a/src/Square/Core/Extensions.cs +++ b/src/Square/Core/Extensions.cs @@ -11,7 +11,7 @@ public static string Stringify(this Enum value) if (field != null) { var attribute = (EnumMemberAttribute?) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); + global::System.Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); return attribute?.Value ?? value.ToString(); } return value.ToString(); diff --git a/src/Square/Core/HeaderValue.cs b/src/Square/Core/HeaderValue.cs index ea1316c3..123bc748 100644 --- a/src/Square/Core/HeaderValue.cs +++ b/src/Square/Core/HeaderValue.cs @@ -2,16 +2,40 @@ namespace Square.Core; -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) +internal sealed class HeaderValue( + OneOf< + string, + Func, + Func>, + Func> + > value +) + : OneOfBase< + string, + Func, + Func>, + Func> + >(value) { - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } + public static implicit operator HeaderValue(string value) => new(value); + + public static implicit operator HeaderValue(Func value) => new(value); + + public static implicit operator HeaderValue( + Func> value + ) => new(value); + + public static implicit operator HeaderValue( + Func> value + ) => new(value); - public static implicit operator HeaderValue(Func value) + internal global::System.Threading.Tasks.ValueTask ResolveAsync() { - return new HeaderValue(value); + return Match( + str => new global::System.Threading.Tasks.ValueTask(str), + syncFunc => new global::System.Threading.Tasks.ValueTask(syncFunc()), + valueTaskFunc => valueTaskFunc(), + taskFunc => new global::System.Threading.Tasks.ValueTask(taskFunc()) + ); } } diff --git a/src/Square/Core/IRequestOptions.cs b/src/Square/Core/IRequestOptions.cs index 22f17cad..ddc6b170 100644 --- a/src/Square/Core/IRequestOptions.cs +++ b/src/Square/Core/IRequestOptions.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; -using System.Net.Http; - namespace Square.Core; internal interface IRequestOptions diff --git a/src/Square/Core/JsonAccessAttribute.cs b/src/Square/Core/JsonAccessAttribute.cs index e22365ef..3320da6c 100644 --- a/src/Square/Core/JsonAccessAttribute.cs +++ b/src/Square/Core/JsonAccessAttribute.cs @@ -1,7 +1,9 @@ namespace Square.Core; -[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] -internal class JsonAccessAttribute(JsonAccessType accessType) : Attribute +[global::System.AttributeUsage( + global::System.AttributeTargets.Property | global::System.AttributeTargets.Field +)] +internal class JsonAccessAttribute(JsonAccessType accessType) : global::System.Attribute { internal JsonAccessType AccessType { get; init; } = accessType; } diff --git a/src/Square/Core/MultipartFormRequest.cs b/src/Square/Core/MultipartFormRequest.cs index c94cc86d..ac138c66 100644 --- a/src/Square/Core/MultipartFormRequest.cs +++ b/src/Square/Core/MultipartFormRequest.cs @@ -52,6 +52,22 @@ internal void AddJsonParts(string name, IEnumerable? value, string? con } } + internal void AddJsonParts(string name, IEnumerable? value) => + AddJsonParts(name, value, null); + + internal void AddJsonParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddJsonPart(name, item, contentType); + } + } + internal void AddStringPart(string name, object? value) => AddStringPart(name, value, null); internal void AddStringPart(string name, object? value, string? contentType) @@ -152,6 +168,9 @@ internal void AddStreamPart(string name, Stream? stream, string? fileName, strin }); } + internal void AddFileParameterPart(string name, Stream? stream) => + AddStreamPart(name, stream, null, null); + internal void AddFileParameterPart(string name, FileParameter? file) => AddFileParameterPart(name, file, null); diff --git a/src/Square/Core/Public/ClientOptions.cs b/src/Square/Core/Public/ClientOptions.cs index 104f4a47..f1c93258 100644 --- a/src/Square/Core/Public/ClientOptions.cs +++ b/src/Square/Core/Public/ClientOptions.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; -using System.Net.Http; using Square.Core; namespace Square; diff --git a/src/Square/Core/Public/RequestOptions.cs b/src/Square/Core/Public/RequestOptions.cs index c8b50309..2bfed7ce 100644 --- a/src/Square/Core/Public/RequestOptions.cs +++ b/src/Square/Core/Public/RequestOptions.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; using Square.Core; namespace Square; diff --git a/src/Square/Core/Public/Version.cs b/src/Square/Core/Public/Version.cs index 1550d431..ad613b2c 100644 --- a/src/Square/Core/Public/Version.cs +++ b/src/Square/Core/Public/Version.cs @@ -3,5 +3,5 @@ namespace Square; [Serializable] internal class Version { - public const string Current = "42.2.1"; + public const string Current = "42.3.0"; } diff --git a/src/Square/Core/RawClient.cs b/src/Square/Core/RawClient.cs index 7c365a71..5a55bf36 100644 --- a/src/Square/Core/RawClient.cs +++ b/src/Square/Core/RawClient.cs @@ -11,6 +11,13 @@ namespace Square.Core; internal partial class RawClient(ClientOptions clientOptions) { private const int MaxRetryDelayMs = 60000; + private const double JitterFactor = 0.2; +#if NET6_0_OR_GREATER + // Use Random.Shared for thread-safe random number generation on .NET 6+ +#else + private static readonly object JitterLock = new(); + private static readonly Random JitterRandom = new(); +#endif internal int BaseRetryDelay { get; set; } = 1000; /// @@ -19,7 +26,7 @@ internal partial class RawClient(ClientOptions clientOptions) internal readonly ClientOptions Options = clientOptions; [Obsolete("Use SendRequestAsync instead.")] - internal Task MakeRequestAsync( + internal global::System.Threading.Tasks.Task MakeRequestAsync( global::Square.Core.BaseRequest request, CancellationToken cancellationToken = default ) @@ -27,30 +34,30 @@ internal partial class RawClient(ClientOptions clientOptions) return SendRequestAsync(request, cancellationToken); } - internal async Task SendRequestAsync( + internal async global::System.Threading.Tasks.Task SendRequestAsync( global::Square.Core.BaseRequest request, CancellationToken cancellationToken = default ) { // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); var timeout = request.Options?.Timeout ?? Options.Timeout; cts.CancelAfter(timeout); - var httpRequest = CreateHttpRequest(request); + var httpRequest = await CreateHttpRequestAsync(request).ConfigureAwait(false); // Send the request. return await SendWithRetriesAsync(httpRequest, request.Options, cts.Token) .ConfigureAwait(false); } - internal async Task SendRequestAsync( + internal async global::System.Threading.Tasks.Task SendRequestAsync( HttpRequestMessage request, IRequestOptions? options, CancellationToken cancellationToken = default ) { // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); var timeout = options?.Timeout ?? Options.Timeout; cts.CancelAfter(timeout); @@ -58,7 +65,9 @@ internal partial class RawClient(ClientOptions clientOptions) return await SendWithRetriesAsync(request, options, cts.Token).ConfigureAwait(false); } - private static async Task CloneRequestAsync(HttpRequestMessage request) + private static async global::System.Threading.Tasks.Task CloneRequestAsync( + HttpRequestMessage request + ) { var clonedRequest = new HttpRequestMessage(request.Method, request.RequestUri); clonedRequest.Version = request.Version; @@ -109,7 +118,7 @@ private static async Task CloneRequestAsync(HttpRequestMessa /// Sends the request with retries, unless the request content is not retryable, /// such as stream requests and multipart form data with stream content. /// - private async Task SendWithRetriesAsync( + private async global::System.Threading.Tasks.Task SendWithRetriesAsync( HttpRequestMessage request, IRequestOptions? options, CancellationToken cancellationToken @@ -117,7 +126,9 @@ CancellationToken cancellationToken { var httpClient = options?.HttpClient ?? Options.HttpClient; var maxRetries = options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); + var response = await httpClient + .SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken) + .ConfigureAwait(false); var isRetryableContent = IsRetryableContent(request); if (!isRetryableContent) @@ -136,11 +147,15 @@ CancellationToken cancellationToken break; } - var delayMs = Math.Min(BaseRetryDelay * (int)Math.Pow(2, i), MaxRetryDelayMs); + var delayMs = GetRetryDelayFromHeaders(response, i); await SystemTask.Delay(delayMs, cancellationToken).ConfigureAwait(false); using var retryRequest = await CloneRequestAsync(request).ConfigureAwait(false); response = await httpClient - .SendAsync(retryRequest, cancellationToken) + .SendAsync( + retryRequest, + HttpCompletionOption.ResponseHeadersRead, + cancellationToken + ) .ConfigureAwait(false); } @@ -157,6 +172,80 @@ private static bool ShouldRetry(HttpResponseMessage response) return statusCode is 408 or 429 or >= 500; } + private static int AddPositiveJitter(int delayMs) + { +#if NET6_0_OR_GREATER + var random = Random.Shared.NextDouble(); +#else + double random; + lock (JitterLock) + { + random = JitterRandom.NextDouble(); + } +#endif + var jitterMultiplier = 1 + random * JitterFactor; + return (int)(delayMs * jitterMultiplier); + } + + private static int AddSymmetricJitter(int delayMs) + { +#if NET6_0_OR_GREATER + var random = Random.Shared.NextDouble(); +#else + double random; + lock (JitterLock) + { + random = JitterRandom.NextDouble(); + } +#endif + var jitterMultiplier = 1 + (random - 0.5) * JitterFactor; + return (int)(delayMs * jitterMultiplier); + } + + private int GetRetryDelayFromHeaders(HttpResponseMessage response, int retryAttempt) + { + if (response.Headers.TryGetValues("Retry-After", out var retryAfterValues)) + { + var retryAfter = retryAfterValues.FirstOrDefault(); + if (!string.IsNullOrEmpty(retryAfter)) + { + if (int.TryParse(retryAfter, out var retryAfterSeconds) && retryAfterSeconds > 0) + { + return Math.Min(retryAfterSeconds * 1000, MaxRetryDelayMs); + } + + if (DateTimeOffset.TryParse(retryAfter, out var retryAfterDate)) + { + var delay = (int)(retryAfterDate - DateTimeOffset.UtcNow).TotalMilliseconds; + if (delay > 0) + { + return Math.Min(delay, MaxRetryDelayMs); + } + } + } + } + + if (response.Headers.TryGetValues("X-RateLimit-Reset", out var rateLimitResetValues)) + { + var rateLimitReset = rateLimitResetValues.FirstOrDefault(); + if ( + !string.IsNullOrEmpty(rateLimitReset) + && long.TryParse(rateLimitReset, out var resetTime) + ) + { + var resetDateTime = DateTimeOffset.FromUnixTimeSeconds(resetTime); + var delay = (int)(resetDateTime - DateTimeOffset.UtcNow).TotalMilliseconds; + if (delay > 0) + { + return AddPositiveJitter(Math.Min(delay, MaxRetryDelayMs)); + } + } + } + + var exponentialDelay = Math.Min(BaseRetryDelay * (1 << retryAttempt), MaxRetryDelayMs); + return AddSymmetricJitter(exponentialDelay); + } + private static bool IsRetryableContent(HttpRequestMessage request) { return request.Content switch @@ -168,16 +257,18 @@ private static bool IsRetryableContent(HttpRequestMessage request) }; } - internal HttpRequestMessage CreateHttpRequest(global::Square.Core.BaseRequest request) + internal async global::System.Threading.Tasks.Task CreateHttpRequestAsync( + global::Square.Core.BaseRequest request + ) { var url = BuildUrl(request); var httpRequest = new HttpRequestMessage(request.Method, url); httpRequest.Content = request.CreateContent(); var mergedHeaders = new Dictionary>(); - MergeHeaders(mergedHeaders, Options.Headers); + await MergeHeadersAsync(mergedHeaders, Options.Headers).ConfigureAwait(false); MergeAdditionalHeaders(mergedHeaders, Options.AdditionalHeaders); - MergeHeaders(mergedHeaders, request.Headers); - MergeHeaders(mergedHeaders, request.Options?.Headers); + await MergeHeadersAsync(mergedHeaders, request.Headers).ConfigureAwait(false); + await MergeHeadersAsync(mergedHeaders, request.Options?.Headers).ConfigureAwait(false); MergeAdditionalHeaders(mergedHeaders, request.Options?.AdditionalHeaders ?? []); SetHeaders(httpRequest, mergedHeaders); @@ -282,7 +373,7 @@ Dictionary inputDict return result; } - private static void MergeHeaders( + private static async SystemTask MergeHeadersAsync( Dictionary> mergedHeaders, Headers? headers ) @@ -294,8 +385,8 @@ private static void MergeHeaders( foreach (var header in headers) { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) + var value = await header.Value.ResolveAsync().ConfigureAwait(false); + if (value is not null) { mergedHeaders[header.Key] = [value]; } diff --git a/src/Square/Customers/Cards/CardsClient.cs b/src/Square/Customers/Cards/CardsClient.cs index f62fcd10..b08326ea 100644 --- a/src/Square/Customers/Cards/CardsClient.cs +++ b/src/Square/Customers/Cards/CardsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Customers/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs b/src/Square/Customers/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs index 82aff4c9..211d5e0a 100644 --- a/src/Square/Customers/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs +++ b/src/Square/Customers/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -119,8 +116,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributeDefinitions?.ToList(), + response => response.Cursor, + response => response.CustomAttributeDefinitions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Customers/CustomAttributes/CustomAttributesClient.cs b/src/Square/Customers/CustomAttributes/CustomAttributesClient.cs index 80e72160..e2a6c046 100644 --- a/src/Square/Customers/CustomAttributes/CustomAttributesClient.cs +++ b/src/Square/Customers/CustomAttributes/CustomAttributesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -130,8 +127,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributes?.ToList(), + response => response.Cursor, + response => response.CustomAttributes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Customers/CustomersClient.cs b/src/Square/Customers/CustomersClient.cs index 18a42946..b34ec048 100644 --- a/src/Square/Customers/CustomersClient.cs +++ b/src/Square/Customers/CustomersClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Customers.Groups; @@ -150,8 +147,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Customers?.ToList(), + response => response.Cursor, + response => response.Customers?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Customers/Groups/GroupsClient.cs b/src/Square/Customers/Groups/GroupsClient.cs index e40c00d5..9823bec8 100644 --- a/src/Square/Customers/Groups/GroupsClient.cs +++ b/src/Square/Customers/Groups/GroupsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -101,8 +98,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Groups?.ToList(), + response => response.Cursor, + response => response.Groups?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Customers/Segments/SegmentsClient.cs b/src/Square/Customers/Segments/SegmentsClient.cs index 2c6d8d1d..c3bda4b9 100644 --- a/src/Square/Customers/Segments/SegmentsClient.cs +++ b/src/Square/Customers/Segments/SegmentsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -101,8 +98,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Segments?.ToList(), + response => response.Cursor, + response => response.Segments?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Devices/Codes/CodesClient.cs b/src/Square/Devices/Codes/CodesClient.cs index 0dbfb2bb..97c02829 100644 --- a/src/Square/Devices/Codes/CodesClient.cs +++ b/src/Square/Devices/Codes/CodesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -117,8 +114,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.DeviceCodes?.ToList(), + response => response.Cursor, + response => response.DeviceCodes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Devices/DevicesClient.cs b/src/Square/Devices/DevicesClient.cs index 3dd7233f..e1da0ce4 100644 --- a/src/Square/Devices/DevicesClient.cs +++ b/src/Square/Devices/DevicesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Devices.Codes; @@ -123,8 +120,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Devices?.ToList(), + response => response.Cursor, + response => response.Devices?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Disputes/DisputesClient.cs b/src/Square/Disputes/DisputesClient.cs index 70f98b13..9195462f 100644 --- a/src/Square/Disputes/DisputesClient.cs +++ b/src/Square/Disputes/DisputesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Disputes.Evidence; @@ -116,8 +113,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Disputes?.ToList(), + response => response.Cursor, + response => response.Disputes?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -232,6 +229,11 @@ public async Task AcceptAsync( /// Uploads a file to use as evidence in a dispute challenge. The endpoint accepts HTTP /// multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats. /// + /// + /// await client.Disputes.CreateEvidenceFileAsync( + /// new CreateEvidenceFileDisputesRequest { DisputeId = "dispute_id" } + /// ); + /// public async Task CreateEvidenceFileAsync( CreateEvidenceFileDisputesRequest request, RequestOptions? options = null, diff --git a/src/Square/Disputes/Evidence/EvidenceClient.cs b/src/Square/Disputes/Evidence/EvidenceClient.cs index 9c64eef0..28aade39 100644 --- a/src/Square/Disputes/Evidence/EvidenceClient.cs +++ b/src/Square/Disputes/Evidence/EvidenceClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -102,8 +99,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Evidence?.ToList(), + response => response.Cursor, + response => response.Evidence?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Employees/EmployeesClient.cs b/src/Square/Employees/EmployeesClient.cs index 516d1e39..0525c1c1 100644 --- a/src/Square/Employees/EmployeesClient.cs +++ b/src/Square/Employees/EmployeesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -111,8 +108,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Employees?.ToList(), + response => response.Cursor, + response => response.Employees?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Events/EventsClient.cs b/src/Square/Events/EventsClient.cs index 474ebd37..35811e4a 100644 --- a/src/Square/Events/EventsClient.cs +++ b/src/Square/Events/EventsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/GiftCards/Activities/ActivitiesClient.cs b/src/Square/GiftCards/Activities/ActivitiesClient.cs index 02a1d748..02a2966a 100644 --- a/src/Square/GiftCards/Activities/ActivitiesClient.cs +++ b/src/Square/GiftCards/Activities/ActivitiesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -143,8 +140,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.GiftCardActivities?.ToList(), + response => response.Cursor, + response => response.GiftCardActivities?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/GiftCards/GiftCardsClient.cs b/src/Square/GiftCards/GiftCardsClient.cs index adc54bda..9f511e57 100644 --- a/src/Square/GiftCards/GiftCardsClient.cs +++ b/src/Square/GiftCards/GiftCardsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.GiftCards.Activities; @@ -128,8 +125,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.GiftCards?.ToList(), + response => response.Cursor, + response => response.GiftCards?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Inventory/InventoryClient.cs b/src/Square/Inventory/InventoryClient.cs index adbd1d4b..10e52b8e 100644 --- a/src/Square/Inventory/InventoryClient.cs +++ b/src/Square/Inventory/InventoryClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -674,8 +671,8 @@ public async Task> BatchGetChangesAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Changes?.ToList(), + response => response.Cursor, + response => response.Changes?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -730,8 +727,8 @@ public async Task> BatchGetCountsAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Counts?.ToList(), + response => response.Cursor, + response => response.Counts?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -938,8 +935,8 @@ public async Task> GetAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Counts?.ToList(), + response => response.Cursor, + response => response.Counts?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -996,8 +993,8 @@ public async Task> ChangesAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Changes?.ToList(), + response => response.Cursor, + response => response.Changes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Invoices/InvoicesClient.cs b/src/Square/Invoices/InvoicesClient.cs index 40260c3d..fad83fea 100644 --- a/src/Square/Invoices/InvoicesClient.cs +++ b/src/Square/Invoices/InvoicesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -113,8 +110,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Invoices?.ToList(), + response => response.Cursor, + response => response.Invoices?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -495,6 +492,11 @@ public async Task DeleteAsync( /// /// __NOTE:__ When testing in the Sandbox environment, the total file size is limited to 1 KB. /// + /// + /// await client.Invoices.CreateInvoiceAttachmentAsync( + /// new CreateInvoiceAttachmentRequest { InvoiceId = "invoice_id" } + /// ); + /// public async Task CreateInvoiceAttachmentAsync( CreateInvoiceAttachmentRequest request, RequestOptions? options = null, diff --git a/src/Square/Labor/BreakTypes/BreakTypesClient.cs b/src/Square/Labor/BreakTypes/BreakTypesClient.cs index 7baa450b..c4d25248 100644 --- a/src/Square/Labor/BreakTypes/BreakTypesClient.cs +++ b/src/Square/Labor/BreakTypes/BreakTypesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -112,8 +109,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.BreakTypes?.ToList(), + response => response.Cursor, + response => response.BreakTypes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Labor/EmployeeWages/EmployeeWagesClient.cs b/src/Square/Labor/EmployeeWages/EmployeeWagesClient.cs index 754772e2..bc10da85 100644 --- a/src/Square/Labor/EmployeeWages/EmployeeWagesClient.cs +++ b/src/Square/Labor/EmployeeWages/EmployeeWagesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -112,8 +109,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.EmployeeWages?.ToList(), + response => response.Cursor, + response => response.EmployeeWages?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Labor/LaborClient.cs b/src/Square/Labor/LaborClient.cs index 74fa98be..0274289c 100644 --- a/src/Square/Labor/LaborClient.cs +++ b/src/Square/Labor/LaborClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Labor.BreakTypes; diff --git a/src/Square/Labor/Shifts/ShiftsClient.cs b/src/Square/Labor/Shifts/ShiftsClient.cs index 0f43ea18..3f3419fa 100644 --- a/src/Square/Labor/Shifts/ShiftsClient.cs +++ b/src/Square/Labor/Shifts/ShiftsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Labor/TeamMemberWages/TeamMemberWagesClient.cs b/src/Square/Labor/TeamMemberWages/TeamMemberWagesClient.cs index 5d218fe9..58ae6f53 100644 --- a/src/Square/Labor/TeamMemberWages/TeamMemberWagesClient.cs +++ b/src/Square/Labor/TeamMemberWages/TeamMemberWagesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -112,8 +109,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.TeamMemberWages?.ToList(), + response => response.Cursor, + response => response.TeamMemberWages?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Labor/WorkweekConfigs/WorkweekConfigsClient.cs b/src/Square/Labor/WorkweekConfigs/WorkweekConfigsClient.cs index 8739aeda..5c81249d 100644 --- a/src/Square/Labor/WorkweekConfigs/WorkweekConfigsClient.cs +++ b/src/Square/Labor/WorkweekConfigs/WorkweekConfigsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -103,8 +100,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.WorkweekConfigs?.ToList(), + response => response.Cursor, + response => response.WorkweekConfigs?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Locations/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs b/src/Square/Locations/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs index e0837e07..c93d8599 100644 --- a/src/Square/Locations/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs +++ b/src/Square/Locations/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -120,8 +117,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributeDefinitions?.ToList(), + response => response.Cursor, + response => response.CustomAttributeDefinitions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Locations/CustomAttributes/CustomAttributesClient.cs b/src/Square/Locations/CustomAttributes/CustomAttributesClient.cs index 5c887fda..0e3d4a52 100644 --- a/src/Square/Locations/CustomAttributes/CustomAttributesClient.cs +++ b/src/Square/Locations/CustomAttributes/CustomAttributesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -321,8 +318,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributes?.ToList(), + response => response.Cursor, + response => response.CustomAttributes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Locations/LocationsClient.cs b/src/Square/Locations/LocationsClient.cs index 8516c4d7..4ea10809 100644 --- a/src/Square/Locations/LocationsClient.cs +++ b/src/Square/Locations/LocationsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Locations.Transactions; diff --git a/src/Square/Locations/Transactions/TransactionsClient.cs b/src/Square/Locations/Transactions/TransactionsClient.cs index 28ec5f02..33ee2a5b 100644 --- a/src/Square/Locations/Transactions/TransactionsClient.cs +++ b/src/Square/Locations/Transactions/TransactionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Loyalty/Accounts/AccountsClient.cs b/src/Square/Loyalty/Accounts/AccountsClient.cs index 892389b9..5e7850fe 100644 --- a/src/Square/Loyalty/Accounts/AccountsClient.cs +++ b/src/Square/Loyalty/Accounts/AccountsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Loyalty/LoyaltyClient.cs b/src/Square/Loyalty/LoyaltyClient.cs index ffd59a95..04b452cb 100644 --- a/src/Square/Loyalty/LoyaltyClient.cs +++ b/src/Square/Loyalty/LoyaltyClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Loyalty.Accounts; diff --git a/src/Square/Loyalty/Programs/ProgramsClient.cs b/src/Square/Loyalty/Programs/ProgramsClient.cs index c6af64de..caa14635 100644 --- a/src/Square/Loyalty/Programs/ProgramsClient.cs +++ b/src/Square/Loyalty/Programs/ProgramsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Loyalty.Programs.Promotions; diff --git a/src/Square/Loyalty/Programs/Promotions/PromotionsClient.cs b/src/Square/Loyalty/Programs/Promotions/PromotionsClient.cs index 96a83646..182f0d54 100644 --- a/src/Square/Loyalty/Programs/Promotions/PromotionsClient.cs +++ b/src/Square/Loyalty/Programs/Promotions/PromotionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -118,8 +115,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.LoyaltyPromotions?.ToList(), + response => response.Cursor, + response => response.LoyaltyPromotions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Loyalty/Rewards/RewardsClient.cs b/src/Square/Loyalty/Rewards/RewardsClient.cs index a6080759..27c8f178 100644 --- a/src/Square/Loyalty/Rewards/RewardsClient.cs +++ b/src/Square/Loyalty/Rewards/RewardsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Merchants/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs b/src/Square/Merchants/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs index ac3f12f7..2eb1f4e0 100644 --- a/src/Square/Merchants/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs +++ b/src/Square/Merchants/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -120,8 +117,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributeDefinitions?.ToList(), + response => response.Cursor, + response => response.CustomAttributeDefinitions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Merchants/CustomAttributes/CustomAttributesClient.cs b/src/Square/Merchants/CustomAttributes/CustomAttributesClient.cs index 904c7753..da220054 100644 --- a/src/Square/Merchants/CustomAttributes/CustomAttributesClient.cs +++ b/src/Square/Merchants/CustomAttributes/CustomAttributesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -302,8 +299,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributes?.ToList(), + response => response.Cursor, + response => response.CustomAttributes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Merchants/MerchantsClient.cs b/src/Square/Merchants/MerchantsClient.cs index e09b65a8..b79111b5 100644 --- a/src/Square/Merchants/MerchantsClient.cs +++ b/src/Square/Merchants/MerchantsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -124,8 +121,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Merchant?.ToList(), + response => response.Cursor, + response => response.Merchant?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Mobile/MobileClient.cs b/src/Square/Mobile/MobileClient.cs index af5983e1..8fc59bd9 100644 --- a/src/Square/Mobile/MobileClient.cs +++ b/src/Square/Mobile/MobileClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/OAuth/OAuthClient.cs b/src/Square/OAuth/OAuthClient.cs index 3af59a30..8c6506b4 100644 --- a/src/Square/OAuth/OAuthClient.cs +++ b/src/Square/OAuth/OAuthClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Orders/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs b/src/Square/Orders/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs index 77109875..fda2551c 100644 --- a/src/Square/Orders/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs +++ b/src/Square/Orders/CustomAttributeDefinitions/CustomAttributeDefinitionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -124,8 +121,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributeDefinitions?.ToList(), + response => response.Cursor, + response => response.CustomAttributeDefinitions?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Orders/CustomAttributes/CustomAttributesClient.cs b/src/Square/Orders/CustomAttributes/CustomAttributesClient.cs index a821066a..f7d10388 100644 --- a/src/Square/Orders/CustomAttributes/CustomAttributesClient.cs +++ b/src/Square/Orders/CustomAttributes/CustomAttributesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -325,8 +322,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.CustomAttributes?.ToList(), + response => response.Cursor, + response => response.CustomAttributes?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Orders/OrdersClient.cs b/src/Square/Orders/OrdersClient.cs index 5601eaf9..5da6efd9 100644 --- a/src/Square/Orders/OrdersClient.cs +++ b/src/Square/Orders/OrdersClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Payments/PaymentsClient.cs b/src/Square/Payments/PaymentsClient.cs index 9f8bdfcc..9fd4c294 100644 --- a/src/Square/Payments/PaymentsClient.cs +++ b/src/Square/Payments/PaymentsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -182,8 +179,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Payments?.ToList(), + response => response.Cursor, + response => response.Payments?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Payouts/PayoutsClient.cs b/src/Square/Payouts/PayoutsClient.cs index 739c1084..769d56f5 100644 --- a/src/Square/Payouts/PayoutsClient.cs +++ b/src/Square/Payouts/PayoutsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -198,8 +195,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Payouts?.ToList(), + response => response.Cursor, + response => response.Payouts?.ToList(), cancellationToken ) .ConfigureAwait(false); @@ -297,8 +294,8 @@ public async Task> ListEntriesAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.PayoutEntries?.ToList(), + response => response.Cursor, + response => response.PayoutEntries?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Refunds/RefundsClient.cs b/src/Square/Refunds/RefundsClient.cs index b36c4ac8..a636fe01 100644 --- a/src/Square/Refunds/RefundsClient.cs +++ b/src/Square/Refunds/RefundsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -162,8 +159,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Refunds?.ToList(), + response => response.Cursor, + response => response.Refunds?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Sites/SitesClient.cs b/src/Square/Sites/SitesClient.cs index 30851479..ac1ff71d 100644 --- a/src/Square/Sites/SitesClient.cs +++ b/src/Square/Sites/SitesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Snippets/SnippetsClient.cs b/src/Square/Snippets/SnippetsClient.cs index 820102a4..3a50bdb4 100644 --- a/src/Square/Snippets/SnippetsClient.cs +++ b/src/Square/Snippets/SnippetsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Square.csproj b/src/Square/Square.csproj index 8d753dfc..787d709d 100644 --- a/src/Square/Square.csproj +++ b/src/Square/Square.csproj @@ -5,7 +5,7 @@ enable 12 enable - 42.2.1 + 42.3.0 $(Version) $(Version) README.md @@ -13,6 +13,7 @@ https://github.com/square/square-dotnet-sdk true + false @@ -20,6 +21,13 @@ $(DefineConstants);USE_PORTABLE_DATE_ONLY true + + + + + + + @@ -37,13 +45,16 @@ + + <_Parameter1>Square.Test + diff --git a/src/Square/SquareClient.cs b/src/Square/SquareClient.cs index 6b1361e3..79720f66 100644 --- a/src/Square/SquareClient.cs +++ b/src/Square/SquareClient.cs @@ -53,7 +53,7 @@ public SquareClient(string? token = null, ClientOptions? clientOptions = null) { "X-Fern-Language", "C#" }, { "X-Fern-SDK-Name", "Square" }, { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Square/42.2.1" }, + { "User-Agent", "Square/42.3.0" }, } ); clientOptions ??= new ClientOptions(); diff --git a/src/Square/Subscriptions/SubscriptionsClient.cs b/src/Square/Subscriptions/SubscriptionsClient.cs index 613f8399..c1de6c93 100644 --- a/src/Square/Subscriptions/SubscriptionsClient.cs +++ b/src/Square/Subscriptions/SubscriptionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -606,8 +603,8 @@ public async Task> ListEventsAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.SubscriptionEvents?.ToList(), + response => response.Cursor, + response => response.SubscriptionEvents?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Team/TeamClient.cs b/src/Square/Team/TeamClient.cs index c986c613..a0982a51 100644 --- a/src/Square/Team/TeamClient.cs +++ b/src/Square/Team/TeamClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/TeamMembers/TeamMembersClient.cs b/src/Square/TeamMembers/TeamMembersClient.cs index d14c10f9..bbf70192 100644 --- a/src/Square/TeamMembers/TeamMembersClient.cs +++ b/src/Square/TeamMembers/TeamMembersClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.TeamMembers.WageSetting; diff --git a/src/Square/TeamMembers/WageSetting/WageSettingClient.cs b/src/Square/TeamMembers/WageSetting/WageSettingClient.cs index 7b26b13b..30b76ba5 100644 --- a/src/Square/TeamMembers/WageSetting/WageSettingClient.cs +++ b/src/Square/TeamMembers/WageSetting/WageSettingClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Terminal/Actions/ActionsClient.cs b/src/Square/Terminal/Actions/ActionsClient.cs index 40c1c59e..a5f24b16 100644 --- a/src/Square/Terminal/Actions/ActionsClient.cs +++ b/src/Square/Terminal/Actions/ActionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Terminal/Checkouts/CheckoutsClient.cs b/src/Square/Terminal/Checkouts/CheckoutsClient.cs index d165f34d..f6760141 100644 --- a/src/Square/Terminal/Checkouts/CheckoutsClient.cs +++ b/src/Square/Terminal/Checkouts/CheckoutsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Terminal/Refunds/RefundsClient.cs b/src/Square/Terminal/Refunds/RefundsClient.cs index 0c36faf1..46982f55 100644 --- a/src/Square/Terminal/Refunds/RefundsClient.cs +++ b/src/Square/Terminal/Refunds/RefundsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Terminal/TerminalClient.cs b/src/Square/Terminal/TerminalClient.cs index be09e8f4..a0550251 100644 --- a/src/Square/Terminal/TerminalClient.cs +++ b/src/Square/Terminal/TerminalClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; using Square.Terminal.Actions; diff --git a/src/Square/TransferOrders/TransferOrdersClient.cs b/src/Square/TransferOrders/TransferOrdersClient.cs index aab8389e..be867659 100644 --- a/src/Square/TransferOrders/TransferOrdersClient.cs +++ b/src/Square/TransferOrders/TransferOrdersClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -224,8 +221,8 @@ public async Task> SearchAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.TransferOrders?.ToList(), + response => response.Cursor, + response => response.TransferOrders?.ToList(), cancellationToken ) .ConfigureAwait(false); diff --git a/src/Square/Types/CatalogObject.cs b/src/Square/Types/CatalogObject.cs index f8e512d3..3a15a4a4 100644 --- a/src/Square/Types/CatalogObject.cs +++ b/src/Square/Types/CatalogObject.cs @@ -937,12 +937,12 @@ public static implicit operator CatalogObject(CatalogObject.AvailabilityPeriod v [Serializable] internal sealed class JsonConverter : JsonConverter { - public override bool CanConvert(global::System.Type typeToConvert) => + public override bool CanConvert(System.Type typeToConvert) => typeof(CatalogObject).IsAssignableFrom(typeToConvert); public override CatalogObject Read( ref Utf8JsonReader reader, - global::System.Type typeToConvert, + System.Type typeToConvert, JsonSerializerOptions options ) { diff --git a/src/Square/Types/CatalogObjectCategory.cs b/src/Square/Types/CatalogObjectCategory.cs index f95c1209..5b65296d 100644 --- a/src/Square/Types/CatalogObjectCategory.cs +++ b/src/Square/Types/CatalogObjectCategory.cs @@ -28,6 +28,9 @@ public record CatalogObjectCategory : IJsonOnDeserialized [JsonPropertyName("ordinal")] public long? Ordinal { get; set; } + [JsonPropertyName("type")] + public string? Type { get; set; } + /// /// Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`. /// diff --git a/src/Square/Types/ScheduledShiftDetails.cs b/src/Square/Types/ScheduledShiftDetails.cs index 055b8af9..1ec7300b 100644 --- a/src/Square/Types/ScheduledShiftDetails.cs +++ b/src/Square/Types/ScheduledShiftDetails.cs @@ -34,7 +34,7 @@ public record ScheduledShiftDetails : IJsonOnDeserialized public string? JobId { get; set; } /// - /// The start time of the shift, in RFC 3339 format in the time zone + + /// The start time of the shift, in RFC 3339 format in the time zone + /// offset of the shift location specified in `location_id`. Precision up to the minute /// is respected; seconds are truncated. /// @@ -42,7 +42,7 @@ public record ScheduledShiftDetails : IJsonOnDeserialized public string? StartAt { get; set; } /// - /// The end time for the shift, in RFC 3339 format in the time zone + + /// The end time for the shift, in RFC 3339 format in the time zone + /// offset of the shift location specified in `location_id`. Precision up to the minute /// is respected; seconds are truncated. /// diff --git a/src/Square/V1Transactions/V1TransactionsClient.cs b/src/Square/V1Transactions/V1TransactionsClient.cs index b7a3b0eb..3bd892b7 100644 --- a/src/Square/V1Transactions/V1TransactionsClient.cs +++ b/src/Square/V1Transactions/V1TransactionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Vendors/VendorsClient.cs b/src/Square/Vendors/VendorsClient.cs index dc9bbbb8..5b12a0a0 100644 --- a/src/Square/Vendors/VendorsClient.cs +++ b/src/Square/Vendors/VendorsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Webhooks/EventTypes/EventTypesClient.cs b/src/Square/Webhooks/EventTypes/EventTypesClient.cs index 5f8f6b47..bb0b42cf 100644 --- a/src/Square/Webhooks/EventTypes/EventTypesClient.cs +++ b/src/Square/Webhooks/EventTypes/EventTypesClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; diff --git a/src/Square/Webhooks/Subscriptions/SubscriptionsClient.cs b/src/Square/Webhooks/Subscriptions/SubscriptionsClient.cs index 9a3d49c3..4dd462cf 100644 --- a/src/Square/Webhooks/Subscriptions/SubscriptionsClient.cs +++ b/src/Square/Webhooks/Subscriptions/SubscriptionsClient.cs @@ -1,7 +1,4 @@ -using System.Net.Http; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using Square; using Square.Core; @@ -117,8 +114,8 @@ public async Task> ListAsync( { request.Cursor = cursor; }, - response => response?.Cursor, - response => response?.Subscriptions?.ToList(), + response => response.Cursor, + response => response.Subscriptions?.ToList(), cancellationToken ) .ConfigureAwait(false);