From e46be2dc1823d07bf5f3b97c667528a1c4e8993f Mon Sep 17 00:00:00 2001
From: fern-support <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 22 Jan 2025 11:20:08 -0500
Subject: [PATCH] Add legacy SDK in legacy/
---
legacy/CHANGELOG.md | 618 +++++++++++
legacy/README.md | 157 +++
legacy/doc/api-error.md | 18 +
legacy/doc/api-response.md | 15 +
legacy/doc/api/apple-pay.md | 65 ++
legacy/doc/api/bank-accounts.md | 139 +++
legacy/doc/api/booking-custom-attributes.md | 606 +++++++++++
legacy/doc/api/bookings.md | 636 ++++++++++++
legacy/doc/api/cards.md | 207 ++++
legacy/doc/api/cash-drawers.md | 166 +++
legacy/doc/api/catalog.md | 936 +++++++++++++++++
legacy/doc/api/checkout.md | 561 ++++++++++
legacy/doc/api/customer-custom-attributes.md | 575 +++++++++++
legacy/doc/api/customer-groups.md | 235 +++++
legacy/doc/api/customer-segments.md | 95 ++
legacy/doc/api/customers.md | 818 +++++++++++++++
legacy/doc/api/devices.md | 235 +++++
legacy/doc/api/disputes.md | 429 ++++++++
legacy/doc/api/employees.md | 99 ++
legacy/doc/api/events.md | 170 +++
legacy/doc/api/gift-card-activities.md | 122 +++
legacy/doc/api/gift-cards.md | 339 ++++++
legacy/doc/api/inventory.md | 690 +++++++++++++
legacy/doc/api/invoices.md | 596 +++++++++++
legacy/doc/api/labor.md | 851 +++++++++++++++
legacy/doc/api/location-custom-attributes.md | 605 +++++++++++
legacy/doc/api/locations.md | 222 ++++
legacy/doc/api/loyalty.md | 976 ++++++++++++++++++
legacy/doc/api/merchant-custom-attributes.md | 603 +++++++++++
legacy/doc/api/merchants.md | 102 ++
legacy/doc/api/mobile-authorization.md | 63 ++
legacy/doc/api/o-auth.md | 193 ++++
legacy/doc/api/order-custom-attributes.md | 634 ++++++++++++
legacy/doc/api/orders.md | 539 ++++++++++
legacy/doc/api/payments.md | 412 ++++++++
legacy/doc/api/payouts.md | 156 +++
legacy/doc/api/refunds.md | 168 +++
legacy/doc/api/sites.md | 48 +
legacy/doc/api/snippets.md | 160 +++
legacy/doc/api/subscriptions.md | 631 +++++++++++
legacy/doc/api/team.md | 721 +++++++++++++
legacy/doc/api/terminal.md | 692 +++++++++++++
legacy/doc/api/transactions.md | 227 ++++
legacy/doc/api/v1-transactions.md | 169 +++
legacy/doc/api/vendors.md | 340 ++++++
legacy/doc/api/webhook-subscriptions.md | 389 +++++++
legacy/doc/auth/oauth-2-bearer-token.md | 32 +
legacy/doc/client.md | 136 +++
legacy/doc/models/accept-dispute-response.md | 64 ++
legacy/doc/models/accepted-payment-methods.md | 27 +
.../accumulate-loyalty-points-request.md | 31 +
.../accumulate-loyalty-points-response.md | 99 ++
legacy/doc/models/ach-details.md | 27 +
legacy/doc/models/action-cancel-reason.md | 15 +
legacy/doc/models/activity-type.md | 70 ++
.../models/add-group-to-customer-response.md | 31 +
legacy/doc/models/additional-recipient.md | 32 +
legacy/doc/models/address.md | 41 +
.../models/adjust-loyalty-points-request.md | 31 +
.../models/adjust-loyalty-points-response.md | 63 ++
legacy/doc/models/afterpay-details.md | 23 +
...ication-details-external-square-product.md | 24 +
legacy/doc/models/application-details.md | 25 +
legacy/doc/models/application-type.md | 13 +
legacy/doc/models/appointment-segment.md | 34 +
legacy/doc/models/archived-state.md | 19 +
legacy/doc/models/availability.md | 36 +
.../models/bank-account-payment-details.md | 34 +
legacy/doc/models/bank-account-status.md | 17 +
legacy/doc/models/bank-account-type.md | 19 +
legacy/doc/models/bank-account.md | 55 +
.../models/batch-change-inventory-request.md | 67 ++
.../models/batch-change-inventory-response.md | 72 ++
.../batch-delete-catalog-objects-request.md | 24 +
.../batch-delete-catalog-objects-response.md | 35 +
.../batch-retrieve-catalog-objects-request.md | 32 +
...batch-retrieve-catalog-objects-response.md | 276 +++++
...atch-retrieve-inventory-changes-request.md | 41 +
...tch-retrieve-inventory-changes-response.md | 73 ++
...batch-retrieve-inventory-counts-request.md | 37 +
...atch-retrieve-inventory-counts-response.md | 34 +
.../models/batch-retrieve-orders-request.md | 29 +
.../models/batch-retrieve-orders-response.md | 121 +++
.../batch-upsert-catalog-objects-request.md | 261 +++++
.../batch-upsert-catalog-objects-response.md | 340 ++++++
legacy/doc/models/booking-booking-source.md | 18 +
.../booking-creator-details-creator-type.md | 16 +
legacy/doc/models/booking-creator-details.md | 27 +
...booking-custom-attribute-delete-request.md | 26 +
...ooking-custom-attribute-delete-response.md | 25 +
...booking-custom-attribute-upsert-request.md | 47 +
...ooking-custom-attribute-upsert-response.md | 64 ++
legacy/doc/models/booking-status.md | 20 +
legacy/doc/models/booking.md | 44 +
legacy/doc/models/break-type.md | 38 +
legacy/doc/models/break.md | 35 +
.../doc/models/bulk-create-customer-data.md | 38 +
.../models/bulk-create-customers-request.md | 61 ++
.../models/bulk-create-customers-response.md | 150 +++
.../bulk-create-team-members-request.md | 60 ++
.../bulk-create-team-members-response.md | 95 ++
.../doc/models/bulk-create-vendors-request.md | 37 +
.../models/bulk-create-vendors-response.md | 80 ++
...elete-booking-custom-attributes-request.md | 28 +
...lete-booking-custom-attributes-response.md | 39 +
.../models/bulk-delete-customers-request.md | 28 +
.../models/bulk-delete-customers-response.md | 94 ++
...ocation-custom-attribute-delete-request.md | 25 +
...lete-location-custom-attributes-request.md | 36 +
...cation-custom-attribute-delete-response.md | 26 +
...ete-location-custom-attributes-response.md | 46 +
...erchant-custom-attribute-delete-request.md | 25 +
...lete-merchant-custom-attributes-request.md | 32 +
...rchant-custom-attribute-delete-response.md | 25 +
...ete-merchant-custom-attributes-response.md | 48 +
...ributes-request-delete-custom-attribute.md | 25 +
...-delete-order-custom-attributes-request.md | 32 +
...delete-order-custom-attributes-response.md | 65 ++
.../models/bulk-retrieve-bookings-request.md | 27 +
.../models/bulk-retrieve-bookings-response.md | 89 ++
.../models/bulk-retrieve-customers-request.md | 28 +
.../bulk-retrieve-customers-response.md | 142 +++
...ve-team-member-booking-profiles-request.md | 26 +
...e-team-member-booking-profiles-response.md | 59 ++
.../models/bulk-retrieve-vendors-request.md | 25 +
.../models/bulk-retrieve-vendors-response.md | 109 ++
legacy/doc/models/bulk-swap-plan-request.md | 28 +
legacy/doc/models/bulk-swap-plan-response.md | 39 +
.../doc/models/bulk-update-customer-data.md | 39 +
.../models/bulk-update-customers-request.md | 43 +
.../models/bulk-update-customers-response.md | 135 +++
.../bulk-update-team-members-request.md | 58 ++
.../bulk-update-team-members-response.md | 99 ++
.../doc/models/bulk-update-vendors-request.md | 72 ++
.../models/bulk-update-vendors-response.md | 139 +++
...psert-booking-custom-attributes-request.md | 70 ++
...sert-booking-custom-attributes-response.md | 142 +++
...ustomer-custom-attribute-upsert-request.md | 47 +
...sert-customer-custom-attributes-request.md | 47 +
...stomer-custom-attribute-upsert-response.md | 64 ++
...ert-customer-custom-attributes-response.md | 154 +++
...ocation-custom-attribute-upsert-request.md | 47 +
...sert-location-custom-attributes-request.md | 47 +
...cation-custom-attribute-upsert-response.md | 58 ++
...ert-location-custom-attributes-response.md | 76 ++
...erchant-custom-attribute-upsert-request.md | 47 +
...sert-merchant-custom-attributes-request.md | 93 ++
...rchant-custom-attribute-upsert-response.md | 64 ++
...ert-merchant-custom-attributes-response.md | 106 ++
...ributes-request-upsert-custom-attribute.md | 45 +
...-upsert-order-custom-attributes-request.md | 93 ++
...upsert-order-custom-attributes-response.md | 74 ++
...ess-appointment-settings-alignment-time.md | 18 +
...ointment-settings-booking-location-type.md | 17 +
...ppointment-settings-cancellation-policy.md | 16 +
...ngs-max-appointments-per-day-limit-type.md | 16 +
.../models/business-appointment-settings.md | 41 +
...business-booking-profile-booking-policy.md | 16 +
...ooking-profile-customer-timezone-choice.md | 16 +
legacy/doc/models/business-booking-profile.md | 34 +
legacy/doc/models/business-hours-period.md | 27 +
legacy/doc/models/business-hours.md | 39 +
.../doc/models/buy-now-pay-later-details.md | 31 +
.../calculate-loyalty-points-request.md | 30 +
.../calculate-loyalty-points-response.md | 46 +
legacy/doc/models/calculate-order-request.md | 98 ++
legacy/doc/models/calculate-order-response.md | 231 +++++
legacy/doc/models/cancel-booking-request.md | 23 +
legacy/doc/models/cancel-booking-response.md | 42 +
legacy/doc/models/cancel-invoice-request.md | 23 +
legacy/doc/models/cancel-invoice-response.md | 112 ++
.../cancel-loyalty-promotion-response.md | 81 ++
...ncel-payment-by-idempotency-key-request.md | 24 +
...cel-payment-by-idempotency-key-response.md | 38 +
legacy/doc/models/cancel-payment-response.md | 98 ++
.../models/cancel-subscription-response.md | 146 +++
.../models/cancel-terminal-action-response.md | 57 +
.../cancel-terminal-checkout-response.md | 79 ++
.../models/cancel-terminal-refund-response.md | 69 ++
.../models/capture-transaction-response.md | 31 +
legacy/doc/models/card-brand.md | 28 +
legacy/doc/models/card-co-brand.md | 17 +
legacy/doc/models/card-payment-details.md | 48 +
legacy/doc/models/card-payment-timeline.md | 27 +
legacy/doc/models/card-prepaid-type.md | 17 +
legacy/doc/models/card-type.md | 17 +
legacy/doc/models/card.md | 44 +
legacy/doc/models/cash-app-details.md | 27 +
legacy/doc/models/cash-drawer-device.md | 23 +
legacy/doc/models/cash-drawer-event-type.md | 25 +
legacy/doc/models/cash-drawer-shift-event.md | 33 +
legacy/doc/models/cash-drawer-shift-state.md | 17 +
.../doc/models/cash-drawer-shift-summary.md | 41 +
legacy/doc/models/cash-drawer-shift.md | 50 +
legacy/doc/models/cash-payment-details.md | 32 +
.../doc/models/catalog-availability-period.md | 27 +
legacy/doc/models/catalog-category-type.md | 17 +
legacy/doc/models/catalog-category.md | 52 +
...tom-attribute-definition-app-visibility.md | 18 +
...stom-attribute-definition-number-config.md | 21 +
...ction-config-custom-attribute-selection.md | 25 +
...m-attribute-definition-selection-config.md | 38 +
...-attribute-definition-seller-visibility.md | 18 +
...stom-attribute-definition-string-config.md | 23 +
...atalog-custom-attribute-definition-type.md | 18 +
.../catalog-custom-attribute-definition.md | 54 +
.../models/catalog-custom-attribute-value.md | 36 +
.../catalog-discount-modify-tax-basis.md | 14 +
legacy/doc/models/catalog-discount-type.md | 18 +
legacy/doc/models/catalog-discount.md | 49 +
legacy/doc/models/catalog-ecom-seo-data.md | 27 +
legacy/doc/models/catalog-id-mapping.md | 35 +
legacy/doc/models/catalog-image.md | 34 +
.../models/catalog-info-response-limits.md | 35 +
legacy/doc/models/catalog-info-response.md | 76 ++
...-preference-standard-dietary-preference.md | 21 +
...everage-details-dietary-preference-type.md | 16 +
...and-beverage-details-dietary-preference.md | 27 +
...-details-ingredient-standard-ingredient.md | 28 +
...em-food-and-beverage-details-ingredient.md | 27 +
.../catalog-item-food-and-beverage-details.md | 44 +
.../models/catalog-item-modifier-list-info.md | 43 +
.../models/catalog-item-option-for-item.md | 24 +
...og-item-option-value-for-item-variation.md | 28 +
.../doc/models/catalog-item-option-value.md | 33 +
legacy/doc/models/catalog-item-option.md | 104 ++
.../doc/models/catalog-item-product-type.md | 23 +
legacy/doc/models/catalog-item-variation.md | 56 +
legacy/doc/models/catalog-item.md | 51 +
legacy/doc/models/catalog-measurement-unit.md | 35 +
.../catalog-modifier-list-modifier-type.md | 16 +
.../catalog-modifier-list-selection-type.md | 16 +
legacy/doc/models/catalog-modifier-list.md | 93 ++
.../doc/models/catalog-modifier-override.md | 25 +
legacy/doc/models/catalog-modifier.md | 71 ++
legacy/doc/models/catalog-object-batch.md | 113 ++
legacy/doc/models/catalog-object-category.md | 27 +
legacy/doc/models/catalog-object-reference.md | 27 +
legacy/doc/models/catalog-object-type.md | 34 +
legacy/doc/models/catalog-object.md | 153 +++
legacy/doc/models/catalog-pricing-rule.md | 42 +
legacy/doc/models/catalog-pricing-type.md | 16 +
legacy/doc/models/catalog-product-set.md | 41 +
legacy/doc/models/catalog-query-exact.md | 25 +
...-item-variations-for-item-option-values.md | 27 +
.../catalog-query-items-for-item-options.md | 26 +
.../catalog-query-items-for-modifier-list.md | 27 +
.../doc/models/catalog-query-items-for-tax.md | 26 +
legacy/doc/models/catalog-query-prefix.md | 25 +
legacy/doc/models/catalog-query-range.md | 27 +
legacy/doc/models/catalog-query-set.md | 28 +
.../models/catalog-query-sorted-attribute.md | 27 +
legacy/doc/models/catalog-query-text.md | 25 +
legacy/doc/models/catalog-query.md | 82 ++
.../doc/models/catalog-quick-amount-type.md | 16 +
legacy/doc/models/catalog-quick-amount.md | 32 +
.../catalog-quick-amounts-settings-option.md | 17 +
.../models/catalog-quick-amounts-settings.md | 46 +
legacy/doc/models/catalog-stock-conversion.md | 29 +
.../catalog-subscription-plan-variation.md | 56 +
.../doc/models/catalog-subscription-plan.md | 194 ++++
legacy/doc/models/catalog-tax.md | 46 +
legacy/doc/models/catalog-time-period.md | 23 +
legacy/doc/models/catalog-v1-id.md | 25 +
.../doc/models/category-path-to-root-node.md | 25 +
.../change-billing-anchor-date-request.md | 26 +
.../change-billing-anchor-date-response.md | 94 ++
legacy/doc/models/change-timing.md | 16 +
.../charge-request-additional-recipient.md | 31 +
legacy/doc/models/charge-request.md | 73 ++
legacy/doc/models/charge-response.md | 187 ++++
...location-settings-branding-button-shape.md | 15 +
...-location-settings-branding-header-type.md | 15 +
.../checkout-location-settings-branding.md | 25 +
.../checkout-location-settings-coupons.md | 21 +
.../checkout-location-settings-policy.md | 25 +
.../checkout-location-settings-tipping.md | 48 +
.../doc/models/checkout-location-settings.md | 67 ++
...ods-afterpay-clearpay-eligibility-range.md | 31 +
...tings-payment-methods-afterpay-clearpay.md | 45 +
...settings-payment-methods-payment-method.md | 23 +
...ckout-merchant-settings-payment-methods.md | 55 +
.../doc/models/checkout-merchant-settings.md | 56 +
.../models/checkout-options-payment-type.md | 20 +
legacy/doc/models/checkout-options.md | 45 +
legacy/doc/models/checkout.md | 37 +
legacy/doc/models/clearpay-details.md | 23 +
legacy/doc/models/clone-order-request.md | 28 +
legacy/doc/models/clone-order-response.md | 333 ++++++
legacy/doc/models/collected-data.md | 21 +
legacy/doc/models/complete-payment-request.md | 27 +
.../doc/models/complete-payment-response.md | 107 ++
legacy/doc/models/component-component-type.md | 20 +
legacy/doc/models/component.md | 54 +
legacy/doc/models/confirmation-decision.md | 21 +
legacy/doc/models/confirmation-options.md | 31 +
legacy/doc/models/coordinates.md | 25 +
legacy/doc/models/country.md | 265 +++++
...ing-custom-attribute-definition-request.md | 34 +
...ng-custom-attribute-definition-response.md | 38 +
legacy/doc/models/create-booking-request.md | 29 +
legacy/doc/models/create-booking-response.md | 42 +
.../doc/models/create-break-type-request.md | 34 +
.../doc/models/create-break-type-response.md | 55 +
legacy/doc/models/create-card-request.md | 47 +
legacy/doc/models/create-card-response.md | 72 ++
.../models/create-catalog-image-request.md | 66 ++
.../models/create-catalog-image-response.md | 70 ++
legacy/doc/models/create-checkout-request.md | 179 ++++
legacy/doc/models/create-checkout-response.md | 172 +++
.../models/create-customer-card-request.md | 39 +
.../models/create-customer-card-response.md | 56 +
...mer-custom-attribute-definition-request.md | 34 +
...er-custom-attribute-definition-response.md | 57 +
.../models/create-customer-group-request.md | 31 +
.../models/create-customer-group-response.md | 40 +
legacy/doc/models/create-customer-request.md | 51 +
legacy/doc/models/create-customer-response.md | 68 ++
.../doc/models/create-device-code-request.md | 30 +
.../doc/models/create-device-code-response.md | 41 +
.../create-dispute-evidence-file-request.md | 27 +
.../create-dispute-evidence-file-response.md | 48 +
.../create-dispute-evidence-text-request.md | 27 +
.../create-dispute-evidence-text-response.md | 49 +
.../create-gift-card-activity-request.md | 40 +
.../create-gift-card-activity-response.md | 58 ++
legacy/doc/models/create-gift-card-request.md | 37 +
.../doc/models/create-gift-card-response.md | 56 +
.../create-invoice-attachment-request.md | 25 +
.../create-invoice-attachment-response.md | 52 +
legacy/doc/models/create-invoice-request.md | 83 ++
legacy/doc/models/create-invoice-response.md | 106 ++
legacy/doc/models/create-job-request.md | 31 +
legacy/doc/models/create-job-response.md | 40 +
...ion-custom-attribute-definition-request.md | 34 +
...on-custom-attribute-definition-response.md | 45 +
legacy/doc/models/create-location-request.md | 40 +
legacy/doc/models/create-location-response.md | 74 ++
.../models/create-loyalty-account-request.md | 35 +
.../models/create-loyalty-account-response.md | 46 +
.../create-loyalty-promotion-request.md | 59 ++
.../create-loyalty-promotion-response.md | 75 ++
.../models/create-loyalty-reward-request.md | 33 +
.../models/create-loyalty-reward-response.md | 47 +
...ant-custom-attribute-definition-request.md | 34 +
...nt-custom-attribute-definition-response.md | 45 +
...reate-mobile-authorization-code-request.md | 24 +
...eate-mobile-authorization-code-response.md | 41 +
...der-custom-attribute-definition-request.md | 34 +
...er-custom-attribute-definition-response.md | 56 +
legacy/doc/models/create-order-request.md | 121 +++
legacy/doc/models/create-order-response.md | 329 ++++++
.../doc/models/create-payment-link-request.md | 83 ++
.../models/create-payment-link-response.md | 266 +++++
legacy/doc/models/create-payment-request.md | 68 ++
legacy/doc/models/create-payment-response.md | 114 ++
legacy/doc/models/create-refund-request.md | 35 +
legacy/doc/models/create-refund-response.md | 68 ++
legacy/doc/models/create-shift-request.md | 56 +
legacy/doc/models/create-shift-response.md | 82 ++
.../doc/models/create-subscription-request.md | 53 +
.../models/create-subscription-response.md | 67 ++
.../doc/models/create-team-member-request.md | 63 ++
.../doc/models/create-team-member-response.md | 94 ++
.../models/create-terminal-action-request.md | 34 +
.../models/create-terminal-action-response.md | 51 +
.../create-terminal-checkout-request.md | 53 +
.../create-terminal-checkout-response.md | 67 ++
.../models/create-terminal-refund-request.md | 36 +
.../models/create-terminal-refund-response.md | 56 +
legacy/doc/models/create-vendor-request.md | 37 +
legacy/doc/models/create-vendor-response.md | 50 +
.../create-webhook-subscription-request.md | 35 +
.../create-webhook-subscription-response.md | 49 +
legacy/doc/models/currency.md | 198 ++++
.../custom-attribute-definition-visibility.md | 20 +
.../doc/models/custom-attribute-definition.md | 38 +
legacy/doc/models/custom-attribute-filter.md | 41 +
legacy/doc/models/custom-attribute.md | 46 +
legacy/doc/models/custom-field.md | 25 +
legacy/doc/models/customer-address-filter.md | 29 +
.../models/customer-creation-source-filter.md | 32 +
legacy/doc/models/customer-creation-source.md | 33 +
.../customer-custom-attribute-filter-value.md | 58 ++
.../customer-custom-attribute-filter.md | 60 ++
.../customer-custom-attribute-filters.md | 63 ++
legacy/doc/models/customer-details.md | 25 +
legacy/doc/models/customer-filter.md | 55 +
legacy/doc/models/customer-group.md | 32 +
.../models/customer-inclusion-exclusion.md | 17 +
legacy/doc/models/customer-preferences.md | 23 +
legacy/doc/models/customer-query.md | 53 +
legacy/doc/models/customer-segment.md | 32 +
legacy/doc/models/customer-sort-field.md | 16 +
legacy/doc/models/customer-sort.md | 26 +
legacy/doc/models/customer-tax-ids.md | 24 +
legacy/doc/models/customer-text-filter.md | 27 +
legacy/doc/models/customer.md | 54 +
.../data-collection-options-input-type.md | 16 +
legacy/doc/models/data-collection-options.md | 29 +
legacy/doc/models/date-range.md | 26 +
legacy/doc/models/day-of-week.md | 21 +
...ng-custom-attribute-definition-response.md | 24 +
...elete-booking-custom-attribute-response.md | 24 +
.../doc/models/delete-break-type-response.md | 31 +
.../models/delete-catalog-object-response.md | 35 +
.../models/delete-customer-card-response.md | 37 +
...er-custom-attribute-definition-response.md | 36 +
...lete-customer-custom-attribute-response.md | 43 +
.../models/delete-customer-group-response.md | 43 +
legacy/doc/models/delete-customer-request.md | 24 +
legacy/doc/models/delete-customer-response.md | 31 +
.../delete-dispute-evidence-response.md | 42 +
.../delete-invoice-attachment-response.md | 36 +
legacy/doc/models/delete-invoice-request.md | 23 +
legacy/doc/models/delete-invoice-response.md | 36 +
...on-custom-attribute-definition-response.md | 42 +
...lete-location-custom-attribute-response.md | 37 +
.../models/delete-loyalty-reward-response.md | 42 +
...nt-custom-attribute-definition-response.md | 36 +
...lete-merchant-custom-attribute-response.md | 37 +
...er-custom-attribute-definition-response.md | 30 +
.../delete-order-custom-attribute-response.md | 30 +
.../models/delete-payment-link-response.md | 32 +
legacy/doc/models/delete-shift-response.md | 31 +
legacy/doc/models/delete-snippet-response.md | 42 +
.../delete-subscription-action-response.md | 62 ++
.../delete-webhook-subscription-response.md | 31 +
...ed-create-dispute-evidence-file-request.md | 27 +
...d-create-dispute-evidence-file-response.md | 43 +
...ed-create-dispute-evidence-text-request.md | 27 +
...d-create-dispute-evidence-text-response.md | 43 +
...destination-details-card-refund-details.md | 31 +
...destination-details-cash-refund-details.md | 31 +
...ination-details-external-refund-details.md | 27 +
legacy/doc/models/destination-details.md | 50 +
legacy/doc/models/destination-type.md | 18 +
legacy/doc/models/destination.md | 25 +
.../models/device-attributes-device-type.md | 15 +
legacy/doc/models/device-attributes.md | 34 +
legacy/doc/models/device-checkout-options.md | 37 +
legacy/doc/models/device-code-status.md | 18 +
legacy/doc/models/device-code.md | 36 +
...e-component-details-application-details.md | 27 +
...evice-component-details-battery-details.md | 23 +
...e-component-details-card-reader-details.md | 21 +
...vice-component-details-ethernet-details.md | 23 +
...device-component-details-external-power.md | 18 +
.../device-component-details-measurement.md | 23 +
...onent-details-network-interface-details.md | 21 +
.../device-component-details-wi-fi-details.md | 31 +
legacy/doc/models/device-details.md | 27 +
legacy/doc/models/device-metadata.md | 36 +
legacy/doc/models/device-status-category.md | 15 +
legacy/doc/models/device-status.md | 21 +
legacy/doc/models/device.md | 125 +++
legacy/doc/models/digital-wallet-details.md | 31 +
legacy/doc/models/disable-card-response.md | 66 ++
legacy/doc/models/disable-events-response.md | 40 +
.../dismiss-terminal-action-response.md | 63 ++
.../dismiss-terminal-checkout-response.md | 76 ++
.../dismiss-terminal-refund-response.md | 92 ++
legacy/doc/models/dispute-evidence-file.md | 25 +
legacy/doc/models/dispute-evidence-type.md | 29 +
legacy/doc/models/dispute-evidence.md | 34 +
legacy/doc/models/dispute-reason.md | 24 +
legacy/doc/models/dispute-state.md | 22 +
legacy/doc/models/dispute.md | 45 +
legacy/doc/models/disputed-payment.md | 23 +
legacy/doc/models/ecom-visibility.md | 18 +
legacy/doc/models/employee-status.md | 18 +
legacy/doc/models/employee-wage.md | 32 +
legacy/doc/models/employee.md | 38 +
legacy/doc/models/enable-events-response.md | 34 +
legacy/doc/models/error-category.md | 23 +
legacy/doc/models/error-code.md | 165 +++
legacy/doc/models/error.md | 31 +
legacy/doc/models/event-data.md | 30 +
legacy/doc/models/event-metadata.md | 25 +
legacy/doc/models/event-type-metadata.md | 27 +
legacy/doc/models/event.md | 30 +
legacy/doc/models/exclude-strategy.md | 17 +
legacy/doc/models/external-payment-details.md | 34 +
legacy/doc/models/filter-value.md | 42 +
legacy/doc/models/float-number-range.md | 25 +
...fillment-delivery-details-schedule-type.md | 16 +
.../models/fulfillment-delivery-details.md | 61 ++
.../models/fulfillment-fulfillment-entry.md | 34 +
...lment-fulfillment-line-item-application.md | 17 +
...-pickup-details-curbside-pickup-details.md | 25 +
...ulfillment-pickup-details-schedule-type.md | 16 +
.../doc/models/fulfillment-pickup-details.md | 56 +
legacy/doc/models/fulfillment-recipient.md | 37 +
.../models/fulfillment-shipment-details.md | 53 +
legacy/doc/models/fulfillment-state.md | 20 +
legacy/doc/models/fulfillment-type.md | 17 +
legacy/doc/models/fulfillment.md | 48 +
.../get-bank-account-by-v1-id-response.md | 62 ++
.../doc/models/get-bank-account-response.md | 50 +
legacy/doc/models/get-break-type-response.md | 49 +
legacy/doc/models/get-device-code-response.md | 41 +
legacy/doc/models/get-device-response.md | 191 ++++
.../doc/models/get-employee-wage-response.md | 54 +
legacy/doc/models/get-invoice-response.md | 106 ++
.../doc/models/get-payment-refund-response.md | 100 ++
legacy/doc/models/get-payment-response.md | 101 ++
legacy/doc/models/get-payout-response.md | 54 +
legacy/doc/models/get-shift-response.md | 82 ++
.../models/get-team-member-wage-response.md | 44 +
.../models/get-terminal-action-response.md | 51 +
.../models/get-terminal-checkout-response.md | 66 ++
.../models/get-terminal-refund-response.md | 56 +
.../doc/models/gift-card-activity-activate.md | 36 +
...t-card-activity-adjust-decrement-reason.md | 18 +
.../gift-card-activity-adjust-decrement.md | 28 +
...t-card-activity-adjust-increment-reason.md | 17 +
.../gift-card-activity-adjust-increment.md | 28 +
.../models/gift-card-activity-block-reason.md | 15 +
legacy/doc/models/gift-card-activity-block.md | 23 +
...gift-card-activity-clear-balance-reason.md | 17 +
.../gift-card-activity-clear-balance.md | 23 +
.../gift-card-activity-deactivate-reason.md | 17 +
.../models/gift-card-activity-deactivate.md | 23 +
.../gift-card-activity-import-reversal.md | 26 +
.../doc/models/gift-card-activity-import.md | 28 +
legacy/doc/models/gift-card-activity-load.md | 37 +
.../gift-card-activity-redeem-status.md | 19 +
.../doc/models/gift-card-activity-redeem.md | 32 +
.../doc/models/gift-card-activity-refund.md | 32 +
...ift-card-activity-transfer-balance-from.md | 28 +
.../gift-card-activity-transfer-balance-to.md | 28 +
legacy/doc/models/gift-card-activity-type.md | 29 +
.../gift-card-activity-unblock-reason.md | 15 +
.../doc/models/gift-card-activity-unblock.md | 23 +
...-card-activity-unlinked-activity-refund.md | 30 +
legacy/doc/models/gift-card-activity.md | 55 +
legacy/doc/models/gift-card-gan-source.md | 17 +
legacy/doc/models/gift-card-status.md | 18 +
legacy/doc/models/gift-card-type.md | 16 +
legacy/doc/models/gift-card.md | 38 +
.../doc/models/inventory-adjustment-group.md | 27 +
legacy/doc/models/inventory-adjustment.md | 46 +
legacy/doc/models/inventory-alert-type.md | 16 +
legacy/doc/models/inventory-change-type.md | 17 +
legacy/doc/models/inventory-change.md | 64 ++
legacy/doc/models/inventory-count.md | 35 +
legacy/doc/models/inventory-physical-count.md | 41 +
legacy/doc/models/inventory-state.md | 30 +
legacy/doc/models/inventory-transfer.md | 40 +
.../invoice-accepted-payment-methods.md | 31 +
legacy/doc/models/invoice-attachment.md | 33 +
.../invoice-automatic-payment-source.md | 17 +
.../models/invoice-custom-field-placement.md | 17 +
legacy/doc/models/invoice-custom-field.md | 31 +
legacy/doc/models/invoice-delivery-method.md | 17 +
legacy/doc/models/invoice-filter.md | 32 +
.../models/invoice-payment-reminder-status.md | 17 +
legacy/doc/models/invoice-payment-reminder.md | 33 +
legacy/doc/models/invoice-payment-request.md | 47 +
legacy/doc/models/invoice-query.md | 36 +
.../doc/models/invoice-recipient-tax-ids.md | 25 +
legacy/doc/models/invoice-recipient.md | 45 +
legacy/doc/models/invoice-request-method.md | 24 +
legacy/doc/models/invoice-request-type.md | 18 +
legacy/doc/models/invoice-sort-field.md | 15 +
legacy/doc/models/invoice-sort.md | 25 +
legacy/doc/models/invoice-status.md | 24 +
legacy/doc/models/invoice.md | 63 ++
.../item-variation-location-overrides.md | 37 +
legacy/doc/models/job-assignment-pay-type.md | 17 +
legacy/doc/models/job-assignment.md | 40 +
legacy/doc/models/job.md | 34 +
.../link-customer-to-gift-card-request.md | 23 +
.../link-customer-to-gift-card-response.md | 47 +
.../doc/models/list-bank-accounts-request.md | 28 +
.../doc/models/list-bank-accounts-response.md | 73 ++
...ng-custom-attribute-definitions-request.md | 25 +
...g-custom-attribute-definitions-response.md | 56 +
.../list-booking-custom-attributes-request.md | 27 +
...list-booking-custom-attributes-response.md | 81 ++
legacy/doc/models/list-bookings-request.md | 31 +
legacy/doc/models/list-bookings-response.md | 52 +
legacy/doc/models/list-break-types-request.md | 27 +
.../doc/models/list-break-types-response.md | 63 ++
legacy/doc/models/list-cards-request.md | 32 +
legacy/doc/models/list-cards-response.md | 64 ++
.../list-cash-drawer-shift-events-request.md | 25 +
.../list-cash-drawer-shift-events-response.md | 99 ++
.../models/list-cash-drawer-shifts-request.md | 31 +
.../list-cash-drawer-shifts-response.md | 59 ++
legacy/doc/models/list-catalog-request.md | 25 +
legacy/doc/models/list-catalog-response.md | 119 +++
...er-custom-attribute-definitions-request.md | 25 +
...r-custom-attribute-definitions-response.md | 69 ++
...list-customer-custom-attributes-request.md | 27 +
...ist-customer-custom-attributes-response.md | 106 ++
.../models/list-customer-groups-request.md | 26 +
.../models/list-customer-groups-response.md | 62 ++
.../models/list-customer-segments-request.md | 25 +
.../models/list-customer-segments-response.md | 73 ++
legacy/doc/models/list-customers-request.md | 32 +
legacy/doc/models/list-customers-response.md | 98 ++
.../doc/models/list-device-codes-request.md | 31 +
.../doc/models/list-device-codes-response.md | 69 ++
legacy/doc/models/list-devices-request.md | 27 +
legacy/doc/models/list-devices-response.md | 368 +++++++
.../models/list-dispute-evidence-request.md | 23 +
.../models/list-dispute-evidence-response.md | 45 +
legacy/doc/models/list-disputes-request.md | 31 +
legacy/doc/models/list-disputes-response.md | 77 ++
.../doc/models/list-employee-wages-request.md | 27 +
.../models/list-employee-wages-response.md | 72 ++
legacy/doc/models/list-employees-request.md | 27 +
legacy/doc/models/list-employees-response.md | 52 +
legacy/doc/models/list-event-types-request.md | 23 +
.../doc/models/list-event-types-response.md | 52 +
.../list-gift-card-activities-request.md | 35 +
.../list-gift-card-activities-response.md | 76 ++
legacy/doc/models/list-gift-cards-request.md | 32 +
legacy/doc/models/list-gift-cards-response.md | 72 ++
legacy/doc/models/list-invoices-request.md | 27 +
legacy/doc/models/list-invoices-response.md | 196 ++++
legacy/doc/models/list-jobs-request.md | 23 +
legacy/doc/models/list-jobs-response.md | 52 +
.../list-location-booking-profiles-request.md | 23 +
...list-location-booking-profiles-response.md | 36 +
...on-custom-attribute-definitions-request.md | 27 +
...n-custom-attribute-definitions-response.md | 63 ++
...list-location-custom-attributes-request.md | 29 +
...ist-location-custom-attributes-response.md | 81 ++
legacy/doc/models/list-locations-response.md | 99 ++
.../models/list-loyalty-programs-response.md | 110 ++
.../models/list-loyalty-promotions-request.md | 27 +
.../list-loyalty-promotions-response.md | 124 +++
...nt-custom-attribute-definitions-request.md | 27 +
...t-custom-attribute-definitions-response.md | 69 ++
...list-merchant-custom-attributes-request.md | 29 +
...ist-merchant-custom-attributes-response.md | 56 +
legacy/doc/models/list-merchants-request.md | 23 +
legacy/doc/models/list-merchants-response.md | 45 +
...er-custom-attribute-definitions-request.md | 27 +
...r-custom-attribute-definitions-response.md | 80 ++
.../list-order-custom-attributes-request.md | 29 +
.../list-order-custom-attributes-response.md | 79 ++
.../doc/models/list-payment-links-request.md | 23 +
.../doc/models/list-payment-links-response.md | 102 ++
.../models/list-payment-refunds-request.md | 37 +
.../models/list-payment-refunds-response.md | 97 ++
legacy/doc/models/list-payments-request.md | 44 +
legacy/doc/models/list-payments-response.md | 105 ++
.../doc/models/list-payout-entries-request.md | 25 +
.../models/list-payout-entries-response.md | 84 ++
legacy/doc/models/list-payouts-request.md | 33 +
legacy/doc/models/list-payouts-response.md | 97 ++
legacy/doc/models/list-refunds-request.md | 32 +
legacy/doc/models/list-refunds-response.md | 66 ++
legacy/doc/models/list-sites-response.md | 49 +
.../list-subscription-events-request.md | 27 +
.../list-subscription-events-response.md | 169 +++
...st-team-member-booking-profiles-request.md | 27 +
...t-team-member-booking-profiles-response.md | 40 +
.../models/list-team-member-wages-request.md | 27 +
.../models/list-team-member-wages-response.md | 86 ++
.../doc/models/list-transactions-request.md | 32 +
.../doc/models/list-transactions-response.md | 111 ++
.../list-webhook-event-types-request.md | 23 +
.../list-webhook-event-types-response.md | 46 +
.../list-webhook-subscriptions-request.md | 29 +
.../list-webhook-subscriptions-response.md | 52 +
.../models/list-workweek-configs-request.md | 25 +
.../models/list-workweek-configs-response.md | 45 +
legacy/doc/models/location-booking-profile.md | 27 +
legacy/doc/models/location-capability.md | 17 +
legacy/doc/models/location-status.md | 16 +
legacy/doc/models/location-type.md | 16 +
legacy/doc/models/location.md | 61 ++
...loyalty-account-expiring-point-deadline.md | 25 +
.../models/loyalty-account-mapping-type.md | 15 +
legacy/doc/models/loyalty-account-mapping.md | 30 +
legacy/doc/models/loyalty-account.md | 38 +
.../models/loyalty-event-accumulate-points.md | 27 +
...yalty-event-accumulate-promotion-points.md | 29 +
.../doc/models/loyalty-event-adjust-points.md | 27 +
.../doc/models/loyalty-event-create-reward.md | 27 +
.../models/loyalty-event-date-time-filter.md | 26 +
.../doc/models/loyalty-event-delete-reward.md | 27 +
.../doc/models/loyalty-event-expire-points.md | 25 +
legacy/doc/models/loyalty-event-filter.md | 53 +
.../models/loyalty-event-location-filter.md | 27 +
.../loyalty-event-loyalty-account-filter.md | 23 +
.../doc/models/loyalty-event-order-filter.md | 23 +
legacy/doc/models/loyalty-event-other.md | 25 +
legacy/doc/models/loyalty-event-query.md | 50 +
.../doc/models/loyalty-event-redeem-reward.md | 27 +
legacy/doc/models/loyalty-event-source.md | 16 +
.../doc/models/loyalty-event-type-filter.md | 27 +
legacy/doc/models/loyalty-event-type.md | 22 +
legacy/doc/models/loyalty-event.md | 66 ++
...alty-program-accrual-rule-category-data.md | 23 +
...rogram-accrual-rule-item-variation-data.md | 23 +
...loyalty-program-accrual-rule-spend-data.md | 37 +
.../loyalty-program-accrual-rule-tax-mode.md | 17 +
.../loyalty-program-accrual-rule-type.md | 18 +
...loyalty-program-accrual-rule-visit-data.md | 28 +
.../models/loyalty-program-accrual-rule.md | 56 +
.../loyalty-program-expiration-policy.md | 23 +
...loyalty-program-reward-definition-scope.md | 19 +
.../loyalty-program-reward-definition-type.md | 18 +
.../loyalty-program-reward-definition.md | 43 +
.../doc/models/loyalty-program-reward-tier.md | 51 +
legacy/doc/models/loyalty-program-status.md | 16 +
.../doc/models/loyalty-program-terminology.md | 25 +
legacy/doc/models/loyalty-program.md | 95 ++
.../loyalty-promotion-available-time-data.md | 32 +
...romotion-incentive-points-addition-data.md | 23 +
...motion-incentive-points-multiplier-data.md | 25 +
.../loyalty-promotion-incentive-type.md | 17 +
.../doc/models/loyalty-promotion-incentive.md | 34 +
legacy/doc/models/loyalty-promotion-status.md | 18 +
...oyalty-promotion-trigger-limit-interval.md | 17 +
.../models/loyalty-promotion-trigger-limit.md | 29 +
legacy/doc/models/loyalty-promotion.md | 63 ++
legacy/doc/models/loyalty-reward-status.md | 17 +
legacy/doc/models/loyalty-reward.md | 38 +
legacy/doc/models/measurement-unit-area.md | 22 +
legacy/doc/models/measurement-unit-custom.md | 25 +
legacy/doc/models/measurement-unit-generic.md | 13 +
legacy/doc/models/measurement-unit-length.md | 22 +
legacy/doc/models/measurement-unit-time.md | 19 +
.../doc/models/measurement-unit-unit-type.md | 20 +
legacy/doc/models/measurement-unit-volume.md | 25 +
legacy/doc/models/measurement-unit-weight.md | 20 +
legacy/doc/models/measurement-unit.md | 39 +
legacy/doc/models/merchant-status.md | 14 +
legacy/doc/models/merchant.md | 35 +
.../doc/models/modifier-location-overrides.md | 30 +
legacy/doc/models/money.md | 30 +
legacy/doc/models/obtain-token-request.md | 36 +
legacy/doc/models/obtain-token-response.md | 36 +
legacy/doc/models/offline-payment-details.md | 23 +
legacy/doc/models/order-created-object.md | 27 +
legacy/doc/models/order-created.md | 29 +
legacy/doc/models/order-entry.md | 28 +
...fillment-delivery-details-schedule-type.md | 16 +
.../order-fulfillment-delivery-details.md | 61 ++
.../order-fulfillment-fulfillment-entry.md | 35 +
...lment-fulfillment-line-item-application.md | 17 +
...-pickup-details-curbside-pickup-details.md | 25 +
...ulfillment-pickup-details-schedule-type.md | 16 +
.../order-fulfillment-pickup-details.md | 56 +
.../doc/models/order-fulfillment-recipient.md | 37 +
.../order-fulfillment-shipment-details.md | 53 +
legacy/doc/models/order-fulfillment-state.md | 20 +
legacy/doc/models/order-fulfillment-type.md | 17 +
.../order-fulfillment-updated-object.md | 27 +
.../order-fulfillment-updated-update.md | 27 +
.../doc/models/order-fulfillment-updated.md | 31 +
legacy/doc/models/order-fulfillment.md | 68 ++
.../order-line-item-applied-discount.md | 35 +
.../order-line-item-applied-service-charge.md | 28 +
.../doc/models/order-line-item-applied-tax.md | 35 +
.../models/order-line-item-discount-scope.md | 17 +
.../models/order-line-item-discount-type.md | 19 +
legacy/doc/models/order-line-item-discount.md | 43 +
.../doc/models/order-line-item-item-type.md | 17 +
legacy/doc/models/order-line-item-modifier.md | 34 +
...tem-pricing-blocklists-blocked-discount.md | 28 +
...ine-item-pricing-blocklists-blocked-tax.md | 28 +
.../order-line-item-pricing-blocklists.md | 54 +
.../doc/models/order-line-item-tax-scope.md | 17 +
legacy/doc/models/order-line-item-tax-type.md | 17 +
legacy/doc/models/order-line-item-tax.md | 40 +
legacy/doc/models/order-line-item.md | 64 ++
legacy/doc/models/order-money-amounts.md | 46 +
legacy/doc/models/order-pricing-options.md | 27 +
legacy/doc/models/order-quantity-unit.md | 39 +
legacy/doc/models/order-return-discount.md | 41 +
.../models/order-return-line-item-modifier.md | 34 +
legacy/doc/models/order-return-line-item.md | 62 ++
.../doc/models/order-return-service-charge.md | 41 +
legacy/doc/models/order-return-tax.md | 39 +
legacy/doc/models/order-return-tip.md | 32 +
legacy/doc/models/order-return.md | 95 ++
legacy/doc/models/order-reward.md | 26 +
.../doc/models/order-rounding-adjustment.md | 31 +
.../order-service-charge-calculation-phase.md | 21 +
.../doc/models/order-service-charge-scope.md | 18 +
.../order-service-charge-treatment-type.md | 17 +
.../doc/models/order-service-charge-type.md | 14 +
legacy/doc/models/order-service-charge.md | 42 +
legacy/doc/models/order-source.md | 23 +
legacy/doc/models/order-state.md | 18 +
legacy/doc/models/order-updated-object.md | 27 +
legacy/doc/models/order-updated.md | 30 +
legacy/doc/models/order.md | 88 ++
legacy/doc/models/pagination-cursor.md | 24 +
.../doc/models/pause-subscription-request.md | 32 +
.../doc/models/pause-subscription-response.md | 84 ++
legacy/doc/models/pay-order-request.md | 31 +
legacy/doc/models/pay-order-response.md | 226 ++++
...-balance-activity-app-fee-refund-detail.md | 25 +
...balance-activity-app-fee-revenue-detail.md | 23 +
...lance-activity-automatic-savings-detail.md | 23 +
...ivity-automatic-savings-reversed-detail.md | 23 +
.../payment-balance-activity-charge-detail.md | 21 +
...ent-balance-activity-deposit-fee-detail.md | 21 +
...ce-activity-deposit-fee-reversed-detail.md | 21 +
...payment-balance-activity-dispute-detail.md | 23 +
.../payment-balance-activity-fee-detail.md | 21 +
...balance-activity-free-processing-detail.md | 21 +
...balance-activity-hold-adjustment-detail.md | 21 +
...nt-balance-activity-open-dispute-detail.md | 23 +
...alance-activity-other-adjustment-detail.md | 21 +
.../payment-balance-activity-other-detail.md | 21 +
.../payment-balance-activity-refund-detail.md | 23 +
...ance-activity-release-adjustment-detail.md | 21 +
...nt-balance-activity-reserve-hold-detail.md | 21 +
...balance-activity-reserve-release-detail.md | 21 +
...-activity-square-capital-payment-detail.md | 21 +
...-square-capital-reversed-payment-detail.md | 21 +
...activity-square-payroll-transfer-detail.md | 21 +
...square-payroll-transfer-reversed-detail.md | 21 +
...ment-balance-activity-tax-on-fee-detail.md | 23 +
...balance-activity-third-party-fee-detail.md | 21 +
...-activity-third-party-fee-refund-detail.md | 23 +
.../models/payment-link-related-resources.md | 223 ++++
legacy/doc/models/payment-link.md | 59 ++
.../models/payment-options-delay-action.md | 17 +
legacy/doc/models/payment-options.md | 27 +
legacy/doc/models/payment-refund.md | 75 ++
legacy/doc/models/payment-sort-field.md | 15 +
legacy/doc/models/payment.md | 76 ++
legacy/doc/models/payout-entry.md | 70 ++
legacy/doc/models/payout-fee-type.md | 16 +
legacy/doc/models/payout-fee.md | 30 +
legacy/doc/models/payout-status.md | 17 +
legacy/doc/models/payout-type.md | 19 +
legacy/doc/models/payout.md | 47 +
legacy/doc/models/phase-input.md | 25 +
legacy/doc/models/phase.md | 29 +
legacy/doc/models/pre-populated-data.md | 35 +
legacy/doc/models/processing-fee.md | 30 +
legacy/doc/models/product-type.md | 13 +
legacy/doc/models/product.md | 24 +
legacy/doc/models/publish-invoice-request.md | 25 +
legacy/doc/models/publish-invoice-response.md | 107 ++
legacy/doc/models/qr-code-options.md | 27 +
legacy/doc/models/quantity-ratio.md | 25 +
legacy/doc/models/quick-pay.md | 32 +
legacy/doc/models/range.md | 25 +
legacy/doc/models/receipt-options.md | 27 +
.../models/redeem-loyalty-reward-request.md | 25 +
.../models/redeem-loyalty-reward-response.md | 70 ++
legacy/doc/models/refund-payment-request.md | 48 +
legacy/doc/models/refund-payment-response.md | 89 ++
legacy/doc/models/refund-status.md | 18 +
legacy/doc/models/refund.md | 75 ++
legacy/doc/models/register-domain-request.md | 24 +
.../models/register-domain-response-status.md | 16 +
legacy/doc/models/register-domain-response.md | 47 +
.../remove-group-from-customer-response.md | 38 +
.../doc/models/resume-subscription-request.md | 26 +
.../models/resume-subscription-response.md | 84 ++
...ing-custom-attribute-definition-request.md | 23 +
...ng-custom-attribute-definition-response.md | 38 +
...trieve-booking-custom-attribute-request.md | 25 +
...rieve-booking-custom-attribute-response.md | 63 ++
.../doc/models/retrieve-booking-response.md | 42 +
...rieve-business-booking-profile-response.md | 45 +
legacy/doc/models/retrieve-card-response.md | 66 ++
.../retrieve-cash-drawer-shift-request.md | 21 +
.../retrieve-cash-drawer-shift-response.md | 77 ++
.../models/retrieve-catalog-object-request.md | 25 +
.../retrieve-catalog-object-response.md | 171 +++
...mer-custom-attribute-definition-request.md | 23 +
...er-custom-attribute-definition-response.md | 51 +
...rieve-customer-custom-attribute-request.md | 25 +
...ieve-customer-custom-attribute-response.md | 51 +
.../retrieve-customer-group-response.md | 40 +
.../doc/models/retrieve-customer-response.md | 85 ++
.../retrieve-customer-segment-response.md | 45 +
.../retrieve-dispute-evidence-response.md | 43 +
.../doc/models/retrieve-dispute-response.md | 52 +
.../doc/models/retrieve-employee-response.md | 42 +
.../retrieve-gift-card-from-gan-request.md | 23 +
.../retrieve-gift-card-from-gan-response.md | 44 +
.../retrieve-gift-card-from-nonce-request.md | 23 +
.../retrieve-gift-card-from-nonce-response.md | 50 +
.../doc/models/retrieve-gift-card-response.md | 50 +
.../retrieve-inventory-adjustment-response.md | 44 +
.../retrieve-inventory-changes-request.md | 23 +
.../retrieve-inventory-changes-response.md | 79 ++
.../retrieve-inventory-count-request.md | 23 +
.../retrieve-inventory-count-response.md | 34 +
...rieve-inventory-physical-count-response.md | 39 +
.../retrieve-inventory-transfer-response.md | 40 +
legacy/doc/models/retrieve-job-response.md | 46 +
...rieve-location-booking-profile-response.md | 28 +
...ion-custom-attribute-definition-request.md | 23 +
...on-custom-attribute-definition-response.md | 57 +
...rieve-location-custom-attribute-request.md | 25 +
...ieve-location-custom-attribute-response.md | 51 +
.../doc/models/retrieve-location-response.md | 58 ++
.../retrieve-location-settings-response.md | 93 ++
.../retrieve-loyalty-account-response.md | 52 +
.../retrieve-loyalty-program-response.md | 96 ++
.../retrieve-loyalty-promotion-response.md | 75 ++
.../retrieve-loyalty-reward-response.md | 48 +
...ant-custom-attribute-definition-request.md | 23 +
...nt-custom-attribute-definition-response.md | 45 +
...rieve-merchant-custom-attribute-request.md | 25 +
...ieve-merchant-custom-attribute-response.md | 57 +
.../doc/models/retrieve-merchant-response.md | 47 +
.../retrieve-merchant-settings-response.md | 76 ++
...der-custom-attribute-definition-request.md | 23 +
...er-custom-attribute-definition-response.md | 44 +
...retrieve-order-custom-attribute-request.md | 25 +
...etrieve-order-custom-attribute-response.md | 56 +
legacy/doc/models/retrieve-order-response.md | 231 +++++
.../models/retrieve-payment-link-response.md | 69 ++
.../doc/models/retrieve-snippet-response.md | 38 +
.../models/retrieve-subscription-request.md | 24 +
.../models/retrieve-subscription-response.md | 62 ++
...ve-team-member-booking-profile-response.md | 29 +
.../models/retrieve-team-member-response.md | 82 ++
.../models/retrieve-token-status-response.md | 48 +
.../models/retrieve-transaction-response.md | 190 ++++
legacy/doc/models/retrieve-vendor-response.md | 44 +
.../models/retrieve-wage-setting-response.md | 66 ++
.../retrieve-webhook-subscription-response.md | 49 +
legacy/doc/models/revoke-token-request.md | 27 +
legacy/doc/models/revoke-token-response.md | 30 +
.../doc/models/risk-evaluation-risk-level.md | 16 +
legacy/doc/models/risk-evaluation.md | 30 +
legacy/doc/models/save-card-options.md | 27 +
.../doc/models/search-availability-filter.md | 71 ++
.../doc/models/search-availability-query.md | 89 ++
.../doc/models/search-availability-request.md | 89 ++
.../models/search-availability-response.md | 276 +++++
...earch-catalog-items-request-stock-level.md | 16 +
.../models/search-catalog-items-request.md | 69 ++
.../models/search-catalog-items-response.md | 89 ++
.../models/search-catalog-objects-request.md | 41 +
.../models/search-catalog-objects-response.md | 231 +++++
legacy/doc/models/search-customers-request.md | 64 ++
.../doc/models/search-customers-response.md | 131 +++
legacy/doc/models/search-events-filter.md | 43 +
legacy/doc/models/search-events-query.md | 44 +
legacy/doc/models/search-events-request.md | 49 +
legacy/doc/models/search-events-response.md | 85 ++
legacy/doc/models/search-events-sort-field.md | 15 +
legacy/doc/models/search-events-sort.md | 25 +
legacy/doc/models/search-invoices-request.md | 41 +
legacy/doc/models/search-invoices-response.md | 191 ++++
...-accounts-request-loyalty-account-query.md | 45 +
.../models/search-loyalty-accounts-request.md | 40 +
.../search-loyalty-accounts-response.md | 56 +
.../models/search-loyalty-events-request.md | 56 +
.../models/search-loyalty-events-response.md | 146 +++
...ty-rewards-request-loyalty-reward-query.md | 25 +
.../models/search-loyalty-rewards-request.md | 30 +
.../models/search-loyalty-rewards-response.md | 89 ++
.../models/search-orders-customer-filter.md | 29 +
.../models/search-orders-date-time-filter.md | 49 +
legacy/doc/models/search-orders-filter.md | 67 ++
.../search-orders-fulfillment-filter.md | 30 +
legacy/doc/models/search-orders-query.md | 69 ++
legacy/doc/models/search-orders-request.md | 78 ++
legacy/doc/models/search-orders-response.md | 225 ++++
legacy/doc/models/search-orders-sort-field.md | 17 +
legacy/doc/models/search-orders-sort.md | 26 +
.../doc/models/search-orders-source-filter.md | 27 +
.../doc/models/search-orders-state-filter.md | 27 +
legacy/doc/models/search-shifts-request.md | 57 +
legacy/doc/models/search-shifts-response.md | 120 +++
.../doc/models/search-subscriptions-filter.md | 39 +
.../doc/models/search-subscriptions-query.md | 34 +
.../models/search-subscriptions-request.md | 44 +
.../models/search-subscriptions-response.md | 100 ++
.../doc/models/search-team-members-filter.md | 37 +
.../doc/models/search-team-members-query.md | 29 +
.../doc/models/search-team-members-request.md | 35 +
.../models/search-team-members-response.md | 284 +++++
.../models/search-terminal-actions-request.md | 38 +
.../search-terminal-actions-response.md | 66 ++
.../search-terminal-checkouts-request.md | 37 +
.../search-terminal-checkouts-response.md | 123 +++
.../models/search-terminal-refunds-request.md | 37 +
.../search-terminal-refunds-response.md | 72 ++
.../models/search-vendors-request-filter.md | 33 +
.../search-vendors-request-sort-field.md | 16 +
.../doc/models/search-vendors-request-sort.md | 25 +
legacy/doc/models/search-vendors-request.md | 55 +
legacy/doc/models/search-vendors-response.md | 61 ++
legacy/doc/models/segment-filter.md | 40 +
legacy/doc/models/select-option.md | 23 +
legacy/doc/models/select-options.md | 35 +
legacy/doc/models/shift-filter-status.md | 16 +
legacy/doc/models/shift-filter.md | 48 +
legacy/doc/models/shift-query.md | 44 +
legacy/doc/models/shift-sort-field.md | 18 +
legacy/doc/models/shift-sort.md | 25 +
legacy/doc/models/shift-status.md | 16 +
legacy/doc/models/shift-wage.md | 32 +
legacy/doc/models/shift-workday-matcher.md | 17 +
legacy/doc/models/shift-workday.md | 31 +
legacy/doc/models/shift.md | 52 +
legacy/doc/models/shipping-fee.md | 26 +
legacy/doc/models/signature-image.md | 23 +
legacy/doc/models/signature-options.md | 38 +
legacy/doc/models/site.md | 32 +
legacy/doc/models/snippet-response.md | 42 +
legacy/doc/models/snippet.md | 31 +
legacy/doc/models/sort-order.md | 16 +
legacy/doc/models/source-application.md | 27 +
legacy/doc/models/square-account-details.md | 38 +
.../models/standard-unit-description-group.md | 68 ++
.../doc/models/standard-unit-description.md | 36 +
legacy/doc/models/submit-evidence-response.md | 64 ++
legacy/doc/models/subscription-action-type.md | 19 +
legacy/doc/models/subscription-action.md | 45 +
legacy/doc/models/subscription-cadence.md | 27 +
.../models/subscription-event-info-code.md | 20 +
legacy/doc/models/subscription-event-info.md | 25 +
...scription-event-subscription-event-type.md | 21 +
legacy/doc/models/subscription-event.md | 51 +
legacy/doc/models/subscription-phase.md | 46 +
.../doc/models/subscription-pricing-type.md | 16 +
legacy/doc/models/subscription-pricing.md | 33 +
legacy/doc/models/subscription-source.md | 23 +
legacy/doc/models/subscription-status.md | 19 +
legacy/doc/models/subscription-test-result.md | 32 +
legacy/doc/models/subscription.md | 48 +
legacy/doc/models/swap-plan-request.md | 31 +
legacy/doc/models/swap-plan-response.md | 88 ++
legacy/doc/models/tax-calculation-phase.md | 16 +
legacy/doc/models/tax-ids.md | 31 +
legacy/doc/models/tax-inclusion-type.md | 16 +
...mber-assigned-locations-assignment-type.md | 16 +
.../models/team-member-assigned-locations.md | 28 +
.../doc/models/team-member-booking-profile.md | 31 +
.../models/team-member-invitation-status.md | 17 +
legacy/doc/models/team-member-status.md | 16 +
legacy/doc/models/team-member-wage.md | 36 +
legacy/doc/models/team-member.md | 38 +
.../tender-bank-account-details-status.md | 17 +
.../doc/models/tender-bank-account-details.md | 26 +
.../tender-buy-now-pay-later-details-brand.md | 14 +
...tender-buy-now-pay-later-details-status.md | 16 +
.../tender-buy-now-pay-later-details.md | 25 +
.../tender-card-details-entry-method.md | 19 +
.../doc/models/tender-card-details-status.md | 18 +
legacy/doc/models/tender-card-details.md | 33 +
legacy/doc/models/tender-cash-details.md | 31 +
.../tender-square-account-details-status.md | 16 +
.../models/tender-square-account-details.md | 23 +
legacy/doc/models/tender-type.md | 24 +
legacy/doc/models/tender.md | 44 +
.../doc/models/terminal-action-action-type.md | 22 +
.../models/terminal-action-query-filter.md | 30 +
.../doc/models/terminal-action-query-sort.md | 21 +
legacy/doc/models/terminal-action-query.md | 42 +
legacy/doc/models/terminal-action.md | 46 +
.../models/terminal-checkout-query-filter.md | 28 +
.../models/terminal-checkout-query-sort.md | 21 +
legacy/doc/models/terminal-checkout-query.md | 32 +
legacy/doc/models/terminal-checkout.md | 71 ++
.../models/terminal-refund-query-filter.md | 28 +
.../doc/models/terminal-refund-query-sort.md | 21 +
legacy/doc/models/terminal-refund-query.md | 32 +
legacy/doc/models/terminal-refund.md | 47 +
.../test-webhook-subscription-request.md | 23 +
.../test-webhook-subscription-response.md | 48 +
legacy/doc/models/time-range.md | 29 +
legacy/doc/models/tip-settings.md | 33 +
legacy/doc/models/transaction-product.md | 22 +
legacy/doc/models/transaction-type.md | 16 +
legacy/doc/models/transaction.md | 177 ++++
.../unlink-customer-from-gift-card-request.md | 23 +
...unlink-customer-from-gift-card-response.md | 56 +
...ing-custom-attribute-definition-request.md | 34 +
...ng-custom-attribute-definition-response.md | 38 +
legacy/doc/models/update-booking-request.md | 29 +
legacy/doc/models/update-booking-response.md | 50 +
.../doc/models/update-break-type-request.md | 32 +
.../doc/models/update-break-type-response.md | 43 +
.../models/update-catalog-image-request.md | 29 +
.../models/update-catalog-image-response.md | 77 ++
...mer-custom-attribute-definition-request.md | 34 +
...er-custom-attribute-definition-response.md | 57 +
.../models/update-customer-group-request.md | 29 +
.../models/update-customer-group-response.md | 52 +
legacy/doc/models/update-customer-request.md | 42 +
legacy/doc/models/update-customer-response.md | 73 ++
legacy/doc/models/update-invoice-request.md | 56 +
legacy/doc/models/update-invoice-response.md | 108 ++
.../update-item-modifier-lists-request.md | 33 +
.../update-item-modifier-lists-response.md | 42 +
.../doc/models/update-item-taxes-request.md | 32 +
.../doc/models/update-item-taxes-response.md | 42 +
legacy/doc/models/update-job-request.md | 29 +
legacy/doc/models/update-job-response.md | 52 +
...ion-custom-attribute-definition-request.md | 34 +
...on-custom-attribute-definition-response.md | 57 +
legacy/doc/models/update-location-request.md | 57 +
legacy/doc/models/update-location-response.md | 87 ++
.../update-location-settings-request.md | 68 ++
.../update-location-settings-response.md | 104 ++
...ant-custom-attribute-definition-request.md | 34 +
...nt-custom-attribute-definition-response.md | 45 +
.../update-merchant-settings-request.md | 57 +
.../update-merchant-settings-response.md | 76 ++
...der-custom-attribute-definition-request.md | 35 +
...er-custom-attribute-definition-response.md | 56 +
legacy/doc/models/update-order-request.md | 64 ++
legacy/doc/models/update-order-response.md | 187 ++++
.../doc/models/update-payment-link-request.md | 52 +
.../models/update-payment-link-response.md | 78 ++
legacy/doc/models/update-payment-request.md | 39 +
legacy/doc/models/update-payment-response.md | 111 ++
legacy/doc/models/update-shift-request.md | 56 +
legacy/doc/models/update-shift-response.md | 82 ++
.../doc/models/update-subscription-request.md | 32 +
.../models/update-subscription-response.md | 58 ++
.../doc/models/update-team-member-request.md | 61 ++
.../doc/models/update-team-member-response.md | 82 ++
legacy/doc/models/update-vendor-request.md | 39 +
legacy/doc/models/update-vendor-response.md | 71 ++
.../doc/models/update-wage-setting-request.md | 58 ++
.../models/update-wage-setting-response.md | 75 ++
.../update-webhook-subscription-request.md | 32 +
.../update-webhook-subscription-response.md | 48 +
...hook-subscription-signature-key-request.md | 23 +
...ook-subscription-signature-key-response.md | 48 +
.../models/update-workweek-config-request.md | 30 +
.../models/update-workweek-config-response.md | 53 +
...upsert-booking-custom-attribute-request.md | 43 +
...psert-booking-custom-attribute-response.md | 63 ++
.../models/upsert-catalog-object-request.md | 80 ++
.../models/upsert-catalog-object-response.md | 139 +++
...psert-customer-custom-attribute-request.md | 43 +
...sert-customer-custom-attribute-response.md | 51 +
...psert-location-custom-attribute-request.md | 43 +
...sert-location-custom-attribute-response.md | 57 +
...psert-merchant-custom-attribute-request.md | 43 +
...sert-merchant-custom-attribute-response.md | 51 +
.../upsert-order-custom-attribute-request.md | 43 +
.../upsert-order-custom-attribute-response.md | 62 ++
legacy/doc/models/upsert-snippet-request.md | 29 +
legacy/doc/models/upsert-snippet-response.md | 44 +
legacy/doc/models/v1-device.md | 23 +
legacy/doc/models/v1-list-orders-request.md | 25 +
legacy/doc/models/v1-list-orders-response.md | 50 +
legacy/doc/models/v1-money.md | 23 +
.../models/v1-order-history-entry-action.md | 19 +
legacy/doc/models/v1-order-history-entry.md | 25 +
legacy/doc/models/v1-order-state.md | 18 +
legacy/doc/models/v1-order.md | 64 ++
legacy/doc/models/v1-phone-number.md | 25 +
legacy/doc/models/v1-tender-card-brand.md | 23 +
legacy/doc/models/v1-tender-entry-method.md | 19 +
legacy/doc/models/v1-tender-type.md | 20 +
legacy/doc/models/v1-tender.md | 63 ++
.../models/v1-update-order-request-action.md | 15 +
legacy/doc/models/v1-update-order-request.md | 31 +
legacy/doc/models/vendor-contact.md | 33 +
legacy/doc/models/vendor-status.md | 17 +
legacy/doc/models/vendor.md | 42 +
legacy/doc/models/visibility-filter.md | 17 +
.../doc/models/void-transaction-response.md | 43 +
legacy/doc/models/wage-setting.md | 76 ++
legacy/doc/models/webhook-subscription.md | 38 +
legacy/doc/models/weekday.md | 21 +
legacy/doc/models/workweek-config.md | 34 +
legacy/exports/index.d.mts | 1 +
legacy/exports/index.d.ts | 1 +
legacy/exports/index.js | 1 +
legacy/exports/index.mjs | 1 +
1178 files changed, 69607 insertions(+)
create mode 100644 legacy/CHANGELOG.md
create mode 100644 legacy/README.md
create mode 100644 legacy/doc/api-error.md
create mode 100644 legacy/doc/api-response.md
create mode 100644 legacy/doc/api/apple-pay.md
create mode 100644 legacy/doc/api/bank-accounts.md
create mode 100644 legacy/doc/api/booking-custom-attributes.md
create mode 100644 legacy/doc/api/bookings.md
create mode 100644 legacy/doc/api/cards.md
create mode 100644 legacy/doc/api/cash-drawers.md
create mode 100644 legacy/doc/api/catalog.md
create mode 100644 legacy/doc/api/checkout.md
create mode 100644 legacy/doc/api/customer-custom-attributes.md
create mode 100644 legacy/doc/api/customer-groups.md
create mode 100644 legacy/doc/api/customer-segments.md
create mode 100644 legacy/doc/api/customers.md
create mode 100644 legacy/doc/api/devices.md
create mode 100644 legacy/doc/api/disputes.md
create mode 100644 legacy/doc/api/employees.md
create mode 100644 legacy/doc/api/events.md
create mode 100644 legacy/doc/api/gift-card-activities.md
create mode 100644 legacy/doc/api/gift-cards.md
create mode 100644 legacy/doc/api/inventory.md
create mode 100644 legacy/doc/api/invoices.md
create mode 100644 legacy/doc/api/labor.md
create mode 100644 legacy/doc/api/location-custom-attributes.md
create mode 100644 legacy/doc/api/locations.md
create mode 100644 legacy/doc/api/loyalty.md
create mode 100644 legacy/doc/api/merchant-custom-attributes.md
create mode 100644 legacy/doc/api/merchants.md
create mode 100644 legacy/doc/api/mobile-authorization.md
create mode 100644 legacy/doc/api/o-auth.md
create mode 100644 legacy/doc/api/order-custom-attributes.md
create mode 100644 legacy/doc/api/orders.md
create mode 100644 legacy/doc/api/payments.md
create mode 100644 legacy/doc/api/payouts.md
create mode 100644 legacy/doc/api/refunds.md
create mode 100644 legacy/doc/api/sites.md
create mode 100644 legacy/doc/api/snippets.md
create mode 100644 legacy/doc/api/subscriptions.md
create mode 100644 legacy/doc/api/team.md
create mode 100644 legacy/doc/api/terminal.md
create mode 100644 legacy/doc/api/transactions.md
create mode 100644 legacy/doc/api/v1-transactions.md
create mode 100644 legacy/doc/api/vendors.md
create mode 100644 legacy/doc/api/webhook-subscriptions.md
create mode 100644 legacy/doc/auth/oauth-2-bearer-token.md
create mode 100644 legacy/doc/client.md
create mode 100644 legacy/doc/models/accept-dispute-response.md
create mode 100644 legacy/doc/models/accepted-payment-methods.md
create mode 100644 legacy/doc/models/accumulate-loyalty-points-request.md
create mode 100644 legacy/doc/models/accumulate-loyalty-points-response.md
create mode 100644 legacy/doc/models/ach-details.md
create mode 100644 legacy/doc/models/action-cancel-reason.md
create mode 100644 legacy/doc/models/activity-type.md
create mode 100644 legacy/doc/models/add-group-to-customer-response.md
create mode 100644 legacy/doc/models/additional-recipient.md
create mode 100644 legacy/doc/models/address.md
create mode 100644 legacy/doc/models/adjust-loyalty-points-request.md
create mode 100644 legacy/doc/models/adjust-loyalty-points-response.md
create mode 100644 legacy/doc/models/afterpay-details.md
create mode 100644 legacy/doc/models/application-details-external-square-product.md
create mode 100644 legacy/doc/models/application-details.md
create mode 100644 legacy/doc/models/application-type.md
create mode 100644 legacy/doc/models/appointment-segment.md
create mode 100644 legacy/doc/models/archived-state.md
create mode 100644 legacy/doc/models/availability.md
create mode 100644 legacy/doc/models/bank-account-payment-details.md
create mode 100644 legacy/doc/models/bank-account-status.md
create mode 100644 legacy/doc/models/bank-account-type.md
create mode 100644 legacy/doc/models/bank-account.md
create mode 100644 legacy/doc/models/batch-change-inventory-request.md
create mode 100644 legacy/doc/models/batch-change-inventory-response.md
create mode 100644 legacy/doc/models/batch-delete-catalog-objects-request.md
create mode 100644 legacy/doc/models/batch-delete-catalog-objects-response.md
create mode 100644 legacy/doc/models/batch-retrieve-catalog-objects-request.md
create mode 100644 legacy/doc/models/batch-retrieve-catalog-objects-response.md
create mode 100644 legacy/doc/models/batch-retrieve-inventory-changes-request.md
create mode 100644 legacy/doc/models/batch-retrieve-inventory-changes-response.md
create mode 100644 legacy/doc/models/batch-retrieve-inventory-counts-request.md
create mode 100644 legacy/doc/models/batch-retrieve-inventory-counts-response.md
create mode 100644 legacy/doc/models/batch-retrieve-orders-request.md
create mode 100644 legacy/doc/models/batch-retrieve-orders-response.md
create mode 100644 legacy/doc/models/batch-upsert-catalog-objects-request.md
create mode 100644 legacy/doc/models/batch-upsert-catalog-objects-response.md
create mode 100644 legacy/doc/models/booking-booking-source.md
create mode 100644 legacy/doc/models/booking-creator-details-creator-type.md
create mode 100644 legacy/doc/models/booking-creator-details.md
create mode 100644 legacy/doc/models/booking-custom-attribute-delete-request.md
create mode 100644 legacy/doc/models/booking-custom-attribute-delete-response.md
create mode 100644 legacy/doc/models/booking-custom-attribute-upsert-request.md
create mode 100644 legacy/doc/models/booking-custom-attribute-upsert-response.md
create mode 100644 legacy/doc/models/booking-status.md
create mode 100644 legacy/doc/models/booking.md
create mode 100644 legacy/doc/models/break-type.md
create mode 100644 legacy/doc/models/break.md
create mode 100644 legacy/doc/models/bulk-create-customer-data.md
create mode 100644 legacy/doc/models/bulk-create-customers-request.md
create mode 100644 legacy/doc/models/bulk-create-customers-response.md
create mode 100644 legacy/doc/models/bulk-create-team-members-request.md
create mode 100644 legacy/doc/models/bulk-create-team-members-response.md
create mode 100644 legacy/doc/models/bulk-create-vendors-request.md
create mode 100644 legacy/doc/models/bulk-create-vendors-response.md
create mode 100644 legacy/doc/models/bulk-delete-booking-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-delete-booking-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-delete-customers-request.md
create mode 100644 legacy/doc/models/bulk-delete-customers-response.md
create mode 100644 legacy/doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md
create mode 100644 legacy/doc/models/bulk-delete-location-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-delete-location-custom-attributes-response-location-custom-attribute-delete-response.md
create mode 100644 legacy/doc/models/bulk-delete-location-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-delete-merchant-custom-attributes-request-merchant-custom-attribute-delete-request.md
create mode 100644 legacy/doc/models/bulk-delete-merchant-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-delete-merchant-custom-attributes-response-merchant-custom-attribute-delete-response.md
create mode 100644 legacy/doc/models/bulk-delete-merchant-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-delete-order-custom-attributes-request-delete-custom-attribute.md
create mode 100644 legacy/doc/models/bulk-delete-order-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-delete-order-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-retrieve-bookings-request.md
create mode 100644 legacy/doc/models/bulk-retrieve-bookings-response.md
create mode 100644 legacy/doc/models/bulk-retrieve-customers-request.md
create mode 100644 legacy/doc/models/bulk-retrieve-customers-response.md
create mode 100644 legacy/doc/models/bulk-retrieve-team-member-booking-profiles-request.md
create mode 100644 legacy/doc/models/bulk-retrieve-team-member-booking-profiles-response.md
create mode 100644 legacy/doc/models/bulk-retrieve-vendors-request.md
create mode 100644 legacy/doc/models/bulk-retrieve-vendors-response.md
create mode 100644 legacy/doc/models/bulk-swap-plan-request.md
create mode 100644 legacy/doc/models/bulk-swap-plan-response.md
create mode 100644 legacy/doc/models/bulk-update-customer-data.md
create mode 100644 legacy/doc/models/bulk-update-customers-request.md
create mode 100644 legacy/doc/models/bulk-update-customers-response.md
create mode 100644 legacy/doc/models/bulk-update-team-members-request.md
create mode 100644 legacy/doc/models/bulk-update-team-members-response.md
create mode 100644 legacy/doc/models/bulk-update-vendors-request.md
create mode 100644 legacy/doc/models/bulk-update-vendors-response.md
create mode 100644 legacy/doc/models/bulk-upsert-booking-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-upsert-booking-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md
create mode 100644 legacy/doc/models/bulk-upsert-customer-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-upsert-customer-custom-attributes-response-customer-custom-attribute-upsert-response.md
create mode 100644 legacy/doc/models/bulk-upsert-customer-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md
create mode 100644 legacy/doc/models/bulk-upsert-location-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-upsert-location-custom-attributes-response-location-custom-attribute-upsert-response.md
create mode 100644 legacy/doc/models/bulk-upsert-location-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-upsert-merchant-custom-attributes-request-merchant-custom-attribute-upsert-request.md
create mode 100644 legacy/doc/models/bulk-upsert-merchant-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-upsert-merchant-custom-attributes-response-merchant-custom-attribute-upsert-response.md
create mode 100644 legacy/doc/models/bulk-upsert-merchant-custom-attributes-response.md
create mode 100644 legacy/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md
create mode 100644 legacy/doc/models/bulk-upsert-order-custom-attributes-request.md
create mode 100644 legacy/doc/models/bulk-upsert-order-custom-attributes-response.md
create mode 100644 legacy/doc/models/business-appointment-settings-alignment-time.md
create mode 100644 legacy/doc/models/business-appointment-settings-booking-location-type.md
create mode 100644 legacy/doc/models/business-appointment-settings-cancellation-policy.md
create mode 100644 legacy/doc/models/business-appointment-settings-max-appointments-per-day-limit-type.md
create mode 100644 legacy/doc/models/business-appointment-settings.md
create mode 100644 legacy/doc/models/business-booking-profile-booking-policy.md
create mode 100644 legacy/doc/models/business-booking-profile-customer-timezone-choice.md
create mode 100644 legacy/doc/models/business-booking-profile.md
create mode 100644 legacy/doc/models/business-hours-period.md
create mode 100644 legacy/doc/models/business-hours.md
create mode 100644 legacy/doc/models/buy-now-pay-later-details.md
create mode 100644 legacy/doc/models/calculate-loyalty-points-request.md
create mode 100644 legacy/doc/models/calculate-loyalty-points-response.md
create mode 100644 legacy/doc/models/calculate-order-request.md
create mode 100644 legacy/doc/models/calculate-order-response.md
create mode 100644 legacy/doc/models/cancel-booking-request.md
create mode 100644 legacy/doc/models/cancel-booking-response.md
create mode 100644 legacy/doc/models/cancel-invoice-request.md
create mode 100644 legacy/doc/models/cancel-invoice-response.md
create mode 100644 legacy/doc/models/cancel-loyalty-promotion-response.md
create mode 100644 legacy/doc/models/cancel-payment-by-idempotency-key-request.md
create mode 100644 legacy/doc/models/cancel-payment-by-idempotency-key-response.md
create mode 100644 legacy/doc/models/cancel-payment-response.md
create mode 100644 legacy/doc/models/cancel-subscription-response.md
create mode 100644 legacy/doc/models/cancel-terminal-action-response.md
create mode 100644 legacy/doc/models/cancel-terminal-checkout-response.md
create mode 100644 legacy/doc/models/cancel-terminal-refund-response.md
create mode 100644 legacy/doc/models/capture-transaction-response.md
create mode 100644 legacy/doc/models/card-brand.md
create mode 100644 legacy/doc/models/card-co-brand.md
create mode 100644 legacy/doc/models/card-payment-details.md
create mode 100644 legacy/doc/models/card-payment-timeline.md
create mode 100644 legacy/doc/models/card-prepaid-type.md
create mode 100644 legacy/doc/models/card-type.md
create mode 100644 legacy/doc/models/card.md
create mode 100644 legacy/doc/models/cash-app-details.md
create mode 100644 legacy/doc/models/cash-drawer-device.md
create mode 100644 legacy/doc/models/cash-drawer-event-type.md
create mode 100644 legacy/doc/models/cash-drawer-shift-event.md
create mode 100644 legacy/doc/models/cash-drawer-shift-state.md
create mode 100644 legacy/doc/models/cash-drawer-shift-summary.md
create mode 100644 legacy/doc/models/cash-drawer-shift.md
create mode 100644 legacy/doc/models/cash-payment-details.md
create mode 100644 legacy/doc/models/catalog-availability-period.md
create mode 100644 legacy/doc/models/catalog-category-type.md
create mode 100644 legacy/doc/models/catalog-category.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-app-visibility.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-number-config.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-selection-config.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-seller-visibility.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-string-config.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition-type.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-definition.md
create mode 100644 legacy/doc/models/catalog-custom-attribute-value.md
create mode 100644 legacy/doc/models/catalog-discount-modify-tax-basis.md
create mode 100644 legacy/doc/models/catalog-discount-type.md
create mode 100644 legacy/doc/models/catalog-discount.md
create mode 100644 legacy/doc/models/catalog-ecom-seo-data.md
create mode 100644 legacy/doc/models/catalog-id-mapping.md
create mode 100644 legacy/doc/models/catalog-image.md
create mode 100644 legacy/doc/models/catalog-info-response-limits.md
create mode 100644 legacy/doc/models/catalog-info-response.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details-dietary-preference-standard-dietary-preference.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details-dietary-preference-type.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details-dietary-preference.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details-ingredient-standard-ingredient.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details-ingredient.md
create mode 100644 legacy/doc/models/catalog-item-food-and-beverage-details.md
create mode 100644 legacy/doc/models/catalog-item-modifier-list-info.md
create mode 100644 legacy/doc/models/catalog-item-option-for-item.md
create mode 100644 legacy/doc/models/catalog-item-option-value-for-item-variation.md
create mode 100644 legacy/doc/models/catalog-item-option-value.md
create mode 100644 legacy/doc/models/catalog-item-option.md
create mode 100644 legacy/doc/models/catalog-item-product-type.md
create mode 100644 legacy/doc/models/catalog-item-variation.md
create mode 100644 legacy/doc/models/catalog-item.md
create mode 100644 legacy/doc/models/catalog-measurement-unit.md
create mode 100644 legacy/doc/models/catalog-modifier-list-modifier-type.md
create mode 100644 legacy/doc/models/catalog-modifier-list-selection-type.md
create mode 100644 legacy/doc/models/catalog-modifier-list.md
create mode 100644 legacy/doc/models/catalog-modifier-override.md
create mode 100644 legacy/doc/models/catalog-modifier.md
create mode 100644 legacy/doc/models/catalog-object-batch.md
create mode 100644 legacy/doc/models/catalog-object-category.md
create mode 100644 legacy/doc/models/catalog-object-reference.md
create mode 100644 legacy/doc/models/catalog-object-type.md
create mode 100644 legacy/doc/models/catalog-object.md
create mode 100644 legacy/doc/models/catalog-pricing-rule.md
create mode 100644 legacy/doc/models/catalog-pricing-type.md
create mode 100644 legacy/doc/models/catalog-product-set.md
create mode 100644 legacy/doc/models/catalog-query-exact.md
create mode 100644 legacy/doc/models/catalog-query-item-variations-for-item-option-values.md
create mode 100644 legacy/doc/models/catalog-query-items-for-item-options.md
create mode 100644 legacy/doc/models/catalog-query-items-for-modifier-list.md
create mode 100644 legacy/doc/models/catalog-query-items-for-tax.md
create mode 100644 legacy/doc/models/catalog-query-prefix.md
create mode 100644 legacy/doc/models/catalog-query-range.md
create mode 100644 legacy/doc/models/catalog-query-set.md
create mode 100644 legacy/doc/models/catalog-query-sorted-attribute.md
create mode 100644 legacy/doc/models/catalog-query-text.md
create mode 100644 legacy/doc/models/catalog-query.md
create mode 100644 legacy/doc/models/catalog-quick-amount-type.md
create mode 100644 legacy/doc/models/catalog-quick-amount.md
create mode 100644 legacy/doc/models/catalog-quick-amounts-settings-option.md
create mode 100644 legacy/doc/models/catalog-quick-amounts-settings.md
create mode 100644 legacy/doc/models/catalog-stock-conversion.md
create mode 100644 legacy/doc/models/catalog-subscription-plan-variation.md
create mode 100644 legacy/doc/models/catalog-subscription-plan.md
create mode 100644 legacy/doc/models/catalog-tax.md
create mode 100644 legacy/doc/models/catalog-time-period.md
create mode 100644 legacy/doc/models/catalog-v1-id.md
create mode 100644 legacy/doc/models/category-path-to-root-node.md
create mode 100644 legacy/doc/models/change-billing-anchor-date-request.md
create mode 100644 legacy/doc/models/change-billing-anchor-date-response.md
create mode 100644 legacy/doc/models/change-timing.md
create mode 100644 legacy/doc/models/charge-request-additional-recipient.md
create mode 100644 legacy/doc/models/charge-request.md
create mode 100644 legacy/doc/models/charge-response.md
create mode 100644 legacy/doc/models/checkout-location-settings-branding-button-shape.md
create mode 100644 legacy/doc/models/checkout-location-settings-branding-header-type.md
create mode 100644 legacy/doc/models/checkout-location-settings-branding.md
create mode 100644 legacy/doc/models/checkout-location-settings-coupons.md
create mode 100644 legacy/doc/models/checkout-location-settings-policy.md
create mode 100644 legacy/doc/models/checkout-location-settings-tipping.md
create mode 100644 legacy/doc/models/checkout-location-settings.md
create mode 100644 legacy/doc/models/checkout-merchant-settings-payment-methods-afterpay-clearpay-eligibility-range.md
create mode 100644 legacy/doc/models/checkout-merchant-settings-payment-methods-afterpay-clearpay.md
create mode 100644 legacy/doc/models/checkout-merchant-settings-payment-methods-payment-method.md
create mode 100644 legacy/doc/models/checkout-merchant-settings-payment-methods.md
create mode 100644 legacy/doc/models/checkout-merchant-settings.md
create mode 100644 legacy/doc/models/checkout-options-payment-type.md
create mode 100644 legacy/doc/models/checkout-options.md
create mode 100644 legacy/doc/models/checkout.md
create mode 100644 legacy/doc/models/clearpay-details.md
create mode 100644 legacy/doc/models/clone-order-request.md
create mode 100644 legacy/doc/models/clone-order-response.md
create mode 100644 legacy/doc/models/collected-data.md
create mode 100644 legacy/doc/models/complete-payment-request.md
create mode 100644 legacy/doc/models/complete-payment-response.md
create mode 100644 legacy/doc/models/component-component-type.md
create mode 100644 legacy/doc/models/component.md
create mode 100644 legacy/doc/models/confirmation-decision.md
create mode 100644 legacy/doc/models/confirmation-options.md
create mode 100644 legacy/doc/models/coordinates.md
create mode 100644 legacy/doc/models/country.md
create mode 100644 legacy/doc/models/create-booking-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/create-booking-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/create-booking-request.md
create mode 100644 legacy/doc/models/create-booking-response.md
create mode 100644 legacy/doc/models/create-break-type-request.md
create mode 100644 legacy/doc/models/create-break-type-response.md
create mode 100644 legacy/doc/models/create-card-request.md
create mode 100644 legacy/doc/models/create-card-response.md
create mode 100644 legacy/doc/models/create-catalog-image-request.md
create mode 100644 legacy/doc/models/create-catalog-image-response.md
create mode 100644 legacy/doc/models/create-checkout-request.md
create mode 100644 legacy/doc/models/create-checkout-response.md
create mode 100644 legacy/doc/models/create-customer-card-request.md
create mode 100644 legacy/doc/models/create-customer-card-response.md
create mode 100644 legacy/doc/models/create-customer-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/create-customer-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/create-customer-group-request.md
create mode 100644 legacy/doc/models/create-customer-group-response.md
create mode 100644 legacy/doc/models/create-customer-request.md
create mode 100644 legacy/doc/models/create-customer-response.md
create mode 100644 legacy/doc/models/create-device-code-request.md
create mode 100644 legacy/doc/models/create-device-code-response.md
create mode 100644 legacy/doc/models/create-dispute-evidence-file-request.md
create mode 100644 legacy/doc/models/create-dispute-evidence-file-response.md
create mode 100644 legacy/doc/models/create-dispute-evidence-text-request.md
create mode 100644 legacy/doc/models/create-dispute-evidence-text-response.md
create mode 100644 legacy/doc/models/create-gift-card-activity-request.md
create mode 100644 legacy/doc/models/create-gift-card-activity-response.md
create mode 100644 legacy/doc/models/create-gift-card-request.md
create mode 100644 legacy/doc/models/create-gift-card-response.md
create mode 100644 legacy/doc/models/create-invoice-attachment-request.md
create mode 100644 legacy/doc/models/create-invoice-attachment-response.md
create mode 100644 legacy/doc/models/create-invoice-request.md
create mode 100644 legacy/doc/models/create-invoice-response.md
create mode 100644 legacy/doc/models/create-job-request.md
create mode 100644 legacy/doc/models/create-job-response.md
create mode 100644 legacy/doc/models/create-location-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/create-location-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/create-location-request.md
create mode 100644 legacy/doc/models/create-location-response.md
create mode 100644 legacy/doc/models/create-loyalty-account-request.md
create mode 100644 legacy/doc/models/create-loyalty-account-response.md
create mode 100644 legacy/doc/models/create-loyalty-promotion-request.md
create mode 100644 legacy/doc/models/create-loyalty-promotion-response.md
create mode 100644 legacy/doc/models/create-loyalty-reward-request.md
create mode 100644 legacy/doc/models/create-loyalty-reward-response.md
create mode 100644 legacy/doc/models/create-merchant-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/create-merchant-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/create-mobile-authorization-code-request.md
create mode 100644 legacy/doc/models/create-mobile-authorization-code-response.md
create mode 100644 legacy/doc/models/create-order-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/create-order-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/create-order-request.md
create mode 100644 legacy/doc/models/create-order-response.md
create mode 100644 legacy/doc/models/create-payment-link-request.md
create mode 100644 legacy/doc/models/create-payment-link-response.md
create mode 100644 legacy/doc/models/create-payment-request.md
create mode 100644 legacy/doc/models/create-payment-response.md
create mode 100644 legacy/doc/models/create-refund-request.md
create mode 100644 legacy/doc/models/create-refund-response.md
create mode 100644 legacy/doc/models/create-shift-request.md
create mode 100644 legacy/doc/models/create-shift-response.md
create mode 100644 legacy/doc/models/create-subscription-request.md
create mode 100644 legacy/doc/models/create-subscription-response.md
create mode 100644 legacy/doc/models/create-team-member-request.md
create mode 100644 legacy/doc/models/create-team-member-response.md
create mode 100644 legacy/doc/models/create-terminal-action-request.md
create mode 100644 legacy/doc/models/create-terminal-action-response.md
create mode 100644 legacy/doc/models/create-terminal-checkout-request.md
create mode 100644 legacy/doc/models/create-terminal-checkout-response.md
create mode 100644 legacy/doc/models/create-terminal-refund-request.md
create mode 100644 legacy/doc/models/create-terminal-refund-response.md
create mode 100644 legacy/doc/models/create-vendor-request.md
create mode 100644 legacy/doc/models/create-vendor-response.md
create mode 100644 legacy/doc/models/create-webhook-subscription-request.md
create mode 100644 legacy/doc/models/create-webhook-subscription-response.md
create mode 100644 legacy/doc/models/currency.md
create mode 100644 legacy/doc/models/custom-attribute-definition-visibility.md
create mode 100644 legacy/doc/models/custom-attribute-definition.md
create mode 100644 legacy/doc/models/custom-attribute-filter.md
create mode 100644 legacy/doc/models/custom-attribute.md
create mode 100644 legacy/doc/models/custom-field.md
create mode 100644 legacy/doc/models/customer-address-filter.md
create mode 100644 legacy/doc/models/customer-creation-source-filter.md
create mode 100644 legacy/doc/models/customer-creation-source.md
create mode 100644 legacy/doc/models/customer-custom-attribute-filter-value.md
create mode 100644 legacy/doc/models/customer-custom-attribute-filter.md
create mode 100644 legacy/doc/models/customer-custom-attribute-filters.md
create mode 100644 legacy/doc/models/customer-details.md
create mode 100644 legacy/doc/models/customer-filter.md
create mode 100644 legacy/doc/models/customer-group.md
create mode 100644 legacy/doc/models/customer-inclusion-exclusion.md
create mode 100644 legacy/doc/models/customer-preferences.md
create mode 100644 legacy/doc/models/customer-query.md
create mode 100644 legacy/doc/models/customer-segment.md
create mode 100644 legacy/doc/models/customer-sort-field.md
create mode 100644 legacy/doc/models/customer-sort.md
create mode 100644 legacy/doc/models/customer-tax-ids.md
create mode 100644 legacy/doc/models/customer-text-filter.md
create mode 100644 legacy/doc/models/customer.md
create mode 100644 legacy/doc/models/data-collection-options-input-type.md
create mode 100644 legacy/doc/models/data-collection-options.md
create mode 100644 legacy/doc/models/date-range.md
create mode 100644 legacy/doc/models/day-of-week.md
create mode 100644 legacy/doc/models/delete-booking-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/delete-booking-custom-attribute-response.md
create mode 100644 legacy/doc/models/delete-break-type-response.md
create mode 100644 legacy/doc/models/delete-catalog-object-response.md
create mode 100644 legacy/doc/models/delete-customer-card-response.md
create mode 100644 legacy/doc/models/delete-customer-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/delete-customer-custom-attribute-response.md
create mode 100644 legacy/doc/models/delete-customer-group-response.md
create mode 100644 legacy/doc/models/delete-customer-request.md
create mode 100644 legacy/doc/models/delete-customer-response.md
create mode 100644 legacy/doc/models/delete-dispute-evidence-response.md
create mode 100644 legacy/doc/models/delete-invoice-attachment-response.md
create mode 100644 legacy/doc/models/delete-invoice-request.md
create mode 100644 legacy/doc/models/delete-invoice-response.md
create mode 100644 legacy/doc/models/delete-location-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/delete-location-custom-attribute-response.md
create mode 100644 legacy/doc/models/delete-loyalty-reward-response.md
create mode 100644 legacy/doc/models/delete-merchant-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/delete-merchant-custom-attribute-response.md
create mode 100644 legacy/doc/models/delete-order-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/delete-order-custom-attribute-response.md
create mode 100644 legacy/doc/models/delete-payment-link-response.md
create mode 100644 legacy/doc/models/delete-shift-response.md
create mode 100644 legacy/doc/models/delete-snippet-response.md
create mode 100644 legacy/doc/models/delete-subscription-action-response.md
create mode 100644 legacy/doc/models/delete-webhook-subscription-response.md
create mode 100644 legacy/doc/models/deprecated-create-dispute-evidence-file-request.md
create mode 100644 legacy/doc/models/deprecated-create-dispute-evidence-file-response.md
create mode 100644 legacy/doc/models/deprecated-create-dispute-evidence-text-request.md
create mode 100644 legacy/doc/models/deprecated-create-dispute-evidence-text-response.md
create mode 100644 legacy/doc/models/destination-details-card-refund-details.md
create mode 100644 legacy/doc/models/destination-details-cash-refund-details.md
create mode 100644 legacy/doc/models/destination-details-external-refund-details.md
create mode 100644 legacy/doc/models/destination-details.md
create mode 100644 legacy/doc/models/destination-type.md
create mode 100644 legacy/doc/models/destination.md
create mode 100644 legacy/doc/models/device-attributes-device-type.md
create mode 100644 legacy/doc/models/device-attributes.md
create mode 100644 legacy/doc/models/device-checkout-options.md
create mode 100644 legacy/doc/models/device-code-status.md
create mode 100644 legacy/doc/models/device-code.md
create mode 100644 legacy/doc/models/device-component-details-application-details.md
create mode 100644 legacy/doc/models/device-component-details-battery-details.md
create mode 100644 legacy/doc/models/device-component-details-card-reader-details.md
create mode 100644 legacy/doc/models/device-component-details-ethernet-details.md
create mode 100644 legacy/doc/models/device-component-details-external-power.md
create mode 100644 legacy/doc/models/device-component-details-measurement.md
create mode 100644 legacy/doc/models/device-component-details-network-interface-details.md
create mode 100644 legacy/doc/models/device-component-details-wi-fi-details.md
create mode 100644 legacy/doc/models/device-details.md
create mode 100644 legacy/doc/models/device-metadata.md
create mode 100644 legacy/doc/models/device-status-category.md
create mode 100644 legacy/doc/models/device-status.md
create mode 100644 legacy/doc/models/device.md
create mode 100644 legacy/doc/models/digital-wallet-details.md
create mode 100644 legacy/doc/models/disable-card-response.md
create mode 100644 legacy/doc/models/disable-events-response.md
create mode 100644 legacy/doc/models/dismiss-terminal-action-response.md
create mode 100644 legacy/doc/models/dismiss-terminal-checkout-response.md
create mode 100644 legacy/doc/models/dismiss-terminal-refund-response.md
create mode 100644 legacy/doc/models/dispute-evidence-file.md
create mode 100644 legacy/doc/models/dispute-evidence-type.md
create mode 100644 legacy/doc/models/dispute-evidence.md
create mode 100644 legacy/doc/models/dispute-reason.md
create mode 100644 legacy/doc/models/dispute-state.md
create mode 100644 legacy/doc/models/dispute.md
create mode 100644 legacy/doc/models/disputed-payment.md
create mode 100644 legacy/doc/models/ecom-visibility.md
create mode 100644 legacy/doc/models/employee-status.md
create mode 100644 legacy/doc/models/employee-wage.md
create mode 100644 legacy/doc/models/employee.md
create mode 100644 legacy/doc/models/enable-events-response.md
create mode 100644 legacy/doc/models/error-category.md
create mode 100644 legacy/doc/models/error-code.md
create mode 100644 legacy/doc/models/error.md
create mode 100644 legacy/doc/models/event-data.md
create mode 100644 legacy/doc/models/event-metadata.md
create mode 100644 legacy/doc/models/event-type-metadata.md
create mode 100644 legacy/doc/models/event.md
create mode 100644 legacy/doc/models/exclude-strategy.md
create mode 100644 legacy/doc/models/external-payment-details.md
create mode 100644 legacy/doc/models/filter-value.md
create mode 100644 legacy/doc/models/float-number-range.md
create mode 100644 legacy/doc/models/fulfillment-delivery-details-order-fulfillment-delivery-details-schedule-type.md
create mode 100644 legacy/doc/models/fulfillment-delivery-details.md
create mode 100644 legacy/doc/models/fulfillment-fulfillment-entry.md
create mode 100644 legacy/doc/models/fulfillment-fulfillment-line-item-application.md
create mode 100644 legacy/doc/models/fulfillment-pickup-details-curbside-pickup-details.md
create mode 100644 legacy/doc/models/fulfillment-pickup-details-schedule-type.md
create mode 100644 legacy/doc/models/fulfillment-pickup-details.md
create mode 100644 legacy/doc/models/fulfillment-recipient.md
create mode 100644 legacy/doc/models/fulfillment-shipment-details.md
create mode 100644 legacy/doc/models/fulfillment-state.md
create mode 100644 legacy/doc/models/fulfillment-type.md
create mode 100644 legacy/doc/models/fulfillment.md
create mode 100644 legacy/doc/models/get-bank-account-by-v1-id-response.md
create mode 100644 legacy/doc/models/get-bank-account-response.md
create mode 100644 legacy/doc/models/get-break-type-response.md
create mode 100644 legacy/doc/models/get-device-code-response.md
create mode 100644 legacy/doc/models/get-device-response.md
create mode 100644 legacy/doc/models/get-employee-wage-response.md
create mode 100644 legacy/doc/models/get-invoice-response.md
create mode 100644 legacy/doc/models/get-payment-refund-response.md
create mode 100644 legacy/doc/models/get-payment-response.md
create mode 100644 legacy/doc/models/get-payout-response.md
create mode 100644 legacy/doc/models/get-shift-response.md
create mode 100644 legacy/doc/models/get-team-member-wage-response.md
create mode 100644 legacy/doc/models/get-terminal-action-response.md
create mode 100644 legacy/doc/models/get-terminal-checkout-response.md
create mode 100644 legacy/doc/models/get-terminal-refund-response.md
create mode 100644 legacy/doc/models/gift-card-activity-activate.md
create mode 100644 legacy/doc/models/gift-card-activity-adjust-decrement-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-adjust-decrement.md
create mode 100644 legacy/doc/models/gift-card-activity-adjust-increment-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-adjust-increment.md
create mode 100644 legacy/doc/models/gift-card-activity-block-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-block.md
create mode 100644 legacy/doc/models/gift-card-activity-clear-balance-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-clear-balance.md
create mode 100644 legacy/doc/models/gift-card-activity-deactivate-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-deactivate.md
create mode 100644 legacy/doc/models/gift-card-activity-import-reversal.md
create mode 100644 legacy/doc/models/gift-card-activity-import.md
create mode 100644 legacy/doc/models/gift-card-activity-load.md
create mode 100644 legacy/doc/models/gift-card-activity-redeem-status.md
create mode 100644 legacy/doc/models/gift-card-activity-redeem.md
create mode 100644 legacy/doc/models/gift-card-activity-refund.md
create mode 100644 legacy/doc/models/gift-card-activity-transfer-balance-from.md
create mode 100644 legacy/doc/models/gift-card-activity-transfer-balance-to.md
create mode 100644 legacy/doc/models/gift-card-activity-type.md
create mode 100644 legacy/doc/models/gift-card-activity-unblock-reason.md
create mode 100644 legacy/doc/models/gift-card-activity-unblock.md
create mode 100644 legacy/doc/models/gift-card-activity-unlinked-activity-refund.md
create mode 100644 legacy/doc/models/gift-card-activity.md
create mode 100644 legacy/doc/models/gift-card-gan-source.md
create mode 100644 legacy/doc/models/gift-card-status.md
create mode 100644 legacy/doc/models/gift-card-type.md
create mode 100644 legacy/doc/models/gift-card.md
create mode 100644 legacy/doc/models/inventory-adjustment-group.md
create mode 100644 legacy/doc/models/inventory-adjustment.md
create mode 100644 legacy/doc/models/inventory-alert-type.md
create mode 100644 legacy/doc/models/inventory-change-type.md
create mode 100644 legacy/doc/models/inventory-change.md
create mode 100644 legacy/doc/models/inventory-count.md
create mode 100644 legacy/doc/models/inventory-physical-count.md
create mode 100644 legacy/doc/models/inventory-state.md
create mode 100644 legacy/doc/models/inventory-transfer.md
create mode 100644 legacy/doc/models/invoice-accepted-payment-methods.md
create mode 100644 legacy/doc/models/invoice-attachment.md
create mode 100644 legacy/doc/models/invoice-automatic-payment-source.md
create mode 100644 legacy/doc/models/invoice-custom-field-placement.md
create mode 100644 legacy/doc/models/invoice-custom-field.md
create mode 100644 legacy/doc/models/invoice-delivery-method.md
create mode 100644 legacy/doc/models/invoice-filter.md
create mode 100644 legacy/doc/models/invoice-payment-reminder-status.md
create mode 100644 legacy/doc/models/invoice-payment-reminder.md
create mode 100644 legacy/doc/models/invoice-payment-request.md
create mode 100644 legacy/doc/models/invoice-query.md
create mode 100644 legacy/doc/models/invoice-recipient-tax-ids.md
create mode 100644 legacy/doc/models/invoice-recipient.md
create mode 100644 legacy/doc/models/invoice-request-method.md
create mode 100644 legacy/doc/models/invoice-request-type.md
create mode 100644 legacy/doc/models/invoice-sort-field.md
create mode 100644 legacy/doc/models/invoice-sort.md
create mode 100644 legacy/doc/models/invoice-status.md
create mode 100644 legacy/doc/models/invoice.md
create mode 100644 legacy/doc/models/item-variation-location-overrides.md
create mode 100644 legacy/doc/models/job-assignment-pay-type.md
create mode 100644 legacy/doc/models/job-assignment.md
create mode 100644 legacy/doc/models/job.md
create mode 100644 legacy/doc/models/link-customer-to-gift-card-request.md
create mode 100644 legacy/doc/models/link-customer-to-gift-card-response.md
create mode 100644 legacy/doc/models/list-bank-accounts-request.md
create mode 100644 legacy/doc/models/list-bank-accounts-response.md
create mode 100644 legacy/doc/models/list-booking-custom-attribute-definitions-request.md
create mode 100644 legacy/doc/models/list-booking-custom-attribute-definitions-response.md
create mode 100644 legacy/doc/models/list-booking-custom-attributes-request.md
create mode 100644 legacy/doc/models/list-booking-custom-attributes-response.md
create mode 100644 legacy/doc/models/list-bookings-request.md
create mode 100644 legacy/doc/models/list-bookings-response.md
create mode 100644 legacy/doc/models/list-break-types-request.md
create mode 100644 legacy/doc/models/list-break-types-response.md
create mode 100644 legacy/doc/models/list-cards-request.md
create mode 100644 legacy/doc/models/list-cards-response.md
create mode 100644 legacy/doc/models/list-cash-drawer-shift-events-request.md
create mode 100644 legacy/doc/models/list-cash-drawer-shift-events-response.md
create mode 100644 legacy/doc/models/list-cash-drawer-shifts-request.md
create mode 100644 legacy/doc/models/list-cash-drawer-shifts-response.md
create mode 100644 legacy/doc/models/list-catalog-request.md
create mode 100644 legacy/doc/models/list-catalog-response.md
create mode 100644 legacy/doc/models/list-customer-custom-attribute-definitions-request.md
create mode 100644 legacy/doc/models/list-customer-custom-attribute-definitions-response.md
create mode 100644 legacy/doc/models/list-customer-custom-attributes-request.md
create mode 100644 legacy/doc/models/list-customer-custom-attributes-response.md
create mode 100644 legacy/doc/models/list-customer-groups-request.md
create mode 100644 legacy/doc/models/list-customer-groups-response.md
create mode 100644 legacy/doc/models/list-customer-segments-request.md
create mode 100644 legacy/doc/models/list-customer-segments-response.md
create mode 100644 legacy/doc/models/list-customers-request.md
create mode 100644 legacy/doc/models/list-customers-response.md
create mode 100644 legacy/doc/models/list-device-codes-request.md
create mode 100644 legacy/doc/models/list-device-codes-response.md
create mode 100644 legacy/doc/models/list-devices-request.md
create mode 100644 legacy/doc/models/list-devices-response.md
create mode 100644 legacy/doc/models/list-dispute-evidence-request.md
create mode 100644 legacy/doc/models/list-dispute-evidence-response.md
create mode 100644 legacy/doc/models/list-disputes-request.md
create mode 100644 legacy/doc/models/list-disputes-response.md
create mode 100644 legacy/doc/models/list-employee-wages-request.md
create mode 100644 legacy/doc/models/list-employee-wages-response.md
create mode 100644 legacy/doc/models/list-employees-request.md
create mode 100644 legacy/doc/models/list-employees-response.md
create mode 100644 legacy/doc/models/list-event-types-request.md
create mode 100644 legacy/doc/models/list-event-types-response.md
create mode 100644 legacy/doc/models/list-gift-card-activities-request.md
create mode 100644 legacy/doc/models/list-gift-card-activities-response.md
create mode 100644 legacy/doc/models/list-gift-cards-request.md
create mode 100644 legacy/doc/models/list-gift-cards-response.md
create mode 100644 legacy/doc/models/list-invoices-request.md
create mode 100644 legacy/doc/models/list-invoices-response.md
create mode 100644 legacy/doc/models/list-jobs-request.md
create mode 100644 legacy/doc/models/list-jobs-response.md
create mode 100644 legacy/doc/models/list-location-booking-profiles-request.md
create mode 100644 legacy/doc/models/list-location-booking-profiles-response.md
create mode 100644 legacy/doc/models/list-location-custom-attribute-definitions-request.md
create mode 100644 legacy/doc/models/list-location-custom-attribute-definitions-response.md
create mode 100644 legacy/doc/models/list-location-custom-attributes-request.md
create mode 100644 legacy/doc/models/list-location-custom-attributes-response.md
create mode 100644 legacy/doc/models/list-locations-response.md
create mode 100644 legacy/doc/models/list-loyalty-programs-response.md
create mode 100644 legacy/doc/models/list-loyalty-promotions-request.md
create mode 100644 legacy/doc/models/list-loyalty-promotions-response.md
create mode 100644 legacy/doc/models/list-merchant-custom-attribute-definitions-request.md
create mode 100644 legacy/doc/models/list-merchant-custom-attribute-definitions-response.md
create mode 100644 legacy/doc/models/list-merchant-custom-attributes-request.md
create mode 100644 legacy/doc/models/list-merchant-custom-attributes-response.md
create mode 100644 legacy/doc/models/list-merchants-request.md
create mode 100644 legacy/doc/models/list-merchants-response.md
create mode 100644 legacy/doc/models/list-order-custom-attribute-definitions-request.md
create mode 100644 legacy/doc/models/list-order-custom-attribute-definitions-response.md
create mode 100644 legacy/doc/models/list-order-custom-attributes-request.md
create mode 100644 legacy/doc/models/list-order-custom-attributes-response.md
create mode 100644 legacy/doc/models/list-payment-links-request.md
create mode 100644 legacy/doc/models/list-payment-links-response.md
create mode 100644 legacy/doc/models/list-payment-refunds-request.md
create mode 100644 legacy/doc/models/list-payment-refunds-response.md
create mode 100644 legacy/doc/models/list-payments-request.md
create mode 100644 legacy/doc/models/list-payments-response.md
create mode 100644 legacy/doc/models/list-payout-entries-request.md
create mode 100644 legacy/doc/models/list-payout-entries-response.md
create mode 100644 legacy/doc/models/list-payouts-request.md
create mode 100644 legacy/doc/models/list-payouts-response.md
create mode 100644 legacy/doc/models/list-refunds-request.md
create mode 100644 legacy/doc/models/list-refunds-response.md
create mode 100644 legacy/doc/models/list-sites-response.md
create mode 100644 legacy/doc/models/list-subscription-events-request.md
create mode 100644 legacy/doc/models/list-subscription-events-response.md
create mode 100644 legacy/doc/models/list-team-member-booking-profiles-request.md
create mode 100644 legacy/doc/models/list-team-member-booking-profiles-response.md
create mode 100644 legacy/doc/models/list-team-member-wages-request.md
create mode 100644 legacy/doc/models/list-team-member-wages-response.md
create mode 100644 legacy/doc/models/list-transactions-request.md
create mode 100644 legacy/doc/models/list-transactions-response.md
create mode 100644 legacy/doc/models/list-webhook-event-types-request.md
create mode 100644 legacy/doc/models/list-webhook-event-types-response.md
create mode 100644 legacy/doc/models/list-webhook-subscriptions-request.md
create mode 100644 legacy/doc/models/list-webhook-subscriptions-response.md
create mode 100644 legacy/doc/models/list-workweek-configs-request.md
create mode 100644 legacy/doc/models/list-workweek-configs-response.md
create mode 100644 legacy/doc/models/location-booking-profile.md
create mode 100644 legacy/doc/models/location-capability.md
create mode 100644 legacy/doc/models/location-status.md
create mode 100644 legacy/doc/models/location-type.md
create mode 100644 legacy/doc/models/location.md
create mode 100644 legacy/doc/models/loyalty-account-expiring-point-deadline.md
create mode 100644 legacy/doc/models/loyalty-account-mapping-type.md
create mode 100644 legacy/doc/models/loyalty-account-mapping.md
create mode 100644 legacy/doc/models/loyalty-account.md
create mode 100644 legacy/doc/models/loyalty-event-accumulate-points.md
create mode 100644 legacy/doc/models/loyalty-event-accumulate-promotion-points.md
create mode 100644 legacy/doc/models/loyalty-event-adjust-points.md
create mode 100644 legacy/doc/models/loyalty-event-create-reward.md
create mode 100644 legacy/doc/models/loyalty-event-date-time-filter.md
create mode 100644 legacy/doc/models/loyalty-event-delete-reward.md
create mode 100644 legacy/doc/models/loyalty-event-expire-points.md
create mode 100644 legacy/doc/models/loyalty-event-filter.md
create mode 100644 legacy/doc/models/loyalty-event-location-filter.md
create mode 100644 legacy/doc/models/loyalty-event-loyalty-account-filter.md
create mode 100644 legacy/doc/models/loyalty-event-order-filter.md
create mode 100644 legacy/doc/models/loyalty-event-other.md
create mode 100644 legacy/doc/models/loyalty-event-query.md
create mode 100644 legacy/doc/models/loyalty-event-redeem-reward.md
create mode 100644 legacy/doc/models/loyalty-event-source.md
create mode 100644 legacy/doc/models/loyalty-event-type-filter.md
create mode 100644 legacy/doc/models/loyalty-event-type.md
create mode 100644 legacy/doc/models/loyalty-event.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-category-data.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-item-variation-data.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-spend-data.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-tax-mode.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-type.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule-visit-data.md
create mode 100644 legacy/doc/models/loyalty-program-accrual-rule.md
create mode 100644 legacy/doc/models/loyalty-program-expiration-policy.md
create mode 100644 legacy/doc/models/loyalty-program-reward-definition-scope.md
create mode 100644 legacy/doc/models/loyalty-program-reward-definition-type.md
create mode 100644 legacy/doc/models/loyalty-program-reward-definition.md
create mode 100644 legacy/doc/models/loyalty-program-reward-tier.md
create mode 100644 legacy/doc/models/loyalty-program-status.md
create mode 100644 legacy/doc/models/loyalty-program-terminology.md
create mode 100644 legacy/doc/models/loyalty-program.md
create mode 100644 legacy/doc/models/loyalty-promotion-available-time-data.md
create mode 100644 legacy/doc/models/loyalty-promotion-incentive-points-addition-data.md
create mode 100644 legacy/doc/models/loyalty-promotion-incentive-points-multiplier-data.md
create mode 100644 legacy/doc/models/loyalty-promotion-incentive-type.md
create mode 100644 legacy/doc/models/loyalty-promotion-incentive.md
create mode 100644 legacy/doc/models/loyalty-promotion-status.md
create mode 100644 legacy/doc/models/loyalty-promotion-trigger-limit-interval.md
create mode 100644 legacy/doc/models/loyalty-promotion-trigger-limit.md
create mode 100644 legacy/doc/models/loyalty-promotion.md
create mode 100644 legacy/doc/models/loyalty-reward-status.md
create mode 100644 legacy/doc/models/loyalty-reward.md
create mode 100644 legacy/doc/models/measurement-unit-area.md
create mode 100644 legacy/doc/models/measurement-unit-custom.md
create mode 100644 legacy/doc/models/measurement-unit-generic.md
create mode 100644 legacy/doc/models/measurement-unit-length.md
create mode 100644 legacy/doc/models/measurement-unit-time.md
create mode 100644 legacy/doc/models/measurement-unit-unit-type.md
create mode 100644 legacy/doc/models/measurement-unit-volume.md
create mode 100644 legacy/doc/models/measurement-unit-weight.md
create mode 100644 legacy/doc/models/measurement-unit.md
create mode 100644 legacy/doc/models/merchant-status.md
create mode 100644 legacy/doc/models/merchant.md
create mode 100644 legacy/doc/models/modifier-location-overrides.md
create mode 100644 legacy/doc/models/money.md
create mode 100644 legacy/doc/models/obtain-token-request.md
create mode 100644 legacy/doc/models/obtain-token-response.md
create mode 100644 legacy/doc/models/offline-payment-details.md
create mode 100644 legacy/doc/models/order-created-object.md
create mode 100644 legacy/doc/models/order-created.md
create mode 100644 legacy/doc/models/order-entry.md
create mode 100644 legacy/doc/models/order-fulfillment-delivery-details-schedule-type.md
create mode 100644 legacy/doc/models/order-fulfillment-delivery-details.md
create mode 100644 legacy/doc/models/order-fulfillment-fulfillment-entry.md
create mode 100644 legacy/doc/models/order-fulfillment-fulfillment-line-item-application.md
create mode 100644 legacy/doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md
create mode 100644 legacy/doc/models/order-fulfillment-pickup-details-schedule-type.md
create mode 100644 legacy/doc/models/order-fulfillment-pickup-details.md
create mode 100644 legacy/doc/models/order-fulfillment-recipient.md
create mode 100644 legacy/doc/models/order-fulfillment-shipment-details.md
create mode 100644 legacy/doc/models/order-fulfillment-state.md
create mode 100644 legacy/doc/models/order-fulfillment-type.md
create mode 100644 legacy/doc/models/order-fulfillment-updated-object.md
create mode 100644 legacy/doc/models/order-fulfillment-updated-update.md
create mode 100644 legacy/doc/models/order-fulfillment-updated.md
create mode 100644 legacy/doc/models/order-fulfillment.md
create mode 100644 legacy/doc/models/order-line-item-applied-discount.md
create mode 100644 legacy/doc/models/order-line-item-applied-service-charge.md
create mode 100644 legacy/doc/models/order-line-item-applied-tax.md
create mode 100644 legacy/doc/models/order-line-item-discount-scope.md
create mode 100644 legacy/doc/models/order-line-item-discount-type.md
create mode 100644 legacy/doc/models/order-line-item-discount.md
create mode 100644 legacy/doc/models/order-line-item-item-type.md
create mode 100644 legacy/doc/models/order-line-item-modifier.md
create mode 100644 legacy/doc/models/order-line-item-pricing-blocklists-blocked-discount.md
create mode 100644 legacy/doc/models/order-line-item-pricing-blocklists-blocked-tax.md
create mode 100644 legacy/doc/models/order-line-item-pricing-blocklists.md
create mode 100644 legacy/doc/models/order-line-item-tax-scope.md
create mode 100644 legacy/doc/models/order-line-item-tax-type.md
create mode 100644 legacy/doc/models/order-line-item-tax.md
create mode 100644 legacy/doc/models/order-line-item.md
create mode 100644 legacy/doc/models/order-money-amounts.md
create mode 100644 legacy/doc/models/order-pricing-options.md
create mode 100644 legacy/doc/models/order-quantity-unit.md
create mode 100644 legacy/doc/models/order-return-discount.md
create mode 100644 legacy/doc/models/order-return-line-item-modifier.md
create mode 100644 legacy/doc/models/order-return-line-item.md
create mode 100644 legacy/doc/models/order-return-service-charge.md
create mode 100644 legacy/doc/models/order-return-tax.md
create mode 100644 legacy/doc/models/order-return-tip.md
create mode 100644 legacy/doc/models/order-return.md
create mode 100644 legacy/doc/models/order-reward.md
create mode 100644 legacy/doc/models/order-rounding-adjustment.md
create mode 100644 legacy/doc/models/order-service-charge-calculation-phase.md
create mode 100644 legacy/doc/models/order-service-charge-scope.md
create mode 100644 legacy/doc/models/order-service-charge-treatment-type.md
create mode 100644 legacy/doc/models/order-service-charge-type.md
create mode 100644 legacy/doc/models/order-service-charge.md
create mode 100644 legacy/doc/models/order-source.md
create mode 100644 legacy/doc/models/order-state.md
create mode 100644 legacy/doc/models/order-updated-object.md
create mode 100644 legacy/doc/models/order-updated.md
create mode 100644 legacy/doc/models/order.md
create mode 100644 legacy/doc/models/pagination-cursor.md
create mode 100644 legacy/doc/models/pause-subscription-request.md
create mode 100644 legacy/doc/models/pause-subscription-response.md
create mode 100644 legacy/doc/models/pay-order-request.md
create mode 100644 legacy/doc/models/pay-order-response.md
create mode 100644 legacy/doc/models/payment-balance-activity-app-fee-refund-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-app-fee-revenue-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-automatic-savings-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-automatic-savings-reversed-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-charge-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-deposit-fee-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-deposit-fee-reversed-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-dispute-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-fee-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-free-processing-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-hold-adjustment-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-open-dispute-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-other-adjustment-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-other-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-refund-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-release-adjustment-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-reserve-hold-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-reserve-release-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-square-capital-payment-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-square-capital-reversed-payment-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-square-payroll-transfer-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-square-payroll-transfer-reversed-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-tax-on-fee-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-third-party-fee-detail.md
create mode 100644 legacy/doc/models/payment-balance-activity-third-party-fee-refund-detail.md
create mode 100644 legacy/doc/models/payment-link-related-resources.md
create mode 100644 legacy/doc/models/payment-link.md
create mode 100644 legacy/doc/models/payment-options-delay-action.md
create mode 100644 legacy/doc/models/payment-options.md
create mode 100644 legacy/doc/models/payment-refund.md
create mode 100644 legacy/doc/models/payment-sort-field.md
create mode 100644 legacy/doc/models/payment.md
create mode 100644 legacy/doc/models/payout-entry.md
create mode 100644 legacy/doc/models/payout-fee-type.md
create mode 100644 legacy/doc/models/payout-fee.md
create mode 100644 legacy/doc/models/payout-status.md
create mode 100644 legacy/doc/models/payout-type.md
create mode 100644 legacy/doc/models/payout.md
create mode 100644 legacy/doc/models/phase-input.md
create mode 100644 legacy/doc/models/phase.md
create mode 100644 legacy/doc/models/pre-populated-data.md
create mode 100644 legacy/doc/models/processing-fee.md
create mode 100644 legacy/doc/models/product-type.md
create mode 100644 legacy/doc/models/product.md
create mode 100644 legacy/doc/models/publish-invoice-request.md
create mode 100644 legacy/doc/models/publish-invoice-response.md
create mode 100644 legacy/doc/models/qr-code-options.md
create mode 100644 legacy/doc/models/quantity-ratio.md
create mode 100644 legacy/doc/models/quick-pay.md
create mode 100644 legacy/doc/models/range.md
create mode 100644 legacy/doc/models/receipt-options.md
create mode 100644 legacy/doc/models/redeem-loyalty-reward-request.md
create mode 100644 legacy/doc/models/redeem-loyalty-reward-response.md
create mode 100644 legacy/doc/models/refund-payment-request.md
create mode 100644 legacy/doc/models/refund-payment-response.md
create mode 100644 legacy/doc/models/refund-status.md
create mode 100644 legacy/doc/models/refund.md
create mode 100644 legacy/doc/models/register-domain-request.md
create mode 100644 legacy/doc/models/register-domain-response-status.md
create mode 100644 legacy/doc/models/register-domain-response.md
create mode 100644 legacy/doc/models/remove-group-from-customer-response.md
create mode 100644 legacy/doc/models/resume-subscription-request.md
create mode 100644 legacy/doc/models/resume-subscription-response.md
create mode 100644 legacy/doc/models/retrieve-booking-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/retrieve-booking-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/retrieve-booking-custom-attribute-request.md
create mode 100644 legacy/doc/models/retrieve-booking-custom-attribute-response.md
create mode 100644 legacy/doc/models/retrieve-booking-response.md
create mode 100644 legacy/doc/models/retrieve-business-booking-profile-response.md
create mode 100644 legacy/doc/models/retrieve-card-response.md
create mode 100644 legacy/doc/models/retrieve-cash-drawer-shift-request.md
create mode 100644 legacy/doc/models/retrieve-cash-drawer-shift-response.md
create mode 100644 legacy/doc/models/retrieve-catalog-object-request.md
create mode 100644 legacy/doc/models/retrieve-catalog-object-response.md
create mode 100644 legacy/doc/models/retrieve-customer-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/retrieve-customer-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/retrieve-customer-custom-attribute-request.md
create mode 100644 legacy/doc/models/retrieve-customer-custom-attribute-response.md
create mode 100644 legacy/doc/models/retrieve-customer-group-response.md
create mode 100644 legacy/doc/models/retrieve-customer-response.md
create mode 100644 legacy/doc/models/retrieve-customer-segment-response.md
create mode 100644 legacy/doc/models/retrieve-dispute-evidence-response.md
create mode 100644 legacy/doc/models/retrieve-dispute-response.md
create mode 100644 legacy/doc/models/retrieve-employee-response.md
create mode 100644 legacy/doc/models/retrieve-gift-card-from-gan-request.md
create mode 100644 legacy/doc/models/retrieve-gift-card-from-gan-response.md
create mode 100644 legacy/doc/models/retrieve-gift-card-from-nonce-request.md
create mode 100644 legacy/doc/models/retrieve-gift-card-from-nonce-response.md
create mode 100644 legacy/doc/models/retrieve-gift-card-response.md
create mode 100644 legacy/doc/models/retrieve-inventory-adjustment-response.md
create mode 100644 legacy/doc/models/retrieve-inventory-changes-request.md
create mode 100644 legacy/doc/models/retrieve-inventory-changes-response.md
create mode 100644 legacy/doc/models/retrieve-inventory-count-request.md
create mode 100644 legacy/doc/models/retrieve-inventory-count-response.md
create mode 100644 legacy/doc/models/retrieve-inventory-physical-count-response.md
create mode 100644 legacy/doc/models/retrieve-inventory-transfer-response.md
create mode 100644 legacy/doc/models/retrieve-job-response.md
create mode 100644 legacy/doc/models/retrieve-location-booking-profile-response.md
create mode 100644 legacy/doc/models/retrieve-location-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/retrieve-location-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/retrieve-location-custom-attribute-request.md
create mode 100644 legacy/doc/models/retrieve-location-custom-attribute-response.md
create mode 100644 legacy/doc/models/retrieve-location-response.md
create mode 100644 legacy/doc/models/retrieve-location-settings-response.md
create mode 100644 legacy/doc/models/retrieve-loyalty-account-response.md
create mode 100644 legacy/doc/models/retrieve-loyalty-program-response.md
create mode 100644 legacy/doc/models/retrieve-loyalty-promotion-response.md
create mode 100644 legacy/doc/models/retrieve-loyalty-reward-response.md
create mode 100644 legacy/doc/models/retrieve-merchant-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/retrieve-merchant-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/retrieve-merchant-custom-attribute-request.md
create mode 100644 legacy/doc/models/retrieve-merchant-custom-attribute-response.md
create mode 100644 legacy/doc/models/retrieve-merchant-response.md
create mode 100644 legacy/doc/models/retrieve-merchant-settings-response.md
create mode 100644 legacy/doc/models/retrieve-order-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/retrieve-order-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/retrieve-order-custom-attribute-request.md
create mode 100644 legacy/doc/models/retrieve-order-custom-attribute-response.md
create mode 100644 legacy/doc/models/retrieve-order-response.md
create mode 100644 legacy/doc/models/retrieve-payment-link-response.md
create mode 100644 legacy/doc/models/retrieve-snippet-response.md
create mode 100644 legacy/doc/models/retrieve-subscription-request.md
create mode 100644 legacy/doc/models/retrieve-subscription-response.md
create mode 100644 legacy/doc/models/retrieve-team-member-booking-profile-response.md
create mode 100644 legacy/doc/models/retrieve-team-member-response.md
create mode 100644 legacy/doc/models/retrieve-token-status-response.md
create mode 100644 legacy/doc/models/retrieve-transaction-response.md
create mode 100644 legacy/doc/models/retrieve-vendor-response.md
create mode 100644 legacy/doc/models/retrieve-wage-setting-response.md
create mode 100644 legacy/doc/models/retrieve-webhook-subscription-response.md
create mode 100644 legacy/doc/models/revoke-token-request.md
create mode 100644 legacy/doc/models/revoke-token-response.md
create mode 100644 legacy/doc/models/risk-evaluation-risk-level.md
create mode 100644 legacy/doc/models/risk-evaluation.md
create mode 100644 legacy/doc/models/save-card-options.md
create mode 100644 legacy/doc/models/search-availability-filter.md
create mode 100644 legacy/doc/models/search-availability-query.md
create mode 100644 legacy/doc/models/search-availability-request.md
create mode 100644 legacy/doc/models/search-availability-response.md
create mode 100644 legacy/doc/models/search-catalog-items-request-stock-level.md
create mode 100644 legacy/doc/models/search-catalog-items-request.md
create mode 100644 legacy/doc/models/search-catalog-items-response.md
create mode 100644 legacy/doc/models/search-catalog-objects-request.md
create mode 100644 legacy/doc/models/search-catalog-objects-response.md
create mode 100644 legacy/doc/models/search-customers-request.md
create mode 100644 legacy/doc/models/search-customers-response.md
create mode 100644 legacy/doc/models/search-events-filter.md
create mode 100644 legacy/doc/models/search-events-query.md
create mode 100644 legacy/doc/models/search-events-request.md
create mode 100644 legacy/doc/models/search-events-response.md
create mode 100644 legacy/doc/models/search-events-sort-field.md
create mode 100644 legacy/doc/models/search-events-sort.md
create mode 100644 legacy/doc/models/search-invoices-request.md
create mode 100644 legacy/doc/models/search-invoices-response.md
create mode 100644 legacy/doc/models/search-loyalty-accounts-request-loyalty-account-query.md
create mode 100644 legacy/doc/models/search-loyalty-accounts-request.md
create mode 100644 legacy/doc/models/search-loyalty-accounts-response.md
create mode 100644 legacy/doc/models/search-loyalty-events-request.md
create mode 100644 legacy/doc/models/search-loyalty-events-response.md
create mode 100644 legacy/doc/models/search-loyalty-rewards-request-loyalty-reward-query.md
create mode 100644 legacy/doc/models/search-loyalty-rewards-request.md
create mode 100644 legacy/doc/models/search-loyalty-rewards-response.md
create mode 100644 legacy/doc/models/search-orders-customer-filter.md
create mode 100644 legacy/doc/models/search-orders-date-time-filter.md
create mode 100644 legacy/doc/models/search-orders-filter.md
create mode 100644 legacy/doc/models/search-orders-fulfillment-filter.md
create mode 100644 legacy/doc/models/search-orders-query.md
create mode 100644 legacy/doc/models/search-orders-request.md
create mode 100644 legacy/doc/models/search-orders-response.md
create mode 100644 legacy/doc/models/search-orders-sort-field.md
create mode 100644 legacy/doc/models/search-orders-sort.md
create mode 100644 legacy/doc/models/search-orders-source-filter.md
create mode 100644 legacy/doc/models/search-orders-state-filter.md
create mode 100644 legacy/doc/models/search-shifts-request.md
create mode 100644 legacy/doc/models/search-shifts-response.md
create mode 100644 legacy/doc/models/search-subscriptions-filter.md
create mode 100644 legacy/doc/models/search-subscriptions-query.md
create mode 100644 legacy/doc/models/search-subscriptions-request.md
create mode 100644 legacy/doc/models/search-subscriptions-response.md
create mode 100644 legacy/doc/models/search-team-members-filter.md
create mode 100644 legacy/doc/models/search-team-members-query.md
create mode 100644 legacy/doc/models/search-team-members-request.md
create mode 100644 legacy/doc/models/search-team-members-response.md
create mode 100644 legacy/doc/models/search-terminal-actions-request.md
create mode 100644 legacy/doc/models/search-terminal-actions-response.md
create mode 100644 legacy/doc/models/search-terminal-checkouts-request.md
create mode 100644 legacy/doc/models/search-terminal-checkouts-response.md
create mode 100644 legacy/doc/models/search-terminal-refunds-request.md
create mode 100644 legacy/doc/models/search-terminal-refunds-response.md
create mode 100644 legacy/doc/models/search-vendors-request-filter.md
create mode 100644 legacy/doc/models/search-vendors-request-sort-field.md
create mode 100644 legacy/doc/models/search-vendors-request-sort.md
create mode 100644 legacy/doc/models/search-vendors-request.md
create mode 100644 legacy/doc/models/search-vendors-response.md
create mode 100644 legacy/doc/models/segment-filter.md
create mode 100644 legacy/doc/models/select-option.md
create mode 100644 legacy/doc/models/select-options.md
create mode 100644 legacy/doc/models/shift-filter-status.md
create mode 100644 legacy/doc/models/shift-filter.md
create mode 100644 legacy/doc/models/shift-query.md
create mode 100644 legacy/doc/models/shift-sort-field.md
create mode 100644 legacy/doc/models/shift-sort.md
create mode 100644 legacy/doc/models/shift-status.md
create mode 100644 legacy/doc/models/shift-wage.md
create mode 100644 legacy/doc/models/shift-workday-matcher.md
create mode 100644 legacy/doc/models/shift-workday.md
create mode 100644 legacy/doc/models/shift.md
create mode 100644 legacy/doc/models/shipping-fee.md
create mode 100644 legacy/doc/models/signature-image.md
create mode 100644 legacy/doc/models/signature-options.md
create mode 100644 legacy/doc/models/site.md
create mode 100644 legacy/doc/models/snippet-response.md
create mode 100644 legacy/doc/models/snippet.md
create mode 100644 legacy/doc/models/sort-order.md
create mode 100644 legacy/doc/models/source-application.md
create mode 100644 legacy/doc/models/square-account-details.md
create mode 100644 legacy/doc/models/standard-unit-description-group.md
create mode 100644 legacy/doc/models/standard-unit-description.md
create mode 100644 legacy/doc/models/submit-evidence-response.md
create mode 100644 legacy/doc/models/subscription-action-type.md
create mode 100644 legacy/doc/models/subscription-action.md
create mode 100644 legacy/doc/models/subscription-cadence.md
create mode 100644 legacy/doc/models/subscription-event-info-code.md
create mode 100644 legacy/doc/models/subscription-event-info.md
create mode 100644 legacy/doc/models/subscription-event-subscription-event-type.md
create mode 100644 legacy/doc/models/subscription-event.md
create mode 100644 legacy/doc/models/subscription-phase.md
create mode 100644 legacy/doc/models/subscription-pricing-type.md
create mode 100644 legacy/doc/models/subscription-pricing.md
create mode 100644 legacy/doc/models/subscription-source.md
create mode 100644 legacy/doc/models/subscription-status.md
create mode 100644 legacy/doc/models/subscription-test-result.md
create mode 100644 legacy/doc/models/subscription.md
create mode 100644 legacy/doc/models/swap-plan-request.md
create mode 100644 legacy/doc/models/swap-plan-response.md
create mode 100644 legacy/doc/models/tax-calculation-phase.md
create mode 100644 legacy/doc/models/tax-ids.md
create mode 100644 legacy/doc/models/tax-inclusion-type.md
create mode 100644 legacy/doc/models/team-member-assigned-locations-assignment-type.md
create mode 100644 legacy/doc/models/team-member-assigned-locations.md
create mode 100644 legacy/doc/models/team-member-booking-profile.md
create mode 100644 legacy/doc/models/team-member-invitation-status.md
create mode 100644 legacy/doc/models/team-member-status.md
create mode 100644 legacy/doc/models/team-member-wage.md
create mode 100644 legacy/doc/models/team-member.md
create mode 100644 legacy/doc/models/tender-bank-account-details-status.md
create mode 100644 legacy/doc/models/tender-bank-account-details.md
create mode 100644 legacy/doc/models/tender-buy-now-pay-later-details-brand.md
create mode 100644 legacy/doc/models/tender-buy-now-pay-later-details-status.md
create mode 100644 legacy/doc/models/tender-buy-now-pay-later-details.md
create mode 100644 legacy/doc/models/tender-card-details-entry-method.md
create mode 100644 legacy/doc/models/tender-card-details-status.md
create mode 100644 legacy/doc/models/tender-card-details.md
create mode 100644 legacy/doc/models/tender-cash-details.md
create mode 100644 legacy/doc/models/tender-square-account-details-status.md
create mode 100644 legacy/doc/models/tender-square-account-details.md
create mode 100644 legacy/doc/models/tender-type.md
create mode 100644 legacy/doc/models/tender.md
create mode 100644 legacy/doc/models/terminal-action-action-type.md
create mode 100644 legacy/doc/models/terminal-action-query-filter.md
create mode 100644 legacy/doc/models/terminal-action-query-sort.md
create mode 100644 legacy/doc/models/terminal-action-query.md
create mode 100644 legacy/doc/models/terminal-action.md
create mode 100644 legacy/doc/models/terminal-checkout-query-filter.md
create mode 100644 legacy/doc/models/terminal-checkout-query-sort.md
create mode 100644 legacy/doc/models/terminal-checkout-query.md
create mode 100644 legacy/doc/models/terminal-checkout.md
create mode 100644 legacy/doc/models/terminal-refund-query-filter.md
create mode 100644 legacy/doc/models/terminal-refund-query-sort.md
create mode 100644 legacy/doc/models/terminal-refund-query.md
create mode 100644 legacy/doc/models/terminal-refund.md
create mode 100644 legacy/doc/models/test-webhook-subscription-request.md
create mode 100644 legacy/doc/models/test-webhook-subscription-response.md
create mode 100644 legacy/doc/models/time-range.md
create mode 100644 legacy/doc/models/tip-settings.md
create mode 100644 legacy/doc/models/transaction-product.md
create mode 100644 legacy/doc/models/transaction-type.md
create mode 100644 legacy/doc/models/transaction.md
create mode 100644 legacy/doc/models/unlink-customer-from-gift-card-request.md
create mode 100644 legacy/doc/models/unlink-customer-from-gift-card-response.md
create mode 100644 legacy/doc/models/update-booking-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/update-booking-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/update-booking-request.md
create mode 100644 legacy/doc/models/update-booking-response.md
create mode 100644 legacy/doc/models/update-break-type-request.md
create mode 100644 legacy/doc/models/update-break-type-response.md
create mode 100644 legacy/doc/models/update-catalog-image-request.md
create mode 100644 legacy/doc/models/update-catalog-image-response.md
create mode 100644 legacy/doc/models/update-customer-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/update-customer-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/update-customer-group-request.md
create mode 100644 legacy/doc/models/update-customer-group-response.md
create mode 100644 legacy/doc/models/update-customer-request.md
create mode 100644 legacy/doc/models/update-customer-response.md
create mode 100644 legacy/doc/models/update-invoice-request.md
create mode 100644 legacy/doc/models/update-invoice-response.md
create mode 100644 legacy/doc/models/update-item-modifier-lists-request.md
create mode 100644 legacy/doc/models/update-item-modifier-lists-response.md
create mode 100644 legacy/doc/models/update-item-taxes-request.md
create mode 100644 legacy/doc/models/update-item-taxes-response.md
create mode 100644 legacy/doc/models/update-job-request.md
create mode 100644 legacy/doc/models/update-job-response.md
create mode 100644 legacy/doc/models/update-location-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/update-location-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/update-location-request.md
create mode 100644 legacy/doc/models/update-location-response.md
create mode 100644 legacy/doc/models/update-location-settings-request.md
create mode 100644 legacy/doc/models/update-location-settings-response.md
create mode 100644 legacy/doc/models/update-merchant-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/update-merchant-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/update-merchant-settings-request.md
create mode 100644 legacy/doc/models/update-merchant-settings-response.md
create mode 100644 legacy/doc/models/update-order-custom-attribute-definition-request.md
create mode 100644 legacy/doc/models/update-order-custom-attribute-definition-response.md
create mode 100644 legacy/doc/models/update-order-request.md
create mode 100644 legacy/doc/models/update-order-response.md
create mode 100644 legacy/doc/models/update-payment-link-request.md
create mode 100644 legacy/doc/models/update-payment-link-response.md
create mode 100644 legacy/doc/models/update-payment-request.md
create mode 100644 legacy/doc/models/update-payment-response.md
create mode 100644 legacy/doc/models/update-shift-request.md
create mode 100644 legacy/doc/models/update-shift-response.md
create mode 100644 legacy/doc/models/update-subscription-request.md
create mode 100644 legacy/doc/models/update-subscription-response.md
create mode 100644 legacy/doc/models/update-team-member-request.md
create mode 100644 legacy/doc/models/update-team-member-response.md
create mode 100644 legacy/doc/models/update-vendor-request.md
create mode 100644 legacy/doc/models/update-vendor-response.md
create mode 100644 legacy/doc/models/update-wage-setting-request.md
create mode 100644 legacy/doc/models/update-wage-setting-response.md
create mode 100644 legacy/doc/models/update-webhook-subscription-request.md
create mode 100644 legacy/doc/models/update-webhook-subscription-response.md
create mode 100644 legacy/doc/models/update-webhook-subscription-signature-key-request.md
create mode 100644 legacy/doc/models/update-webhook-subscription-signature-key-response.md
create mode 100644 legacy/doc/models/update-workweek-config-request.md
create mode 100644 legacy/doc/models/update-workweek-config-response.md
create mode 100644 legacy/doc/models/upsert-booking-custom-attribute-request.md
create mode 100644 legacy/doc/models/upsert-booking-custom-attribute-response.md
create mode 100644 legacy/doc/models/upsert-catalog-object-request.md
create mode 100644 legacy/doc/models/upsert-catalog-object-response.md
create mode 100644 legacy/doc/models/upsert-customer-custom-attribute-request.md
create mode 100644 legacy/doc/models/upsert-customer-custom-attribute-response.md
create mode 100644 legacy/doc/models/upsert-location-custom-attribute-request.md
create mode 100644 legacy/doc/models/upsert-location-custom-attribute-response.md
create mode 100644 legacy/doc/models/upsert-merchant-custom-attribute-request.md
create mode 100644 legacy/doc/models/upsert-merchant-custom-attribute-response.md
create mode 100644 legacy/doc/models/upsert-order-custom-attribute-request.md
create mode 100644 legacy/doc/models/upsert-order-custom-attribute-response.md
create mode 100644 legacy/doc/models/upsert-snippet-request.md
create mode 100644 legacy/doc/models/upsert-snippet-response.md
create mode 100644 legacy/doc/models/v1-device.md
create mode 100644 legacy/doc/models/v1-list-orders-request.md
create mode 100644 legacy/doc/models/v1-list-orders-response.md
create mode 100644 legacy/doc/models/v1-money.md
create mode 100644 legacy/doc/models/v1-order-history-entry-action.md
create mode 100644 legacy/doc/models/v1-order-history-entry.md
create mode 100644 legacy/doc/models/v1-order-state.md
create mode 100644 legacy/doc/models/v1-order.md
create mode 100644 legacy/doc/models/v1-phone-number.md
create mode 100644 legacy/doc/models/v1-tender-card-brand.md
create mode 100644 legacy/doc/models/v1-tender-entry-method.md
create mode 100644 legacy/doc/models/v1-tender-type.md
create mode 100644 legacy/doc/models/v1-tender.md
create mode 100644 legacy/doc/models/v1-update-order-request-action.md
create mode 100644 legacy/doc/models/v1-update-order-request.md
create mode 100644 legacy/doc/models/vendor-contact.md
create mode 100644 legacy/doc/models/vendor-status.md
create mode 100644 legacy/doc/models/vendor.md
create mode 100644 legacy/doc/models/visibility-filter.md
create mode 100644 legacy/doc/models/void-transaction-response.md
create mode 100644 legacy/doc/models/wage-setting.md
create mode 100644 legacy/doc/models/webhook-subscription.md
create mode 100644 legacy/doc/models/weekday.md
create mode 100644 legacy/doc/models/workweek-config.md
create mode 100644 legacy/exports/index.d.mts
create mode 100644 legacy/exports/index.d.ts
create mode 100644 legacy/exports/index.js
create mode 100644 legacy/exports/index.mjs
diff --git a/legacy/CHANGELOG.md b/legacy/CHANGELOG.md
new file mode 100644
index 000000000..03990c0f4
--- /dev/null
+++ b/legacy/CHANGELOG.md
@@ -0,0 +1,618 @@
+# Change Log
+
+For general API and SDK changelogs, see [Square APIs and SDKs Release Notes](https://developer.squareup.com/docs/changelog/connect).
+
+## Version 17.0.0 (2021-12-15)
+### API updates
+
+* **Invoices API:**
+ * The Invoices API now supports seller accounts in France. For more information, see [International availability and considerations.](https://developer.squareup.com/docs/invoices-api/overview#international-availability-invoices)
+ * France only: [`Invoice`](https://developer.squareup.com/reference/square_2021-12-15/objects/Invoice) object. Added a new `payment_conditions` field, which contains payment terms and conditions that are displayed on the invoice. This field is available only for sellers in France. For more information, see [Payment conditions.](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions)
+
+ Square version 2021-12-15 or higher is required to set this field, but it is returned in `ListInvoices` and `RetrieveInvoice` requests for all Square versions.
+
+* **Cards API**
+ * Added the `CARD_DECLINED_VERIFICATION_REQUIRED` error code to the list of error codes returned by [CreateCard](https://developer.squareup.com/reference/square_2021-12-15/cards-api/CreateCard).
+* **Catalog API:**
+ * [CreateCatalogImage](https://developer.squareup.com/reference/square_2021-12-15/catalog-api/create-catalog-image) endpoint
+ * Updated to support attaching multiple images to a [Catalogbject](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogObject) instance.
+ * Added `is_primary` option to let the caller choose to attach an image as the primary image on the object for display with the Square Point of Sale and other first-party Square applications. For more information, see [Upload and Attach Images.](https://developer.squareup.com/docs/catalog-api/upload-and-attach-images)
+ * [CatalogObject](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogObject) object
+ * Retired the `image_id` field, used to hold a single image object attached to an image-supporting object of the `ITEM`, `ITEM_VARIATION`, `CATEGORY`, or `MODIFIER_LIST` type, in Square API version 2021-12-15 and later, which supports attachment of multiple images. The `image_id` field is still supported in Square API version prior to 2021-12-15. For more information, see [Work with Images: Overview.](https://developer.squareup.com/docs/catalog-api/cookbook/create-catalog-image#overview)
+ * [CatalogItem](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogItem), [CatalogItemVariation](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogItemVariation), [CatalogCategory](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogCategory) or [CatalogModifierList](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogModifierList) object
+ * Added `image_ids` list to hold attached image objects. The first element of `image_ids` list refers to the primary image attached to the catalog object. For more information, see [Work with Images: Overview.](https://developer.squareup.com/docs/catalog-api/cookbook/create-catalog-image#overview)
+ * [UpdateCatalogImage](https://developer.squareup.com/reference/square_2021-12-15/catalog-api/update-catalog-image) endpoint
+ * Added to support replacing the image file encapsulated by an existing [CatalogImage](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogImage) object. For more information, see [Replace image file on a CatalogImage object.](https://developer.squareup.com/docs/catalog-api/manage-images#replace-the-image-file-of-a-catalogimage-object)
+
+ * [CatalogPricingRule](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogPricingRule) object
+ * Added [minimum_order_subtotal_money](https://developer.squareup.com/reference/square_2021-12-15/objects/CatalogPricingRule#definition__property-minimum_order_subtotal_money) field to require that the minimum order subtotal be reached before the pricing rule may be applied.
+
+### Documentation updates
+* Added a new top-level node for Developer Tools. This node includes such features as Sandbox, API Logs, and Webhooks.
+* Added [Webhook Event Logs (beta)](https://developer.squareup.com/docs/devtools/webhook-logs) documentation to the Developer Tools node.
+
+
+## Version 16.0.0 (2021-11-17)
+## API updates
+
+* **Cards API.** The [Card](https://developer.squareup.com/reference/square_2021-11-17/objects/card) object and webhook response body for all webhooks are updated updated with fields.
+ * Added the [Card.merchant_id](https://developer.squareup.com/reference/square_2021-11-17/objects/Card#definition__property-merchant_id) field to identify the Square seller that stored the payment card on file.
+ * Added a [Card](https://developer.squareup.com/reference/square_2021-11-17/objects/Card) object to the response bodies of all [Cards API webhooks](https://developer.squareup.com/docs/webhooks/v2webhook-events-tech-ref#cards-api). The `Card` is added as a child of the `data.object` field in all webhook responses.
+
+* **Bookings API.** The new [ListBookings](https://developer.squareup.com/reference/square_2021-11-17/bookings-api/list-bookings) endpoint supports browsing a collection of bookings of a seller. For more information, see [Use the Bookings API: list bookings.](https://developer.squareup.com/docs/bookings-api/use-the-api#list-bookings)
+
+* **Subscriptions API.** Introduced the new [actions framework](https://developer.squareup.com/docs/subscriptions-api/overview#subscriptions-actions-overview) representing scheduled, future changes to subscriptions.
+ * The new [PauseSubscription](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/pause-subscription) endpoint supports temporarily pausing a subscription. Calling this endpoint schedules a new `PAUSE` action.
+ * The new [SwapPlan](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/swap-plan) endpoint supports changing the subscription plan associated with a single customer. Calling this endpoint schedules a new `SWAP_PLAN` action.
+ * The new [DeleteSubscriptionAction](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/delete-subscription-action) endpoint supports deleting a scheduled action.
+ * The [ResumeSubscription](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/resume-subscription) endpoint has been updated to support resuming a paused subscription. Calling this endpoint schedules a new `RESUME` action.
+ * The [CancelSubscription](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/cancel-subscription) endpoint now schedules a new `CANCEL` action.
+ * Added an optional `include` body parameter to the [SearchSubscriptions](https://developer.squareup.com/reference/square_2021-11-17/subscriptions-api/search-subscriptions) endpoint. Include `actions` in the request to return all [actions](https://developer.squareup.com/docs/subscriptions-api/overview#subscriptions-actions-overview) associated with the subscriptions.
+
+## Documentation Update
+
+* **Migration Guides.**
+ * [Migrate from the Connect V1 Refunds API.](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-refunds) The topic is updated to include information to migrate from the v1 ListRefunds endpoint to the appropriate Square API counterparts.
+ * [Migrate from the Connect V1 Payments API.](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-payments) The topic provides developers information to migrate from the Connect V1 Payments API to the appropriate Square API counterparts.
+
+ Code that relies on these V1 API endpoints must be updated to avoid breaking when these APIs reach retirement.
+
+
+## Version 15.0.0 (2021-10-20)
+## API updates
+* **Transactions API.** Three previously deprecated endpoints (`ListRefunds`, `Charge`, and `CreateRefund`) in the [Transactions API](https://developer.squareup.com/reference/square_2021-10-20/transactions-api) are removed from Square API version 2021-10-20 and later. These endpoints will work if you are using Square API versions prior to 2021-10-20. However, these endpoints will eventually be retired from all Square versions.
+
+ * Instead of the Transactions API `Charge` endpoint, use the Payments API [CreatePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment) endpoint.
+ * Instead of the Transactions API `CreateRefund` endpoint, use the Refunds API [RefundPayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/refund-payment) endpoint.
+ * Instead of the Transactions API `ListRefunds` endpoint, use the Refunds API [ListPaymentRefund](https://developer.squareup.com/reference/square_2021-10-20/payments-api/list-payment-refunds) endpoint.
+
+* **Payments API:**
+ * [Payment](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment) object.
+ * Added the [device_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-device_details) read-only field to view details of the device used to take a payment. This `Payment`-level field provides device information for all types of payments. Previously, device details were only available for card payments (`Payment.card_details.device_details`), which is now deprecated.
+ * Added the [team_member_id](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-team_member_id) that applications can use to view the ID of the [TeamMember](https://developer.squareup.com/reference/square_2021-10-20/objects/TeamMember) associated with the payment. Use this field instead of the `Payment.employee_id` field, which is now deprecated.
+ * Added the [application_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-application_details) read-only field to view details of the application that took the payment.
+
+ * These `Payment` fields have moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle) (GA) state:[tip_money](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-tip_money), [delay_duration](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_duration), [statement_description_identifier](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-statement_description_identifier), [delay_duration](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_duration), [delay_action](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_action), [delayed_until](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delayed_until), and [statement_description_identifier](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-statement_description_identifier).
+
+ * The [ACH Bank Transfer Payments](https://developer.squareup.com/docs/payments-api/take-payments/ach-payments) feature has moved to the GA state. Accordingly, the [bank_account_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-bank_account_details) field (and its [BankAccountPaymentDetails](https://developer.squareup.com/reference/square_2021-10-20/objects/BankAccountPaymentDetails) type) are moved to the GA state.
+ * [CreatePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment) endpoint.
+ * Added the [team_member_id](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment#request__property-team_member_id) request field to record the ID of the team member associated with the payment.
+ * The [accept_partial_authorization](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment#request__property-accept_partial_authorization) request field has moved to the GA state.
+ * [CompletePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/complete-payment) endpoint. Added the `version_token` request field to support optimistic concurrency. For more information, see [Delayed capture of a card payment.](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment)
+
+* **Refunds API:**
+ * [RefundPayment](https://developer.squareup.com/reference/square_2021-10-20/refunds-api/refund-payment) endpoint.
+ * Added the `team_member_id` request field to record the ID of the team member associated with the refund.
+ * Added the `payment_version_token` request field to support optimistic concurrency. For more information, see [Refund Payment.](https://developer.squareup.com/docs/payments-api/refund-payments#optimistic-concurrency)
+
+* **Customers API:**
+ * [Customer](https://developer.squareup.com/reference/square_2021-10-20/objects/Customer) object. Added a new `tax_ids` field of the [CustomerTaxIds](https://developer.squareup.com/reference/square_2021-10-20/objects/CustomerTaxIds) type, which can contain the EU VAT ID of the customer. This field is available only for customers of sellers in France, Ireland, or the United Kingdom. For more information, see [Customer tax IDs.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)
+
+ * [UpdateCustomer](https://developer.squareup.com/reference/square_2021-10-20/customers-api/update-customer) endpoint. The Customers API now returns a `400 BAD_REQUEST` error if the request body does not contain any fields. For earlier Square versions, the Customers API will continue to return a `200 OK` response along with the customer profile. For more information, see [Migration notes.](https://developer.squareup.com/docs/customers-api/what-it-does#migration-notes)
+
+* **Invoices API:**
+ * [InvoiceRecipient](https://developer.squareup.com/reference/square_2021-10-20/objects/InvoiceRecipient) object. Added a new, read-only `tax_ids` field of the [InvoiceRecipientTaxIds](https://developer.squareup.com/reference/square_2021-10-20/objects/InvoiceRecipientTaxIds) type, which can contain the EU VAT ID of the invoice recipient. This field is available only for customers of sellers in Ireland or the United Kingdom. If defined, `tax_ids` is returned for all Square API versions. For more information, see [Invoice recipient tax IDs.](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids)
+ * Square now sends emails for test invoices that are published in the Sandbox environment.
+
+* **Catalog API:**
+ * [CatalogSubscriptionPlan.name](https://developer.squareup.com/reference/square_2021-10-20/objects/CatalogSubscriptionPlan#definition__property-name) can be updated after the subscription plan is created. The change is retroactively applicable to prior versions of the Square API.
+
+* **Subscriptions API:**
+ * The new [SubscriptionSource](https://developer.squareup.com/reference/square_2021-10-20/objects/SubscriptionSource) data type is introduced to encapsulate the source where a subscription is created. The new `SubscriptionSource.name` value is propagated to the `Order.source` attribute when an order is made on the subscription. The new feature is retroactively applicable to prior versions of the Square API.
+ * The new [Subscription.source](https://developer.squareup.com/reference/square_2021-10-20/objects/Subscription#definition__property-source) attribute is introduced to indicate the source where the subscription was created. This new feature is retroactively applicable to prior versions of the Square API.
+ * The new [SearchSubscriptionsFilter.source_names](https://developer.squareup.com/reference/square_2021-10-20/objects/SearchSubscriptionFilter#definition__property-source_names) query expression is introduced to enable search for subscriptions by the subscription source name. This new feature is retroactively applicable to prior versions of the Square API.
+
+
+## Version 14.1.0 (2021-09-15)
+## API updates
+
+* **Invoices API:**
+ * [Invoice](https://developer.squareup.com/reference/square_2021-09-15/objects/Invoice) object. Added a new, optional `sale_or_service_date` field used to specify the date of the sale or the date that the service is rendered. If specified, this date is displayed on the invoice.
+
+* **Orders API:**
+ * [CreateOrder](https://developer.squareup.com/reference/square_2021-09-15/orders-api/create-order). The endpoint now supports creating temporary, draft orders. For more information, see [Create a draft order.](https://developer.squareup.com/docs/orders-api/create-orders#create-a-draft-order)
+ * [CloneOrder](https://developer.squareup.com/reference/square_2021-09-15/orders-api/clone-order). The Orders API supports this new endpoint to clone an existing order. For more information, see [Clone an order.](https://developer.squareup.com/docs/orders-api/create-orders#clone-an-order)
+ * These fields have moved to the [general availability (GA)](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) state: [OrderLineItem.item_type](https://developer.squareup.com/reference/square_2021-09-15/objects/OrderLineItem#definition__property-item_type), [OrderServiceCharge.type](https://developer.squareup.com/reference/square_2021-09-15/objects/OrderServiceCharge#definition__property-type), and `catalog_version` field on every order type that contains this field.
+
+* **Team API:**
+ * [SearchTeamMembersFilter](https://developer.squareup.com/reference/square_2021-09-15/objects/SearchTeamMembersFilter) object now has an `is_owner` field that when set, causes a team member search to return only the seller who owns a Square account.
+
+* **Terminal API:**
+ * [TerminalCheckout](https://developer.squareup.com/reference/square_2021-09-15/objects/TerminalCheckout) object. The `customer_id` field is now GA.
+
+## Documentation updates
+* **OAuth API:**
+ * Revised API descriptions for the ObtainToken and Authorize endpoints. Clarified that the Authorize endpoint is not a callable API but is used to direct the seller to the Square authorization page. For more information about the Authorize endpoint, see [Create the Redirect URL and Square Authorization Page URL.](https://developer.squareup.com/docs/oauth-api/create-urls-for-square-authorization)
+
+
+## Version 13.1.0 (2021-08-18)
+## API updates
+
+* **Customers API:**
+ * [Customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) object. The `version` field has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. This field represents the current version of the customer profile and enables optimistic concurrency control. For more information, see [Customer profile versions and optimistic concurrency support.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-profile-versions-and-optimistic-concurrency-support)
+ * [ListCustomers](https://developer.squareup.com/reference/square_2021-08-18/customers-api/list-customers) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
+
+* **Customer Groups API:**
+ * [ListCustomerGroups](https://developer.squareup.com/reference/square_2021-08-18/customer-groups-api/list-customer-groups) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
+
+* **Customer Segments API:**
+ * [ListCustomerSegments](https://developer.squareup.com/reference/square_2021-08-18/customer-segments-api/list-customer-segments) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
+
+* **Invoices API:**
+ * Square Invoices Plus is a monthly subscription plan that allows access to premium invoice features. After Invoices Plus is launched in September 2021, a subscription will be required to create invoices with custom fields and installment payments. For more information, including how to handle new errors, see [Premium features available with Invoices Plus.](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)
+
+* **Loyalty API:**
+ * [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccount) object. Added a new `expiring_point_deadlines` field that specifies when points in the account balance are scheduled to expire. This field contains a list of [LoyaltyAccountExpiringPointDeadline](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccountExpiringPointDeadline) objects. For more information, see [Expiring points.](https://developer.squareup.com/docs/loyalty-api/overview#expiring-points)
+
+## Documentation updates
+
+* [App Marketplace.](https://developer.squareup.com/docs/app-marketplace) Added the following topics:
+ * [How to apply.](https://developer.squareup.com/docs/app-marketplace#how-to-apply) Documented the process to list an application on the Square App Marketplace.
+ * [App Marketplace API Usage Requirements.](https://developer.squareup.com/docs/app-marketplace/requirements) Added a topic that describes a set of API usage requirements and recommendations for partner applications.
+
+* [Automatic communications from Square about invoices.](https://developer.squareup.com/docs/invoices-api/overview#automatic-communication-from-square-to-customers) Documented the invoice-related communications sent from Square to customers and sellers.
+
+* [Snippets best practices.](https://developer.squareup.com/docs/snippets-api/overview#best-practices) Documented best practices and additional requirements for snippets and applications that integrate with the Snippets API.
+
+
+## Version 13.0.0 (2021-07-21)
+## API updates
+
+* **Orders API:**
+ * [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge) object. Added a new field, `type`. It identifies the service charge type.
+
+ * [OrderQuantityUnit](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderQuantityUnit),
+ [OrderLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItem),
+ [OrderLineItemDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemDiscount),
+ [OrderLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemModifier),
+ [OrderLineItemTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemTax),
+ [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge),
+ [OrderReturnLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItem),
+ [OrderReturnLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItemModifier),
+ [OrderReturnServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnServiceCharge),
+ [OrderReturnTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnTax), and
+ [OrderReturnDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnDiscount) objects. Added a new field, `catalog_version`.
+* **Locations API:**
+ * [Location](https://developer.squareup.com/reference/square_2021-07-21/objects/Location) object. Added a new field `tax_ids` of type `TaxIds`. In the current implementation, sellers in Ireland and France can configure tax IDs during the onboarding process. They can also provide the information later by updating the location information in the Seller Dashboard. These tax IDs appear in this field.
+
+* **Loyalty API:**
+ * As of July 15, 2021, the country in which the seller’s Square account is activated determines whether Square uses pretax or post-tax purchase amounts to calculate accrued points. This change supports consumption tax models, such as value-added tax (VAT). Previously, point accrual was based on pretax purchase amounts only. This change does not affect the existing point balance of loyalty accounts. For more information, see [Availability of Square Loyalty.](https://developer.squareup.com/docs/loyalty-api/overview#loyalty-market-availability)
+
+* **Payments API:**
+ * [UpdatePayment](https://developer.squareup.com/reference/square_2021-07-21/payments-api/update-payment). The endpoint has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Also, you can now update gift card payments (similar to card, cash, and external payments).
+
+* **Subscriptions API:**
+ * The [Subscriptions API](https://developer.squareup.com/docs/subscriptions-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.
+ * [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2021-07-21/objects/CatalogSubscriptionPlan) object. The `name` and `price` are now write-once fields. You specify these values at the time of creating a plan. After the plan is created, these fields cannot be updated. This makes a subscription plan immutable.
+
+* **Inventory API:**
+ * [RetrieveInventoryTransfer.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Transfer) This new endpoint is introduced to support the retrieval of inventory transfer.
+ * [RetrieveInventoryChanges.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Changes) This endpoint is deprecated. Its support ends when it is retired in about 12 months.
+ * The following endpoints have updated URLs to conform to the standard REST API convention. For more information about migrating deprecated URLs to updated URLs in your application, see [Inventory API: Migrate to Updated API Entities.](https://developer.squareup.com/docs/inventory-api/migrate-to-updated-api-entities)
+ * [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Adjustment)
+ * [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Change-Inventory)
+ * [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Changes)
+ * [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Counts)
+ * [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Physical-Count)
+
+## Documentation updates
+* **Webhooks.** Revised the steps and descriptions for creating and using webhooks. For more information, see [Webhooks Overview.](https://developer.squareup.com/docs/webhooks/overview)
+
+
+## Version 12.0.0 (2021-06-16)
+## New API releases
+* **Gift Cards API and Gift Card Activities API.** Gift card support is integrated in the [Square Seller Dashboard](https://squareup.com/dashboard/) and the [Square Point of Sale](https://squareup.com/us/en/point-of-sale) application. Sellers can sell, redeem, track, and reload Square gift cards. Now developers can use the [Gift Cards API](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api) and the [Gift Card Activities API](https://developer.squareup.com/reference/square_2021-06-16/gift-card-activities-api) to integrate Square gift cards into third-party applications. For more information, see [Gift Cards API Overview.](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api)
+
+* **Cards API.** The [Cards API](https://developer.squareup.com/reference/square_2021-06-16/cards-api) replaces the deprecated `CreateCustomerCard` and `DeleteCustomerCard` endpoints and lets an application save a customer payment card on file along with other card management operations. For more information, see [Cards API Overview.](https://developer.squareup.com/docs/cards-api/overview)
+
+## API updates
+* **Catalog API:**
+ * [CatalogPricingRule](https://developer.squareup.com/reference/square_2021-06-16/objects/CatalogPricingRule). Support of the [customer group discount](https://developer.squareup.com/reference/square_2021-06-16/objects/CatalogPricingRule#definition__property-customer_group_ids_any) becomes GA. For more information, see [CreateCustomerGroupDiscounts.](https://developer.squareup.com/docs/catalog-api/configure-customer-group-discounts)
+ * [CatalogItemVariation](https://developer.squareup.com/reference/square_2021-06-16/objects/CatalogItemVariation). Offers Beta support of the [stockable](https://developer.squareup.com/reference/square_2021-06-16/objects/CatalogItemVariation#definition__property-stockable) and [stockable_conversion](https://developer.squareup.com/reference/square_2021-06-16/objects/CatalogItemVariation#definition__property-stockable_conversion) attributes to enable sales of a product in multiple measurement units.
+ * [UpsertCatalogObject](https://developer.squareup.com/reference/square_2021-06-16/catalog-api/upsert-catalog-object) and [BatchUpsertCatalogObjects](https://developer.squareup.com/reference/square_2021-06-16/catalog-api/batch-upsert-catalog-objects). Support creating an item with stockable and non-stockable variations with a specified stock conversion between the two. For more information, see [Enable Stock Conversion.](https://developer.squareup.com/docs/inventory-api/enable-stock-conversion)
+ * [UpsertCatalogObject](https://developer.squareup.com/reference/square_2021-06-16/catalog-api/upsert-catalog-object) and [BatchUpsertCatalogObjects](https://developer.squareup.com/reference/square_2021-06-16/catalog-api/batch-upsert-catalog-objects). Require that an item be created with at least one variation. Otherwise, an `INVALID_REQUEST` error is returned.
+
+* **Customers API:**
+ * Using the Customers API to manage cards on file is deprecated:
+ * The [CreateCustomerCard](https://developer.squareup.com/reference/square_2021-06-16/customers-api/create-customer-card) endpoint is deprecated and replaced by the [CreateCard](https://developer.squareup.com/reference/square_2021-06-16/cards-api/create-card) and [LinkCustomerToGiftCard](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api/link-customer-to-gift-card) endpoints.
+ * The [DeleteCustomerCard](https://developer.squareup.com/reference/square_2021-06-16/customers-api/delete-customer-card) endpoint is deprecated and replaced by the [DisableCard](https://developer.squareup.com/reference/square_2021-06-16/cards-api/disable-card) and [UnlinkCustomerFromGiftCard](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api/unlink-customer-from-gift-card) endpoints.
+ * The `cards` field in the [Customer](https://developer.squareup.com/reference/square_2021-06-16/objects/Customer) object is deprecated and replaced by the following endpoints:
+ * [ListCards](https://developer.squareup.com/reference/square_2021-06-16/cards-api/list-cards) to retrieve credit and debit cards on file.
+ * [ListGiftCards](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api/list-gift-cards) to retrieve gift cards on file.
+
+ For more information, see [Migrate to the Cards API and Gift Cards API.](https://developer.squareup.com/docs/customers-api/use-the-api/integrate-with-other-services#migrate-customer-cards)
+
+ * [Customer](https://developer.squareup.com/reference/square_2021-06-16/objects/Customer) object. In the `cards` field, the IDs for gift cards now have a `gftc:` prefix followed by the card number. This is a service-level change that applies to all Square API versions.
+
+* **Disputes API:**
+ * The Disputes API is now GA.
+ * `RemoveDisputeEvidence`. Renamed to [DeleteDisputeEvidence](https://developer.squareup.com/reference/square_2021-06-16/objects/DeleteDisputeEvidence).
+ * [CreateDisputeEvidenceFile.](https://developer.squareup.com/reference/square_2021-06-16/objects/CreateDisputeEvidenceFile) The URL is changed from `/v2/disputes/{dispute_id}/evidence_file` to `/v2/disputes/{dispute_id}/evidence-files`.
+ * [CreateDisputeEvidenceText.](https://developer.squareup.com/reference/square_2021-06-16/objects/CreateDisputeEvidenceText) The URL is changed from `/v2/disputes/{dispute_id}/evidence_text` to `/v2/disputes/{dispute_id}/evidence-text`.
+ * [ListDisputeEvidence.](https://developer.squareup.com/reference/square_2021-06-16/objects/ListDisputeEvidence) The endpoint now returns a pagination cursor and accepts a pagination cursor in requests.
+ * `DISPUTES_READ` and `DISPUTES_WRITE` permissions are required for all Disputes API endpoints instead of `PAYMENTS_READ` and `PAYMENTS_WRITE`.
+ * [DisputeEvidence.](https://developer.squareup.com/reference/square_2021-06-16/objects/DisputeEvidence) The `evidence_id` field is deprecated and replaced by the `id` field.
+ * The `dispute.state.changed` webhook is renamed to `dispute.state.updated`.
+ * [Dispute](https://developer.squareup.com/reference/square_2021-06-16/objects/Dispute) object. The following breaking changes are made:
+ * The `dispute_id` field is deprecated and replaced by the `id` field.
+ * The `reported_date` field is deprecated and replaced by the `reported_at` field.
+ * The `evidence_ids` field is deprecated with no replacement.
+
+ For more information about the GA release of the Disputes API, see [Disputes Overview.](https://developer.squareup.com/docs/disputes-api/overview)
+
+
+* **Inventory API:**
+ * [CatalogStockConversion](https://developer.squareup.com/docs/{SQUARE_TECH_REF}/objects/CatalogStockConversion) (Beta). Enables selling a product in multiple measurement units and lets Square sellers manage inventory counts of the product's stockable and a non-stockable variations in a self-consistent manner. For more information, see [Enable Stock Conversion.](https://developer.squareup.com/docs/inventory-api/enable-stock-conversion)
+
+* **Invoices API:**
+ * [CreateInvoice.](https://developer.squareup.com/reference/square_2021-06-16/invoices-api/create-invoice) The `location_id` field is now optional and defaults to the location ID of the associated order. If specified in the request, the value must match the location ID of the associated order. This is a service-level change that applies to all Square API versions.
+
+* **Loyalty API:**
+ * [LoyaltyProgramAccrualRule](https://developer.squareup.com/reference/square_2021-06-16/objects/LoyaltyProgramAccrualRule) object. New `excluded_category_ids` and `excluded_item_variation_ids` fields that represent any categories and items that are excluded from accruing points in spend-based loyalty programs.
+
+* **Subscriptions API:**
+ * [Subscription.](https://developer.squareup.com/reference/square_2021-06-16/objects/Subscription) The `paid_until_date` field is renamed to `charge_through_date`.
+ * [UpdateSubscription.](https://developer.squareup.com/reference/square_2021-06-16/subscriptions-api/update-subscription) The `version` field is now optional because it can update only the latest version of a subscription.
+
+ * [CreateSubscription.](https://developer.squareup.com/reference/square_2021-06-16/subscriptions-api/create-subscription) The `idempotency_key` field is now optional in the request. If you do not provide it, each `CreateSubscription` assumes a unique (never used before) value and creates a subscription for each call.
+
+## Documentation updates
+* [Order fee structure.](https://developer.squareup.com/docs/payments-pricing#orders-api-fee-structure) Documented the transaction fee related to using the Orders API with a non-Square payments provider.
+
+
+## Version 11.0.0 (2021-05-13)
+## New API releases
+
+* **Sites API.** The [Sites API](https://developer.squareup.com/reference/square_2021-05-13/sites-api) lets you retrieve basic details about the Square Online sites that belong to a Square seller. For more information, see [Sites API Overview.](https://developer.squareup.com/docs/sites-api/overview)
+
+
+* **Snippets API.** The [Snippets API](https://developer.squareup.com/reference/square_2021-05-13/snippets-api) lets you manage snippets that provide custom functionality on Square Online sites. A snippet is a script that is injected into all pages on a site, except for checkout pages. For more information, see [Snippets API Overview.](https://developer.squareup.com/docs/snippets-api/overview)
+
+The Sites API and Snippets API are publicly available to all developers as part of an early access program (EAP). 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)
+
+## API updates
+
+* **Payments API.**
+ * [CreatePayment.](https://developer.squareup.com/reference/square_2021-05-13/payments-api/create-payment) The endpoint now supports ACH bank transfer payments. For more information, see [ACH Payment](https://developer.squareup.com/docs/payments-api/take-payments/ach-payments).
+
+* **Loyalty API:**
+ * The [Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.
+
+ * The [ListLoyaltyPrograms](https://developer.squareup.com/reference/square_2021-05-13/loyalty-api/list-loyalty-programs) endpoint is deprecated and replaced by the [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2021-05-13/loyalty-api/retrieve-loyalty-program) endpoint when used with the `main` keyword.
+
+ * [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-05-13/objects/LoyaltyAccount) object. The `mappings` field is retired and replaced by `mapping`.
+
+ * [LoyaltyAccountMapping](https://developer.squareup.com/reference/square_2021-05-13/objects/LoyaltyAccountMapping) object. The `type` and `value` fields are retired and replaced by `phone_number`.
+
+ Starting in Square version 2021-05-13:
+ * `mappings` is not accepted in `CreateLoyaltyAccount` requests or returned in responses.
+ * `type` and `value` are not accepted in `CreateLoyaltyAccount` or `SearchLoyaltyAccounts` requests or returned in responses.
+
+ For more information, see [Migration notes.](https://developer.squareup.com/docs/loyalty-api/overview#migration-notes)
+
+## Documentation updates
+* **Getting Started** Added step that shows how to use the API Logs to examine a transaction.
+
+
+## Version 10.0.0 (2021-04-21)
+## New API releases
+
+## Existing API updates
+
+* **Subscriptions API:**
+ * [ResumeSubscription.](https://developer.squareup.com/reference/square_2021-04-21/subscriptions-api/resume-subscription) This new endpoint enables applications to resume [deactivated subscriptions.](https://developer.squareup.com/docs/subscriptions-api/overview#deactivated-subscriptions) After a subscription is created, there are events that can make a subscription non-billable, causing Square to deactivate the subscription. A seller can also resume deactivated subscriptions in the Seller Dashboard. Applications can call [ListSubscriptionEvents](https://developer.squareup.com/reference/square_2021-04-21/subscriptions-api/list-subscription-events) to determine why Square deactivated a subscription.
+
+* **Customers API:**
+
+ * [Customer](https://developer.squareup.com/reference/square_2021-04-21/objects/Customer) object:
+ * New `version` field (beta). This field represents the current version of the customer profile. You can include it in your `UpdateCustomer` and `DeleteCustomer` requests to enable optimistic concurrency. For more information, see [Customer profile versions and optimistic concurrency support.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-profile-versions-and-optimistic-concurrency-support)
+ * The `groups` field and corresponding `CustomerGroupInfo` object are retired.
+
+ * [Customer webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks) have moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Event notifications now include the `version` field (beta).
+
+* **Invoices API:**
+
+ * The [Invoices API](https://developer.squareup.com/docs/invoices-api/overview) has moved to the GA state.
+
+ * [Invoice](https://developer.squareup.com/reference/square_2021-04-21/objects/Invoice) object:
+ * A new required `accepted_payment_methods` field that defines the methods of payment that customers can use to pay an invoice on the Square-hosted invoice page. Valid values are defined in the new [InvoiceAcceptedPaymentMethods](https://developer.squareup.com/reference/square_2021-04-21/objects/InvoiceAcceptedPaymentMethods) enum. For more information, see the [migration notes.](https://developer.squareup.com/docs/invoices-api/overview#migration-notes)
+ * A new `subscription_id` field, which is included in invoices created for subscription billing.
+
+* **Loyalty API:** (beta)
+
+ * [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2021-04-21/loyalty-api/retrieve-loyalty-program) endpoint. This new endpoint accepts a program ID or the `main` keyword and returns the loyalty program in a seller's account. For more information, see [Retrieve a loyalty program.](https://developer.squareup.com/docs/loyalty-api/overview#retrieve-loyalty-program) This endpoint is preferred over the `ListLoyaltyPrograms` endpoint.
+
+ * Introduced a new mapping implementation for loyalty accounts:
+ * [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-04-21/objects/LoyaltyAccount) object. Added the `mapping` field (of type `LoyaltyAccountMapping`), which is used to associate the loyalty account with a buyer. This field is recommended over the `mappings` field.
+ * [LoyaltyAccountMapping](https://developer.squareup.com/reference/square_2021-04-21/objects/LoyaltyAccountMapping) object. Added the `phone_number` field to represent a phone number mapping. This field is recommended over the `type` and `value` fields.
+
+ * A new [loyalty.program.created](https://developer.squareup.com/reference/square_2021-04-21/webhooks/loyalty.program.created) webhook. Square now publishes an event notification when a loyalty program is created in the Square Seller Dashboard.
+
+* **Inventory API:**
+ * [InventoryChange](https://developer.squareup.com/reference/square_2021-04-21/objects/InventoryChange) can now have its own measurement unit.
+
+* **Catalog API:**
+ * [CatalogItem](https://developer.squareup.com/reference/square_2021-04-21/objects/CatalogItem) introduces the `sort_name` attribute that can take Japanese writing scripts to sort items by. When it is unspecified, the regular `name` attribute is used for sorting.
+ * [CatalogPricingRule](https://developer.squareup.com/reference/square_2021-04-21/objects/CatalogCatalogPricingRule) has the new `customer_group_ids_any` attribute included to support automatic application of discounts to specified product set purchased by members of any of the customer groups identified by the `customer_group_ids_any` attribute values.
+* **Team API**
+ * New [Team webhooks](https://developer.squareup.com/reference/square_2021-04-21/team-api/webhooks): `team_member.created`, `team_member.updated`, `team_member.wage_setting.updated` to notify on created and updated team members and wage settings.
+
+## SDKs
+* **Connect Node.js SDK:** (retired)
+ * The Connect Node.js SDK is retired and replaced by the [Square Node.js SDK.](https://github.com/square/square-nodejs-sdk) For migration information, see [Connect Node.js SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md)
+
+
+
+
+## Version 9.1.0 (2021-03-17)
+
+## Existing API updates
+
+* **Payments API:**
+ * [CreatePayment](https://developer.squareup.com/reference/square_2021-03-17/payments-api/create-payment). Until now, the `CreatePayment` endpoint supported only taking card payments. In this release, the API now supports cash and external payments. For more information, see [Take Payments.](https://developer.squareup.com/docs/payments-api/take-payments)
+ * [UpdatePayment](https://developer.squareup.com/reference/square_2021-03-17/payments-api/update-payment). This new endpoint enables developers to change the payment amount and tip amount after a payment is created. For more information, see [Update Payments.](https://developer.squareup.com/docs/payments-api/update-payments)
+
+* **Invoices API:**
+ * [InvoiceDeliveryMethod](https://developer.squareup.com/reference/square_2021-03-17/enums/InvoiceDeliveryMethod) enum. Added the read-only `SMS` value.
+ * [InvoiceRequestMethod](https://developer.squareup.com/reference/square_2021-03-17/enums/InvoiceRequestMethod) enum (deprecated). Added the read-only `SMS`, `SMS_CHARGE_CARD_ON_FILE`, and `SMS_CHARGE_BANK_ON_FILE` values for backward compatibility.
+
+ These values direct Square to send invoices and receipts to customers using SMS (text message). SMS settings can be configured from first-party Square applications only; they cannot be configured from the Invoices API. Square does not send invoice reminders when using SMS to communicate with customers.
+
+
+* **Terminal API:**
+ * [TerminalCheckout](https://developer.squareup.com/reference/square_2021-03-17/objects/TerminalCheckout). Previously, `TerminalCheckout` only supported tapped, dipped, or swiped credit cards. It now supports manual card entry and e-money. Added the `payment_type` field to denote a request for a manually entered payment card or an e-money payment.
+ * [TerminalCheckoutPaymentType.](https://developer.squareup.com/reference/square_2021-03-17enums/TerminalCheckoutPaymentType) A new enum for the Terminal checkout payment types that can be requested.
+ * [E-money support](https://developer.squareup.com/docs/terminal-api/e-money-payments) is now available for Terminal checkout requests in Japan.
+
+
+## SDKs
+* **Square Java SDK:**
+ * Updated the OkHttp dependency to version 4.9.0.
+ * Fixed a `NullPointerException` when passing an empty order ID to the `UpdateOrder` method.
+
+## Documentation updates
+
+* **Multi-language code examples.** Previously, various topics showed only cURL examples for the REST API operations. These topics now show examples in multiple languages. You can use the language drop-down list to choose a language.
+
+* [When to Use Connect V1.](https://developer.squareup.com/docs/build-basics/using-connect-v1) Content is revised to reflect the most current information about when to use the Connect V1 API.
+
+
+## Version 9.0.0 (2021-02-26)
+## Existing API updates
+
+* **Customers API:**
+
+ * [New webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks) (beta). Square now sends notifications for the following events:
+ * [customer.created](https://developer.squareup.com/reference/square_2021-02-26/webhooks/customer.created)
+ * [customer.deleted](https://developer.squareup.com/reference/square_2021-02-26/webhooks/customer.deleted)
+ * [customer.updated](https://developer.squareup.com/reference/square_2021-02-26/webhooks/customer.updated)
+
+* **Orders API:**
+ * [CreateOrder](https://developer.squareup.com/reference/square_2021-02-26/orders-api/create-order). Removed the `location_id` field from the request. It was an unused field.
+
+* **Payments API:**
+ * [Payment](https://developer.squareup.com/reference/square_2021-02-26/objects/Payment). This type now returns the `card_payment_timeline` [(CardPaymentTimeline](https://developer.squareup.com/reference/square_2021-02-26/objects/CardPaymentTimeline)) as part of the `card_details` field.
+
+* **v1 Items API:**
+ * The following endpoints are [retired:](https://developer.squareup.com/docs/build-basics/api-lifecycle)
+ * `AdjustInventory`: Use the Square Inventory API [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-02-26/inventory-api/batch-change-inventory) endpoint.
+ * `ListInventory`: Use the Square Inventory API [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-02-26/inventory-api/batch-retrieve-inventory-counts) endpoint.
+
+* **v1 Employees.Timecards:**
+ * The following endpoints are retired:
+ * `CreateTimecard`: Use the Square Labor API [CreateShift](https://developer.squareup.com/reference/square_2021-02-26/labor-api/create-shift) endpoint.
+ * `DeleteTimecard`: Use the Square Labor API [DeleteShift](https://developer.squareup.com/reference/square_2021-02-26/labor-api/delete-shift) endpoint.
+ * `ListTimecards`: Use the Square Labor API [SearchShift](https://developer.squareup.com/reference/square_2021-02-26/labor-api/search-shift) endpoint.
+ * `RetrieveTimecards`: Use the Square Labor API [GetShift](https://developer.squareup.com/reference/square_2021-02-26/labor-api/get-shift) endpoint.
+ * `UpdateTimecard`: Use the Square Labor API [UpdateShift](https://developer.squareup.com/reference/square_2021-02-26/labor-api/update-shift) endpoint.
+ * `ListTimecardEvents`: No direct replacement. To learn about replacing the v1 functionality, see the [migration guide.](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-timecards#endpoints)
+
+* **v1 Employees.CashDrawers:**
+ * The following endpoints are retired:
+ * `ListCashDrawerShifts`: Use the Square CashDrawerShifts API [ListCashDrawerShifts](https://developer.squareup.com/reference/square_2021-02-26/cash-drawers-api/list-cash-drawer-shifts) endpoint.
+ * `RetrieveCashDrawerShift`: Use the Square CashDrawerShifts API [RetrieveCashDrawerShift](https://developer.squareup.com/reference/square_2021-02-26/cash-drawers-api/retrieve-cash-drawer-shift) endpoint.
+* **v1 Transactions.BankAccounts:**
+ * The following endpoints are retired:
+ * `ListBankAccounts`: Use the Square Bank Accounts API [ListBankAccounts](https://developer.squareup.com/reference/square_2021-02-26/bank-accounts-api/list-bank-accounts) endpoint.
+ * `RetrieveBankAccount`: Use the Square Bank Accounts API [GetBankAccount](https://developer.squareup.com/reference/square_2021-02-26/bank-accounts-api/get-bank-account) endpoint.
+
+## SDKs
+
+* **All Square SDKs:**
+
+ By default, all SDKs send requests to Square's production (https://connect.squareup.com) or sandbox (https://connect.squareupsandbox.com) hosts based on the client's `environment` parameter.
+
+ You now have the option to use a custom URL instead. To use a custom URL, follow the example for your language to set the `environment` parameter to `custom` and the `customUrl` parameter to your URL:
+
+ - Java
+
+ ```java
+ new SquareClient.Builder()
+ .environment(Environment.CUSTOM)
+ .customUrl("https://example.com")
+ ```
+
+ - .NET
+
+ ```csharp
+ new Square.SquareClient.Builder()
+ .Environment(Environment.Custom)
+ .CustomUrl("https://example.com")
+ ```
+
+ - Node.js
+
+ ```javascript
+ new Client({
+ environment: Environment.Custom,
+ customUrl: 'https://example.com'
+ });
+ ```
+
+ - PHP
+
+ ```php
+ new Square\SquareClient([
+ 'environment' => Environment::CUSTOM,
+ 'customUrl' => 'https://example.com',
+ ]);
+ ```
+
+ - Python
+
+ ```python
+ Client(
+ environment = 'custom',
+ custom_url = 'https://example.com',)
+ ```
+
+ - Ruby
+
+ ```ruby
+ Square::Client.new(
+ environment: 'custom',
+ custom_url: 'https://example.com'
+ });
+ ```
+
+
+* **Square .NET SDK:**
+
+ Square has overridden the `Equals` and `GetHashCode` methods for models:
+
+ * In the `Equals` override, Square has implemented a field-level comparison.
+ * The Square `GetHashCode` override now ensures that hashes are deterministic and unique for each object.
+
+* **Square Node.js SDK:**
+
+ Endpoints that return 64-bit integers now return a `BigInt` object instead of a `Number` object.
+
+
+* **Connect Node.js SDK:** (deprecated)
+
+ The deprecated Connect Node.js SDK is in the security [maintenance state.](https://developer.squareup.com/docs/build-basics/api-lifecycle#maintenance) It does not receive any bug fixes or API updates from the Square version 2021-02-26 release. However, the SDK will receive support and security patches until it is retired (end of life) in the second quarter of 2021. For more information, including steps for migrating to the [Square Node.js SDK,](https://github.com/square/square-nodejs-sdk) see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md)
+
+## Documentation updates
+* **Catalog API:**
+ * [Update Catalog Objects.](https://developer.squareup.com/docs/catalog-api/update-catalog-objects) Provides programming guidance to update catalog objects.
+
+* **Inventory API:**
+ * [List or retrieve inventory.](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-items#list-or-retrieve-inventory) Migrate the retired v1 endpoint of `ListInventory` to the v2 endpoint of `BatchRetrieveInventoryCounts`. Compare and contrast the programming patterns between the v1 endpoint of `ListInventory` and its v2 counterparts of [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-02-26/inventory-api/batch-retrieve-inventory-counts) or [RetrieveInventoryCount](https://developer.squareup.com/reference/square_2021-02-26/inventory-api/retrieve-inventory-count).
+ * [Adjust or change inventory.](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-items#adjust-or-change-inventory) Migrate the retired v1 endpoint of `AdjustInventory` to the v2 endpoint of `BatchChangeInventory`. Compare and contrast the programming patterns between the v1 endpoint of `AdjustInventory` and its v2 counterparts of [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-02-26/inventory-api/batch-change-inventory).
+
+* **Get Started topic.** Revised the [Get Started](https://developer.squareup.com/docs/get-started) experience. In addition to clarifications, it now includes the use of the Square Sandbox and API Explorer. These are the tools and environments developers use to explore Square APIs.
+
+
+## Version 8.1.1 (2021-01-27T00:00)
+## SDKs
+* Fixed Node.js test `testCreateInvoice`. Uses `Invoice.delivery_method` instead of deprecated field `InvoicePaymentRequest.request_method`
+
+## Version 8.1.0 (2021-01-21T00:00)
+## Existing API updates
+
+* **Invoices API:** (beta)
+
+ The `InvoicePaymentRequest.request_method` field is deprecated, and its current options are separated into two new fields that better represent their scope:
+ * `Invoice.delivery_method` specifies how Square should send invoices, reminders, and receipts to the customer.
+ * `InvoicePaymentRequest.automatic_payment_source` specifies the payment method for an automatic payment.
+
+ As part of this change, the [InvoiceDeliveryMethod](https://developer.squareup.com/reference/square_2021-01-21/enums/InvoiceDeliveryMethod) and [InvoiceAutomaticPaymentSource](https://developer.squareup.com/reference/square_2021-01-21/enums/InvoiceAutomaticPaymentSource) enums are added and the `InvoiceRequestMethod` enum is deprecated.
+
+ The Invoices API will continue to accept `request_method` in create and update requests until the field is retired, but starting in this version, `request_method` is not included in returned `Invoice` objects. For more information, see the [migration notes.](https://developer.squareup.com/docs/invoices-api/overview#migrate-InvoicePaymentRequest.request_method)
+
+
+* **Locations API:**
+ * The [Locations.MCC](https://developer.squareup.com/reference/square_2021-01-21/objects/Location#definition__property-mcc) field is now updatable (beta). You can use the `UpdateLocation` endpoint to update the merchant category code (MCC) associated with a seller location. For more information, see [Initialize a merchant category code.](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code)
+
+
+
+
+## SDKs
+* **Connect Node.js SDK:** (deprecated)
+
+ The deprecated Connect Node.js SDK is in the security [maintenance state.](https://developer.squareup.com/docs/build-basics/api-lifecycle#maintenance) It will not receive any bug fixes or API updates from the Square version 2021-01-21 release. However, the SDK will receive support and security patches until it is retired (EOL) in Q2, 2021. For more information, including steps for migrating to the [Square Node.js SDK,](https://github.com/square/square-nodejs-sdk) see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md)
+
+## Documentation updates
+* **Catalog API:**
+ * The [Use Item Options to Manage Item Variations](https://developer.squareup.com/docs/catalog-api/item-options-migration) topic is added. It demonstrates how item variations are usually used and how item options can be used to enable random access to item variations.
+
+* **Inventory API:**
+ * The [Inventory API](inventory-api/what-it-does) content is updated. It provides clearer guidance about how to use the API, with a task-oriented TOC and improved code examples.
+
+
+
+## Version 8.0.0 (2020-12-16T00:00)
+## Existing API updates
+
+* **Orders API:**
+ * [OrderLineItemPricingBlocklists.](https://developer.squareup.com/reference/square_2020-12-16/objects/OrderLineItemPricingBlocklists) You can explicitly specify taxes and discounts in an order or automatically apply preconfigured taxes and discounts to an order. In addition, you can now block applying these taxes and discounts to a specific [OrderLineItem](https://developer.squareup.com/reference/square_2020-12-16/objects/OrderLineItem) in an [order](https://developer.squareup.com/reference/square_2020-12-16/objects/Order). You add the `pricing_blocklists` attribute to individual line items and specify the `blocked_discounts` and `blocked_taxes` that you do not want to apply. For more information, see [Apply Taxes and Discounts.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts) For example walkthroughs, see [Automatically Apply Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-discounts) and [Automatically Apply Taxes.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes)
+ * [OrderPricingOptions](https://developer.squareup.com/reference/square_2020-12-16/objects/OrderPricingOptions). Previously, the `pricing_options` field in an [order](https://developer.squareup.com/reference/square_2020-12-16/objects/OrderPricingOptions) supported only `auto_apply_discounts` to enable the automatic application of preconfigured discounts. Now it also supports `auto_apply_taxes` to enable the automatic application of preconfigured taxes. For more information, see [Automatically apply preconfigured catalog taxes or discounts.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts#automatically-apply-preconfigured-catalog-taxes-or-discounts)
+
+ * [OrderLineItemTax](https://developer.squareup.com/reference/square_2020-12-16/objects/OrderLineItemTax). It now includes the new `auto_applied` field. It indicates whether the tax was automatically applied using a preconfigured [CatalogTax](https://developer.squareup.com/reference/square_2020-12-16/objects/CatalogTax).
+
+
+* **Bookings API:**
+ * The [CancelBooking](https://developer.squareup.com/reference/square_2020-12-16/bookings-api/cancel-booking) endpoint supports canceling an accepted or pending booking.
+ * The [booking.created](https://developer.squareup.com/reference/square_2020-12-16/webhooks/booking.created) webhook event notifies when a new booking is created by calling the [CreateBooking](https://developer.squareup.com/reference/square_2020-12-16/bookings-api/cancel-booking) endpoint.
+ * The [booking.updated](https://developer.squareup.com/reference/square_2020-12-16/webhooks/booking.updated) webhook event notifies when an existing booking is updated.
+
+* **Catalog API:**
+ * [ListCatalog](https://developer.squareup.com/reference/square_2020-12-16/catalog-api/list-catalog), [RetrieveCatalogObject](https://developer.squareup.com/reference/square_2020-12-16/catalog-api/retrieve-catalog-object), and [BatchRetrieveCatalogObjects](https://developer.squareup.com/reference/square_2020-12-16/catalog-api/batch-retrieve-catalog-objects) now support the `catalog_version` filter to return catalog objects of the specified version.
+
+* **Customers API:**
+ * [SearchCustomers](https://developer.squareup.com/reference/square_2020-12-16/customers-api/search-customers) endpoint. The `email_address`, `group_ids`, `phone_number`, and `reference_id` query filters are now generally available (GA).
+ * The [Customer Groups](https://developer.squareup.com/reference/square_2020-12-16/customer-groups-api) API is now GA.
+ * The [Customer Segments](https://developer.squareup.com/reference/square_2020-12-16/customer-segments-api) API is now GA.
+
+
+* **Invoices API:** (beta)
+ * [Invoice](https://developer.squareup.com/reference/square_2020-12-16/objects/Invoice) object. Added the `custom_fields` field, which contains up to two customer-facing, seller-defined fields to display on the invoice. For more information, see [Custom fields.](https://developer.squareup.com/docs/invoices-api/overview#custom-fields)
+ As part of this change, the following objects are added:
+ * [InvoiceCustomField](https://developer.squareup.com/reference/square_2020-12-16/objects/InvoiceCustomField) object
+ * [InvoiceCustomFieldPlacement](https://developer.squareup.com/reference/square_2020-12-16/enums/InvoiceCustomFieldPlacement) enum
+ * [InvoiceRequestMethod](https://developer.squareup.com/reference/square_2020-12-16/enums/InvoiceRequestMethod) enum. Added the read-only CHARGE_BANK_ON_FILE value, which represents a bank transfer automatic payment method for a recurring invoice.
+
+
+* **Loyalty API:** (beta)
+ * [LoyaltyProgramRewardTier](https://developer.squareup.com/reference/square_2020-12-16/objects/LoyaltyProgramRewardTier) object. The `definition` field in this type is deprecated and replaced by the new `pricing_rule_reference` field. You can use `pricing_rule_reference` fields to retrieve catalog objects that define the discount details for the reward tier. For more information, see [Get discount details for a reward tier.](https://developer.squareup.com/docs/loyalty-api/overview#get-discount-details-for-a-reward-tier)
+ As part of this change, the following APIs are deprecated:
+ * [LoyaltyProgramRewardDefinition](https://developer.squareup.com/reference/square_2020-12-16/objects/LoyaltyProgramRewardDefinition) object
+ * [LoyaltyProgramRewardDefinitionScope](https://developer.squareup.com/reference/square_2020-12-16/enums/LoyaltyProgramRewardDefinitionScope) enum
+ * [LoyaltyProgramRewardDefinitionType](https://developer.squareup.com/reference/square_2020-12-16/enums/LoyaltyProgramRewardDefinitionType) enum
+
+## New SDK release
+* **Square Node.js SDK:**
+
+ The new [Square Node.js SDK](https://github.com/square/square-nodejs-sdk) is now GA and replaces the deprecated Connect Node.js SDK. For migration information, see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md)
+
+
+## Documentation updates
+
+* [Get Right-Sized Permissions with Down-Scoped OAuth Tokens.](https://developer.squareup.com/docs/oauth-api/cookbook/downscoped-access) This new OAuth API topic shows how to get an additional reduced-scope OAuth token with a 24-hour expiration by using the refresh token from the Square account authorization OAuth flow.
+
+
+## Version 7.0.0 (2020-11-18T00:00)
+## New API releases
+
+* **Bookings API** (beta). This API enables you, as an application developer, to create applications to set up and manage bookings for appointments of fixed duration in which selected staff members of a Square seller provide specified services in supported locations for particular customers.
+ * For an overview, see [Manage Bookings for Square Sellers](https://developer.squareup.com/docs/bookings-api/what-it-is).
+ * For technical reference, see [Bookings API](https://developer.squareup.com/reference/square_2020-11-18/bookings-api).
+
+## Existing API updates
+
+* **Payments API:**
+ * [Payment.](https://developer.squareup.com/reference/square_2020-11-18/objects/Payment) The object now includes the `risk_evaluation` field to identify the Square-assigned risk level associated with the payment. Sellers can use this information to provide the goods and services or refund the payment.
+
+## New SDK release
+* **New Square Node.js SDK (beta)**
+
+ The new [Square Node.js SDK](https://github.com/square/square-nodejs-sdk) is available in beta and will eventually replace the deprecated Connect Node.js SDK. For migration information, see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md) The following topics are updated to use the new SDK:
+ * [Walkthrough: Integrate Square Payments in a Website](https://developer.squareup.com/docs/payment-form/payment-form-walkthrough)
+ * [Verify the Buyer When Using a Nonce for an Online Payment](https://developer.squareup.com/docs/payment-form/cookbook/verify-buyer-on-card-charge)
+ * [Create a Gift Card Payment Endpoint](https://developer.squareup.com/docs/payment-form/gift-cards/part-2)
+
+
+## Documentation Updates
+
+* The **Testing** topics are moved from the end of the table of contents to the top, in the **Home** section under [Testing your App](https://developer.squareup.com/docs/testing-your-app).
+* [Pay for orders.]](https://developer.squareup.com/docs/orders-api/pay-for-order) Topic revised to add clarity when to use Payments API and Orders API to pay for an order. The [Orders Integration]](https://developer.squareup.com/docs/payments-api/take-payments?preview=true#orders-integration) topic in Payments API simplified accordingly.
diff --git a/legacy/README.md b/legacy/README.md
new file mode 100644
index 000000000..1f598e529
--- /dev/null
+++ b/legacy/README.md
@@ -0,0 +1,157 @@
+# Square Legacy Node.js SDK
+
+Use this JavaScript library to manage Square resources (such as payments, orders, items, and inventory) for your own Square account or on behalf of Square sellers.
+
+* [Requirements](#requirements)
+* [Installation](#installation)
+* [Quickstart](#quickstart)
+* [Usage](#usage)
+* [Tests](#tests)
+* [SDK Reference](#sdk-reference)
+* [Deprecated APIs](#deprecated-apis)
+
+## Requirements
+
+Use of the Square Node.js SDK requires:
+
+* Node.js 14 or higher
+
+This SDK supports Node.js versions that are either current, or that are in long-term support status (LTS). The SDK does not support Node.js versions that have reached their end-of-life (EOL). For more information on Node.js versioning, see .
+
+This SDK is for use with Node.js only. It does not support other usages, such as for web browsers or frontend applications.
+
+## Installation
+
+For more information, see [Set Up Your Square SDK for a Node.js Project](https://developer.squareup.com/docs/sdks/nodejs/setup-project).
+
+## Quickstart
+
+For more information, see [Square Node.js SDK Quickstart](https://developer.squareup.com/docs/sdks/nodejs/quick-start).
+
+## Usage
+For more information, see [Using the Square Node.js SDK](https://developer.squareup.com/docs/sdks/nodejs/using-nodejs-sdk).
+
+## SDK Reference
+
+### Payments
+* [Payments]
+* [Refunds]
+* [Disputes]
+* [Checkout]
+* [Apple Pay]
+* [Cards]
+* [Payouts]
+
+### Terminal
+* [Terminal]
+
+### Orders
+* [Orders]
+* [Order Custom Attributes]
+
+### Subscriptions
+* [Subscriptions]
+
+### Invoices
+* [Invoices]
+
+### Items
+* [Catalog]
+* [Inventory]
+
+### Customers
+* [Customers]
+* [Customer Groups]
+* [Customer Segments]
+
+### Loyalty
+* [Loyalty]
+
+### Gift Cards
+* [Gift Cards]
+* [Gift Card Activities]
+
+### Bookings
+* [Bookings]
+* [Booking Custom Attributes]
+
+### Business
+* [Merchants]
+* [Merchant Custom Attributes]
+* [Locations]
+* [Location Custom Attributes]
+* [Devices]
+* [Cash Drawers]
+
+### Team
+* [Team]
+* [Labor]
+
+### Financials
+* [Bank Accounts]
+
+### Online
+* [Sites]
+* [Snippets]
+
+### Authorization
+* [Mobile Authorization]
+* [OAuth]
+
+### Webhook Subscriptions
+* [Webhook Subscriptions]
+## Deprecated APIs
+
+The following Square APIs are [deprecated](https://developer.squareup.com/docs/build-basics/api-lifecycle):
+
+* [Employees] - replaced by the [Team] API. For more information, see [Migrate from the Employees API](https://developer.squareup.com/docs/team/migrate-from-v2-employees).
+
+* [Transactions] - replaced by the [Orders] and [Payments] APIs. For more information, see [Migrate from the Transactions API](https://developer.squareup.com/docs/payments-api/migrate-from-transactions-api).
+
+
+[Developer Dashboard]: https://developer.squareup.com/apps
+[Square API]: https://squareup.com/developers
+[sign up for a developer account]: https://squareup.com/signup?v=developers
+[Locations overview]: https://developer.squareup.com/docs/locations-api
+[OAuth overview]: https://developer.squareup.com/docs/oauth-api/overview
+[Client]: doc/client.md
+[Devices]: doc/api/devices.md
+[Disputes]: doc/api/disputes.md
+[Terminal]: doc/api/terminal.md
+[Team]: doc/api/team.md
+[Cash Drawers]: doc/api/cash-drawers.md
+[Vendors]: doc/api/vendors.md
+[Customer Groups]: doc/api/customer-groups.md
+[Customer Segments]: doc/api/customer-segments.md
+[Bank Accounts]: doc/api/bank-accounts.md
+[Payments]: doc/api/payments.md
+[Checkout]: doc/api/checkout.md
+[Catalog]: doc/api/catalog.md
+[Customers]: doc/api/customers.md
+[Customer Custom Attributes]: doc/api/customer-custom-attributes.md
+[Inventory]: doc/api/inventory.md
+[Labor]: doc/api/labor.md
+[Loyalty]: doc/api/loyalty.md
+[Bookings]: doc/api/bookings.md
+[Booking Custom Attributes]: doc/api/booking-custom-attributes.md
+[Locations]: doc/api/locations.md
+[Location Custom Attributes]: doc/api/location-custom-attributes.md
+[Merchants]: doc/api/merchants.md
+[Merchant Custom Attributes]: doc/api/merchant-custom-attributes.md
+[Orders]: doc/api/orders.md
+[Order Custom Attributes]: doc/api/order-custom-attributes.md
+[Invoices]: doc/api/invoices.md
+[Apple Pay]: doc/api/apple-pay.md
+[Refunds]: doc/api/refunds.md
+[Subscriptions]: doc/api/subscriptions.md
+[Mobile Authorization]: doc/api/mobile-authorization.md
+[OAuth]: doc/api/o-auth.md
+[Sites]: doc/api/sites.md
+[Snippets]: doc/api/snippets.md
+[Cards]: doc/api/cards.md
+[Payouts]: doc/api/payouts.md
+[Gift Cards]: doc/api/gift-cards.md
+[Gift Card Activities]: doc/api/gift-card-activities.md
+[Employees]: doc/api/employees.md
+[Transactions]: doc/api/transactions.md
+[Webhook Subscriptions]: doc/api/webhook-subscriptions.md
diff --git a/legacy/doc/api-error.md b/legacy/doc/api-error.md
new file mode 100644
index 000000000..60d30c4f4
--- /dev/null
+++ b/legacy/doc/api-error.md
@@ -0,0 +1,18 @@
+
+# ApiError
+
+Thrown when the HTTP status code is not okay.
+
+The ApiError extends the ApiResponse interface, so all ApiResponse properties are available.
+
+## Properties
+
+| Name | Type | Description |
+| --- | --- | --- |
+| request | HttpRequest | Original request that resulted in this response. |
+| statusCode | number | Response status code. |
+| headers | Record | Response headers. |
+| result | T | Response data. |
+| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |
+| errors? | Error[] | Represents an error encountered during a request to the Connect API |
+
diff --git a/legacy/doc/api-response.md b/legacy/doc/api-response.md
new file mode 100644
index 000000000..1e886c9e1
--- /dev/null
+++ b/legacy/doc/api-response.md
@@ -0,0 +1,15 @@
+
+# ApiResponse
+
+An interface for the result of an API call.
+
+## Properties
+
+| Name | Type | Description |
+| --- | --- | --- |
+| request | HttpRequest | Original request that resulted in this response. |
+| statusCode | number | Response status codee. |
+| headers | Record | Response headers. |
+| result | T | Response data. |
+| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |
+
diff --git a/legacy/doc/api/apple-pay.md b/legacy/doc/api/apple-pay.md
new file mode 100644
index 000000000..867c9b2de
--- /dev/null
+++ b/legacy/doc/api/apple-pay.md
@@ -0,0 +1,65 @@
+# Apple Pay
+
+```ts
+const applePayApi = client.applePayApi;
+```
+
+## Class Name
+
+`ApplePayApi`
+
+
+# Register Domain
+
+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).
+
+```ts
+async registerDomain(
+ body: RegisterDomainRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`RegisterDomainRequest`](../../doc/models/register-domain-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RegisterDomainResponse`](../../doc/models/register-domain-response.md)
+
+## Example Usage
+
+```ts
+const body: RegisterDomainRequest = {
+ domainName: 'example.com',
+};
+
+try {
+ const { result, ...httpResponse } = await applePayApi.registerDomain(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/bank-accounts.md b/legacy/doc/api/bank-accounts.md
new file mode 100644
index 000000000..7bfa7a63f
--- /dev/null
+++ b/legacy/doc/api/bank-accounts.md
@@ -0,0 +1,139 @@
+# Bank Accounts
+
+```ts
+const bankAccountsApi = client.bankAccountsApi;
+```
+
+## Class Name
+
+`BankAccountsApi`
+
+## Methods
+
+* [List Bank Accounts](../../doc/api/bank-accounts.md#list-bank-accounts)
+* [Get Bank Account by V1 Id](../../doc/api/bank-accounts.md#get-bank-account-by-v1-id)
+* [Get Bank Account](../../doc/api/bank-accounts.md#get-bank-account)
+
+
+# List Bank Accounts
+
+Returns a list of [BankAccount](../../doc/models/bank-account.md) objects linked to a Square account.
+
+```ts
+async listBankAccounts(
+ cursor?: string,
+ limit?: number,
+ locationId?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | Upper limit on the number of bank accounts to return in the response.
Currently, 1000 is the largest supported limit. You can specify a limit
of up to 1000 bank accounts. This is also the default limit. |
+| `locationId` | `string \| undefined` | Query, Optional | Location ID. You can specify this optional filter
to retrieve only the linked bank accounts belonging to a specific location. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListBankAccountsResponse`](../../doc/models/list-bank-accounts-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await bankAccountsApi.listBankAccounts();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Bank Account by V1 Id
+
+Returns details of a [BankAccount](../../doc/models/bank-account.md) identified by V1 bank account ID.
+
+```ts
+async getBankAccountByV1Id(
+ v1BankAccountId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `v1BankAccountId` | `string` | Template, Required | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetBankAccountByV1IdResponse`](../../doc/models/get-bank-account-by-v1-id-response.md)
+
+## Example Usage
+
+```ts
+const v1BankAccountId = 'v1_bank_account_id8';
+
+try {
+ const { result, ...httpResponse } = await bankAccountsApi.getBankAccountByV1Id(v1BankAccountId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Bank Account
+
+Returns details of a [BankAccount](../../doc/models/bank-account.md)
+linked to a Square account.
+
+```ts
+async getBankAccount(
+ bankAccountId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bankAccountId` | `string` | Template, Required | Square-issued ID of the desired `BankAccount`. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetBankAccountResponse`](../../doc/models/get-bank-account-response.md)
+
+## Example Usage
+
+```ts
+const bankAccountId = 'bank_account_id0';
+
+try {
+ const { result, ...httpResponse } = await bankAccountsApi.getBankAccount(bankAccountId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/booking-custom-attributes.md b/legacy/doc/api/booking-custom-attributes.md
new file mode 100644
index 000000000..c051cf499
--- /dev/null
+++ b/legacy/doc/api/booking-custom-attributes.md
@@ -0,0 +1,606 @@
+# Booking Custom Attributes
+
+```ts
+const bookingCustomAttributesApi = client.bookingCustomAttributesApi;
+```
+
+## Class Name
+
+`BookingCustomAttributesApi`
+
+## Methods
+
+* [List Booking Custom Attribute Definitions](../../doc/api/booking-custom-attributes.md#list-booking-custom-attribute-definitions)
+* [Create Booking Custom Attribute Definition](../../doc/api/booking-custom-attributes.md#create-booking-custom-attribute-definition)
+* [Delete Booking Custom Attribute Definition](../../doc/api/booking-custom-attributes.md#delete-booking-custom-attribute-definition)
+* [Retrieve Booking Custom Attribute Definition](../../doc/api/booking-custom-attributes.md#retrieve-booking-custom-attribute-definition)
+* [Update Booking Custom Attribute Definition](../../doc/api/booking-custom-attributes.md#update-booking-custom-attribute-definition)
+* [Bulk Delete Booking Custom Attributes](../../doc/api/booking-custom-attributes.md#bulk-delete-booking-custom-attributes)
+* [Bulk Upsert Booking Custom Attributes](../../doc/api/booking-custom-attributes.md#bulk-upsert-booking-custom-attributes)
+* [List Booking Custom Attributes](../../doc/api/booking-custom-attributes.md#list-booking-custom-attributes)
+* [Delete Booking Custom Attribute](../../doc/api/booking-custom-attributes.md#delete-booking-custom-attribute)
+* [Retrieve Booking Custom Attribute](../../doc/api/booking-custom-attributes.md#retrieve-booking-custom-attribute)
+* [Upsert Booking Custom Attribute](../../doc/api/booking-custom-attributes.md#upsert-booking-custom-attribute)
+
+
+# List Booking Custom Attribute Definitions
+
+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.
+
+```ts
+async listBookingCustomAttributeDefinitions(
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListBookingCustomAttributeDefinitionsResponse`](../../doc/models/list-booking-custom-attribute-definitions-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.listBookingCustomAttributeDefinitions();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Booking Custom Attribute Definition
+
+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*.
+
+```ts
+async createBookingCustomAttributeDefinition(
+ body: CreateBookingCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateBookingCustomAttributeDefinitionRequest`](../../doc/models/create-booking-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateBookingCustomAttributeDefinitionResponse`](../../doc/models/create-booking-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateBookingCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.createBookingCustomAttributeDefinition(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Booking Custom Attribute Definition
+
+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*.
+
+```ts
+async deleteBookingCustomAttributeDefinition(
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteBookingCustomAttributeDefinitionResponse`](../../doc/models/delete-booking-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.deleteBookingCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Booking Custom Attribute Definition
+
+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.
+
+```ts
+async retrieveBookingCustomAttributeDefinition(
+ key: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to retrieve. If the requesting application
is not the definition owner, you must use the qualified key. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveBookingCustomAttributeDefinitionResponse`](../../doc/models/retrieve-booking-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.retrieveBookingCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Booking Custom Attribute Definition
+
+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*.
+
+```ts
+async updateBookingCustomAttributeDefinition(
+ key: string,
+ body: UpdateBookingCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to update. |
+| `body` | [`UpdateBookingCustomAttributeDefinitionRequest`](../../doc/models/update-booking-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateBookingCustomAttributeDefinitionResponse`](../../doc/models/update-booking-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+const body: UpdateBookingCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.updateBookingCustomAttributeDefinition(
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Delete Booking Custom Attributes
+
+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*.
+
+```ts
+async bulkDeleteBookingCustomAttributes(
+ body: BulkDeleteBookingCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkDeleteBookingCustomAttributesRequest`](../../doc/models/bulk-delete-booking-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkDeleteBookingCustomAttributesResponse`](../../doc/models/bulk-delete-booking-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkDeleteBookingCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ bookingId: 'booking_id4',
+ key: 'key0',
+ },
+ 'key1': {
+ bookingId: 'booking_id4',
+ key: 'key0',
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.bulkDeleteBookingCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Upsert Booking Custom Attributes
+
+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*.
+
+```ts
+async bulkUpsertBookingCustomAttributes(
+ body: BulkUpsertBookingCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpsertBookingCustomAttributesRequest`](../../doc/models/bulk-upsert-booking-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpsertBookingCustomAttributesResponse`](../../doc/models/bulk-upsert-booking-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpsertBookingCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ bookingId: 'booking_id4',
+ customAttribute: {
+ },
+ },
+ 'key1': {
+ bookingId: 'booking_id4',
+ customAttribute: {
+ },
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.bulkUpsertBookingCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Booking Custom Attributes
+
+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.
+
+```ts
+async listBookingCustomAttributes(
+ bookingId: string,
+ limit?: number,
+ cursor?: string,
+ withDefinitions?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `withDefinitions` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListBookingCustomAttributesResponse`](../../doc/models/list-booking-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const withDefinitions = false;
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.listBookingCustomAttributes(
+ bookingId,
+ undefined,
+ undefined,
+ withDefinitions
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Booking Custom Attribute
+
+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*.
+
+```ts
+async deleteBookingCustomAttribute(
+ bookingId: string,
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
+| `key` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteBookingCustomAttributeResponse`](../../doc/models/delete-booking-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.deleteBookingCustomAttribute(
+ bookingId,
+ key
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Booking Custom Attribute
+
+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.
+
+```ts
+async retrieveBookingCustomAttribute(
+ bookingId: string,
+ key: string,
+ withDefinition?: boolean,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
+| `key` | `string` | Template, Required | 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. |
+| `withDefinition` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveBookingCustomAttributeResponse`](../../doc/models/retrieve-booking-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const key = 'key0';
+
+const withDefinition = false;
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.retrieveBookingCustomAttribute(
+ bookingId,
+ key,
+ withDefinition
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Booking Custom Attribute
+
+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*.
+
+```ts
+async upsertBookingCustomAttribute(
+ bookingId: string,
+ key: string,
+ body: UpsertBookingCustomAttributeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
+| `key` | `string` | Template, Required | 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` | [`UpsertBookingCustomAttributeRequest`](../../doc/models/upsert-booking-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertBookingCustomAttributeResponse`](../../doc/models/upsert-booking-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const key = 'key0';
+
+const body: UpsertBookingCustomAttributeRequest = {
+ customAttribute: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingCustomAttributesApi.upsertBookingCustomAttribute(
+ bookingId,
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/bookings.md b/legacy/doc/api/bookings.md
new file mode 100644
index 000000000..cfb229f45
--- /dev/null
+++ b/legacy/doc/api/bookings.md
@@ -0,0 +1,636 @@
+# Bookings
+
+```ts
+const bookingsApi = client.bookingsApi;
+```
+
+## Class Name
+
+`BookingsApi`
+
+## Methods
+
+* [List Bookings](../../doc/api/bookings.md#list-bookings)
+* [Create Booking](../../doc/api/bookings.md#create-booking)
+* [Search Availability](../../doc/api/bookings.md#search-availability)
+* [Bulk Retrieve Bookings](../../doc/api/bookings.md#bulk-retrieve-bookings)
+* [Retrieve Business Booking Profile](../../doc/api/bookings.md#retrieve-business-booking-profile)
+* [List Location Booking Profiles](../../doc/api/bookings.md#list-location-booking-profiles)
+* [Retrieve Location Booking Profile](../../doc/api/bookings.md#retrieve-location-booking-profile)
+* [List Team Member Booking Profiles](../../doc/api/bookings.md#list-team-member-booking-profiles)
+* [Bulk Retrieve Team Member Booking Profiles](../../doc/api/bookings.md#bulk-retrieve-team-member-booking-profiles)
+* [Retrieve Team Member Booking Profile](../../doc/api/bookings.md#retrieve-team-member-booking-profile)
+* [Retrieve Booking](../../doc/api/bookings.md#retrieve-booking)
+* [Update Booking](../../doc/api/bookings.md#update-booking)
+* [Cancel Booking](../../doc/api/bookings.md#cancel-booking)
+
+
+# List Bookings
+
+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.
+
+```ts
+async listBookings(
+ limit?: number,
+ cursor?: string,
+ customerId?: string,
+ teamMemberId?: string,
+ locationId?: string,
+ startAtMin?: string,
+ startAtMax?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of results per page to return in a paged response. |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `customerId` | `string \| undefined` | Query, Optional | The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved. |
+| `teamMemberId` | `string \| undefined` | Query, Optional | The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved. |
+| `locationId` | `string \| undefined` | Query, Optional | The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved. |
+| `startAtMin` | `string \| undefined` | Query, Optional | The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used. |
+| `startAtMax` | `string \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListBookingsResponse`](../../doc/models/list-bookings-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await bookingsApi.listBookings();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Booking
+
+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*.
+
+```ts
+async createBooking(
+ body: CreateBookingRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateBookingRequest`](../../doc/models/create-booking-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateBookingResponse`](../../doc/models/create-booking-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateBookingRequest = {
+ booking: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.createBooking(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Availability
+
+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.
+
+```ts
+async searchAvailability(
+ body: SearchAvailabilityRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchAvailabilityRequest`](../../doc/models/search-availability-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchAvailabilityResponse`](../../doc/models/search-availability-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchAvailabilityRequest = {
+ query: {
+ filter: {
+ startAtRange: {
+ },
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.searchAvailability(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Retrieve Bookings
+
+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.
+
+```ts
+async bulkRetrieveBookings(
+ body: BulkRetrieveBookingsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkRetrieveBookingsRequest`](../../doc/models/bulk-retrieve-bookings-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkRetrieveBookingsResponse`](../../doc/models/bulk-retrieve-bookings-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkRetrieveBookingsRequest = {
+ bookingIds: [
+ 'booking_ids8',
+ 'booking_ids9',
+ 'booking_ids0'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.bulkRetrieveBookings(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Business Booking Profile
+
+Retrieves a seller's booking profile.
+
+```ts
+async retrieveBusinessBookingProfile(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveBusinessBookingProfileResponse`](../../doc/models/retrieve-business-booking-profile-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await bookingsApi.retrieveBusinessBookingProfile();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Location Booking Profiles
+
+Lists location booking profiles of a seller.
+
+```ts
+async listLocationBookingProfiles(
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of results to return in a paged response. |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLocationBookingProfilesResponse`](../../doc/models/list-location-booking-profiles-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await bookingsApi.listLocationBookingProfiles();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Location Booking Profile
+
+Retrieves a seller's location booking profile.
+
+```ts
+async retrieveLocationBookingProfile(
+ locationId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the location to retrieve the booking profile. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLocationBookingProfileResponse`](../../doc/models/retrieve-location-booking-profile-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.retrieveLocationBookingProfile(locationId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Team Member Booking Profiles
+
+Lists booking profiles for team members.
+
+```ts
+async listTeamMemberBookingProfiles(
+ bookableOnly?: boolean,
+ limit?: number,
+ cursor?: string,
+ locationId?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookableOnly` | `boolean \| undefined` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).
**Default**: `false` |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of results to return in a paged response. |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `locationId` | `string \| undefined` | Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListTeamMemberBookingProfilesResponse`](../../doc/models/list-team-member-booking-profiles-response.md)
+
+## Example Usage
+
+```ts
+const bookableOnly = false;
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.listTeamMemberBookingProfiles(bookableOnly);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Retrieve Team Member Booking Profiles
+
+Retrieves one or more team members' booking profiles.
+
+```ts
+async bulkRetrieveTeamMemberBookingProfiles(
+ body: BulkRetrieveTeamMemberBookingProfilesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkRetrieveTeamMemberBookingProfilesRequest`](../../doc/models/bulk-retrieve-team-member-booking-profiles-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkRetrieveTeamMemberBookingProfilesResponse`](../../doc/models/bulk-retrieve-team-member-booking-profiles-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkRetrieveTeamMemberBookingProfilesRequest = {
+ teamMemberIds: [
+ 'team_member_ids3',
+ 'team_member_ids4',
+ 'team_member_ids5'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.bulkRetrieveTeamMemberBookingProfiles(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Team Member Booking Profile
+
+Retrieves a team member's booking profile.
+
+```ts
+async retrieveTeamMemberBookingProfile(
+ teamMemberId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `teamMemberId` | `string` | Template, Required | The ID of the team member to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveTeamMemberBookingProfileResponse`](../../doc/models/retrieve-team-member-booking-profile-response.md)
+
+## Example Usage
+
+```ts
+const teamMemberId = 'team_member_id0';
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.retrieveTeamMemberBookingProfile(teamMemberId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Booking
+
+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.
+
+```ts
+async retrieveBooking(
+ bookingId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-retrieved booking. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveBookingResponse`](../../doc/models/retrieve-booking-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.retrieveBooking(bookingId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Booking
+
+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*.
+
+```ts
+async updateBooking(
+ bookingId: string,
+ body: UpdateBookingRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-updated booking. |
+| `body` | [`UpdateBookingRequest`](../../doc/models/update-booking-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateBookingResponse`](../../doc/models/update-booking-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const body: UpdateBookingRequest = {
+ booking: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.updateBooking(
+ bookingId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Booking
+
+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*.
+
+```ts
+async cancelBooking(
+ bookingId: string,
+ body: CancelBookingRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-cancelled booking. |
+| `body` | [`CancelBookingRequest`](../../doc/models/cancel-booking-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelBookingResponse`](../../doc/models/cancel-booking-response.md)
+
+## Example Usage
+
+```ts
+const bookingId = 'booking_id4';
+
+const body: CancelBookingRequest = {
+};
+
+try {
+ const { result, ...httpResponse } = await bookingsApi.cancelBooking(
+ bookingId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/cards.md b/legacy/doc/api/cards.md
new file mode 100644
index 000000000..004664f10
--- /dev/null
+++ b/legacy/doc/api/cards.md
@@ -0,0 +1,207 @@
+# Cards
+
+```ts
+const cardsApi = client.cardsApi;
+```
+
+## Class Name
+
+`CardsApi`
+
+## Methods
+
+* [List Cards](../../doc/api/cards.md#list-cards)
+* [Create Card](../../doc/api/cards.md#create-card)
+* [Retrieve Card](../../doc/api/cards.md#retrieve-card)
+* [Disable Card](../../doc/api/cards.md#disable-card)
+
+
+# List Cards
+
+Retrieves a list of cards owned by the account making the request.
+A max of 25 cards will be returned.
+
+```ts
+async listCards(
+ cursor?: string,
+ customerId?: string,
+ includeDisabled?: boolean,
+ referenceId?: string,
+ sortOrder?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `customerId` | `string \| undefined` | Query, Optional | Limit results to cards associated with the customer supplied.
By default, all cards owned by the merchant are returned. |
+| `includeDisabled` | `boolean \| undefined` | Query, Optional | Includes disabled cards.
By default, all enabled cards owned by the merchant are returned.
**Default**: `false` |
+| `referenceId` | `string \| undefined` | Query, Optional | Limit results to cards associated with the reference_id supplied. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | Sorts the returned list by when the card was created with the specified order.
This field defaults to ASC. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCardsResponse`](../../doc/models/list-cards-response.md)
+
+## Example Usage
+
+```ts
+const includeDisabled = false;
+
+try {
+ const { result, ...httpResponse } = await cardsApi.listCards(
+ undefined,
+ undefined,
+ includeDisabled
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Card
+
+Adds a card on file to an existing merchant.
+
+```ts
+async createCard(
+ body: CreateCardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateCardRequest`](../../doc/models/create-card-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCardResponse`](../../doc/models/create-card-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateCardRequest = {
+ idempotencyKey: '4935a656-a929-4792-b97c-8848be85c27c',
+ sourceId: 'cnon:uIbfJXhXETSP197M3GB',
+ card: {
+ cardholderName: 'Amelia Earhart',
+ billingAddress: {
+ addressLine1: '500 Electric Ave',
+ addressLine2: 'Suite 600',
+ locality: 'New York',
+ administrativeDistrictLevel1: 'NY',
+ postalCode: '10003',
+ country: 'US',
+ },
+ customerId: 'VDKXEEKPJN48QDG3BGGFAK05P8',
+ referenceId: 'user-id-1',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await cardsApi.createCard(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Card
+
+Retrieves details for a specific Card.
+
+```ts
+async retrieveCard(
+ cardId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cardId` | `string` | Template, Required | Unique ID for the desired Card. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCardResponse`](../../doc/models/retrieve-card-response.md)
+
+## Example Usage
+
+```ts
+const cardId = 'card_id4';
+
+try {
+ const { result, ...httpResponse } = await cardsApi.retrieveCard(cardId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Disable Card
+
+Disables the card, preventing any further updates or charges.
+Disabling an already disabled card is allowed but has no effect.
+
+```ts
+async disableCard(
+ cardId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cardId` | `string` | Template, Required | Unique ID for the desired Card. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DisableCardResponse`](../../doc/models/disable-card-response.md)
+
+## Example Usage
+
+```ts
+const cardId = 'card_id4';
+
+try {
+ const { result, ...httpResponse } = await cardsApi.disableCard(cardId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/cash-drawers.md b/legacy/doc/api/cash-drawers.md
new file mode 100644
index 000000000..fdafbe0ce
--- /dev/null
+++ b/legacy/doc/api/cash-drawers.md
@@ -0,0 +1,166 @@
+# Cash Drawers
+
+```ts
+const cashDrawersApi = client.cashDrawersApi;
+```
+
+## Class Name
+
+`CashDrawersApi`
+
+## Methods
+
+* [List Cash Drawer Shifts](../../doc/api/cash-drawers.md#list-cash-drawer-shifts)
+* [Retrieve Cash Drawer Shift](../../doc/api/cash-drawers.md#retrieve-cash-drawer-shift)
+* [List Cash Drawer Shift Events](../../doc/api/cash-drawers.md#list-cash-drawer-shift-events)
+
+
+# List Cash Drawer Shifts
+
+Provides the details for all of the cash drawer shifts for a location
+in a date range.
+
+```ts
+async listCashDrawerShifts(
+ locationId: string,
+ sortOrder?: string,
+ beginTime?: string,
+ endTime?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Query, Required | The ID of the location to query for a list of cash drawer shifts. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | The order in which cash drawer shifts are listed in the response,
based on their opened_at field. Default value: ASC |
+| `beginTime` | `string \| undefined` | Query, Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. |
+| `endTime` | `string \| undefined` | Query, Optional | The exclusive end date of the query on opened_at, in ISO 8601 format. |
+| `limit` | `number \| undefined` | Query, Optional | Number of cash drawer shift events in a page of results (200 by
default, 1000 max). |
+| `cursor` | `string \| undefined` | Query, Optional | Opaque cursor for fetching the next page of results. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCashDrawerShiftsResponse`](../../doc/models/list-cash-drawer-shifts-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+try {
+ const { result, ...httpResponse } = await cashDrawersApi.listCashDrawerShifts(locationId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Cash Drawer Shift
+
+Provides the summary details for a single cash drawer shift. See
+[ListCashDrawerShiftEvents](../../doc/api/cash-drawers.md#list-cash-drawer-shift-events) for a list of cash drawer shift events.
+
+```ts
+async retrieveCashDrawerShift(
+ locationId: string,
+ shiftId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Query, Required | The ID of the location to retrieve cash drawer shifts from. |
+| `shiftId` | `string` | Template, Required | The shift ID. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCashDrawerShiftResponse`](../../doc/models/retrieve-cash-drawer-shift-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const shiftId = 'shift_id0';
+
+try {
+ const { result, ...httpResponse } = await cashDrawersApi.retrieveCashDrawerShift(
+ locationId,
+ shiftId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Cash Drawer Shift Events
+
+Provides a paginated list of events for a single cash drawer shift.
+
+```ts
+async listCashDrawerShiftEvents(
+ locationId: string,
+ shiftId: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Query, Required | The ID of the location to list cash drawer shifts for. |
+| `shiftId` | `string` | Template, Required | The shift ID. |
+| `limit` | `number \| undefined` | Query, Optional | Number of resources to be returned in a page of results (200 by
default, 1000 max). |
+| `cursor` | `string \| undefined` | Query, Optional | Opaque cursor for fetching the next page of results. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCashDrawerShiftEventsResponse`](../../doc/models/list-cash-drawer-shift-events-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const shiftId = 'shift_id0';
+
+try {
+ const { result, ...httpResponse } = await cashDrawersApi.listCashDrawerShiftEvents(
+ locationId,
+ shiftId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/catalog.md b/legacy/doc/api/catalog.md
new file mode 100644
index 000000000..65015c855
--- /dev/null
+++ b/legacy/doc/api/catalog.md
@@ -0,0 +1,936 @@
+# Catalog
+
+```ts
+const catalogApi = client.catalogApi;
+```
+
+## Class Name
+
+`CatalogApi`
+
+## Methods
+
+* [Batch Delete Catalog Objects](../../doc/api/catalog.md#batch-delete-catalog-objects)
+* [Batch Retrieve Catalog Objects](../../doc/api/catalog.md#batch-retrieve-catalog-objects)
+* [Batch Upsert Catalog Objects](../../doc/api/catalog.md#batch-upsert-catalog-objects)
+* [Create Catalog Image](../../doc/api/catalog.md#create-catalog-image)
+* [Update Catalog Image](../../doc/api/catalog.md#update-catalog-image)
+* [Catalog Info](../../doc/api/catalog.md#catalog-info)
+* [List Catalog](../../doc/api/catalog.md#list-catalog)
+* [Upsert Catalog Object](../../doc/api/catalog.md#upsert-catalog-object)
+* [Delete Catalog Object](../../doc/api/catalog.md#delete-catalog-object)
+* [Retrieve Catalog Object](../../doc/api/catalog.md#retrieve-catalog-object)
+* [Search Catalog Objects](../../doc/api/catalog.md#search-catalog-objects)
+* [Search Catalog Items](../../doc/api/catalog.md#search-catalog-items)
+* [Update Item Modifier Lists](../../doc/api/catalog.md#update-item-modifier-lists)
+* [Update Item Taxes](../../doc/api/catalog.md#update-item-taxes)
+
+
+# Batch Delete Catalog Objects
+
+Deletes a set of [CatalogItem](../../doc/models/catalog-item.md)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](../../doc/models/catalog-item-variation.md)
+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.
+
+```ts
+async batchDeleteCatalogObjects(
+ body: BatchDeleteCatalogObjectsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchDeleteCatalogObjectsRequest`](../../doc/models/batch-delete-catalog-objects-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchDeleteCatalogObjectsResponse`](../../doc/models/batch-delete-catalog-objects-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchDeleteCatalogObjectsRequest = {
+ objectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI',
+ 'AA27W3M2GGTF3H6AVPNB77CK'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.batchDeleteCatalogObjects(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Retrieve Catalog Objects
+
+Returns a set of objects based on the provided ID.
+Each [CatalogItem](../../doc/models/catalog-item.md) returned in the set includes all of its
+child information including: all of its
+[CatalogItemVariation](../../doc/models/catalog-item-variation.md) objects, references to
+its [CatalogModifierList](../../doc/models/catalog-modifier-list.md) objects, and the ids of
+any [CatalogTax](../../doc/models/catalog-tax.md) objects that apply to it.
+
+```ts
+async batchRetrieveCatalogObjects(
+ body: BatchRetrieveCatalogObjectsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveCatalogObjectsRequest`](../../doc/models/batch-retrieve-catalog-objects-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveCatalogObjectsResponse`](../../doc/models/batch-retrieve-catalog-objects-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveCatalogObjectsRequest = {
+ objectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI',
+ 'AA27W3M2GGTF3H6AVPNB77CK'
+ ],
+ includeRelatedObjects: true,
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.batchRetrieveCatalogObjects(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Upsert Catalog Objects
+
+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.
+
+```ts
+async batchUpsertCatalogObjects(
+ body: BatchUpsertCatalogObjectsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchUpsertCatalogObjectsRequest`](../../doc/models/batch-upsert-catalog-objects-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchUpsertCatalogObjectsResponse`](../../doc/models/batch-upsert-catalog-objects-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchUpsertCatalogObjectsRequest = {
+ idempotencyKey: '789ff020-f723-43a9-b4b5-43b5dc1fa3dc',
+ batches: [
+ {
+ objects: [
+ {
+ type: 'ITEM',
+ id: '#Tea',
+ presentAtAllLocations: true,
+ itemData: {
+ name: 'Tea',
+ taxIds: [
+ '#SalesTax'
+ ],
+ variations: [
+ {
+ type: 'ITEM_VARIATION',
+ id: '#Tea_Mug',
+ presentAtAllLocations: true,
+ itemVariationData: {
+ itemId: '#Tea',
+ name: 'Mug',
+ pricingType: 'FIXED_PRICING',
+ priceMoney: {
+ amount: BigInt(150),
+ currency: 'USD',
+ },
+ },
+ }
+ ],
+ categories: [
+ {
+ id: '#Beverages',
+ }
+ ],
+ descriptionHtml: 'Hot Leaf Juice
',
+ },
+ },
+ {
+ type: 'ITEM',
+ id: '#Coffee',
+ presentAtAllLocations: true,
+ itemData: {
+ name: 'Coffee',
+ taxIds: [
+ '#SalesTax'
+ ],
+ variations: [
+ {
+ type: 'ITEM_VARIATION',
+ id: '#Coffee_Regular',
+ presentAtAllLocations: true,
+ itemVariationData: {
+ itemId: '#Coffee',
+ name: 'Regular',
+ pricingType: 'FIXED_PRICING',
+ priceMoney: {
+ amount: BigInt(250),
+ currency: 'USD',
+ },
+ },
+ },
+ {
+ type: 'ITEM_VARIATION',
+ id: '#Coffee_Large',
+ presentAtAllLocations: true,
+ itemVariationData: {
+ itemId: '#Coffee',
+ name: 'Large',
+ pricingType: 'FIXED_PRICING',
+ priceMoney: {
+ amount: BigInt(350),
+ currency: 'USD',
+ },
+ },
+ }
+ ],
+ categories: [
+ {
+ id: '#Beverages',
+ }
+ ],
+ descriptionHtml: 'Hot Bean Juice
',
+ },
+ },
+ {
+ type: 'CATEGORY',
+ id: '#Beverages',
+ presentAtAllLocations: true,
+ categoryData: {
+ name: 'Beverages',
+ },
+ },
+ {
+ type: 'TAX',
+ id: '#SalesTax',
+ presentAtAllLocations: true,
+ taxData: {
+ name: 'Sales Tax',
+ calculationPhase: 'TAX_SUBTOTAL_PHASE',
+ inclusionType: 'ADDITIVE',
+ percentage: '5.0',
+ appliesToCustomAmounts: true,
+ enabled: true,
+ },
+ }
+ ],
+ }
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.batchUpsertCatalogObjects(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Catalog Image
+
+Uploads an image file to be represented by a [CatalogImage](../../doc/models/catalog-image.md) object that can be linked to an existing
+[CatalogObject](../../doc/models/catalog-object.md) 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.
+
+```ts
+async createCatalogImage(
+ request?: CreateCatalogImageRequest,
+ imageFile?: FileWrapper,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `request` | [`CreateCatalogImageRequest \| undefined`](../../doc/models/create-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
+| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCatalogImageResponse`](../../doc/models/create-catalog-image-response.md)
+
+## Example Usage
+
+```ts
+const request: CreateCatalogImageRequest = {
+ idempotencyKey: '528dea59-7bfb-43c1-bd48-4a6bba7dd61f86',
+ image: {
+ type: 'IMAGE',
+ id: '#TEMP_ID',
+ imageData: {
+ caption: 'A picture of a cup of coffee',
+ },
+ },
+ objectId: 'ND6EA5AAJEO5WL3JNNIAQA32',
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.createCatalogImage(request);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Catalog Image
+
+Uploads a new image file to replace the existing one in the specified [CatalogImage](../../doc/models/catalog-image.md) 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.
+
+```ts
+async updateCatalogImage(
+ imageId: string,
+ request?: UpdateCatalogImageRequest,
+ imageFile?: FileWrapper,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `imageId` | `string` | Template, Required | The ID of the `CatalogImage` object to update the encapsulated image file. |
+| `request` | [`UpdateCatalogImageRequest \| undefined`](../../doc/models/update-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
+| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateCatalogImageResponse`](../../doc/models/update-catalog-image-response.md)
+
+## Example Usage
+
+```ts
+const imageId = 'image_id4';
+
+const request: UpdateCatalogImageRequest = {
+ idempotencyKey: '528dea59-7bfb-43c1-bd48-4a6bba7dd61f86',
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.updateCatalogImage(
+ imageId,
+ request
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Catalog Info
+
+Retrieves information about the Square Catalog API, such as batch size
+limits that can be used by the `BatchUpsertCatalogObjects` endpoint.
+
+```ts
+async catalogInfo(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CatalogInfoResponse`](../../doc/models/catalog-info-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await catalogApi.catalogInfo();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Catalog
+
+Returns a list of all [CatalogObject](../../doc/models/catalog-object.md)s of the specified types in the catalog.
+
+The `types` parameter is specified as a comma-separated list of the [CatalogObjectType](../../doc/models/catalog-object-type.md) 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](../../doc/api/catalog.md#search-catalog-objects)
+and set the `include_deleted_objects` attribute value to `true`.
+
+```ts
+async listCatalog(
+ cursor?: string,
+ types?: string,
+ catalogVersion?: bigint,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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. |
+| `catalogVersion` | `bigint \| undefined` | Query, Optional | 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](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will be from the
current version of the catalog. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCatalogResponse`](../../doc/models/list-catalog-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await catalogApi.listCatalog();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Catalog Object
+
+Creates a new or updates the specified [CatalogObject](../../doc/models/catalog-object.md).
+
+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.
+
+```ts
+async upsertCatalogObject(
+ body: UpsertCatalogObjectRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`UpsertCatalogObjectRequest`](../../doc/models/upsert-catalog-object-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertCatalogObjectResponse`](../../doc/models/upsert-catalog-object-response.md)
+
+## Example Usage
+
+```ts
+const body: UpsertCatalogObjectRequest = {
+ idempotencyKey: 'af3d1afc-7212-4300-b463-0bfc5314a5ae',
+ object: {
+ type: 'ITEM',
+ id: '#Cocoa',
+ itemData: {
+ name: 'Cocoa',
+ abbreviation: 'Ch',
+ variations: [
+ {
+ type: 'ITEM_VARIATION',
+ id: '#Small',
+ itemVariationData: {
+ itemId: '#Cocoa',
+ name: 'Small',
+ pricingType: 'VARIABLE_PRICING',
+ },
+ },
+ {
+ type: 'ITEM_VARIATION',
+ id: '#Large',
+ itemVariationData: {
+ itemId: '#Cocoa',
+ name: 'Large',
+ pricingType: 'FIXED_PRICING',
+ priceMoney: {
+ amount: BigInt(400),
+ currency: 'USD',
+ },
+ },
+ }
+ ],
+ descriptionHtml: 'Hot Chocolate
',
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.upsertCatalogObject(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Catalog Object
+
+Deletes a single [CatalogObject](../../doc/models/catalog-object.md) 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](../../doc/models/catalog-item.md)
+will also delete all of its
+[CatalogItemVariation](../../doc/models/catalog-item-variation.md) 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.
+
+```ts
+async deleteCatalogObject(
+ objectId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `objectId` | `string` | Template, Required | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCatalogObjectResponse`](../../doc/models/delete-catalog-object-response.md)
+
+## Example Usage
+
+```ts
+const objectId = 'object_id8';
+
+try {
+ const { result, ...httpResponse } = await catalogApi.deleteCatalogObject(objectId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Catalog Object
+
+Returns a single [CatalogItem](../../doc/models/catalog-item.md) as a
+[CatalogObject](../../doc/models/catalog-object.md) based on the provided ID. The returned
+object includes all of the relevant [CatalogItem](../../doc/models/catalog-item.md)
+information including: [CatalogItemVariation](../../doc/models/catalog-item-variation.md)
+children, references to its
+[CatalogModifierList](../../doc/models/catalog-modifier-list.md) objects, and the ids of
+any [CatalogTax](../../doc/models/catalog-tax.md) objects that apply to it.
+
+```ts
+async retrieveCatalogObject(
+ objectId: string,
+ includeRelatedObjects?: boolean,
+ catalogVersion?: bigint,
+ includeCategoryPathToRoot?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `objectId` | `string` | Template, Required | The object ID of any type of catalog objects to be retrieved. |
+| `includeRelatedObjects` | `boolean \| undefined` | Query, Optional | 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`
**Default**: `false` |
+| `catalogVersion` | `bigint \| undefined` | Query, Optional | 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](../../doc/models/catalog-object.md)s. If not included, results will
be from the current version of the catalog. |
+| `includeCategoryPathToRoot` | `boolean \| undefined` | Query, Optional | 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.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCatalogObjectResponse`](../../doc/models/retrieve-catalog-object-response.md)
+
+## Example Usage
+
+```ts
+const objectId = 'object_id8';
+
+const includeRelatedObjects = false;
+
+const includeCategoryPathToRoot = false;
+
+try {
+ const { result, ...httpResponse } = await catalogApi.retrieveCatalogObject(
+ objectId,
+ includeRelatedObjects,
+ undefined,
+ includeCategoryPathToRoot
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Catalog Objects
+
+Searches for [CatalogObject](../../doc/models/catalog-object.md) 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](../../doc/api/catalog.md#search-catalog-items)
+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.
+
+```ts
+async searchCatalogObjects(
+ body: SearchCatalogObjectsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchCatalogObjectsRequest`](../../doc/models/search-catalog-objects-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchCatalogObjectsResponse`](../../doc/models/search-catalog-objects-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchCatalogObjectsRequest = {
+ objectTypes: [
+ 'ITEM'
+ ],
+ query: {
+ prefixQuery: {
+ attributeName: 'name',
+ attributePrefix: 'tea',
+ },
+ },
+ limit: 100,
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.searchCatalogObjects(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Catalog Items
+
+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](../../doc/api/catalog.md#search-catalog-objects)
+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.
+
+```ts
+async searchCatalogItems(
+ body: SearchCatalogItemsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchCatalogItemsRequest`](../../doc/models/search-catalog-items-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchCatalogItemsResponse`](../../doc/models/search-catalog-items-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchCatalogItemsRequest = {
+ textFilter: 'red',
+ categoryIds: [
+ 'WINE_CATEGORY_ID'
+ ],
+ stockLevels: [
+ 'OUT',
+ 'LOW'
+ ],
+ enabledLocationIds: [
+ 'ATL_LOCATION_ID'
+ ],
+ limit: 100,
+ sortOrder: 'ASC',
+ productTypes: [
+ 'REGULAR'
+ ],
+ customAttributeFilters: [
+ {
+ customAttributeDefinitionId: 'VEGAN_DEFINITION_ID',
+ boolFilter: true,
+ },
+ {
+ customAttributeDefinitionId: 'BRAND_DEFINITION_ID',
+ stringFilter: 'Dark Horse',
+ },
+ {
+ key: 'VINTAGE',
+ numberFilter: {
+ min: '2017',
+ max: '2018',
+ },
+ },
+ {
+ customAttributeDefinitionId: 'VARIETAL_DEFINITION_ID',
+ }
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.searchCatalogItems(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Item Modifier Lists
+
+Updates the [CatalogModifierList](../../doc/models/catalog-modifier-list.md) objects
+that apply to the targeted [CatalogItem](../../doc/models/catalog-item.md) without having
+to perform an upsert on the entire item.
+
+```ts
+async updateItemModifierLists(
+ body: UpdateItemModifierListsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`UpdateItemModifierListsRequest`](../../doc/models/update-item-modifier-lists-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateItemModifierListsResponse`](../../doc/models/update-item-modifier-lists-response.md)
+
+## Example Usage
+
+```ts
+const body: UpdateItemModifierListsRequest = {
+ itemIds: [
+ 'H42BRLUJ5KTZTTMPVSLFAACQ',
+ '2JXOBJIHCWBQ4NZ3RIXQGJA6'
+ ],
+ modifierListsToEnable: [
+ 'H42BRLUJ5KTZTTMPVSLFAACQ',
+ '2JXOBJIHCWBQ4NZ3RIXQGJA6'
+ ],
+ modifierListsToDisable: [
+ '7WRC16CJZDVLSNDQ35PP6YAD'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.updateItemModifierLists(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Item Taxes
+
+Updates the [CatalogTax](../../doc/models/catalog-tax.md) objects that apply to the
+targeted [CatalogItem](../../doc/models/catalog-item.md) without having to perform an
+upsert on the entire item.
+
+```ts
+async updateItemTaxes(
+ body: UpdateItemTaxesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`UpdateItemTaxesRequest`](../../doc/models/update-item-taxes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateItemTaxesResponse`](../../doc/models/update-item-taxes-response.md)
+
+## Example Usage
+
+```ts
+const body: UpdateItemTaxesRequest = {
+ itemIds: [
+ 'H42BRLUJ5KTZTTMPVSLFAACQ',
+ '2JXOBJIHCWBQ4NZ3RIXQGJA6'
+ ],
+ taxesToEnable: [
+ '4WRCNHCJZDVLSNDQ35PP6YAD'
+ ],
+ taxesToDisable: [
+ 'AQCEGCEBBQONINDOHRGZISEX'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await catalogApi.updateItemTaxes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/checkout.md b/legacy/doc/api/checkout.md
new file mode 100644
index 000000000..47f9faafc
--- /dev/null
+++ b/legacy/doc/api/checkout.md
@@ -0,0 +1,561 @@
+# Checkout
+
+```ts
+const checkoutApi = client.checkoutApi;
+```
+
+## Class Name
+
+`CheckoutApi`
+
+## Methods
+
+* [Create Checkout](../../doc/api/checkout.md#create-checkout)
+* [Retrieve Location Settings](../../doc/api/checkout.md#retrieve-location-settings)
+* [Update Location Settings](../../doc/api/checkout.md#update-location-settings)
+* [Retrieve Merchant Settings](../../doc/api/checkout.md#retrieve-merchant-settings)
+* [Update Merchant Settings](../../doc/api/checkout.md#update-merchant-settings)
+* [List Payment Links](../../doc/api/checkout.md#list-payment-links)
+* [Create Payment Link](../../doc/api/checkout.md#create-payment-link)
+* [Delete Payment Link](../../doc/api/checkout.md#delete-payment-link)
+* [Retrieve Payment Link](../../doc/api/checkout.md#retrieve-payment-link)
+* [Update Payment Link](../../doc/api/checkout.md#update-payment-link)
+
+
+# Create Checkout
+
+**This endpoint is deprecated.**
+
+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).
+
+```ts
+async createCheckout(
+ locationId: string,
+ body: CreateCheckoutRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the business location to associate the checkout with. |
+| `body` | [`CreateCheckoutRequest`](../../doc/models/create-checkout-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCheckoutResponse`](../../doc/models/create-checkout-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const body: CreateCheckoutRequest = {
+ idempotencyKey: '86ae1696-b1e3-4328-af6d-f1e04d947ad6',
+ order: {
+ order: {
+ locationId: 'location_id',
+ referenceId: 'reference_id',
+ customerId: 'customer_id',
+ lineItems: [
+ {
+ quantity: '2',
+ name: 'Printed T Shirt',
+ appliedTaxes: [
+ {
+ taxUid: '38ze1696-z1e3-5628-af6d-f1e04d947fg3',
+ }
+ ],
+ appliedDiscounts: [
+ {
+ discountUid: '56ae1696-z1e3-9328-af6d-f1e04d947gd4',
+ }
+ ],
+ basePriceMoney: {
+ amount: BigInt(1500),
+ currency: 'USD',
+ },
+ },
+ {
+ quantity: '1',
+ name: 'Slim Jeans',
+ basePriceMoney: {
+ amount: BigInt(2500),
+ currency: 'USD',
+ },
+ },
+ {
+ quantity: '3',
+ name: 'Woven Sweater',
+ basePriceMoney: {
+ amount: BigInt(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',
+ amountMoney: {
+ amount: BigInt(100),
+ currency: 'USD',
+ },
+ scope: 'LINE_ITEM',
+ }
+ ],
+ },
+ idempotencyKey: '12ae1696-z1e3-4328-af6d-f1e04d947gd4',
+ },
+ askForShippingAddress: true,
+ merchantSupportEmail: 'merchant+support@website.com',
+ prePopulateBuyerEmail: 'example@email.com',
+ prePopulateShippingAddress: {
+ addressLine1: '1455 Market St.',
+ addressLine2: 'Suite 600',
+ locality: 'San Francisco',
+ administrativeDistrictLevel1: 'CA',
+ postalCode: '94103',
+ country: 'US',
+ firstName: 'Jane',
+ lastName: 'Doe',
+ },
+ redirectUrl: 'https://merchant.website.com/order-confirm',
+ additionalRecipients: [
+ {
+ locationId: '057P5VYJ4A5X1',
+ description: 'Application fees',
+ amountMoney: {
+ amount: BigInt(60),
+ currency: 'USD',
+ },
+ }
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.createCheckout(
+ locationId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Location Settings
+
+Retrieves the location-level settings for a Square-hosted checkout page.
+
+```ts
+async retrieveLocationSettings(
+ locationId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the location for which to retrieve settings. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLocationSettingsResponse`](../../doc/models/retrieve-location-settings-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.retrieveLocationSettings(locationId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Location Settings
+
+Updates the location-level settings for a Square-hosted checkout page.
+
+```ts
+async updateLocationSettings(
+ locationId: string,
+ body: UpdateLocationSettingsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the location for which to retrieve settings. |
+| `body` | [`UpdateLocationSettingsRequest`](../../doc/models/update-location-settings-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateLocationSettingsResponse`](../../doc/models/update-location-settings-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const body: UpdateLocationSettingsRequest = {
+ locationSettings: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.updateLocationSettings(
+ locationId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Merchant Settings
+
+Retrieves the merchant-level settings for a Square-hosted checkout page.
+
+```ts
+async retrieveMerchantSettings(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveMerchantSettingsResponse`](../../doc/models/retrieve-merchant-settings-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await checkoutApi.retrieveMerchantSettings();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Merchant Settings
+
+Updates the merchant-level settings for a Square-hosted checkout page.
+
+```ts
+async updateMerchantSettings(
+ body: UpdateMerchantSettingsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`UpdateMerchantSettingsRequest`](../../doc/models/update-merchant-settings-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateMerchantSettingsResponse`](../../doc/models/update-merchant-settings-response.md)
+
+## Example Usage
+
+```ts
+const body: UpdateMerchantSettingsRequest = {
+ merchantSettings: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.updateMerchantSettings(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Payment Links
+
+Lists all payment links.
+
+```ts
+async listPaymentLinks(
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListPaymentLinksResponse`](../../doc/models/list-payment-links-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await checkoutApi.listPaymentLinks();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Payment Link
+
+Creates a Square-hosted checkout page. Applications can share the resulting payment link with their buyer to pay for goods and services.
+
+```ts
+async createPaymentLink(
+ body: CreatePaymentLinkRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreatePaymentLinkRequest`](../../doc/models/create-payment-link-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreatePaymentLinkResponse`](../../doc/models/create-payment-link-response.md)
+
+## Example Usage
+
+```ts
+const body: CreatePaymentLinkRequest = {
+ idempotencyKey: 'cd9e25dc-d9f2-4430-aedb-61605070e95f',
+ quickPay: {
+ name: 'Auto Detailing',
+ priceMoney: {
+ amount: BigInt(10000),
+ currency: 'USD',
+ },
+ locationId: 'A9Y43N9ABXZBP',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.createPaymentLink(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Payment Link
+
+Deletes a payment link.
+
+```ts
+async deletePaymentLink(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the payment link to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeletePaymentLinkResponse`](../../doc/models/delete-payment-link-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.deletePaymentLink(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Payment Link
+
+Retrieves a payment link.
+
+```ts
+async retrievePaymentLink(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of link to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrievePaymentLinkResponse`](../../doc/models/retrieve-payment-link-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.retrievePaymentLink(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Payment Link
+
+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.
+
+```ts
+async updatePaymentLink(
+ id: string,
+ body: UpdatePaymentLinkRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the payment link to update. |
+| `body` | [`UpdatePaymentLinkRequest`](../../doc/models/update-payment-link-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdatePaymentLinkResponse`](../../doc/models/update-payment-link-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+const body: UpdatePaymentLinkRequest = {
+ paymentLink: {
+ version: 1,
+ checkoutOptions: {
+ askForShippingAddress: true,
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await checkoutApi.updatePaymentLink(
+ id,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/customer-custom-attributes.md b/legacy/doc/api/customer-custom-attributes.md
new file mode 100644
index 000000000..b6c2b9b96
--- /dev/null
+++ b/legacy/doc/api/customer-custom-attributes.md
@@ -0,0 +1,575 @@
+# Customer Custom Attributes
+
+```ts
+const customerCustomAttributesApi = client.customerCustomAttributesApi;
+```
+
+## Class Name
+
+`CustomerCustomAttributesApi`
+
+## Methods
+
+* [List Customer Custom Attribute Definitions](../../doc/api/customer-custom-attributes.md#list-customer-custom-attribute-definitions)
+* [Create Customer Custom Attribute Definition](../../doc/api/customer-custom-attributes.md#create-customer-custom-attribute-definition)
+* [Delete Customer Custom Attribute Definition](../../doc/api/customer-custom-attributes.md#delete-customer-custom-attribute-definition)
+* [Retrieve Customer Custom Attribute Definition](../../doc/api/customer-custom-attributes.md#retrieve-customer-custom-attribute-definition)
+* [Update Customer Custom Attribute Definition](../../doc/api/customer-custom-attributes.md#update-customer-custom-attribute-definition)
+* [Bulk Upsert Customer Custom Attributes](../../doc/api/customer-custom-attributes.md#bulk-upsert-customer-custom-attributes)
+* [List Customer Custom Attributes](../../doc/api/customer-custom-attributes.md#list-customer-custom-attributes)
+* [Delete Customer Custom Attribute](../../doc/api/customer-custom-attributes.md#delete-customer-custom-attribute)
+* [Retrieve Customer Custom Attribute](../../doc/api/customer-custom-attributes.md#retrieve-customer-custom-attribute)
+* [Upsert Customer Custom Attribute](../../doc/api/customer-custom-attributes.md#upsert-customer-custom-attribute)
+
+
+# List Customer Custom Attribute Definitions
+
+Lists the customer-related [custom attribute definitions](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async listCustomerCustomAttributeDefinitions(
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCustomerCustomAttributeDefinitionsResponse`](../../doc/models/list-customer-custom-attribute-definitions-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.listCustomerCustomAttributeDefinitions();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Customer Custom Attribute Definition
+
+Creates a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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](../../doc/api/customer-custom-attributes.md#upsert-customer-custom-attribute) or
+[BulkUpsertCustomerCustomAttributes](../../doc/api/customer-custom-attributes.md#bulk-upsert-customer-custom-attributes)
+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`.
+
+```ts
+async createCustomerCustomAttributeDefinition(
+ body: CreateCustomerCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateCustomerCustomAttributeDefinitionRequest`](../../doc/models/create-customer-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCustomerCustomAttributeDefinitionResponse`](../../doc/models/create-customer-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateCustomerCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ key: 'favoritemovie',
+ name: 'Favorite Movie',
+ description: 'The favorite movie of the customer.',
+ visibility: 'VISIBILITY_HIDDEN',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.createCustomerCustomAttributeDefinition(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Customer Custom Attribute Definition
+
+Deletes a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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.
+
+```ts
+async deleteCustomerCustomAttributeDefinition(
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCustomerCustomAttributeDefinitionResponse`](../../doc/models/delete-customer-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.deleteCustomerCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Customer Custom Attribute Definition
+
+Retrieves a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async retrieveCustomerCustomAttributeDefinition(
+ key: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to retrieve. If the requesting application
is not the definition owner, you must use the qualified key. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCustomerCustomAttributeDefinitionResponse`](../../doc/models/retrieve-customer-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.retrieveCustomerCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Customer Custom Attribute Definition
+
+Updates a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async updateCustomerCustomAttributeDefinition(
+ key: string,
+ body: UpdateCustomerCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to update. |
+| `body` | [`UpdateCustomerCustomAttributeDefinitionRequest`](../../doc/models/update-customer-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateCustomerCustomAttributeDefinitionResponse`](../../doc/models/update-customer-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+const body: UpdateCustomerCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ description: 'Update the description as desired.',
+ visibility: 'VISIBILITY_READ_ONLY',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.updateCustomerCustomAttributeDefinition(
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Upsert Customer Custom Attributes
+
+Creates or updates [custom attributes](../../doc/models/custom-attribute.md) 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](../../doc/api/customer-custom-attributes.md#create-customer-custom-attribute-definition) 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`.
+
+```ts
+async bulkUpsertCustomerCustomAttributes(
+ body: BulkUpsertCustomerCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpsertCustomerCustomAttributesRequest`](../../doc/models/bulk-upsert-customer-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpsertCustomerCustomAttributesResponse`](../../doc/models/bulk-upsert-customer-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpsertCustomerCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ customerId: 'customer_id8',
+ customAttribute: {
+ },
+ },
+ 'key1': {
+ customerId: 'customer_id8',
+ customAttribute: {
+ },
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.bulkUpsertCustomerCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Customer Custom Attributes
+
+Lists the [custom attributes](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async listCustomerCustomAttributes(
+ customerId: string,
+ limit?: number,
+ cursor?: string,
+ withDefinitions?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the target [customer profile](entity:Customer). |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `withDefinitions` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCustomerCustomAttributesResponse`](../../doc/models/list-customer-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const withDefinitions = false;
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.listCustomerCustomAttributes(
+ customerId,
+ undefined,
+ undefined,
+ withDefinitions
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Customer Custom Attribute
+
+Deletes a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async deleteCustomerCustomAttribute(
+ customerId: string,
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the target [customer profile](entity:Customer). |
+| `key` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCustomerCustomAttributeResponse`](../../doc/models/delete-customer-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.deleteCustomerCustomAttribute(
+ customerId,
+ key
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Customer Custom Attribute
+
+Retrieves a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async retrieveCustomerCustomAttribute(
+ customerId: string,
+ key: string,
+ withDefinition?: boolean,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the target [customer profile](entity:Customer). |
+| `key` | `string` | Template, Required | 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. |
+| `withDefinition` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCustomerCustomAttributeResponse`](../../doc/models/retrieve-customer-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const key = 'key0';
+
+const withDefinition = false;
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.retrieveCustomerCustomAttribute(
+ customerId,
+ key,
+ withDefinition
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Customer Custom Attribute
+
+Creates or updates a [custom attribute](../../doc/models/custom-attribute.md) 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](../../doc/api/customer-custom-attributes.md#create-customer-custom-attribute-definition) 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`.
+
+```ts
+async upsertCustomerCustomAttribute(
+ customerId: string,
+ key: string,
+ body: UpsertCustomerCustomAttributeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the target [customer profile](entity:Customer). |
+| `key` | `string` | Template, Required | 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` | [`UpsertCustomerCustomAttributeRequest`](../../doc/models/upsert-customer-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertCustomerCustomAttributeResponse`](../../doc/models/upsert-customer-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const key = 'key0';
+
+const body: UpsertCustomerCustomAttributeRequest = {
+ customAttribute: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerCustomAttributesApi.upsertCustomerCustomAttribute(
+ customerId,
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/customer-groups.md b/legacy/doc/api/customer-groups.md
new file mode 100644
index 000000000..0fd88d68b
--- /dev/null
+++ b/legacy/doc/api/customer-groups.md
@@ -0,0 +1,235 @@
+# Customer Groups
+
+```ts
+const customerGroupsApi = client.customerGroupsApi;
+```
+
+## Class Name
+
+`CustomerGroupsApi`
+
+## Methods
+
+* [List Customer Groups](../../doc/api/customer-groups.md#list-customer-groups)
+* [Create Customer Group](../../doc/api/customer-groups.md#create-customer-group)
+* [Delete Customer Group](../../doc/api/customer-groups.md#delete-customer-group)
+* [Retrieve Customer Group](../../doc/api/customer-groups.md#retrieve-customer-group)
+* [Update Customer Group](../../doc/api/customer-groups.md#update-customer-group)
+
+
+# List Customer Groups
+
+Retrieves the list of customer groups of a business.
+
+```ts
+async listCustomerGroups(
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCustomerGroupsResponse`](../../doc/models/list-customer-groups-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await customerGroupsApi.listCustomerGroups();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Customer Group
+
+Creates a new customer group for a business.
+
+The request must include the `name` value of the group.
+
+```ts
+async createCustomerGroup(
+ body: CreateCustomerGroupRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateCustomerGroupRequest`](../../doc/models/create-customer-group-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCustomerGroupResponse`](../../doc/models/create-customer-group-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateCustomerGroupRequest = {
+ group: {
+ name: 'Loyal Customers',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerGroupsApi.createCustomerGroup(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Customer Group
+
+Deletes a customer group as identified by the `group_id` value.
+
+```ts
+async deleteCustomerGroup(
+ groupId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `groupId` | `string` | Template, Required | The ID of the customer group to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCustomerGroupResponse`](../../doc/models/delete-customer-group-response.md)
+
+## Example Usage
+
+```ts
+const groupId = 'group_id0';
+
+try {
+ const { result, ...httpResponse } = await customerGroupsApi.deleteCustomerGroup(groupId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Customer Group
+
+Retrieves a specific customer group as identified by the `group_id` value.
+
+```ts
+async retrieveCustomerGroup(
+ groupId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `groupId` | `string` | Template, Required | The ID of the customer group to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCustomerGroupResponse`](../../doc/models/retrieve-customer-group-response.md)
+
+## Example Usage
+
+```ts
+const groupId = 'group_id0';
+
+try {
+ const { result, ...httpResponse } = await customerGroupsApi.retrieveCustomerGroup(groupId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Customer Group
+
+Updates a customer group as identified by the `group_id` value.
+
+```ts
+async updateCustomerGroup(
+ groupId: string,
+ body: UpdateCustomerGroupRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `groupId` | `string` | Template, Required | The ID of the customer group to update. |
+| `body` | [`UpdateCustomerGroupRequest`](../../doc/models/update-customer-group-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateCustomerGroupResponse`](../../doc/models/update-customer-group-response.md)
+
+## Example Usage
+
+```ts
+const groupId = 'group_id0';
+
+const body: UpdateCustomerGroupRequest = {
+ group: {
+ name: 'Loyal Customers',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customerGroupsApi.updateCustomerGroup(
+ groupId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/customer-segments.md b/legacy/doc/api/customer-segments.md
new file mode 100644
index 000000000..01e1370da
--- /dev/null
+++ b/legacy/doc/api/customer-segments.md
@@ -0,0 +1,95 @@
+# Customer Segments
+
+```ts
+const customerSegmentsApi = client.customerSegmentsApi;
+```
+
+## Class Name
+
+`CustomerSegmentsApi`
+
+## Methods
+
+* [List Customer Segments](../../doc/api/customer-segments.md#list-customer-segments)
+* [Retrieve Customer Segment](../../doc/api/customer-segments.md#retrieve-customer-segment)
+
+
+# List Customer Segments
+
+Retrieves the list of customer segments of a business.
+
+```ts
+async listCustomerSegments(
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCustomerSegmentsResponse`](../../doc/models/list-customer-segments-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await customerSegmentsApi.listCustomerSegments();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Customer Segment
+
+Retrieves a specific customer segment as identified by the `segment_id` value.
+
+```ts
+async retrieveCustomerSegment(
+ segmentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `segmentId` | `string` | Template, Required | The Square-issued ID of the customer segment. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCustomerSegmentResponse`](../../doc/models/retrieve-customer-segment-response.md)
+
+## Example Usage
+
+```ts
+const segmentId = 'segment_id4';
+
+try {
+ const { result, ...httpResponse } = await customerSegmentsApi.retrieveCustomerSegment(segmentId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/customers.md b/legacy/doc/api/customers.md
new file mode 100644
index 000000000..b6ac01988
--- /dev/null
+++ b/legacy/doc/api/customers.md
@@ -0,0 +1,818 @@
+# Customers
+
+```ts
+const customersApi = client.customersApi;
+```
+
+## Class Name
+
+`CustomersApi`
+
+## Methods
+
+* [List Customers](../../doc/api/customers.md#list-customers)
+* [Create Customer](../../doc/api/customers.md#create-customer)
+* [Bulk Create Customers](../../doc/api/customers.md#bulk-create-customers)
+* [Bulk Delete Customers](../../doc/api/customers.md#bulk-delete-customers)
+* [Bulk Retrieve Customers](../../doc/api/customers.md#bulk-retrieve-customers)
+* [Bulk Update Customers](../../doc/api/customers.md#bulk-update-customers)
+* [Search Customers](../../doc/api/customers.md#search-customers)
+* [Delete Customer](../../doc/api/customers.md#delete-customer)
+* [Retrieve Customer](../../doc/api/customers.md#retrieve-customer)
+* [Update Customer](../../doc/api/customers.md#update-customer)
+* [Create Customer Card](../../doc/api/customers.md#create-customer-card)
+* [Delete Customer Card](../../doc/api/customers.md#delete-customer-card)
+* [Remove Group From Customer](../../doc/api/customers.md#remove-group-from-customer)
+* [Add Group to Customer](../../doc/api/customers.md#add-group-to-customer)
+
+
+# List Customers
+
+Lists customer profiles associated with a Square account.
+
+Under normal operating conditions, newly created or updated customer profiles become available
+for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated
+profiles can take closer to one minute or longer, especially during network incidents and outages.
+
+```ts
+async listCustomers(
+ cursor?: string,
+ limit?: number,
+ sortField?: string,
+ sortOrder?: string,
+ count?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `sortField` | [`string \| undefined`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.
The default value is `DEFAULT`. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or
descending (`DESC`) order.
The default value is `ASC`. |
+| `count` | `boolean \| undefined` | Query, Optional | Indicates whether to return the total count of customers in the `count` field of the response.
The default value is `false`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListCustomersResponse`](../../doc/models/list-customers-response.md)
+
+## Example Usage
+
+```ts
+const count = false;
+
+try {
+ const { result, ...httpResponse } = await customersApi.listCustomers(
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ count
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Customer
+
+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`
+
+```ts
+async createCustomer(
+ body: CreateCustomerRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateCustomerRequest`](../../doc/models/create-customer-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCustomerResponse`](../../doc/models/create-customer-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateCustomerRequest = {
+ givenName: 'Amelia',
+ familyName: 'Earhart',
+ emailAddress: 'Amelia.Earhart@example.com',
+ address: {
+ addressLine1: '500 Electric Ave',
+ addressLine2: 'Suite 600',
+ locality: 'New York',
+ administrativeDistrictLevel1: 'NY',
+ postalCode: '10003',
+ country: 'US',
+ },
+ phoneNumber: '+1-212-555-4240',
+ referenceId: 'YOUR_REFERENCE_ID',
+ note: 'a customer',
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.createCustomer(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Create Customers
+
+Creates multiple [customer profiles](../../doc/models/customer.md) 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`
+
+```ts
+async bulkCreateCustomers(
+ body: BulkCreateCustomersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkCreateCustomersRequest`](../../doc/models/bulk-create-customers-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkCreateCustomersResponse`](../../doc/models/bulk-create-customers-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkCreateCustomersRequest = {
+ customers: {
+ '8bb76c4f-e35d-4c5b-90de-1194cd9179f0': {
+ givenName: 'Amelia',
+ familyName: 'Earhart',
+ emailAddress: 'Amelia.Earhart@example.com',
+ address: {
+ addressLine1: '500 Electric Ave',
+ addressLine2: 'Suite 600',
+ locality: 'New York',
+ administrativeDistrictLevel1: 'NY',
+ postalCode: '10003',
+ country: 'US',
+ },
+ phoneNumber: '+1-212-555-4240',
+ referenceId: 'YOUR_REFERENCE_ID',
+ note: 'a customer',
+ },
+ 'd1689f23-b25d-4932-b2f0-aed00f5e2029': {
+ givenName: 'Marie',
+ familyName: 'Curie',
+ emailAddress: 'Marie.Curie@example.com',
+ address: {
+ addressLine1: '500 Electric Ave',
+ addressLine2: 'Suite 601',
+ locality: 'New York',
+ administrativeDistrictLevel1: 'NY',
+ postalCode: '10003',
+ country: 'US',
+ },
+ phoneNumber: '+1-212-444-4240',
+ referenceId: 'YOUR_REFERENCE_ID',
+ note: 'another customer',
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.bulkCreateCustomers(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Delete Customers
+
+Deletes multiple customer profiles.
+
+The endpoint takes a list of customer IDs and returns a map of responses.
+
+```ts
+async bulkDeleteCustomers(
+ body: BulkDeleteCustomersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkDeleteCustomersRequest`](../../doc/models/bulk-delete-customers-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkDeleteCustomersResponse`](../../doc/models/bulk-delete-customers-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkDeleteCustomersRequest = {
+ customerIds: [
+ '8DDA5NZVBZFGAX0V3HPF81HHE0',
+ 'N18CPRVXR5214XPBBA6BZQWF3C',
+ '2GYD7WNXF7BJZW1PMGNXZ3Y8M8'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.bulkDeleteCustomers(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Retrieve Customers
+
+Retrieves multiple customer profiles.
+
+This endpoint takes a list of customer IDs and returns a map of responses.
+
+```ts
+async bulkRetrieveCustomers(
+ body: BulkRetrieveCustomersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkRetrieveCustomersRequest`](../../doc/models/bulk-retrieve-customers-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkRetrieveCustomersResponse`](../../doc/models/bulk-retrieve-customers-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkRetrieveCustomersRequest = {
+ customerIds: [
+ '8DDA5NZVBZFGAX0V3HPF81HHE0',
+ 'N18CPRVXR5214XPBBA6BZQWF3C',
+ '2GYD7WNXF7BJZW1PMGNXZ3Y8M8'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.bulkRetrieveCustomers(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Update Customers
+
+Updates multiple customer profiles.
+
+This endpoint takes a map of individual update requests and returns a map of responses.
+
+You cannot use this endpoint to change cards on file. To make changes, use the [Cards API](../../doc/api/cards.md) or [Gift Cards API](../../doc/api/gift-cards.md).
+
+```ts
+async bulkUpdateCustomers(
+ body: BulkUpdateCustomersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpdateCustomersRequest`](../../doc/models/bulk-update-customers-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpdateCustomersResponse`](../../doc/models/bulk-update-customers-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpdateCustomersRequest = {
+ customers: {
+ '8DDA5NZVBZFGAX0V3HPF81HHE0': {
+ emailAddress: 'New.Amelia.Earhart@example.com',
+ phoneNumber: 'phone_number2',
+ note: 'updated customer note',
+ version: BigInt(2),
+ },
+ 'N18CPRVXR5214XPBBA6BZQWF3C': {
+ givenName: 'Marie',
+ familyName: 'Curie',
+ version: BigInt(0),
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.bulkUpdateCustomers(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Customers
+
+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.
+
+```ts
+async searchCustomers(
+ body: SearchCustomersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchCustomersRequest`](../../doc/models/search-customers-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchCustomersResponse`](../../doc/models/search-customers-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchCustomersRequest = {
+ limit: BigInt(2),
+ query: {
+ filter: {
+ creationSource: {
+ values: [
+ 'THIRD_PARTY'
+ ],
+ rule: 'INCLUDE',
+ },
+ createdAt: {
+ startAt: '2018-01-01T00:00:00-00:00',
+ endAt: '2018-02-01T00:00:00-00:00',
+ },
+ emailAddress: {
+ fuzzy: 'example.com',
+ },
+ groupIds: {
+ all: [
+ '545AXB44B4XXWMVQ4W8SBT3HHF'
+ ],
+ },
+ },
+ sort: {
+ field: 'CREATED_AT',
+ order: 'ASC',
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.searchCustomers(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Customer
+
+Deletes a customer profile from a business. This operation also unlinks any associated cards on file.
+
+To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
+
+```ts
+async deleteCustomer(
+ customerId: string,
+ version?: bigint,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer to delete. |
+| `version` | `bigint \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCustomerResponse`](../../doc/models/delete-customer-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+try {
+ const { result, ...httpResponse } = await customersApi.deleteCustomer(customerId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Customer
+
+Returns details for a single customer.
+
+```ts
+async retrieveCustomer(
+ customerId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveCustomerResponse`](../../doc/models/retrieve-customer-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+try {
+ const { result, ...httpResponse } = await customersApi.retrieveCustomer(customerId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Customer
+
+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.
+
+You cannot use this endpoint to change cards on file. To make changes, use the [Cards API](../../doc/api/cards.md) or [Gift Cards API](../../doc/api/gift-cards.md).
+
+```ts
+async updateCustomer(
+ customerId: string,
+ body: UpdateCustomerRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer to update. |
+| `body` | [`UpdateCustomerRequest`](../../doc/models/update-customer-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateCustomerResponse`](../../doc/models/update-customer-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const body: UpdateCustomerRequest = {
+ emailAddress: 'New.Amelia.Earhart@example.com',
+ phoneNumber: 'phone_number2',
+ note: 'updated customer note',
+ version: BigInt(2),
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.updateCustomer(
+ customerId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Customer Card
+
+**This endpoint is deprecated.**
+
+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.
+
+```ts
+async createCustomerCard(
+ customerId: string,
+ body: CreateCustomerCardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The Square ID of the customer profile the card is linked to. |
+| `body` | [`CreateCustomerCardRequest`](../../doc/models/create-customer-card-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateCustomerCardResponse`](../../doc/models/create-customer-card-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const body: CreateCustomerCardRequest = {
+ cardNonce: 'YOUR_CARD_NONCE',
+ billingAddress: {
+ addressLine1: '500 Electric Ave',
+ addressLine2: 'Suite 600',
+ locality: 'New York',
+ administrativeDistrictLevel1: 'NY',
+ postalCode: '10003',
+ country: 'US',
+ },
+ cardholderName: 'Amelia Earhart',
+};
+
+try {
+ const { result, ...httpResponse } = await customersApi.createCustomerCard(
+ customerId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Customer Card
+
+**This endpoint is deprecated.**
+
+Removes a card on file from a customer.
+
+```ts
+async deleteCustomerCard(
+ customerId: string,
+ cardId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer that the card on file belongs to. |
+| `cardId` | `string` | Template, Required | The ID of the card on file to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteCustomerCardResponse`](../../doc/models/delete-customer-card-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const cardId = 'card_id4';
+
+try {
+ const { result, ...httpResponse } = await customersApi.deleteCustomerCard(
+ customerId,
+ cardId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Remove Group From Customer
+
+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.
+
+```ts
+async removeGroupFromCustomer(
+ customerId: string,
+ groupId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer to remove from the group. |
+| `groupId` | `string` | Template, Required | The ID of the customer group to remove the customer from. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RemoveGroupFromCustomerResponse`](../../doc/models/remove-group-from-customer-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const groupId = 'group_id0';
+
+try {
+ const { result, ...httpResponse } = await customersApi.removeGroupFromCustomer(
+ customerId,
+ groupId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Add Group to Customer
+
+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.
+
+```ts
+async addGroupToCustomer(
+ customerId: string,
+ groupId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `customerId` | `string` | Template, Required | The ID of the customer to add to a group. |
+| `groupId` | `string` | Template, Required | The ID of the customer group to add the customer to. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`AddGroupToCustomerResponse`](../../doc/models/add-group-to-customer-response.md)
+
+## Example Usage
+
+```ts
+const customerId = 'customer_id8';
+
+const groupId = 'group_id0';
+
+try {
+ const { result, ...httpResponse } = await customersApi.addGroupToCustomer(
+ customerId,
+ groupId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/devices.md b/legacy/doc/api/devices.md
new file mode 100644
index 000000000..f370647fe
--- /dev/null
+++ b/legacy/doc/api/devices.md
@@ -0,0 +1,235 @@
+# Devices
+
+```ts
+const devicesApi = client.devicesApi;
+```
+
+## Class Name
+
+`DevicesApi`
+
+## Methods
+
+* [List Devices](../../doc/api/devices.md#list-devices)
+* [List Device Codes](../../doc/api/devices.md#list-device-codes)
+* [Create Device Code](../../doc/api/devices.md#create-device-code)
+* [Get Device Code](../../doc/api/devices.md#get-device-code)
+* [Get Device](../../doc/api/devices.md#get-device)
+
+
+# List Devices
+
+List devices associated with the merchant. Currently, only Terminal API
+devices are supported.
+
+```ts
+async listDevices(
+ cursor?: string,
+ sortOrder?: string,
+ limit?: number,
+ locationId?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | The order in which results are listed.
- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). |
+| `limit` | `number \| undefined` | Query, Optional | The number of results to return in a single page. |
+| `locationId` | `string \| undefined` | Query, Optional | If present, only returns devices at the target location. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListDevicesResponse`](../../doc/models/list-devices-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await devicesApi.listDevices();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Device Codes
+
+Lists all DeviceCodes associated with the merchant.
+
+```ts
+async listDeviceCodes(
+ cursor?: string,
+ locationId?: string,
+ productType?: string,
+ status?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `locationId` | `string \| undefined` | Query, Optional | If specified, only returns DeviceCodes of the specified location.
Returns DeviceCodes of all locations if empty. |
+| `productType` | [`string \| undefined`](../../doc/models/product-type.md) | Query, Optional | If specified, only returns DeviceCodes targeting the specified product type.
Returns DeviceCodes of all product types if empty. |
+| `status` | [`string \| undefined`](../../doc/models/device-code-status.md) | Query, Optional | If specified, returns DeviceCodes with the specified statuses.
Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListDeviceCodesResponse`](../../doc/models/list-device-codes-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await devicesApi.listDeviceCodes();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Device Code
+
+Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected
+terminal mode.
+
+```ts
+async createDeviceCode(
+ body: CreateDeviceCodeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateDeviceCodeRequest`](../../doc/models/create-device-code-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateDeviceCodeResponse`](../../doc/models/create-device-code-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateDeviceCodeRequest = {
+ idempotencyKey: '01bb00a6-0c86-4770-94ed-f5fca973cd56',
+ deviceCode: {
+ productType: 'TERMINAL_API',
+ name: 'Counter 1',
+ locationId: 'B5E4484SHHNYH',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await devicesApi.createDeviceCode(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Device Code
+
+Retrieves DeviceCode with the associated ID.
+
+```ts
+async getDeviceCode(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The unique identifier for the device code. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetDeviceCodeResponse`](../../doc/models/get-device-code-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await devicesApi.getDeviceCode(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Device
+
+Retrieves Device with the associated `device_id`.
+
+```ts
+async getDevice(
+ deviceId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `deviceId` | `string` | Template, Required | The unique ID for the desired `Device`. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetDeviceResponse`](../../doc/models/get-device-response.md)
+
+## Example Usage
+
+```ts
+const deviceId = 'device_id6';
+
+try {
+ const { result, ...httpResponse } = await devicesApi.getDevice(deviceId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/disputes.md b/legacy/doc/api/disputes.md
new file mode 100644
index 000000000..1356cba01
--- /dev/null
+++ b/legacy/doc/api/disputes.md
@@ -0,0 +1,429 @@
+# Disputes
+
+```ts
+const disputesApi = client.disputesApi;
+```
+
+## Class Name
+
+`DisputesApi`
+
+## Methods
+
+* [List Disputes](../../doc/api/disputes.md#list-disputes)
+* [Retrieve Dispute](../../doc/api/disputes.md#retrieve-dispute)
+* [Accept Dispute](../../doc/api/disputes.md#accept-dispute)
+* [List Dispute Evidence](../../doc/api/disputes.md#list-dispute-evidence)
+* [Create Dispute Evidence File](../../doc/api/disputes.md#create-dispute-evidence-file)
+* [Create Dispute Evidence Text](../../doc/api/disputes.md#create-dispute-evidence-text)
+* [Delete Dispute Evidence](../../doc/api/disputes.md#delete-dispute-evidence)
+* [Retrieve Dispute Evidence](../../doc/api/disputes.md#retrieve-dispute-evidence)
+* [Submit Evidence](../../doc/api/disputes.md#submit-evidence)
+
+
+# List Disputes
+
+Returns a list of disputes associated with a particular account.
+
+```ts
+async listDisputes(
+ cursor?: string,
+ states?: string,
+ locationId?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | [`string \| undefined`](../../doc/models/dispute-state.md) | Query, Optional | The dispute states used to filter the result. If not specified, the endpoint returns all disputes. |
+| `locationId` | `string \| undefined` | Query, Optional | The ID of the location for which to return a list of disputes.
If not specified, the endpoint returns disputes associated with all locations. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListDisputesResponse`](../../doc/models/list-disputes-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await disputesApi.listDisputes();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Dispute
+
+Returns details about a specific dispute.
+
+```ts
+async retrieveDispute(
+ disputeId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute you want more details about. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveDisputeResponse`](../../doc/models/retrieve-dispute-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.retrieveDispute(disputeId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Accept Dispute
+
+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.
+
+```ts
+async acceptDispute(
+ disputeId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute you want to accept. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`AcceptDisputeResponse`](../../doc/models/accept-dispute-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.acceptDispute(disputeId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Dispute Evidence
+
+Returns a list of evidence associated with a dispute.
+
+```ts
+async listDisputeEvidence(
+ disputeId: string,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute. |
+| `cursor` | `string \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListDisputeEvidenceResponse`](../../doc/models/list-dispute-evidence-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.listDisputeEvidence(disputeId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Dispute Evidence File
+
+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.
+
+```ts
+async createDisputeEvidenceFile(
+ disputeId: string,
+ request?: CreateDisputeEvidenceFileRequest,
+ imageFile?: FileWrapper,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to upload evidence. |
+| `request` | [`CreateDisputeEvidenceFileRequest \| undefined`](../../doc/models/create-dispute-evidence-file-request.md) | Form (JSON-Encoded), Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
+| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateDisputeEvidenceFileResponse`](../../doc/models/create-dispute-evidence-file-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.createDisputeEvidenceFile(disputeId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Dispute Evidence Text
+
+Uploads text to use as evidence for a dispute challenge.
+
+```ts
+async createDisputeEvidenceText(
+ disputeId: string,
+ body: CreateDisputeEvidenceTextRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to upload evidence. |
+| `body` | [`CreateDisputeEvidenceTextRequest`](../../doc/models/create-dispute-evidence-text-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateDisputeEvidenceTextResponse`](../../doc/models/create-dispute-evidence-text-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+const body: CreateDisputeEvidenceTextRequest = {
+ idempotencyKey: 'ed3ee3933d946f1514d505d173c82648',
+ evidenceText: '1Z8888888888888888',
+ evidenceType: 'TRACKING_NUMBER',
+};
+
+try {
+ const { result, ...httpResponse } = await disputesApi.createDisputeEvidenceText(
+ disputeId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Dispute Evidence
+
+Removes specified evidence from a dispute.
+Square does not send the bank any evidence that is removed.
+
+```ts
+async deleteDisputeEvidence(
+ disputeId: string,
+ evidenceId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute from which you want to remove evidence. |
+| `evidenceId` | `string` | Template, Required | The ID of the evidence you want to remove. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteDisputeEvidenceResponse`](../../doc/models/delete-dispute-evidence-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+const evidenceId = 'evidence_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.deleteDisputeEvidence(
+ disputeId,
+ evidenceId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Dispute Evidence
+
+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.
+
+```ts
+async retrieveDisputeEvidence(
+ disputeId: string,
+ evidenceId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute from which you want to retrieve evidence metadata. |
+| `evidenceId` | `string` | Template, Required | The ID of the evidence to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveDisputeEvidenceResponse`](../../doc/models/retrieve-dispute-evidence-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+const evidenceId = 'evidence_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.retrieveDisputeEvidence(
+ disputeId,
+ evidenceId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Submit Evidence
+
+Submits evidence to the cardholder's bank.
+
+The evidence submitted by this endpoint includes evidence uploaded
+using the [CreateDisputeEvidenceFile](../../doc/api/disputes.md#create-dispute-evidence-file) and
+[CreateDisputeEvidenceText](../../doc/api/disputes.md#create-dispute-evidence-text) endpoints and
+evidence automatically provided by Square, when available. Evidence cannot be removed from
+a dispute after submission.
+
+```ts
+async submitEvidence(
+ disputeId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to submit evidence. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SubmitEvidenceResponse`](../../doc/models/submit-evidence-response.md)
+
+## Example Usage
+
+```ts
+const disputeId = 'dispute_id2';
+
+try {
+ const { result, ...httpResponse } = await disputesApi.submitEvidence(disputeId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/employees.md b/legacy/doc/api/employees.md
new file mode 100644
index 000000000..8b3bb97f7
--- /dev/null
+++ b/legacy/doc/api/employees.md
@@ -0,0 +1,99 @@
+# Employees
+
+```ts
+const employeesApi = client.employeesApi;
+```
+
+## Class Name
+
+`EmployeesApi`
+
+## Methods
+
+* [List Employees](../../doc/api/employees.md#list-employees)
+* [Retrieve Employee](../../doc/api/employees.md#retrieve-employee)
+
+
+# List Employees
+
+**This endpoint is deprecated.**
+
+```ts
+async listEmployees(
+ locationId?: string,
+ status?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string \| undefined` | Query, Optional | - |
+| `status` | [`string \| undefined`](../../doc/models/employee-status.md) | Query, Optional | Specifies the EmployeeStatus to filter the employee by. |
+| `limit` | `number \| undefined` | Query, Optional | The number of employees to be returned on each page. |
+| `cursor` | `string \| undefined` | Query, Optional | The token required to retrieve the specified page of results. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListEmployeesResponse`](../../doc/models/list-employees-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await employeesApi.listEmployees();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Employee
+
+**This endpoint is deprecated.**
+
+```ts
+async retrieveEmployee(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | UUID for the employee that was requested. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveEmployeeResponse`](../../doc/models/retrieve-employee-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await employeesApi.retrieveEmployee(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/events.md b/legacy/doc/api/events.md
new file mode 100644
index 000000000..aba749909
--- /dev/null
+++ b/legacy/doc/api/events.md
@@ -0,0 +1,170 @@
+# Events
+
+```ts
+const eventsApi = client.eventsApi;
+```
+
+## Class Name
+
+`EventsApi`
+
+## Methods
+
+* [Search Events](../../doc/api/events.md#search-events)
+* [Disable Events](../../doc/api/events.md#disable-events)
+* [Enable Events](../../doc/api/events.md#enable-events)
+* [List Event Types](../../doc/api/events.md#list-event-types)
+
+
+# Search Events
+
+Search for Square API events that occur within a 28-day timeframe.
+
+```ts
+async searchEvents(
+ body: SearchEventsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchEventsRequest`](../../doc/models/search-events-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchEventsResponse`](../../doc/models/search-events-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchEventsRequest = {
+};
+
+try {
+ const { result, ...httpResponse } = await eventsApi.searchEvents(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Disable Events
+
+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.
+
+```ts
+async disableEvents(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DisableEventsResponse`](../../doc/models/disable-events-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await eventsApi.disableEvents();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Enable Events
+
+Enables events to make them searchable. Only events that occur while in the enabled state are searchable.
+
+```ts
+async enableEvents(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`EnableEventsResponse`](../../doc/models/enable-events-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await eventsApi.enableEvents();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Event Types
+
+Lists all event types that you can subscribe to as webhooks or query using the Events API.
+
+```ts
+async listEventTypes(
+ apiVersion?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `apiVersion` | `string \| undefined` | Query, Optional | The API version for which to list event types. Setting this field overrides the default version used by the application. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListEventTypesResponse`](../../doc/models/list-event-types-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await eventsApi.listEventTypes();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/gift-card-activities.md b/legacy/doc/api/gift-card-activities.md
new file mode 100644
index 000000000..04c24c484
--- /dev/null
+++ b/legacy/doc/api/gift-card-activities.md
@@ -0,0 +1,122 @@
+# Gift Card Activities
+
+```ts
+const giftCardActivitiesApi = client.giftCardActivitiesApi;
+```
+
+## Class Name
+
+`GiftCardActivitiesApi`
+
+## Methods
+
+* [List Gift Card Activities](../../doc/api/gift-card-activities.md#list-gift-card-activities)
+* [Create Gift Card Activity](../../doc/api/gift-card-activities.md#create-gift-card-activity)
+
+
+# List Gift Card Activities
+
+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.
+
+```ts
+async listGiftCardActivities(
+ giftCardId?: string,
+ type?: string,
+ locationId?: string,
+ beginTime?: string,
+ endTime?: string,
+ limit?: number,
+ cursor?: string,
+ sortOrder?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `giftCardId` | `string \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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. |
+| `locationId` | `string \| undefined` | Query, Optional | 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. |
+| `beginTime` | `string \| undefined` | Query, Optional | 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. |
+| `endTime` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `sortOrder` | `string \| undefined` | Query, Optional | The order in which the endpoint returns the activities, based on `created_at`.
- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListGiftCardActivitiesResponse`](../../doc/models/list-gift-card-activities-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await giftCardActivitiesApi.listGiftCardActivities();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Gift Card Activity
+
+Creates a gift card activity to manage the balance or state of a [gift card](../../doc/models/gift-card.md).
+For example, create an `ACTIVATE` activity to activate a gift card with an initial balance before first use.
+
+```ts
+async createGiftCardActivity(
+ body: CreateGiftCardActivityRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateGiftCardActivityRequest`](../../doc/models/create-gift-card-activity-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateGiftCardActivityResponse`](../../doc/models/create-gift-card-activity-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateGiftCardActivityRequest = {
+ idempotencyKey: 'U16kfr-kA70er-q4Rsym-7U7NnY',
+ giftCardActivity: {
+ type: 'ACTIVATE',
+ locationId: '81FN9BNFZTKS4',
+ giftCardId: 'gftc:6d55a72470d940c6ba09c0ab8ad08d20',
+ activateActivityDetails: {
+ orderId: 'jJNGHm4gLI6XkFbwtiSLqK72KkAZY',
+ lineItemUid: 'eIWl7X0nMuO9Ewbh0ChIx',
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardActivitiesApi.createGiftCardActivity(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/gift-cards.md b/legacy/doc/api/gift-cards.md
new file mode 100644
index 000000000..fcdf4b737
--- /dev/null
+++ b/legacy/doc/api/gift-cards.md
@@ -0,0 +1,339 @@
+# Gift Cards
+
+```ts
+const giftCardsApi = client.giftCardsApi;
+```
+
+## Class Name
+
+`GiftCardsApi`
+
+## Methods
+
+* [List Gift Cards](../../doc/api/gift-cards.md#list-gift-cards)
+* [Create Gift Card](../../doc/api/gift-cards.md#create-gift-card)
+* [Retrieve Gift Card From GAN](../../doc/api/gift-cards.md#retrieve-gift-card-from-gan)
+* [Retrieve Gift Card From Nonce](../../doc/api/gift-cards.md#retrieve-gift-card-from-nonce)
+* [Link Customer to Gift Card](../../doc/api/gift-cards.md#link-customer-to-gift-card)
+* [Unlink Customer From Gift Card](../../doc/api/gift-cards.md#unlink-customer-from-gift-card)
+* [Retrieve Gift Card](../../doc/api/gift-cards.md#retrieve-gift-card)
+
+
+# List Gift Cards
+
+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.
+
+```ts
+async listGiftCards(
+ type?: string,
+ state?: string,
+ limit?: number,
+ cursor?: string,
+ customerId?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `type` | `string \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `customerId` | `string \| undefined` | Query, Optional | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListGiftCardsResponse`](../../doc/models/list-gift-cards-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await giftCardsApi.listGiftCards();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Gift Card
+
+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](../../doc/api/gift-card-activities.md#create-gift-card-activity) and create an `ACTIVATE`
+activity with the initial balance. Alternatively, you can use [RefundPayment](../../doc/api/refunds.md#refund-payment)
+to refund a payment to the new gift card.
+
+```ts
+async createGiftCard(
+ body: CreateGiftCardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateGiftCardRequest`](../../doc/models/create-gift-card-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateGiftCardResponse`](../../doc/models/create-gift-card-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateGiftCardRequest = {
+ idempotencyKey: 'NC9Tm69EjbjtConu',
+ locationId: '81FN9BNFZTKS4',
+ giftCard: {
+ type: 'DIGITAL',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.createGiftCard(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Gift Card From GAN
+
+Retrieves a gift card using the gift card account number (GAN).
+
+```ts
+async retrieveGiftCardFromGAN(
+ body: RetrieveGiftCardFromGANRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`RetrieveGiftCardFromGANRequest`](../../doc/models/retrieve-gift-card-from-gan-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveGiftCardFromGANResponse`](../../doc/models/retrieve-gift-card-from-gan-response.md)
+
+## Example Usage
+
+```ts
+const body: RetrieveGiftCardFromGANRequest = {
+ gan: '7783320001001635',
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.retrieveGiftCardFromGAN(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Gift Card From Nonce
+
+Retrieves a gift card using a secure payment token that represents the gift card.
+
+```ts
+async retrieveGiftCardFromNonce(
+ body: RetrieveGiftCardFromNonceRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`RetrieveGiftCardFromNonceRequest`](../../doc/models/retrieve-gift-card-from-nonce-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveGiftCardFromNonceResponse`](../../doc/models/retrieve-gift-card-from-nonce-response.md)
+
+## Example Usage
+
+```ts
+const body: RetrieveGiftCardFromNonceRequest = {
+ nonce: 'cnon:7783322135245171',
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.retrieveGiftCardFromNonce(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Link Customer to Gift Card
+
+Links a customer to a gift card, which is also referred to as adding a card on file.
+
+```ts
+async linkCustomerToGiftCard(
+ giftCardId: string,
+ body: LinkCustomerToGiftCardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `giftCardId` | `string` | Template, Required | The ID of the gift card to be linked. |
+| `body` | [`LinkCustomerToGiftCardRequest`](../../doc/models/link-customer-to-gift-card-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`LinkCustomerToGiftCardResponse`](../../doc/models/link-customer-to-gift-card-response.md)
+
+## Example Usage
+
+```ts
+const giftCardId = 'gift_card_id8';
+
+const body: LinkCustomerToGiftCardRequest = {
+ customerId: 'GKY0FZ3V717AH8Q2D821PNT2ZW',
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.linkCustomerToGiftCard(
+ giftCardId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Unlink Customer From Gift Card
+
+Unlinks a customer from a gift card, which is also referred to as removing a card on file.
+
+```ts
+async unlinkCustomerFromGiftCard(
+ giftCardId: string,
+ body: UnlinkCustomerFromGiftCardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `giftCardId` | `string` | Template, Required | The ID of the gift card to be unlinked. |
+| `body` | [`UnlinkCustomerFromGiftCardRequest`](../../doc/models/unlink-customer-from-gift-card-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UnlinkCustomerFromGiftCardResponse`](../../doc/models/unlink-customer-from-gift-card-response.md)
+
+## Example Usage
+
+```ts
+const giftCardId = 'gift_card_id8';
+
+const body: UnlinkCustomerFromGiftCardRequest = {
+ customerId: 'GKY0FZ3V717AH8Q2D821PNT2ZW',
+};
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.unlinkCustomerFromGiftCard(
+ giftCardId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Gift Card
+
+Retrieves a gift card using the gift card ID.
+
+```ts
+async retrieveGiftCard(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the gift card to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveGiftCardResponse`](../../doc/models/retrieve-gift-card-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await giftCardsApi.retrieveGiftCard(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/inventory.md b/legacy/doc/api/inventory.md
new file mode 100644
index 000000000..765f5f824
--- /dev/null
+++ b/legacy/doc/api/inventory.md
@@ -0,0 +1,690 @@
+# Inventory
+
+```ts
+const inventoryApi = client.inventoryApi;
+```
+
+## Class Name
+
+`InventoryApi`
+
+## Methods
+
+* [Deprecated Retrieve Inventory Adjustment](../../doc/api/inventory.md#deprecated-retrieve-inventory-adjustment)
+* [Retrieve Inventory Adjustment](../../doc/api/inventory.md#retrieve-inventory-adjustment)
+* [Deprecated Batch Change Inventory](../../doc/api/inventory.md#deprecated-batch-change-inventory)
+* [Deprecated Batch Retrieve Inventory Changes](../../doc/api/inventory.md#deprecated-batch-retrieve-inventory-changes)
+* [Deprecated Batch Retrieve Inventory Counts](../../doc/api/inventory.md#deprecated-batch-retrieve-inventory-counts)
+* [Batch Change Inventory](../../doc/api/inventory.md#batch-change-inventory)
+* [Batch Retrieve Inventory Changes](../../doc/api/inventory.md#batch-retrieve-inventory-changes)
+* [Batch Retrieve Inventory Counts](../../doc/api/inventory.md#batch-retrieve-inventory-counts)
+* [Deprecated Retrieve Inventory Physical Count](../../doc/api/inventory.md#deprecated-retrieve-inventory-physical-count)
+* [Retrieve Inventory Physical Count](../../doc/api/inventory.md#retrieve-inventory-physical-count)
+* [Retrieve Inventory Transfer](../../doc/api/inventory.md#retrieve-inventory-transfer)
+* [Retrieve Inventory Count](../../doc/api/inventory.md#retrieve-inventory-count)
+* [Retrieve Inventory Changes](../../doc/api/inventory.md#retrieve-inventory-changes)
+
+
+# Deprecated Retrieve Inventory Adjustment
+
+**This endpoint is deprecated.**
+
+Deprecated version of [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) after the endpoint URL
+is updated to conform to the standard convention.
+
+```ts
+async deprecatedRetrieveInventoryAdjustment(
+ adjustmentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `adjustmentId` | `string` | Template, Required | ID of the [InventoryAdjustment](entity:InventoryAdjustment) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryAdjustmentResponse`](../../doc/models/retrieve-inventory-adjustment-response.md)
+
+## Example Usage
+
+```ts
+const adjustmentId = 'adjustment_id0';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.deprecatedRetrieveInventoryAdjustment(adjustmentId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Inventory Adjustment
+
+Returns the [InventoryAdjustment](../../doc/models/inventory-adjustment.md) object
+with the provided `adjustment_id`.
+
+```ts
+async retrieveInventoryAdjustment(
+ adjustmentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `adjustmentId` | `string` | Template, Required | ID of the [InventoryAdjustment](entity:InventoryAdjustment) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryAdjustmentResponse`](../../doc/models/retrieve-inventory-adjustment-response.md)
+
+## Example Usage
+
+```ts
+const adjustmentId = 'adjustment_id0';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.retrieveInventoryAdjustment(adjustmentId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Deprecated Batch Change Inventory
+
+**This endpoint is deprecated.**
+
+Deprecated version of [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) after the endpoint URL
+is updated to conform to the standard convention.
+
+```ts
+async deprecatedBatchChangeInventory(
+ body: BatchChangeInventoryRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchChangeInventoryRequest`](../../doc/models/batch-change-inventory-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchChangeInventoryResponse`](../../doc/models/batch-change-inventory-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchChangeInventoryRequest = {
+ idempotencyKey: '8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe',
+ changes: [
+ {
+ type: 'PHYSICAL_COUNT',
+ physicalCount: {
+ referenceId: '1536bfbf-efed-48bf-b17d-a197141b2a92',
+ catalogObjectId: 'W62UWFY35CWMYGVWK6TWJDNI',
+ state: 'IN_STOCK',
+ locationId: 'C6W5YS5QM06F5',
+ quantity: '53',
+ teamMemberId: 'LRK57NSQ5X7PUD05',
+ occurredAt: '2016-11-16T22:25:24.878Z',
+ },
+ }
+ ],
+ ignoreUnchangedCounts: true,
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.deprecatedBatchChangeInventory(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Deprecated Batch Retrieve Inventory Changes
+
+**This endpoint is deprecated.**
+
+Deprecated version of [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) after the endpoint URL
+is updated to conform to the standard convention.
+
+```ts
+async deprecatedBatchRetrieveInventoryChanges(
+ body: BatchRetrieveInventoryChangesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveInventoryChangesRequest`](../../doc/models/batch-retrieve-inventory-changes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveInventoryChangesResponse`](../../doc/models/batch-retrieve-inventory-changes-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveInventoryChangesRequest = {
+ catalogObjectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI'
+ ],
+ locationIds: [
+ 'C6W5YS5QM06F5'
+ ],
+ types: [
+ 'PHYSICAL_COUNT'
+ ],
+ states: [
+ 'IN_STOCK'
+ ],
+ updatedAfter: '2016-11-01T00:00:00.000Z',
+ updatedBefore: '2016-12-01T00:00:00.000Z',
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.deprecatedBatchRetrieveInventoryChanges(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Deprecated Batch Retrieve Inventory Counts
+
+**This endpoint is deprecated.**
+
+Deprecated version of [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts) after the endpoint URL
+is updated to conform to the standard convention.
+
+```ts
+async deprecatedBatchRetrieveInventoryCounts(
+ body: BatchRetrieveInventoryCountsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveInventoryCountsRequest`](../../doc/models/batch-retrieve-inventory-counts-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveInventoryCountsResponse`](../../doc/models/batch-retrieve-inventory-counts-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveInventoryCountsRequest = {
+ catalogObjectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI'
+ ],
+ locationIds: [
+ '59TNP9SA8VGDA'
+ ],
+ updatedAfter: '2016-11-16T00:00:00.000Z',
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.deprecatedBatchRetrieveInventoryCounts(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Change Inventory
+
+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.
+
+```ts
+async batchChangeInventory(
+ body: BatchChangeInventoryRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchChangeInventoryRequest`](../../doc/models/batch-change-inventory-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchChangeInventoryResponse`](../../doc/models/batch-change-inventory-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchChangeInventoryRequest = {
+ idempotencyKey: '8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe',
+ changes: [
+ {
+ type: 'PHYSICAL_COUNT',
+ physicalCount: {
+ referenceId: '1536bfbf-efed-48bf-b17d-a197141b2a92',
+ catalogObjectId: 'W62UWFY35CWMYGVWK6TWJDNI',
+ state: 'IN_STOCK',
+ locationId: 'C6W5YS5QM06F5',
+ quantity: '53',
+ teamMemberId: 'LRK57NSQ5X7PUD05',
+ occurredAt: '2016-11-16T22:25:24.878Z',
+ },
+ }
+ ],
+ ignoreUnchangedCounts: true,
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.batchChangeInventory(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Retrieve Inventory Changes
+
+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.
+
+```ts
+async batchRetrieveInventoryChanges(
+ body: BatchRetrieveInventoryChangesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveInventoryChangesRequest`](../../doc/models/batch-retrieve-inventory-changes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveInventoryChangesResponse`](../../doc/models/batch-retrieve-inventory-changes-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveInventoryChangesRequest = {
+ catalogObjectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI'
+ ],
+ locationIds: [
+ 'C6W5YS5QM06F5'
+ ],
+ types: [
+ 'PHYSICAL_COUNT'
+ ],
+ states: [
+ 'IN_STOCK'
+ ],
+ updatedAfter: '2016-11-01T00:00:00.000Z',
+ updatedBefore: '2016-12-01T00:00:00.000Z',
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.batchRetrieveInventoryChanges(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Retrieve Inventory Counts
+
+Returns current counts for the provided
+[CatalogObject](../../doc/models/catalog-object.md)s at the requested
+[Location](../../doc/models/location.md)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.
+
+```ts
+async batchRetrieveInventoryCounts(
+ body: BatchRetrieveInventoryCountsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveInventoryCountsRequest`](../../doc/models/batch-retrieve-inventory-counts-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveInventoryCountsResponse`](../../doc/models/batch-retrieve-inventory-counts-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveInventoryCountsRequest = {
+ catalogObjectIds: [
+ 'W62UWFY35CWMYGVWK6TWJDNI'
+ ],
+ locationIds: [
+ '59TNP9SA8VGDA'
+ ],
+ updatedAfter: '2016-11-16T00:00:00.000Z',
+};
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.batchRetrieveInventoryCounts(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Deprecated Retrieve Inventory Physical Count
+
+**This endpoint is deprecated.**
+
+Deprecated version of [RetrieveInventoryPhysicalCount](api-endpoint:Inventory-RetrieveInventoryPhysicalCount) after the endpoint URL
+is updated to conform to the standard convention.
+
+```ts
+async deprecatedRetrieveInventoryPhysicalCount(
+ physicalCountId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `physicalCountId` | `string` | Template, Required | ID of the
[InventoryPhysicalCount](entity:InventoryPhysicalCount) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryPhysicalCountResponse`](../../doc/models/retrieve-inventory-physical-count-response.md)
+
+## Example Usage
+
+```ts
+const physicalCountId = 'physical_count_id2';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.deprecatedRetrieveInventoryPhysicalCount(physicalCountId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Inventory Physical Count
+
+Returns the [InventoryPhysicalCount](../../doc/models/inventory-physical-count.md)
+object with the provided `physical_count_id`.
+
+```ts
+async retrieveInventoryPhysicalCount(
+ physicalCountId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `physicalCountId` | `string` | Template, Required | ID of the
[InventoryPhysicalCount](entity:InventoryPhysicalCount) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryPhysicalCountResponse`](../../doc/models/retrieve-inventory-physical-count-response.md)
+
+## Example Usage
+
+```ts
+const physicalCountId = 'physical_count_id2';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.retrieveInventoryPhysicalCount(physicalCountId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Inventory Transfer
+
+Returns the [InventoryTransfer](../../doc/models/inventory-transfer.md) object
+with the provided `transfer_id`.
+
+```ts
+async retrieveInventoryTransfer(
+ transferId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `transferId` | `string` | Template, Required | ID of the [InventoryTransfer](entity:InventoryTransfer) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryTransferResponse`](../../doc/models/retrieve-inventory-transfer-response.md)
+
+## Example Usage
+
+```ts
+const transferId = 'transfer_id6';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.retrieveInventoryTransfer(transferId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Inventory Count
+
+Retrieves the current calculated stock count for a given
+[CatalogObject](../../doc/models/catalog-object.md) at a given set of
+[Location](../../doc/models/location.md)s. Responses are paginated and unsorted.
+For more sophisticated queries, use a batch endpoint.
+
+```ts
+async retrieveInventoryCount(
+ catalogObjectId: string,
+ locationIds?: string,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `catalogObjectId` | `string` | Template, Required | ID of the [CatalogObject](entity:CatalogObject) to retrieve. |
+| `locationIds` | `string \| undefined` | Query, Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryCountResponse`](../../doc/models/retrieve-inventory-count-response.md)
+
+## Example Usage
+
+```ts
+const catalogObjectId = 'catalog_object_id6';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.retrieveInventoryCount(catalogObjectId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Inventory Changes
+
+**This endpoint is deprecated.**
+
+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.
+
+```ts
+async retrieveInventoryChanges(
+ catalogObjectId: string,
+ locationIds?: string,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `catalogObjectId` | `string` | Template, Required | ID of the [CatalogObject](entity:CatalogObject) to retrieve. |
+| `locationIds` | `string \| undefined` | Query, Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. |
+| `cursor` | `string \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveInventoryChangesResponse`](../../doc/models/retrieve-inventory-changes-response.md)
+
+## Example Usage
+
+```ts
+const catalogObjectId = 'catalog_object_id6';
+
+try {
+ const { result, ...httpResponse } = await inventoryApi.retrieveInventoryChanges(catalogObjectId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/invoices.md b/legacy/doc/api/invoices.md
new file mode 100644
index 000000000..dd450a4a1
--- /dev/null
+++ b/legacy/doc/api/invoices.md
@@ -0,0 +1,596 @@
+# Invoices
+
+```ts
+const invoicesApi = client.invoicesApi;
+```
+
+## Class Name
+
+`InvoicesApi`
+
+## Methods
+
+* [List Invoices](../../doc/api/invoices.md#list-invoices)
+* [Create Invoice](../../doc/api/invoices.md#create-invoice)
+* [Search Invoices](../../doc/api/invoices.md#search-invoices)
+* [Delete Invoice](../../doc/api/invoices.md#delete-invoice)
+* [Get Invoice](../../doc/api/invoices.md#get-invoice)
+* [Update Invoice](../../doc/api/invoices.md#update-invoice)
+* [Create Invoice Attachment](../../doc/api/invoices.md#create-invoice-attachment)
+* [Delete Invoice Attachment](../../doc/api/invoices.md#delete-invoice-attachment)
+* [Cancel Invoice](../../doc/api/invoices.md#cancel-invoice)
+* [Publish Invoice](../../doc/api/invoices.md#publish-invoice)
+
+
+# List Invoices
+
+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.
+
+```ts
+async listInvoices(
+ locationId: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Query, Required | The ID of the location for which to list invoices. |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | The maximum number of invoices to return (200 is the maximum `limit`).
If not provided, the server uses a default limit of 100 invoices. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListInvoicesResponse`](../../doc/models/list-invoices-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.listInvoices(locationId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Invoice
+
+Creates a draft [invoice](../../doc/models/invoice.md)
+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).
+
+```ts
+async createInvoice(
+ body: CreateInvoiceRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateInvoiceRequest`](../../doc/models/create-invoice-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateInvoiceResponse`](../../doc/models/create-invoice-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateInvoiceRequest = {
+ invoice: {
+ locationId: 'ES0RJRZYEC39A',
+ orderId: 'CAISENgvlJ6jLWAzERDzjyHVybY',
+ primaryRecipient: {
+ customerId: 'JDKYHBWT1D4F8MFH63DBMEN8Y4',
+ },
+ paymentRequests: [
+ {
+ requestType: 'BALANCE',
+ dueDate: '2030-01-24',
+ tippingEnabled: true,
+ automaticPaymentSource: 'NONE',
+ reminders: [
+ {
+ relativeScheduledDays: -1,
+ message: 'Your invoice is due tomorrow',
+ }
+ ],
+ }
+ ],
+ deliveryMethod: 'EMAIL',
+ invoiceNumber: 'inv-100',
+ title: 'Event Planning Services',
+ description: 'We appreciate your business!',
+ scheduledAt: '2030-01-13T10:00:00Z',
+ acceptedPaymentMethods: {
+ card: true,
+ squareGiftCard: false,
+ bankAccount: false,
+ buyNowPayLater: false,
+ cashAppPay: false,
+ },
+ customFields: [
+ {
+ 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',
+ }
+ ],
+ saleOrServiceDate: '2030-01-24',
+ storePaymentMethodEnabled: false,
+ },
+ idempotencyKey: 'ce3748f9-5fc1-4762-aa12-aae5e843f1f4',
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.createInvoice(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Invoices
+
+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.
+
+```ts
+async searchInvoices(
+ body: SearchInvoicesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchInvoicesRequest`](../../doc/models/search-invoices-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchInvoicesResponse`](../../doc/models/search-invoices-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchInvoicesRequest = {
+ query: {
+ filter: {
+ locationIds: [
+ 'ES0RJRZYEC39A'
+ ],
+ customerIds: [
+ 'JDKYHBWT1D4F8MFH63DBMEN8Y4'
+ ],
+ },
+ sort: {
+ field: 'INVOICE_SORT_DATE',
+ order: 'DESC',
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.searchInvoices(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Invoice
+
+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).
+
+```ts
+async deleteInvoice(
+ invoiceId: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the invoice to delete. |
+| `version` | `number \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteInvoiceResponse`](../../doc/models/delete-invoice-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.deleteInvoice(invoiceId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Invoice
+
+Retrieves an invoice by invoice ID.
+
+```ts
+async getInvoice(
+ invoiceId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the invoice to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetInvoiceResponse`](../../doc/models/get-invoice-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.getInvoice(invoiceId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Invoice
+
+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.
+
+```ts
+async updateInvoice(
+ invoiceId: string,
+ body: UpdateInvoiceRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the invoice to update. |
+| `body` | [`UpdateInvoiceRequest`](../../doc/models/update-invoice-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateInvoiceResponse`](../../doc/models/update-invoice-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+const body: UpdateInvoiceRequest = {
+ invoice: {
+ version: 1,
+ paymentRequests: [
+ {
+ uid: '2da7964f-f3d2-4f43-81e8-5aa220bf3355',
+ tippingEnabled: false,
+ reminders: [
+ {
+ },
+ {
+ },
+ {
+ }
+ ],
+ }
+ ],
+ },
+ idempotencyKey: '4ee82288-0910-499e-ab4c-5d0071dad1be',
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.updateInvoice(
+ invoiceId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Invoice Attachment
+
+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.
+
+```ts
+async createInvoiceAttachment(
+ invoiceId: string,
+ request?: CreateInvoiceAttachmentRequest,
+ imageFile?: FileWrapper,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the [invoice](entity:Invoice) to attach the file to. |
+| `request` | [`CreateInvoiceAttachmentRequest \| undefined`](../../doc/models/create-invoice-attachment-request.md) | Form (JSON-Encoded), Optional | Represents a [CreateInvoiceAttachment](../../doc/api/invoices.md#create-invoice-attachment) request. |
+| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateInvoiceAttachmentResponse`](../../doc/models/create-invoice-attachment-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+const request: CreateInvoiceAttachmentRequest = {
+ idempotencyKey: 'ae5e84f9-4742-4fc1-ba12-a3ce3748f1c3',
+ description: 'Service contract',
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.createInvoiceAttachment(
+ invoiceId,
+ request
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Invoice Attachment
+
+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.
+
+```ts
+async deleteInvoiceAttachment(
+ invoiceId: string,
+ attachmentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the [invoice](entity:Invoice) to delete the attachment from. |
+| `attachmentId` | `string` | Template, Required | The ID of the [attachment](entity:InvoiceAttachment) to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteInvoiceAttachmentResponse`](../../doc/models/delete-invoice-attachment-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+const attachmentId = 'attachment_id6';
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.deleteInvoiceAttachment(
+ invoiceId,
+ attachmentId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Invoice
+
+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`.
+
+```ts
+async cancelInvoice(
+ invoiceId: string,
+ body: CancelInvoiceRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the [invoice](entity:Invoice) to cancel. |
+| `body` | [`CancelInvoiceRequest`](../../doc/models/cancel-invoice-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelInvoiceResponse`](../../doc/models/cancel-invoice-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+const body: CancelInvoiceRequest = {
+ version: 0,
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.cancelInvoice(
+ invoiceId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Publish Invoice
+
+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.
+
+```ts
+async publishInvoice(
+ invoiceId: string,
+ body: PublishInvoiceRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `invoiceId` | `string` | Template, Required | The ID of the invoice to publish. |
+| `body` | [`PublishInvoiceRequest`](../../doc/models/publish-invoice-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`PublishInvoiceResponse`](../../doc/models/publish-invoice-response.md)
+
+## Example Usage
+
+```ts
+const invoiceId = 'invoice_id0';
+
+const body: PublishInvoiceRequest = {
+ version: 1,
+ idempotencyKey: '32da42d0-1997-41b0-826b-f09464fc2c2e',
+};
+
+try {
+ const { result, ...httpResponse } = await invoicesApi.publishInvoice(
+ invoiceId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/labor.md b/legacy/doc/api/labor.md
new file mode 100644
index 000000000..07260f848
--- /dev/null
+++ b/legacy/doc/api/labor.md
@@ -0,0 +1,851 @@
+# Labor
+
+```ts
+const laborApi = client.laborApi;
+```
+
+## Class Name
+
+`LaborApi`
+
+## Methods
+
+* [List Break Types](../../doc/api/labor.md#list-break-types)
+* [Create Break Type](../../doc/api/labor.md#create-break-type)
+* [Delete Break Type](../../doc/api/labor.md#delete-break-type)
+* [Get Break Type](../../doc/api/labor.md#get-break-type)
+* [Update Break Type](../../doc/api/labor.md#update-break-type)
+* [List Employee Wages](../../doc/api/labor.md#list-employee-wages)
+* [Get Employee Wage](../../doc/api/labor.md#get-employee-wage)
+* [Create Shift](../../doc/api/labor.md#create-shift)
+* [Search Shifts](../../doc/api/labor.md#search-shifts)
+* [Delete Shift](../../doc/api/labor.md#delete-shift)
+* [Get Shift](../../doc/api/labor.md#get-shift)
+* [Update Shift](../../doc/api/labor.md#update-shift)
+* [List Team Member Wages](../../doc/api/labor.md#list-team-member-wages)
+* [Get Team Member Wage](../../doc/api/labor.md#get-team-member-wage)
+* [List Workweek Configs](../../doc/api/labor.md#list-workweek-configs)
+* [Update Workweek Config](../../doc/api/labor.md#update-workweek-config)
+
+
+# List Break Types
+
+Returns a paginated list of `BreakType` instances for a business.
+
+```ts
+async listBreakTypes(
+ locationId?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string \| undefined` | Query, Optional | Filter the returned `BreakType` results to only those that are associated with the
specified location. |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of `BreakType` results to return per page. The number can range between 1
and 200. The default is 200. |
+| `cursor` | `string \| undefined` | Query, Optional | A pointer to the next page of `BreakType` results to fetch. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListBreakTypesResponse`](../../doc/models/list-break-types-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await laborApi.listBreakTypes();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Break Type
+
+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.
+
+```ts
+async createBreakType(
+ body: CreateBreakTypeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateBreakTypeRequest`](../../doc/models/create-break-type-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateBreakTypeResponse`](../../doc/models/create-break-type-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateBreakTypeRequest = {
+ breakType: {
+ locationId: 'CGJN03P1D08GF',
+ breakName: 'Lunch Break',
+ expectedDuration: 'PT30M',
+ isPaid: true,
+ },
+ idempotencyKey: 'PAD3NG5KSN2GL',
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.createBreakType(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Break Type
+
+Deletes an existing `BreakType`.
+
+A `BreakType` can be deleted even if it is referenced from a `Shift`.
+
+```ts
+async deleteBreakType(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `BreakType` being deleted. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteBreakTypeResponse`](../../doc/models/delete-break-type-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.deleteBreakType(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Break Type
+
+Returns a single `BreakType` specified by `id`.
+
+```ts
+async getBreakType(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `BreakType` being retrieved. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetBreakTypeResponse`](../../doc/models/get-break-type-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.getBreakType(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Break Type
+
+Updates an existing `BreakType`.
+
+```ts
+async updateBreakType(
+ id: string,
+ body: UpdateBreakTypeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `BreakType` being updated. |
+| `body` | [`UpdateBreakTypeRequest`](../../doc/models/update-break-type-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateBreakTypeResponse`](../../doc/models/update-break-type-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+const body: UpdateBreakTypeRequest = {
+ breakType: {
+ locationId: '26M7H24AZ9N6R',
+ breakName: 'Lunch',
+ expectedDuration: 'PT50M',
+ isPaid: true,
+ version: 1,
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.updateBreakType(
+ id,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Employee Wages
+
+**This endpoint is deprecated.**
+
+Returns a paginated list of `EmployeeWage` instances for a business.
+
+```ts
+async listEmployeeWages(
+ employeeId?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `employeeId` | `string \| undefined` | Query, Optional | Filter the returned wages to only those that are associated with the specified employee. |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of `EmployeeWage` results to return per page. The number can range between
1 and 200. The default is 200. |
+| `cursor` | `string \| undefined` | Query, Optional | A pointer to the next page of `EmployeeWage` results to fetch. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListEmployeeWagesResponse`](../../doc/models/list-employee-wages-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await laborApi.listEmployeeWages();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Employee Wage
+
+**This endpoint is deprecated.**
+
+Returns a single `EmployeeWage` specified by `id`.
+
+```ts
+async getEmployeeWage(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `EmployeeWage` being retrieved. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetEmployeeWageResponse`](../../doc/models/get-employee-wage-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.getEmployeeWage(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Shift
+
+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.
+
+```ts
+async createShift(
+ body: CreateShiftRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateShiftRequest`](../../doc/models/create-shift-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateShiftResponse`](../../doc/models/create-shift-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateShiftRequest = {
+ shift: {
+ locationId: 'PAA1RJZZKXBFG',
+ startAt: '2019-01-25T03:11:00-05:00',
+ endAt: '2019-01-25T13:11:00-05:00',
+ wage: {
+ title: 'Barista',
+ hourlyRate: {
+ amount: BigInt(1100),
+ currency: 'USD',
+ },
+ tipEligible: true,
+ },
+ breaks: [
+ {
+ startAt: '2019-01-25T06:11:00-05:00',
+ breakTypeId: 'REGS1EQR1TPZ5',
+ name: 'Tea Break',
+ expectedDuration: 'PT5M',
+ isPaid: true,
+ endAt: '2019-01-25T06:16:00-05:00',
+ }
+ ],
+ teamMemberId: 'ormj0jJJZ5OZIzxrZYJI',
+ declaredCashTipMoney: {
+ amount: BigInt(500),
+ currency: 'USD',
+ },
+ },
+ idempotencyKey: 'HIDSNG5KS478L',
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.createShift(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Shifts
+
+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`
+
+```ts
+async searchShifts(
+ body: SearchShiftsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchShiftsRequest`](../../doc/models/search-shifts-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchShiftsResponse`](../../doc/models/search-shifts-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchShiftsRequest = {
+ query: {
+ filter: {
+ workday: {
+ dateRange: {
+ startDate: '2019-01-20',
+ endDate: '2019-02-03',
+ },
+ matchShiftsBy: 'START_AT',
+ defaultTimezone: 'America/Los_Angeles',
+ },
+ },
+ },
+ limit: 100,
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.searchShifts(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Shift
+
+Deletes a `Shift`.
+
+```ts
+async deleteShift(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `Shift` being deleted. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteShiftResponse`](../../doc/models/delete-shift-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.deleteShift(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Shift
+
+Returns a single `Shift` specified by `id`.
+
+```ts
+async getShift(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `Shift` being retrieved. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetShiftResponse`](../../doc/models/get-shift-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.getShift(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Shift
+
+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`.
+
+```ts
+async updateShift(
+ id: string,
+ body: UpdateShiftRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the object being updated. |
+| `body` | [`UpdateShiftRequest`](../../doc/models/update-shift-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateShiftResponse`](../../doc/models/update-shift-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+const body: UpdateShiftRequest = {
+ shift: {
+ locationId: 'PAA1RJZZKXBFG',
+ startAt: '2019-01-25T03:11:00-05:00',
+ endAt: '2019-01-25T13:11:00-05:00',
+ wage: {
+ title: 'Bartender',
+ hourlyRate: {
+ amount: BigInt(1500),
+ currency: 'USD',
+ },
+ tipEligible: true,
+ },
+ breaks: [
+ {
+ startAt: '2019-01-25T06:11:00-05:00',
+ breakTypeId: 'REGS1EQR1TPZ5',
+ name: 'Tea Break',
+ expectedDuration: 'PT5M',
+ isPaid: true,
+ id: 'X7GAQYVVRRG6P',
+ endAt: '2019-01-25T06:16:00-05:00',
+ }
+ ],
+ version: 1,
+ teamMemberId: 'ormj0jJJZ5OZIzxrZYJI',
+ declaredCashTipMoney: {
+ amount: BigInt(500),
+ currency: 'USD',
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.updateShift(
+ id,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Team Member Wages
+
+Returns a paginated list of `TeamMemberWage` instances for a business.
+
+```ts
+async listTeamMemberWages(
+ teamMemberId?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `teamMemberId` | `string \| undefined` | Query, Optional | Filter the returned wages to only those that are associated with the
specified team member. |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of `TeamMemberWage` results to return per page. The number can range between
1 and 200. The default is 200. |
+| `cursor` | `string \| undefined` | Query, Optional | A pointer to the next page of `EmployeeWage` results to fetch. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListTeamMemberWagesResponse`](../../doc/models/list-team-member-wages-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await laborApi.listTeamMemberWages();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Team Member Wage
+
+Returns a single `TeamMemberWage` specified by `id`.
+
+```ts
+async getTeamMemberWage(
+ id: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `TeamMemberWage` being retrieved. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetTeamMemberWageResponse`](../../doc/models/get-team-member-wage-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+try {
+ const { result, ...httpResponse } = await laborApi.getTeamMemberWage(id);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Workweek Configs
+
+Returns a list of `WorkweekConfig` instances for a business.
+
+```ts
+async listWorkweekConfigs(
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `limit` | `number \| undefined` | Query, Optional | The maximum number of `WorkweekConfigs` results to return per page. |
+| `cursor` | `string \| undefined` | Query, Optional | A pointer to the next page of `WorkweekConfig` results to fetch. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListWorkweekConfigsResponse`](../../doc/models/list-workweek-configs-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await laborApi.listWorkweekConfigs();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Workweek Config
+
+Updates a `WorkweekConfig`.
+
+```ts
+async updateWorkweekConfig(
+ id: string,
+ body: UpdateWorkweekConfigRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The UUID for the `WorkweekConfig` object being updated. |
+| `body` | [`UpdateWorkweekConfigRequest`](../../doc/models/update-workweek-config-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateWorkweekConfigResponse`](../../doc/models/update-workweek-config-response.md)
+
+## Example Usage
+
+```ts
+const id = 'id0';
+
+const body: UpdateWorkweekConfigRequest = {
+ workweekConfig: {
+ startOfWeek: 'MON',
+ startOfDayLocalTime: '10:00',
+ version: 10,
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await laborApi.updateWorkweekConfig(
+ id,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/location-custom-attributes.md b/legacy/doc/api/location-custom-attributes.md
new file mode 100644
index 000000000..9fc777f78
--- /dev/null
+++ b/legacy/doc/api/location-custom-attributes.md
@@ -0,0 +1,605 @@
+# Location Custom Attributes
+
+```ts
+const locationCustomAttributesApi = client.locationCustomAttributesApi;
+```
+
+## Class Name
+
+`LocationCustomAttributesApi`
+
+## Methods
+
+* [List Location Custom Attribute Definitions](../../doc/api/location-custom-attributes.md#list-location-custom-attribute-definitions)
+* [Create Location Custom Attribute Definition](../../doc/api/location-custom-attributes.md#create-location-custom-attribute-definition)
+* [Delete Location Custom Attribute Definition](../../doc/api/location-custom-attributes.md#delete-location-custom-attribute-definition)
+* [Retrieve Location Custom Attribute Definition](../../doc/api/location-custom-attributes.md#retrieve-location-custom-attribute-definition)
+* [Update Location Custom Attribute Definition](../../doc/api/location-custom-attributes.md#update-location-custom-attribute-definition)
+* [Bulk Delete Location Custom Attributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes)
+* [Bulk Upsert Location Custom Attributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes)
+* [List Location Custom Attributes](../../doc/api/location-custom-attributes.md#list-location-custom-attributes)
+* [Delete Location Custom Attribute](../../doc/api/location-custom-attributes.md#delete-location-custom-attribute)
+* [Retrieve Location Custom Attribute](../../doc/api/location-custom-attributes.md#retrieve-location-custom-attribute)
+* [Upsert Location Custom Attribute](../../doc/api/location-custom-attributes.md#upsert-location-custom-attribute)
+
+
+# List Location Custom Attribute Definitions
+
+Lists the location-related [custom attribute definitions](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async listLocationCustomAttributeDefinitions(
+ visibilityFilter?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Filters the `CustomAttributeDefinition` results by their `visibility` values. |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLocationCustomAttributeDefinitionsResponse`](../../doc/models/list-location-custom-attribute-definitions-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.listLocationCustomAttributeDefinitions();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Location Custom Attribute Definition
+
+Creates a location-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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](../../doc/api/location-custom-attributes.md#upsert-location-custom-attribute) or
+[BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes)
+to set the custom attribute for locations.
+
+```ts
+async createLocationCustomAttributeDefinition(
+ body: CreateLocationCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateLocationCustomAttributeDefinitionRequest`](../../doc/models/create-location-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateLocationCustomAttributeDefinitionResponse`](../../doc/models/create-location-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateLocationCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ key: 'bestseller',
+ name: 'Bestseller',
+ description: 'Bestselling item at location',
+ visibility: 'VISIBILITY_READ_WRITE_VALUES',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.createLocationCustomAttributeDefinition(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Location Custom Attribute Definition
+
+Deletes a location-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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.
+
+```ts
+async deleteLocationCustomAttributeDefinition(
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteLocationCustomAttributeDefinitionResponse`](../../doc/models/delete-location-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.deleteLocationCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Location Custom Attribute Definition
+
+Retrieves a location-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async retrieveLocationCustomAttributeDefinition(
+ key: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to retrieve. If the requesting application
is not the definition owner, you must use the qualified key. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLocationCustomAttributeDefinitionResponse`](../../doc/models/retrieve-location-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.retrieveLocationCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Location Custom Attribute Definition
+
+Updates a location-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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.
+
+```ts
+async updateLocationCustomAttributeDefinition(
+ key: string,
+ body: UpdateLocationCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to update. |
+| `body` | [`UpdateLocationCustomAttributeDefinitionRequest`](../../doc/models/update-location-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateLocationCustomAttributeDefinitionResponse`](../../doc/models/update-location-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+const body: UpdateLocationCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ description: 'Update the description as desired.',
+ visibility: 'VISIBILITY_READ_ONLY',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.updateLocationCustomAttributeDefinition(
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Delete Location Custom Attributes
+
+Deletes [custom attributes](../../doc/models/custom-attribute.md) for locations as a bulk operation.
+To delete a custom attribute owned by another application, the `visibility` setting must be
+`VISIBILITY_READ_WRITE_VALUES`.
+
+```ts
+async bulkDeleteLocationCustomAttributes(
+ body: BulkDeleteLocationCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkDeleteLocationCustomAttributesRequest`](../../doc/models/bulk-delete-location-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkDeleteLocationCustomAttributesResponse`](../../doc/models/bulk-delete-location-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkDeleteLocationCustomAttributesRequest = {
+ values: {
+ 'id1': {
+ },
+ 'id2': {
+ },
+ 'id3': {
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.bulkDeleteLocationCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Upsert Location Custom Attributes
+
+Creates or updates [custom attributes](../../doc/models/custom-attribute.md) 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](../../doc/api/location-custom-attributes.md#create-location-custom-attribute-definition) 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`.
+
+```ts
+async bulkUpsertLocationCustomAttributes(
+ body: BulkUpsertLocationCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpsertLocationCustomAttributesRequest`](../../doc/models/bulk-upsert-location-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpsertLocationCustomAttributesResponse`](../../doc/models/bulk-upsert-location-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpsertLocationCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ locationId: 'location_id4',
+ customAttribute: {
+ },
+ },
+ 'key1': {
+ locationId: 'location_id4',
+ customAttribute: {
+ },
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.bulkUpsertLocationCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Location Custom Attributes
+
+Lists the [custom attributes](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async listLocationCustomAttributes(
+ locationId: string,
+ visibilityFilter?: string,
+ limit?: number,
+ cursor?: string,
+ withDefinitions?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the target [location](entity:Location). |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Filters the `CustomAttributeDefinition` results by their `visibility` values. |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `withDefinitions` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLocationCustomAttributesResponse`](../../doc/models/list-location-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const withDefinitions = false;
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.listLocationCustomAttributes(
+ locationId,
+ undefined,
+ undefined,
+ undefined,
+ withDefinitions
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Location Custom Attribute
+
+Deletes a [custom attribute](../../doc/models/custom-attribute.md) associated with a location.
+To delete a custom attribute owned by another application, the `visibility` setting must be
+`VISIBILITY_READ_WRITE_VALUES`.
+
+```ts
+async deleteLocationCustomAttribute(
+ locationId: string,
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the target [location](entity:Location). |
+| `key` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteLocationCustomAttributeResponse`](../../doc/models/delete-location-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.deleteLocationCustomAttribute(
+ locationId,
+ key
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Location Custom Attribute
+
+Retrieves a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async retrieveLocationCustomAttribute(
+ locationId: string,
+ key: string,
+ withDefinition?: boolean,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the target [location](entity:Location). |
+| `key` | `string` | Template, Required | 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. |
+| `withDefinition` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLocationCustomAttributeResponse`](../../doc/models/retrieve-location-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const key = 'key0';
+
+const withDefinition = false;
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.retrieveLocationCustomAttribute(
+ locationId,
+ key,
+ withDefinition
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Location Custom Attribute
+
+Creates or updates a [custom attribute](../../doc/models/custom-attribute.md) 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](../../doc/api/location-custom-attributes.md#create-location-custom-attribute-definition) endpoint.
+To create or update a custom attribute owned by another application, the `visibility` setting
+must be `VISIBILITY_READ_WRITE_VALUES`.
+
+```ts
+async upsertLocationCustomAttribute(
+ locationId: string,
+ key: string,
+ body: UpsertLocationCustomAttributeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the target [location](entity:Location). |
+| `key` | `string` | Template, Required | 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` | [`UpsertLocationCustomAttributeRequest`](../../doc/models/upsert-location-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertLocationCustomAttributeResponse`](../../doc/models/upsert-location-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const key = 'key0';
+
+const body: UpsertLocationCustomAttributeRequest = {
+ customAttribute: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationCustomAttributesApi.upsertLocationCustomAttribute(
+ locationId,
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/locations.md b/legacy/doc/api/locations.md
new file mode 100644
index 000000000..4a9bccb00
--- /dev/null
+++ b/legacy/doc/api/locations.md
@@ -0,0 +1,222 @@
+# Locations
+
+```ts
+const locationsApi = client.locationsApi;
+```
+
+## Class Name
+
+`LocationsApi`
+
+## Methods
+
+* [List Locations](../../doc/api/locations.md#list-locations)
+* [Create Location](../../doc/api/locations.md#create-location)
+* [Retrieve Location](../../doc/api/locations.md#retrieve-location)
+* [Update Location](../../doc/api/locations.md#update-location)
+
+
+# List Locations
+
+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`.
+
+```ts
+async listLocations(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLocationsResponse`](../../doc/models/list-locations-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await locationsApi.listLocations();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Location
+
+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.
+
+```ts
+async createLocation(
+ body: CreateLocationRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateLocationRequest`](../../doc/models/create-location-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateLocationResponse`](../../doc/models/create-location-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateLocationRequest = {
+ location: {
+ name: 'Midtown',
+ address: {
+ addressLine1: '1234 Peachtree St. NE',
+ locality: 'Atlanta',
+ administrativeDistrictLevel1: 'GA',
+ postalCode: '30309',
+ },
+ description: 'Midtown Atlanta store',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationsApi.createLocation(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Location
+
+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).
+
+```ts
+async retrieveLocation(
+ locationId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the location to retrieve. Specify the string
"main" to return the main location. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLocationResponse`](../../doc/models/retrieve-location-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+try {
+ const { result, ...httpResponse } = await locationsApi.retrieveLocation(locationId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Location
+
+Updates a [location](https://developer.squareup.com/docs/locations-api).
+
+```ts
+async updateLocation(
+ locationId: string,
+ body: UpdateLocationRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string` | Template, Required | The ID of the location to update. |
+| `body` | [`UpdateLocationRequest`](../../doc/models/update-location-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateLocationResponse`](../../doc/models/update-location-response.md)
+
+## Example Usage
+
+```ts
+const locationId = 'location_id4';
+
+const body: UpdateLocationRequest = {
+ location: {
+ businessHours: {
+ periods: [
+ {
+ dayOfWeek: 'FRI',
+ startLocalTime: '07:00',
+ endLocalTime: '18:00',
+ },
+ {
+ dayOfWeek: 'SAT',
+ startLocalTime: '07:00',
+ endLocalTime: '18:00',
+ },
+ {
+ dayOfWeek: 'SUN',
+ startLocalTime: '09:00',
+ endLocalTime: '15:00',
+ }
+ ],
+ },
+ description: 'Midtown Atlanta store - Open weekends',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await locationsApi.updateLocation(
+ locationId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/loyalty.md b/legacy/doc/api/loyalty.md
new file mode 100644
index 000000000..2841c3090
--- /dev/null
+++ b/legacy/doc/api/loyalty.md
@@ -0,0 +1,976 @@
+# Loyalty
+
+```ts
+const loyaltyApi = client.loyaltyApi;
+```
+
+## Class Name
+
+`LoyaltyApi`
+
+## Methods
+
+* [Create Loyalty Account](../../doc/api/loyalty.md#create-loyalty-account)
+* [Search Loyalty Accounts](../../doc/api/loyalty.md#search-loyalty-accounts)
+* [Retrieve Loyalty Account](../../doc/api/loyalty.md#retrieve-loyalty-account)
+* [Accumulate Loyalty Points](../../doc/api/loyalty.md#accumulate-loyalty-points)
+* [Adjust Loyalty Points](../../doc/api/loyalty.md#adjust-loyalty-points)
+* [Search Loyalty Events](../../doc/api/loyalty.md#search-loyalty-events)
+* [List Loyalty Programs](../../doc/api/loyalty.md#list-loyalty-programs)
+* [Retrieve Loyalty Program](../../doc/api/loyalty.md#retrieve-loyalty-program)
+* [Calculate Loyalty Points](../../doc/api/loyalty.md#calculate-loyalty-points)
+* [List Loyalty Promotions](../../doc/api/loyalty.md#list-loyalty-promotions)
+* [Create Loyalty Promotion](../../doc/api/loyalty.md#create-loyalty-promotion)
+* [Retrieve Loyalty Promotion](../../doc/api/loyalty.md#retrieve-loyalty-promotion)
+* [Cancel Loyalty Promotion](../../doc/api/loyalty.md#cancel-loyalty-promotion)
+* [Create Loyalty Reward](../../doc/api/loyalty.md#create-loyalty-reward)
+* [Search Loyalty Rewards](../../doc/api/loyalty.md#search-loyalty-rewards)
+* [Delete Loyalty Reward](../../doc/api/loyalty.md#delete-loyalty-reward)
+* [Retrieve Loyalty Reward](../../doc/api/loyalty.md#retrieve-loyalty-reward)
+* [Redeem Loyalty Reward](../../doc/api/loyalty.md#redeem-loyalty-reward)
+
+
+# Create Loyalty Account
+
+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.
+
+```ts
+async createLoyaltyAccount(
+ body: CreateLoyaltyAccountRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateLoyaltyAccountRequest`](../../doc/models/create-loyalty-account-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateLoyaltyAccountResponse`](../../doc/models/create-loyalty-account-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateLoyaltyAccountRequest = {
+ loyaltyAccount: {
+ programId: 'd619f755-2d17-41f3-990d-c04ecedd64dd',
+ mapping: {
+ phoneNumber: '+14155551234',
+ },
+ },
+ idempotencyKey: 'ec78c477-b1c3-4899-a209-a4e71337c996',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.createLoyaltyAccount(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Loyalty Accounts
+
+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.
+
+```ts
+async searchLoyaltyAccounts(
+ body: SearchLoyaltyAccountsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchLoyaltyAccountsRequest`](../../doc/models/search-loyalty-accounts-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchLoyaltyAccountsResponse`](../../doc/models/search-loyalty-accounts-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchLoyaltyAccountsRequest = {
+ query: {
+ mappings: [
+ {
+ phoneNumber: '+14155551234',
+ }
+ ],
+ },
+ limit: 10,
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.searchLoyaltyAccounts(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Loyalty Account
+
+Retrieves a loyalty account.
+
+```ts
+async retrieveLoyaltyAccount(
+ accountId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `accountId` | `string` | Template, Required | The ID of the [loyalty account](entity:LoyaltyAccount) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLoyaltyAccountResponse`](../../doc/models/retrieve-loyalty-account-response.md)
+
+## Example Usage
+
+```ts
+const accountId = 'account_id2';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.retrieveLoyaltyAccount(accountId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Accumulate Loyalty Points
+
+Adds points earned from a purchase to a [loyalty account](../../doc/models/loyalty-account.md).
+
+- 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](../../doc/models/loyalty-promotion.md). 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](../../doc/api/loyalty.md#calculate-loyalty-points)
+ 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).
+
+```ts
+async accumulateLoyaltyPoints(
+ accountId: string,
+ body: AccumulateLoyaltyPointsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `accountId` | `string` | Template, Required | The ID of the target [loyalty account](entity:LoyaltyAccount). |
+| `body` | [`AccumulateLoyaltyPointsRequest`](../../doc/models/accumulate-loyalty-points-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`AccumulateLoyaltyPointsResponse`](../../doc/models/accumulate-loyalty-points-response.md)
+
+## Example Usage
+
+```ts
+const accountId = 'account_id2';
+
+const body: AccumulateLoyaltyPointsRequest = {
+ accumulatePoints: {
+ orderId: 'RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY',
+ },
+ idempotencyKey: '58b90739-c3e8-4b11-85f7-e636d48d72cb',
+ locationId: 'P034NEENMD09F',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.accumulateLoyaltyPoints(
+ accountId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Adjust Loyalty Points
+
+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](../../doc/api/loyalty.md#accumulate-loyalty-points)
+to add points when a buyer pays for the purchase.
+
+```ts
+async adjustLoyaltyPoints(
+ accountId: string,
+ body: AdjustLoyaltyPointsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `accountId` | `string` | Template, Required | The ID of the target [loyalty account](entity:LoyaltyAccount). |
+| `body` | [`AdjustLoyaltyPointsRequest`](../../doc/models/adjust-loyalty-points-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`AdjustLoyaltyPointsResponse`](../../doc/models/adjust-loyalty-points-response.md)
+
+## Example Usage
+
+```ts
+const accountId = 'account_id2';
+
+const body: AdjustLoyaltyPointsRequest = {
+ idempotencyKey: 'bc29a517-3dc9-450e-aa76-fae39ee849d1',
+ adjustPoints: {
+ points: 10,
+ reason: 'Complimentary points',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.adjustLoyaltyPoints(
+ accountId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Loyalty Events
+
+Searches for loyalty events.
+
+A Square loyalty program maintains a ledger of events that occur during the lifetime of a
+buyer's loyalty account. Each change in the point balance
+(for example, points earned, points redeemed, and points expired) is
+recorded in the ledger. Using this endpoint, you can search the ledger for events.
+
+Search results are sorted by `created_at` in descending order.
+
+```ts
+async searchLoyaltyEvents(
+ body: SearchLoyaltyEventsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchLoyaltyEventsRequest`](../../doc/models/search-loyalty-events-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchLoyaltyEventsResponse`](../../doc/models/search-loyalty-events-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchLoyaltyEventsRequest = {
+ query: {
+ filter: {
+ orderFilter: {
+ orderId: 'PyATxhYLfsMqpVkcKJITPydgEYfZY',
+ },
+ },
+ },
+ limit: 30,
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.searchLoyaltyEvents(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Loyalty Programs
+
+**This endpoint is deprecated.**
+
+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`.
+
+```ts
+async listLoyaltyPrograms(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLoyaltyProgramsResponse`](../../doc/models/list-loyalty-programs-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await loyaltyApi.listLoyaltyPrograms();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Loyalty Program
+
+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).
+
+```ts
+async retrieveLoyaltyProgram(
+ programId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `programId` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLoyaltyProgramResponse`](../../doc/models/retrieve-loyalty-program-response.md)
+
+## Example Usage
+
+```ts
+const programId = 'program_id0';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.retrieveLoyaltyProgram(programId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Calculate Loyalty Points
+
+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](../../doc/models/loyalty-promotion.md).
+
+- 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](../../doc/api/loyalty.md#list-loyalty-promotions) 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).
+
+```ts
+async calculateLoyaltyPoints(
+ programId: string,
+ body: CalculateLoyaltyPointsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `programId` | `string` | Template, Required | The ID of the [loyalty program](entity:LoyaltyProgram), which defines the rules for accruing points. |
+| `body` | [`CalculateLoyaltyPointsRequest`](../../doc/models/calculate-loyalty-points-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CalculateLoyaltyPointsResponse`](../../doc/models/calculate-loyalty-points-response.md)
+
+## Example Usage
+
+```ts
+const programId = 'program_id0';
+
+const body: CalculateLoyaltyPointsRequest = {
+ orderId: 'RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY',
+ loyaltyAccountId: '79b807d2-d786-46a9-933b-918028d7a8c5',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.calculateLoyaltyPoints(
+ programId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Loyalty Promotions
+
+Lists the loyalty promotions associated with a [loyalty program](../../doc/models/loyalty-program.md).
+Results are sorted by the `created_at` date in descending order (newest to oldest).
+
+```ts
+async listLoyaltyPromotions(
+ programId: string,
+ status?: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `programId` | `string` | Template, Required | The ID of the base [loyalty program](entity:LoyaltyProgram). To get the program ID,
call [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the `main` keyword. |
+| `status` | [`string \| undefined`](../../doc/models/loyalty-promotion-status.md) | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListLoyaltyPromotionsResponse`](../../doc/models/list-loyalty-promotions-response.md)
+
+## Example Usage
+
+```ts
+const programId = 'program_id0';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.listLoyaltyPromotions(programId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Loyalty Promotion
+
+Creates a loyalty promotion for a [loyalty program](../../doc/models/loyalty-program.md). 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.
+
+```ts
+async createLoyaltyPromotion(
+ programId: string,
+ body: CreateLoyaltyPromotionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `programId` | `string` | Template, Required | 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` | [`CreateLoyaltyPromotionRequest`](../../doc/models/create-loyalty-promotion-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateLoyaltyPromotionResponse`](../../doc/models/create-loyalty-promotion-response.md)
+
+## Example Usage
+
+```ts
+const programId = 'program_id0';
+
+const body: CreateLoyaltyPromotionRequest = {
+ loyaltyPromotion: {
+ name: 'Tuesday Happy Hour Promo',
+ incentive: {
+ type: 'POINTS_MULTIPLIER',
+ pointsMultiplierData: {
+ multiplier: '3.0',
+ },
+ },
+ availableTime: {
+ timePeriods: [
+ 'BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT'
+ ],
+ },
+ triggerLimit: {
+ times: 1,
+ interval: 'DAY',
+ },
+ minimumSpendAmountMoney: {
+ amount: BigInt(2000),
+ currency: 'USD',
+ },
+ qualifyingCategoryIds: [
+ 'XTQPYLR3IIU9C44VRCB3XD12'
+ ],
+ },
+ idempotencyKey: 'ec78c477-b1c3-4899-a209-a4e71337c996',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.createLoyaltyPromotion(
+ programId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Loyalty Promotion
+
+Retrieves a loyalty promotion.
+
+```ts
+async retrieveLoyaltyPromotion(
+ promotionId: string,
+ programId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `promotionId` | `string` | Template, Required | The ID of the [loyalty promotion](entity:LoyaltyPromotion) to retrieve. |
+| `programId` | `string` | Template, Required | The ID of the base [loyalty program](entity:LoyaltyProgram). To get the program ID,
call [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the `main` keyword. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLoyaltyPromotionResponse`](../../doc/models/retrieve-loyalty-promotion-response.md)
+
+## Example Usage
+
+```ts
+const promotionId = 'promotion_id0';
+
+const programId = 'program_id0';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.retrieveLoyaltyPromotion(
+ promotionId,
+ programId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Loyalty Promotion
+
+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
+
+```ts
+async cancelLoyaltyPromotion(
+ promotionId: string,
+ programId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `promotionId` | `string` | Template, Required | The ID of the [loyalty promotion](entity:LoyaltyPromotion) to cancel. You can cancel a
promotion that has an `ACTIVE` or `SCHEDULED` status. |
+| `programId` | `string` | Template, Required | The ID of the base [loyalty program](entity:LoyaltyProgram). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelLoyaltyPromotionResponse`](../../doc/models/cancel-loyalty-promotion-response.md)
+
+## Example Usage
+
+```ts
+const promotionId = 'promotion_id0';
+
+const programId = 'program_id0';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.cancelLoyaltyPromotion(
+ promotionId,
+ programId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Loyalty Reward
+
+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.
+
+```ts
+async createLoyaltyReward(
+ body: CreateLoyaltyRewardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateLoyaltyRewardRequest`](../../doc/models/create-loyalty-reward-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateLoyaltyRewardResponse`](../../doc/models/create-loyalty-reward-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateLoyaltyRewardRequest = {
+ reward: {
+ loyaltyAccountId: '5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd',
+ rewardTierId: 'e1b39225-9da5-43d1-a5db-782cdd8ad94f',
+ orderId: 'RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY',
+ },
+ idempotencyKey: '18c2e5ea-a620-4b1f-ad60-7b167285e451',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.createLoyaltyReward(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Loyalty Rewards
+
+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](../../doc/api/loyalty.md#retrieve-loyalty-reward) endpoint.
+
+Search results are sorted by `updated_at` in descending order.
+
+```ts
+async searchLoyaltyRewards(
+ body: SearchLoyaltyRewardsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchLoyaltyRewardsRequest`](../../doc/models/search-loyalty-rewards-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchLoyaltyRewardsResponse`](../../doc/models/search-loyalty-rewards-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchLoyaltyRewardsRequest = {
+ query: {
+ loyaltyAccountId: '5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd',
+ },
+ limit: 10,
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.searchLoyaltyRewards(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Loyalty Reward
+
+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](../../doc/api/loyalty.md#create-loyalty-reward)),
+ it updates the order by removing the reward and related
+ discounts.
+
+You cannot delete a reward that has reached the terminal state (REDEEMED).
+
+```ts
+async deleteLoyaltyReward(
+ rewardId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `rewardId` | `string` | Template, Required | The ID of the [loyalty reward](entity:LoyaltyReward) to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteLoyaltyRewardResponse`](../../doc/models/delete-loyalty-reward-response.md)
+
+## Example Usage
+
+```ts
+const rewardId = 'reward_id4';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.deleteLoyaltyReward(rewardId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Loyalty Reward
+
+Retrieves a loyalty reward.
+
+```ts
+async retrieveLoyaltyReward(
+ rewardId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `rewardId` | `string` | Template, Required | The ID of the [loyalty reward](entity:LoyaltyReward) to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveLoyaltyRewardResponse`](../../doc/models/retrieve-loyalty-reward-response.md)
+
+## Example Usage
+
+```ts
+const rewardId = 'reward_id4';
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.retrieveLoyaltyReward(rewardId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Redeem Loyalty Reward
+
+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.
+
+```ts
+async redeemLoyaltyReward(
+ rewardId: string,
+ body: RedeemLoyaltyRewardRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `rewardId` | `string` | Template, Required | The ID of the [loyalty reward](entity:LoyaltyReward) to redeem. |
+| `body` | [`RedeemLoyaltyRewardRequest`](../../doc/models/redeem-loyalty-reward-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RedeemLoyaltyRewardResponse`](../../doc/models/redeem-loyalty-reward-response.md)
+
+## Example Usage
+
+```ts
+const rewardId = 'reward_id4';
+
+const body: RedeemLoyaltyRewardRequest = {
+ idempotencyKey: '98adc7f7-6963-473b-b29c-f3c9cdd7d994',
+ locationId: 'P034NEENMD09F',
+};
+
+try {
+ const { result, ...httpResponse } = await loyaltyApi.redeemLoyaltyReward(
+ rewardId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/merchant-custom-attributes.md b/legacy/doc/api/merchant-custom-attributes.md
new file mode 100644
index 000000000..499597bf4
--- /dev/null
+++ b/legacy/doc/api/merchant-custom-attributes.md
@@ -0,0 +1,603 @@
+# Merchant Custom Attributes
+
+```ts
+const merchantCustomAttributesApi = client.merchantCustomAttributesApi;
+```
+
+## Class Name
+
+`MerchantCustomAttributesApi`
+
+## Methods
+
+* [List Merchant Custom Attribute Definitions](../../doc/api/merchant-custom-attributes.md#list-merchant-custom-attribute-definitions)
+* [Create Merchant Custom Attribute Definition](../../doc/api/merchant-custom-attributes.md#create-merchant-custom-attribute-definition)
+* [Delete Merchant Custom Attribute Definition](../../doc/api/merchant-custom-attributes.md#delete-merchant-custom-attribute-definition)
+* [Retrieve Merchant Custom Attribute Definition](../../doc/api/merchant-custom-attributes.md#retrieve-merchant-custom-attribute-definition)
+* [Update Merchant Custom Attribute Definition](../../doc/api/merchant-custom-attributes.md#update-merchant-custom-attribute-definition)
+* [Bulk Delete Merchant Custom Attributes](../../doc/api/merchant-custom-attributes.md#bulk-delete-merchant-custom-attributes)
+* [Bulk Upsert Merchant Custom Attributes](../../doc/api/merchant-custom-attributes.md#bulk-upsert-merchant-custom-attributes)
+* [List Merchant Custom Attributes](../../doc/api/merchant-custom-attributes.md#list-merchant-custom-attributes)
+* [Delete Merchant Custom Attribute](../../doc/api/merchant-custom-attributes.md#delete-merchant-custom-attribute)
+* [Retrieve Merchant Custom Attribute](../../doc/api/merchant-custom-attributes.md#retrieve-merchant-custom-attribute)
+* [Upsert Merchant Custom Attribute](../../doc/api/merchant-custom-attributes.md#upsert-merchant-custom-attribute)
+
+
+# List Merchant Custom Attribute Definitions
+
+Lists the merchant-related [custom attribute definitions](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async listMerchantCustomAttributeDefinitions(
+ visibilityFilter?: string,
+ limit?: number,
+ cursor?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Filters the `CustomAttributeDefinition` results by their `visibility` values. |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListMerchantCustomAttributeDefinitionsResponse`](../../doc/models/list-merchant-custom-attribute-definitions-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.listMerchantCustomAttributeDefinitions();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Merchant Custom Attribute Definition
+
+Creates a merchant-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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](../../doc/api/merchant-custom-attributes.md#upsert-merchant-custom-attribute) or
+[BulkUpsertMerchantCustomAttributes](../../doc/api/merchant-custom-attributes.md#bulk-upsert-merchant-custom-attributes)
+to set the custom attribute for a merchant.
+
+```ts
+async createMerchantCustomAttributeDefinition(
+ body: CreateMerchantCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateMerchantCustomAttributeDefinitionRequest`](../../doc/models/create-merchant-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateMerchantCustomAttributeDefinitionResponse`](../../doc/models/create-merchant-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateMerchantCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ key: 'alternative_seller_name',
+ name: 'Alternative Merchant Name',
+ description: 'This is the other name this merchant goes by.',
+ visibility: 'VISIBILITY_READ_ONLY',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.createMerchantCustomAttributeDefinition(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Merchant Custom Attribute Definition
+
+Deletes a merchant-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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.
+
+```ts
+async deleteMerchantCustomAttributeDefinition(
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteMerchantCustomAttributeDefinitionResponse`](../../doc/models/delete-merchant-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.deleteMerchantCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Merchant Custom Attribute Definition
+
+Retrieves a merchant-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async retrieveMerchantCustomAttributeDefinition(
+ key: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to retrieve. If the requesting application
is not the definition owner, you must use the qualified key. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveMerchantCustomAttributeDefinitionResponse`](../../doc/models/retrieve-merchant-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.retrieveMerchantCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Merchant Custom Attribute Definition
+
+Updates a merchant-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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.
+
+```ts
+async updateMerchantCustomAttributeDefinition(
+ key: string,
+ body: UpdateMerchantCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to update. |
+| `body` | [`UpdateMerchantCustomAttributeDefinitionRequest`](../../doc/models/update-merchant-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateMerchantCustomAttributeDefinitionResponse`](../../doc/models/update-merchant-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+const body: UpdateMerchantCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ description: 'Update the description as desired.',
+ visibility: 'VISIBILITY_READ_ONLY',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.updateMerchantCustomAttributeDefinition(
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Delete Merchant Custom Attributes
+
+Deletes [custom attributes](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async bulkDeleteMerchantCustomAttributes(
+ body: BulkDeleteMerchantCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkDeleteMerchantCustomAttributesRequest`](../../doc/models/bulk-delete-merchant-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkDeleteMerchantCustomAttributesResponse`](../../doc/models/bulk-delete-merchant-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkDeleteMerchantCustomAttributesRequest = {
+ values: {
+ 'id1': {
+ },
+ 'id2': {
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.bulkDeleteMerchantCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Upsert Merchant Custom Attributes
+
+Creates or updates [custom attributes](../../doc/models/custom-attribute.md) 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](../../doc/api/merchant-custom-attributes.md#create-merchant-custom-attribute-definition) 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`.
+
+```ts
+async bulkUpsertMerchantCustomAttributes(
+ body: BulkUpsertMerchantCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpsertMerchantCustomAttributesRequest`](../../doc/models/bulk-upsert-merchant-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpsertMerchantCustomAttributesResponse`](../../doc/models/bulk-upsert-merchant-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpsertMerchantCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ merchantId: 'merchant_id0',
+ customAttribute: {
+ },
+ },
+ 'key1': {
+ merchantId: 'merchant_id0',
+ customAttribute: {
+ },
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.bulkUpsertMerchantCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Merchant Custom Attributes
+
+Lists the [custom attributes](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async listMerchantCustomAttributes(
+ merchantId: string,
+ visibilityFilter?: string,
+ limit?: number,
+ cursor?: string,
+ withDefinitions?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `merchantId` | `string` | Template, Required | The ID of the target [merchant](entity:Merchant). |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Filters the `CustomAttributeDefinition` results by their `visibility` values. |
+| `limit` | `number \| undefined` | Query, Optional | 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` | `string \| undefined` | Query, Optional | 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). |
+| `withDefinitions` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListMerchantCustomAttributesResponse`](../../doc/models/list-merchant-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const merchantId = 'merchant_id0';
+
+const withDefinitions = false;
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.listMerchantCustomAttributes(
+ merchantId,
+ undefined,
+ undefined,
+ undefined,
+ withDefinitions
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Merchant Custom Attribute
+
+Deletes a [custom attribute](../../doc/models/custom-attribute.md) associated with a merchant.
+To delete a custom attribute owned by another application, the `visibility` setting must be
+`VISIBILITY_READ_WRITE_VALUES`.
+
+```ts
+async deleteMerchantCustomAttribute(
+ merchantId: string,
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `merchantId` | `string` | Template, Required | The ID of the target [merchant](entity:Merchant). |
+| `key` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteMerchantCustomAttributeResponse`](../../doc/models/delete-merchant-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const merchantId = 'merchant_id0';
+
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.deleteMerchantCustomAttribute(
+ merchantId,
+ key
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Merchant Custom Attribute
+
+Retrieves a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async retrieveMerchantCustomAttribute(
+ merchantId: string,
+ key: string,
+ withDefinition?: boolean,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `merchantId` | `string` | Template, Required | The ID of the target [merchant](entity:Merchant). |
+| `key` | `string` | Template, Required | 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. |
+| `withDefinition` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveMerchantCustomAttributeResponse`](../../doc/models/retrieve-merchant-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const merchantId = 'merchant_id0';
+
+const key = 'key0';
+
+const withDefinition = false;
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.retrieveMerchantCustomAttribute(
+ merchantId,
+ key,
+ withDefinition
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Merchant Custom Attribute
+
+Creates or updates a [custom attribute](../../doc/models/custom-attribute.md) 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](../../doc/api/merchant-custom-attributes.md#create-merchant-custom-attribute-definition) endpoint.
+To create or update a custom attribute owned by another application, the `visibility` setting
+must be `VISIBILITY_READ_WRITE_VALUES`.
+
+```ts
+async upsertMerchantCustomAttribute(
+ merchantId: string,
+ key: string,
+ body: UpsertMerchantCustomAttributeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `merchantId` | `string` | Template, Required | The ID of the target [merchant](entity:Merchant). |
+| `key` | `string` | Template, Required | 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` | [`UpsertMerchantCustomAttributeRequest`](../../doc/models/upsert-merchant-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertMerchantCustomAttributeResponse`](../../doc/models/upsert-merchant-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const merchantId = 'merchant_id0';
+
+const key = 'key0';
+
+const body: UpsertMerchantCustomAttributeRequest = {
+ customAttribute: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await merchantCustomAttributesApi.upsertMerchantCustomAttribute(
+ merchantId,
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/merchants.md b/legacy/doc/api/merchants.md
new file mode 100644
index 000000000..e3d13e89d
--- /dev/null
+++ b/legacy/doc/api/merchants.md
@@ -0,0 +1,102 @@
+# Merchants
+
+```ts
+const merchantsApi = client.merchantsApi;
+```
+
+## Class Name
+
+`MerchantsApi`
+
+## Methods
+
+* [List Merchants](../../doc/api/merchants.md#list-merchants)
+* [Retrieve Merchant](../../doc/api/merchants.md#retrieve-merchant)
+
+
+# List Merchants
+
+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](../../doc/api/merchants.md#retrieve-merchant)
+endpoint to retrieve the merchant information.
+
+```ts
+async listMerchants(
+ cursor?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `cursor` | `number \| undefined` | Query, Optional | The cursor generated by the previous response. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListMerchantsResponse`](../../doc/models/list-merchants-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await merchantsApi.listMerchants();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Merchant
+
+Retrieves the `Merchant` object for the given `merchant_id`.
+
+```ts
+async retrieveMerchant(
+ merchantId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `merchantId` | `string` | Template, Required | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveMerchantResponse`](../../doc/models/retrieve-merchant-response.md)
+
+## Example Usage
+
+```ts
+const merchantId = 'merchant_id0';
+
+try {
+ const { result, ...httpResponse } = await merchantsApi.retrieveMerchant(merchantId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/mobile-authorization.md b/legacy/doc/api/mobile-authorization.md
new file mode 100644
index 000000000..ad614acc7
--- /dev/null
+++ b/legacy/doc/api/mobile-authorization.md
@@ -0,0 +1,63 @@
+# Mobile Authorization
+
+```ts
+const mobileAuthorizationApi = client.mobileAuthorizationApi;
+```
+
+## Class Name
+
+`MobileAuthorizationApi`
+
+
+# Create Mobile Authorization Code
+
+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.
+
+__Important:__ 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).
+
+```ts
+async createMobileAuthorizationCode(
+ body: CreateMobileAuthorizationCodeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateMobileAuthorizationCodeRequest`](../../doc/models/create-mobile-authorization-code-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateMobileAuthorizationCodeResponse`](../../doc/models/create-mobile-authorization-code-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateMobileAuthorizationCodeRequest = {
+ locationId: 'YOUR_LOCATION_ID',
+};
+
+try {
+ const { result, ...httpResponse } = await mobileAuthorizationApi.createMobileAuthorizationCode(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/o-auth.md b/legacy/doc/api/o-auth.md
new file mode 100644
index 000000000..9de69302d
--- /dev/null
+++ b/legacy/doc/api/o-auth.md
@@ -0,0 +1,193 @@
+# O Auth
+
+```ts
+const oAuthApi = client.oAuthApi;
+```
+
+## Class Name
+
+`OAuthApi`
+
+## Methods
+
+* [Revoke Token](../../doc/api/o-auth.md#revoke-token)
+* [Obtain Token](../../doc/api/o-auth.md#obtain-token)
+* [Retrieve Token Status](../../doc/api/o-auth.md#retrieve-token-status)
+
+
+# Revoke Token
+
+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.
+
+:information_source: **Note** This endpoint does not require authentication.
+
+```ts
+async revokeToken(
+ body: RevokeTokenRequest,
+ authorization: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`RevokeTokenRequest`](../../doc/models/revoke-token-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `authorization` | `string` | Header, Required | Client APPLICATION_SECRET |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RevokeTokenResponse`](../../doc/models/revoke-token-response.md)
+
+## Example Usage
+
+```ts
+const body: RevokeTokenRequest = {
+ clientId: 'CLIENT_ID',
+ accessToken: 'ACCESS_TOKEN',
+};
+
+const authorization = 'Client CLIENT_SECRET';
+
+try {
+ const { result, ...httpResponse } = await oAuthApi.revokeToken(
+ body,
+ authorization
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Obtain Token
+
+Returns an OAuth access token and a refresh token unless the
+`short_lived` parameter is set to `true`, in which case the endpoint
+returns only an access token.
+
+The `grant_type` parameter specifies the type of OAuth request. If
+`grant_type` is `authorization_code`, you must include the authorization
+code you received when a seller granted you authorization. If `grant_type`
+is `refresh_token`, you must provide a valid refresh token. If you're using
+an old version of the Square APIs (prior to March 13, 2019), `grant_type`
+can be `migration_token` and you must provide a valid migration token.
+
+You can use the `scopes` parameter to limit the set of permissions granted
+to the access token and refresh token. You can use the `short_lived` parameter
+to create an access token that expires in 24 hours.
+
+__Note:__ OAuth tokens should be encrypted and stored on a secure server.
+Application clients should never interact directly with OAuth tokens.
+
+:information_source: **Note** This endpoint does not require authentication.
+
+```ts
+async obtainToken(
+ body: ObtainTokenRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`ObtainTokenRequest`](../../doc/models/obtain-token-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ObtainTokenResponse`](../../doc/models/obtain-token-response.md)
+
+## Example Usage
+
+```ts
+const body: ObtainTokenRequest = {
+ clientId: 'APPLICATION_ID',
+ grantType: 'authorization_code',
+ clientSecret: 'APPLICATION_SECRET',
+ code: 'CODE_FROM_AUTHORIZE',
+};
+
+try {
+ const { result, ...httpResponse } = await oAuthApi.obtainToken(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Token Status
+
+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).
+
+Add the access token to the Authorization header of the request.
+
+__Important:__ The `Authorization` header you provide to this endpoint must have the following format:
+
+```
+Authorization: Bearer ACCESS_TOKEN
+```
+
+where `ACCESS_TOKEN` is a
+[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).
+
+If the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.
+
+```ts
+async retrieveTokenStatus(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveTokenStatusResponse`](../../doc/models/retrieve-token-status-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await oAuthApi.retrieveTokenStatus();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/order-custom-attributes.md b/legacy/doc/api/order-custom-attributes.md
new file mode 100644
index 000000000..5bdfaf4af
--- /dev/null
+++ b/legacy/doc/api/order-custom-attributes.md
@@ -0,0 +1,634 @@
+# Order Custom Attributes
+
+```ts
+const orderCustomAttributesApi = client.orderCustomAttributesApi;
+```
+
+## Class Name
+
+`OrderCustomAttributesApi`
+
+## Methods
+
+* [List Order Custom Attribute Definitions](../../doc/api/order-custom-attributes.md#list-order-custom-attribute-definitions)
+* [Create Order Custom Attribute Definition](../../doc/api/order-custom-attributes.md#create-order-custom-attribute-definition)
+* [Delete Order Custom Attribute Definition](../../doc/api/order-custom-attributes.md#delete-order-custom-attribute-definition)
+* [Retrieve Order Custom Attribute Definition](../../doc/api/order-custom-attributes.md#retrieve-order-custom-attribute-definition)
+* [Update Order Custom Attribute Definition](../../doc/api/order-custom-attributes.md#update-order-custom-attribute-definition)
+* [Bulk Delete Order Custom Attributes](../../doc/api/order-custom-attributes.md#bulk-delete-order-custom-attributes)
+* [Bulk Upsert Order Custom Attributes](../../doc/api/order-custom-attributes.md#bulk-upsert-order-custom-attributes)
+* [List Order Custom Attributes](../../doc/api/order-custom-attributes.md#list-order-custom-attributes)
+* [Delete Order Custom Attribute](../../doc/api/order-custom-attributes.md#delete-order-custom-attribute)
+* [Retrieve Order Custom Attribute](../../doc/api/order-custom-attributes.md#retrieve-order-custom-attribute)
+* [Upsert Order Custom Attribute](../../doc/api/order-custom-attributes.md#upsert-order-custom-attribute)
+
+
+# List Order Custom Attribute Definitions
+
+Lists the order-related [custom attribute definitions](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async listOrderCustomAttributeDefinitions(
+ visibilityFilter?: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Requests that all of the custom attributes be returned, or only those that are read-only or read-write. |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListOrderCustomAttributeDefinitionsResponse`](../../doc/models/list-order-custom-attribute-definitions-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.listOrderCustomAttributeDefinitions();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Order Custom Attribute Definition
+
+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.
+
+```ts
+async createOrderCustomAttributeDefinition(
+ body: CreateOrderCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateOrderCustomAttributeDefinitionRequest`](../../doc/models/create-order-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateOrderCustomAttributeDefinitionResponse`](../../doc/models/create-order-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateOrderCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ key: 'cover-count',
+ name: 'Cover count',
+ description: 'The number of people seated at a table',
+ visibility: 'VISIBILITY_READ_WRITE_VALUES',
+ },
+ idempotencyKey: 'IDEMPOTENCY_KEY',
+};
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.createOrderCustomAttributeDefinition(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Order Custom Attribute Definition
+
+Deletes an order-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) from a Square seller account.
+
+Only the definition owner can delete a custom attribute definition.
+
+```ts
+async deleteOrderCustomAttributeDefinition(
+ key: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to delete. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteOrderCustomAttributeDefinitionResponse`](../../doc/models/delete-order-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.deleteOrderCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Order Custom Attribute Definition
+
+Retrieves an order-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) 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`.
+
+```ts
+async retrieveOrderCustomAttributeDefinition(
+ key: string,
+ version?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to retrieve. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveOrderCustomAttributeDefinitionResponse`](../../doc/models/retrieve-order-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.retrieveOrderCustomAttributeDefinition(key);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Order Custom Attribute Definition
+
+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`.
+
+```ts
+async updateOrderCustomAttributeDefinition(
+ key: string,
+ body: UpdateOrderCustomAttributeDefinitionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `key` | `string` | Template, Required | The key of the custom attribute definition to update. |
+| `body` | [`UpdateOrderCustomAttributeDefinitionRequest`](../../doc/models/update-order-custom-attribute-definition-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateOrderCustomAttributeDefinitionResponse`](../../doc/models/update-order-custom-attribute-definition-response.md)
+
+## Example Usage
+
+```ts
+const key = 'key0';
+
+const body: UpdateOrderCustomAttributeDefinitionRequest = {
+ customAttributeDefinition: {
+ key: 'cover-count',
+ visibility: 'VISIBILITY_READ_ONLY',
+ version: 1,
+ },
+ idempotencyKey: 'IDEMPOTENCY_KEY',
+};
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.updateOrderCustomAttributeDefinition(
+ key,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Delete Order Custom Attributes
+
+Deletes order [custom attributes](../../doc/models/custom-attribute.md) 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](../../doc/api/order-custom-attributes.md#create-order-custom-attribute-definition) 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`.
+
+```ts
+async bulkDeleteOrderCustomAttributes(
+ body: BulkDeleteOrderCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkDeleteOrderCustomAttributesRequest`](../../doc/models/bulk-delete-order-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkDeleteOrderCustomAttributesResponse`](../../doc/models/bulk-delete-order-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkDeleteOrderCustomAttributesRequest = {
+ values: {
+ 'cover-count': {
+ orderId: '7BbXGEIWNldxAzrtGf9GPVZTwZ4F',
+ },
+ 'table-number': {
+ orderId: '7BbXGEIWNldxAzrtGf9GPVZTwZ4F',
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.bulkDeleteOrderCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Upsert Order Custom Attributes
+
+Creates or updates order [custom attributes](../../doc/models/custom-attribute.md) 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](../../doc/api/order-custom-attributes.md#create-order-custom-attribute-definition) 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`.
+
+```ts
+async bulkUpsertOrderCustomAttributes(
+ body: BulkUpsertOrderCustomAttributesRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkUpsertOrderCustomAttributesRequest`](../../doc/models/bulk-upsert-order-custom-attributes-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkUpsertOrderCustomAttributesResponse`](../../doc/models/bulk-upsert-order-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkUpsertOrderCustomAttributesRequest = {
+ values: {
+ 'key0': {
+ customAttribute: {
+ },
+ orderId: 'order_id4',
+ },
+ 'key1': {
+ customAttribute: {
+ },
+ orderId: 'order_id4',
+ }
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.bulkUpsertOrderCustomAttributes(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Order Custom Attributes
+
+Lists the [custom attributes](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async listOrderCustomAttributes(
+ orderId: string,
+ visibilityFilter?: string,
+ cursor?: string,
+ limit?: number,
+ withDefinitions?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the target [order](entity:Order). |
+| `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Query, Optional | Requests that all of the custom attributes be returned, or only those that are read-only or read-write. |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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). |
+| `withDefinitions` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListOrderCustomAttributesResponse`](../../doc/models/list-order-custom-attributes-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const withDefinitions = false;
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.listOrderCustomAttributes(
+ orderId,
+ undefined,
+ undefined,
+ undefined,
+ withDefinitions
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Order Custom Attribute
+
+Deletes a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async deleteOrderCustomAttribute(
+ orderId: string,
+ customAttributeKey: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the target [order](entity:Order). |
+| `customAttributeKey` | `string` | Template, Required | The key of the custom attribute to delete. This key must match the key of an
existing custom attribute definition. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteOrderCustomAttributeResponse`](../../doc/models/delete-order-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const customAttributeKey = 'custom_attribute_key2';
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.deleteOrderCustomAttribute(
+ orderId,
+ customAttributeKey
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Order Custom Attribute
+
+Retrieves a [custom attribute](../../doc/models/custom-attribute.md) 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`.
+
+```ts
+async retrieveOrderCustomAttribute(
+ orderId: string,
+ customAttributeKey: string,
+ version?: number,
+ withDefinition?: boolean,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the target [order](entity:Order). |
+| `customAttributeKey` | `string` | Template, Required | The key of the custom attribute to retrieve. This key must match the key of an
existing custom attribute definition. |
+| `version` | `number \| undefined` | Query, Optional | 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. |
+| `withDefinition` | `boolean \| undefined` | Query, Optional | 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`.
**Default**: `false` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveOrderCustomAttributeResponse`](../../doc/models/retrieve-order-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const customAttributeKey = 'custom_attribute_key2';
+
+const withDefinition = false;
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.retrieveOrderCustomAttribute(
+ orderId,
+ customAttributeKey,
+ undefined,
+ withDefinition
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Order Custom Attribute
+
+Creates or updates a [custom attribute](../../doc/models/custom-attribute.md) 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](../../doc/api/order-custom-attributes.md#create-order-custom-attribute-definition) 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`.
+
+```ts
+async upsertOrderCustomAttribute(
+ orderId: string,
+ customAttributeKey: string,
+ body: UpsertOrderCustomAttributeRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the target [order](entity:Order). |
+| `customAttributeKey` | `string` | Template, Required | The key of the custom attribute to create or update. This key must match the key
of an existing custom attribute definition. |
+| `body` | [`UpsertOrderCustomAttributeRequest`](../../doc/models/upsert-order-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertOrderCustomAttributeResponse`](../../doc/models/upsert-order-custom-attribute-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const customAttributeKey = 'custom_attribute_key2';
+
+const body: UpsertOrderCustomAttributeRequest = {
+ customAttribute: {
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await orderCustomAttributesApi.upsertOrderCustomAttribute(
+ orderId,
+ customAttributeKey,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/orders.md b/legacy/doc/api/orders.md
new file mode 100644
index 000000000..8e1bc1bc7
--- /dev/null
+++ b/legacy/doc/api/orders.md
@@ -0,0 +1,539 @@
+# Orders
+
+```ts
+const ordersApi = client.ordersApi;
+```
+
+## Class Name
+
+`OrdersApi`
+
+## Methods
+
+* [Create Order](../../doc/api/orders.md#create-order)
+* [Batch Retrieve Orders](../../doc/api/orders.md#batch-retrieve-orders)
+* [Calculate Order](../../doc/api/orders.md#calculate-order)
+* [Clone Order](../../doc/api/orders.md#clone-order)
+* [Search Orders](../../doc/api/orders.md#search-orders)
+* [Retrieve Order](../../doc/api/orders.md#retrieve-order)
+* [Update Order](../../doc/api/orders.md#update-order)
+* [Pay Order](../../doc/api/orders.md#pay-order)
+
+
+# Create Order
+
+Creates a new [order](../../doc/models/order.md) 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](../../doc/api/orders.md#update-order) endpoint.
+
+```ts
+async createOrder(
+ body: CreateOrderRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateOrderRequest`](../../doc/models/create-order-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateOrderResponse`](../../doc/models/create-order-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateOrderRequest = {
+ order: {
+ locationId: '057P5VYJ4A5X1',
+ referenceId: 'my-order-001',
+ lineItems: [
+ {
+ quantity: '1',
+ name: 'New York Strip Steak',
+ basePriceMoney: {
+ amount: BigInt(1599),
+ currency: 'USD',
+ },
+ },
+ {
+ quantity: '2',
+ catalogObjectId: 'BEMYCSMIJL46OCDV4KYIKXIB',
+ modifiers: [
+ {
+ catalogObjectId: 'CHQX7Y4KY6N5KINJKZCFURPZ',
+ }
+ ],
+ appliedDiscounts: [
+ {
+ discountUid: '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',
+ catalogObjectId: 'DB7L55ZH2BGWI4H23ULIWOQ7',
+ scope: 'ORDER',
+ },
+ {
+ uid: 'one-dollar-off',
+ name: 'Sale - $1.00 off',
+ amountMoney: {
+ amount: BigInt(100),
+ currency: 'USD',
+ },
+ scope: 'LINE_ITEM',
+ }
+ ],
+ },
+ idempotencyKey: '8193148c-9586-11e6-99f9-28cfe92138cf',
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.createOrder(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Batch Retrieve Orders
+
+Retrieves a set of [orders](../../doc/models/order.md) by their IDs.
+
+If a given order ID does not exist, the ID is ignored instead of generating an error.
+
+```ts
+async batchRetrieveOrders(
+ body: BatchRetrieveOrdersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BatchRetrieveOrdersRequest`](../../doc/models/batch-retrieve-orders-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BatchRetrieveOrdersResponse`](../../doc/models/batch-retrieve-orders-response.md)
+
+## Example Usage
+
+```ts
+const body: BatchRetrieveOrdersRequest = {
+ orderIds: [
+ 'CAISEM82RcpmcFBM0TfOyiHV3es',
+ 'CAISENgvlJ6jLWAzERDzjyHVybY'
+ ],
+ locationId: '057P5VYJ4A5X1',
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.batchRetrieveOrders(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Calculate Order
+
+Enables applications to preview order pricing without creating an order.
+
+```ts
+async calculateOrder(
+ body: CalculateOrderRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CalculateOrderRequest`](../../doc/models/calculate-order-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CalculateOrderResponse`](../../doc/models/calculate-order-response.md)
+
+## Example Usage
+
+```ts
+const body: CalculateOrderRequest = {
+ order: {
+ locationId: 'D7AVYMEAPJ3A3',
+ lineItems: [
+ {
+ quantity: '1',
+ name: 'Item 1',
+ basePriceMoney: {
+ amount: BigInt(500),
+ currency: 'USD',
+ },
+ },
+ {
+ quantity: '2',
+ name: 'Item 2',
+ basePriceMoney: {
+ amount: BigInt(300),
+ currency: 'USD',
+ },
+ }
+ ],
+ discounts: [
+ {
+ name: '50% Off',
+ percentage: '50',
+ scope: 'ORDER',
+ }
+ ],
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.calculateOrder(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Clone Order
+
+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.
+
+```ts
+async cloneOrder(
+ body: CloneOrderRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CloneOrderRequest`](../../doc/models/clone-order-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CloneOrderResponse`](../../doc/models/clone-order-response.md)
+
+## Example Usage
+
+```ts
+const body: CloneOrderRequest = {
+ orderId: 'ZAISEM52YcpmcWAzERDOyiWS123',
+ version: 3,
+ idempotencyKey: 'UNIQUE_STRING',
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.cloneOrder(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Orders
+
+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](../../doc/models/search-orders-query.md) 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](../../doc/models/order-entry.md) 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.
+
+```ts
+async searchOrders(
+ body: SearchOrdersRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchOrdersRequest`](../../doc/models/search-orders-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchOrdersResponse`](../../doc/models/search-orders-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchOrdersRequest = {
+ locationIds: [
+ '057P5VYJ4A5X1',
+ '18YC4JDH91E1H'
+ ],
+ query: {
+ filter: {
+ stateFilter: {
+ states: [
+ 'COMPLETED'
+ ],
+ },
+ dateTimeFilter: {
+ closedAt: {
+ startAt: '2018-03-03T20:00:00+00:00',
+ endAt: '2019-03-04T21:54:45+00:00',
+ },
+ },
+ },
+ sort: {
+ sortField: 'CLOSED_AT',
+ sortOrder: 'DESC',
+ },
+ },
+ limit: 3,
+ returnEntries: true,
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.searchOrders(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Order
+
+Retrieves an [Order](../../doc/models/order.md) by ID.
+
+```ts
+async retrieveOrder(
+ orderId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the order to retrieve. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveOrderResponse`](../../doc/models/retrieve-order-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+try {
+ const { result, ...httpResponse } = await ordersApi.retrieveOrder(orderId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Order
+
+Updates an open [order](../../doc/models/order.md) 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).
+
+```ts
+async updateOrder(
+ orderId: string,
+ body: UpdateOrderRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the order to update. |
+| `body` | [`UpdateOrderRequest`](../../doc/models/update-order-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateOrderResponse`](../../doc/models/update-order-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const body: UpdateOrderRequest = {
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.updateOrder(
+ orderId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Pay Order
+
+Pay for an [order](../../doc/models/order.md) using one or more approved [payments](../../doc/models/payment.md)
+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](../../doc/api/payments.md#create-payment).
+ 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.
+
+```ts
+async payOrder(
+ orderId: string,
+ body: PayOrderRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `orderId` | `string` | Template, Required | The ID of the order being paid. |
+| `body` | [`PayOrderRequest`](../../doc/models/pay-order-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`PayOrderResponse`](../../doc/models/pay-order-response.md)
+
+## Example Usage
+
+```ts
+const orderId = 'order_id6';
+
+const body: PayOrderRequest = {
+ idempotencyKey: 'c043a359-7ad9-4136-82a9-c3f1d66dcbff',
+ paymentIds: [
+ 'EnZdNAlWCmfh6Mt5FMNST1o7taB',
+ '0LRiVlbXVwe8ozu4KbZxd12mvaB'
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await ordersApi.payOrder(
+ orderId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/payments.md b/legacy/doc/api/payments.md
new file mode 100644
index 000000000..2371fce02
--- /dev/null
+++ b/legacy/doc/api/payments.md
@@ -0,0 +1,412 @@
+# Payments
+
+```ts
+const paymentsApi = client.paymentsApi;
+```
+
+## Class Name
+
+`PaymentsApi`
+
+## Methods
+
+* [List Payments](../../doc/api/payments.md#list-payments)
+* [Create Payment](../../doc/api/payments.md#create-payment)
+* [Cancel Payment by Idempotency Key](../../doc/api/payments.md#cancel-payment-by-idempotency-key)
+* [Get Payment](../../doc/api/payments.md#get-payment)
+* [Update Payment](../../doc/api/payments.md#update-payment)
+* [Cancel Payment](../../doc/api/payments.md#cancel-payment)
+* [Complete Payment](../../doc/api/payments.md#complete-payment)
+
+
+# List Payments
+
+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.
+
+```ts
+async listPayments(
+ beginTime?: string,
+ endTime?: string,
+ sortOrder?: string,
+ cursor?: string,
+ locationId?: string,
+ total?: bigint,
+ last4?: string,
+ cardBrand?: string,
+ limit?: number,
+ isOfflinePayment?: boolean,
+ offlineBeginTime?: string,
+ offlineEndTime?: string,
+ updatedAtBeginTime?: string,
+ updatedAtEndTime?: string,
+ sortField?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `beginTime` | `string \| undefined` | Query, Optional | 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. |
+| `endTime` | `string \| undefined` | Query, Optional | 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. |
+| `sortOrder` | `string \| undefined` | Query, Optional | The order in which results are listed by `ListPaymentsRequest.sort_field`:
- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). |
+| `cursor` | `string \| undefined` | Query, Optional | 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). |
+| `locationId` | `string \| undefined` | Query, Optional | Limit results to the location supplied. By default, results are returned
for the default (main) location associated with the seller. |
+| `total` | `bigint \| undefined` | Query, Optional | The exact amount in the `total_money` for a payment. |
+| `last4` | `string \| undefined` | Query, Optional | The last four digits of a payment card. |
+| `cardBrand` | `string \| undefined` | Query, Optional | The brand of the payment card (for example, VISA). |
+| `limit` | `number \| undefined` | Query, Optional | 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` |
+| `isOfflinePayment` | `boolean \| undefined` | Query, Optional | Whether the payment was taken offline or not.
**Default**: `false` |
+| `offlineBeginTime` | `string \| undefined` | Query, Optional | 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. |
+| `offlineEndTime` | `string \| undefined` | Query, Optional | 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. |
+| `updatedAtBeginTime` | `string \| undefined` | Query, Optional | 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. |
+| `updatedAtEndTime` | `string \| undefined` | Query, Optional | 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. |
+| `sortField` | [`string \| undefined`](../../doc/models/payment-sort-field.md) | Query, Optional | The field used to sort results by. The default is `CREATED_AT`. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListPaymentsResponse`](../../doc/models/list-payments-response.md)
+
+## Example Usage
+
+```ts
+const isOfflinePayment = false;
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.listPayments(
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ isOfflinePayment
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Create Payment
+
+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.
+
+```ts
+async createPayment(
+ body: CreatePaymentRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreatePaymentRequest`](../../doc/models/create-payment-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreatePaymentResponse`](../../doc/models/create-payment-response.md)
+
+## Example Usage
+
+```ts
+const body: CreatePaymentRequest = {
+ sourceId: 'ccof:GaJGNaZa8x4OgDJn4GB',
+ idempotencyKey: '7b0f3ec5-086a-4871-8f13-3c81b3875218',
+ amountMoney: {
+ amount: BigInt(1000),
+ currency: 'USD',
+ },
+ appFeeMoney: {
+ amount: BigInt(10),
+ currency: 'USD',
+ },
+ autocomplete: true,
+ customerId: 'W92WH6P11H4Z77CTET0RNTGFW8',
+ locationId: 'L88917AVBK2S5',
+ referenceId: '123456',
+ note: 'Brief description',
+};
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.createPayment(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Payment by Idempotency Key
+
+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.
+
+```ts
+async cancelPaymentByIdempotencyKey(
+ body: CancelPaymentByIdempotencyKeyRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CancelPaymentByIdempotencyKeyRequest`](../../doc/models/cancel-payment-by-idempotency-key-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelPaymentByIdempotencyKeyResponse`](../../doc/models/cancel-payment-by-idempotency-key-response.md)
+
+## Example Usage
+
+```ts
+const body: CancelPaymentByIdempotencyKeyRequest = {
+ idempotencyKey: 'a7e36d40-d24b-11e8-b568-0800200c9a66',
+};
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.cancelPaymentByIdempotencyKey(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Payment
+
+Retrieves details for a specific payment.
+
+```ts
+async getPayment(
+ paymentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `paymentId` | `string` | Template, Required | A unique ID for the desired payment. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetPaymentResponse`](../../doc/models/get-payment-response.md)
+
+## Example Usage
+
+```ts
+const paymentId = 'payment_id0';
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.getPayment(paymentId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Payment
+
+Updates a payment with the APPROVED status.
+You can update the `amount_money` and `tip_money` using this endpoint.
+
+```ts
+async updatePayment(
+ paymentId: string,
+ body: UpdatePaymentRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `paymentId` | `string` | Template, Required | The ID of the payment to update. |
+| `body` | [`UpdatePaymentRequest`](../../doc/models/update-payment-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdatePaymentResponse`](../../doc/models/update-payment-response.md)
+
+## Example Usage
+
+```ts
+const paymentId = 'payment_id0';
+
+const body: UpdatePaymentRequest = {
+ idempotencyKey: '956f8b13-e4ec-45d6-85e8-d1d95ef0c5de',
+ payment: {
+ amountMoney: {
+ amount: BigInt(1000),
+ currency: 'USD',
+ },
+ tipMoney: {
+ amount: BigInt(100),
+ currency: 'USD',
+ },
+ versionToken: 'ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.updatePayment(
+ paymentId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Payment
+
+Cancels (voids) a payment. You can use this endpoint to cancel a payment with
+the APPROVED `status`.
+
+```ts
+async cancelPayment(
+ paymentId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `paymentId` | `string` | Template, Required | The ID of the payment to cancel. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelPaymentResponse`](../../doc/models/cancel-payment-response.md)
+
+## Example Usage
+
+```ts
+const paymentId = 'payment_id0';
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.cancelPayment(paymentId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Complete Payment
+
+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`.
+
+```ts
+async completePayment(
+ paymentId: string,
+ body: CompletePaymentRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `paymentId` | `string` | Template, Required | The unique ID identifying the payment to be completed. |
+| `body` | [`CompletePaymentRequest`](../../doc/models/complete-payment-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CompletePaymentResponse`](../../doc/models/complete-payment-response.md)
+
+## Example Usage
+
+```ts
+const paymentId = 'payment_id0';
+
+const body: CompletePaymentRequest = {
+};
+
+try {
+ const { result, ...httpResponse } = await paymentsApi.completePayment(
+ paymentId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/payouts.md b/legacy/doc/api/payouts.md
new file mode 100644
index 000000000..dc33df5d1
--- /dev/null
+++ b/legacy/doc/api/payouts.md
@@ -0,0 +1,156 @@
+# Payouts
+
+```ts
+const payoutsApi = client.payoutsApi;
+```
+
+## Class Name
+
+`PayoutsApi`
+
+## Methods
+
+* [List Payouts](../../doc/api/payouts.md#list-payouts)
+* [Get Payout](../../doc/api/payouts.md#get-payout)
+* [List Payout Entries](../../doc/api/payouts.md#list-payout-entries)
+
+
+# List Payouts
+
+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.
+
+```ts
+async listPayouts(
+ locationId?: string,
+ status?: string,
+ beginTime?: string,
+ endTime?: string,
+ sortOrder?: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `locationId` | `string \| undefined` | Query, Optional | 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` | [`string \| undefined`](../../doc/models/payout-status.md) | Query, Optional | If provided, only payouts with the given status are returned. |
+| `beginTime` | `string \| undefined` | Query, Optional | The timestamp for the beginning of the payout creation time, in RFC 3339 format.
Inclusive. Default: The current time minus one year. |
+| `endTime` | `string \| undefined` | Query, Optional | The timestamp for the end of the payout creation time, in RFC 3339 format.
Default: The current time. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | The order in which payouts are listed. |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListPayoutsResponse`](../../doc/models/list-payouts-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await payoutsApi.listPayouts();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Payout
+
+Retrieves details of a specific payout identified by a payout ID.
+To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
+
+```ts
+async getPayout(
+ payoutId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `payoutId` | `string` | Template, Required | The ID of the payout to retrieve the information for. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetPayoutResponse`](../../doc/models/get-payout-response.md)
+
+## Example Usage
+
+```ts
+const payoutId = 'payout_id6';
+
+try {
+ const { result, ...httpResponse } = await payoutsApi.getPayout(payoutId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Payout Entries
+
+Retrieves a list of all payout entries for a specific payout.
+To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
+
+```ts
+async listPayoutEntries(
+ payoutId: string,
+ sortOrder?: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `payoutId` | `string` | Template, Required | The ID of the payout to retrieve the information for. |
+| `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Query, Optional | The order in which payout entries are listed. |
+| `cursor` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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` |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListPayoutEntriesResponse`](../../doc/models/list-payout-entries-response.md)
+
+## Example Usage
+
+```ts
+const payoutId = 'payout_id6';
+
+try {
+ const { result, ...httpResponse } = await payoutsApi.listPayoutEntries(payoutId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/refunds.md b/legacy/doc/api/refunds.md
new file mode 100644
index 000000000..6109deaec
--- /dev/null
+++ b/legacy/doc/api/refunds.md
@@ -0,0 +1,168 @@
+# Refunds
+
+```ts
+const refundsApi = client.refundsApi;
+```
+
+## Class Name
+
+`RefundsApi`
+
+## Methods
+
+* [List Payment Refunds](../../doc/api/refunds.md#list-payment-refunds)
+* [Refund Payment](../../doc/api/refunds.md#refund-payment)
+* [Get Payment Refund](../../doc/api/refunds.md#get-payment-refund)
+
+
+# List Payment Refunds
+
+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.
+
+```ts
+async listPaymentRefunds(
+ beginTime?: string,
+ endTime?: string,
+ sortOrder?: string,
+ cursor?: string,
+ locationId?: string,
+ status?: string,
+ sourceType?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `beginTime` | `string \| undefined` | Query, Optional | 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. |
+| `endTime` | `string \| undefined` | Query, Optional | 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. |
+| `sortOrder` | `string \| undefined` | Query, Optional | The order in which results are listed by `PaymentRefund.created_at`:
- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). |
+| `cursor` | `string \| undefined` | Query, Optional | 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). |
+| `locationId` | `string \| undefined` | Query, Optional | Limit results to the location supplied. By default, results are returned
for all locations associated with the seller. |
+| `status` | `string \| undefined` | Query, Optional | 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. |
+| `sourceType` | `string \| undefined` | Query, Optional | 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` | `number \| undefined` | Query, Optional | 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 |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListPaymentRefundsResponse`](../../doc/models/list-payment-refunds-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await refundsApi.listPaymentRefunds();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Refund Payment
+
+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).
+
+```ts
+async refundPayment(
+ body: RefundPaymentRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`RefundPaymentRequest`](../../doc/models/refund-payment-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RefundPaymentResponse`](../../doc/models/refund-payment-response.md)
+
+## Example Usage
+
+```ts
+const body: RefundPaymentRequest = {
+ idempotencyKey: '9b7f2dcf-49da-4411-b23e-a2d6af21333a',
+ amountMoney: {
+ amount: BigInt(1000),
+ currency: 'USD',
+ },
+ appFeeMoney: {
+ amount: BigInt(10),
+ currency: 'USD',
+ },
+ paymentId: 'R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY',
+ reason: 'Example',
+};
+
+try {
+ const { result, ...httpResponse } = await refundsApi.refundPayment(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Get Payment Refund
+
+Retrieves a specific refund using the `refund_id`.
+
+```ts
+async getPaymentRefund(
+ refundId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `refundId` | `string` | Template, Required | The unique ID for the desired `PaymentRefund`. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`GetPaymentRefundResponse`](../../doc/models/get-payment-refund-response.md)
+
+## Example Usage
+
+```ts
+const refundId = 'refund_id4';
+
+try {
+ const { result, ...httpResponse } = await refundsApi.getPaymentRefund(refundId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/sites.md b/legacy/doc/api/sites.md
new file mode 100644
index 000000000..f72f32349
--- /dev/null
+++ b/legacy/doc/api/sites.md
@@ -0,0 +1,48 @@
+# Sites
+
+```ts
+const sitesApi = client.sitesApi;
+```
+
+## Class Name
+
+`SitesApi`
+
+
+# List Sites
+
+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).
+
+```ts
+async listSites(
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ListSitesResponse`](../../doc/models/list-sites-response.md)
+
+## Example Usage
+
+```ts
+try {
+ const { result, ...httpResponse } = await sitesApi.listSites();
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/snippets.md b/legacy/doc/api/snippets.md
new file mode 100644
index 000000000..a05b73db7
--- /dev/null
+++ b/legacy/doc/api/snippets.md
@@ -0,0 +1,160 @@
+# Snippets
+
+```ts
+const snippetsApi = client.snippetsApi;
+```
+
+## Class Name
+
+`SnippetsApi`
+
+## Methods
+
+* [Delete Snippet](../../doc/api/snippets.md#delete-snippet)
+* [Retrieve Snippet](../../doc/api/snippets.md#retrieve-snippet)
+* [Upsert Snippet](../../doc/api/snippets.md#upsert-snippet)
+
+
+# Delete Snippet
+
+Removes your snippet from a Square Online site.
+
+You can call [ListSites](../../doc/api/sites.md#list-sites) 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).
+
+```ts
+async deleteSnippet(
+ siteId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `siteId` | `string` | Template, Required | The ID of the site that contains the snippet. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteSnippetResponse`](../../doc/models/delete-snippet-response.md)
+
+## Example Usage
+
+```ts
+const siteId = 'site_id6';
+
+try {
+ const { result, ...httpResponse } = await snippetsApi.deleteSnippet(siteId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Snippet
+
+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](../../doc/api/sites.md#list-sites) 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).
+
+```ts
+async retrieveSnippet(
+ siteId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `siteId` | `string` | Template, Required | The ID of the site that contains the snippet. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveSnippetResponse`](../../doc/models/retrieve-snippet-response.md)
+
+## Example Usage
+
+```ts
+const siteId = 'site_id6';
+
+try {
+ const { result, ...httpResponse } = await snippetsApi.retrieveSnippet(siteId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Upsert Snippet
+
+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](../../doc/api/sites.md#list-sites) 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).
+
+```ts
+async upsertSnippet(
+ siteId: string,
+ body: UpsertSnippetRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `siteId` | `string` | Template, Required | The ID of the site where you want to add or update the snippet. |
+| `body` | [`UpsertSnippetRequest`](../../doc/models/upsert-snippet-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpsertSnippetResponse`](../../doc/models/upsert-snippet-response.md)
+
+## Example Usage
+
+```ts
+const siteId = 'site_id6';
+
+const body: UpsertSnippetRequest = {
+ snippet: {
+ content: '',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await snippetsApi.upsertSnippet(
+ siteId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
diff --git a/legacy/doc/api/subscriptions.md b/legacy/doc/api/subscriptions.md
new file mode 100644
index 000000000..85cca5654
--- /dev/null
+++ b/legacy/doc/api/subscriptions.md
@@ -0,0 +1,631 @@
+# Subscriptions
+
+```ts
+const subscriptionsApi = client.subscriptionsApi;
+```
+
+## Class Name
+
+`SubscriptionsApi`
+
+## Methods
+
+* [Create Subscription](../../doc/api/subscriptions.md#create-subscription)
+* [Bulk Swap Plan](../../doc/api/subscriptions.md#bulk-swap-plan)
+* [Search Subscriptions](../../doc/api/subscriptions.md#search-subscriptions)
+* [Retrieve Subscription](../../doc/api/subscriptions.md#retrieve-subscription)
+* [Update Subscription](../../doc/api/subscriptions.md#update-subscription)
+* [Delete Subscription Action](../../doc/api/subscriptions.md#delete-subscription-action)
+* [Change Billing Anchor Date](../../doc/api/subscriptions.md#change-billing-anchor-date)
+* [Cancel Subscription](../../doc/api/subscriptions.md#cancel-subscription)
+* [List Subscription Events](../../doc/api/subscriptions.md#list-subscription-events)
+* [Pause Subscription](../../doc/api/subscriptions.md#pause-subscription)
+* [Resume Subscription](../../doc/api/subscriptions.md#resume-subscription)
+* [Swap Plan](../../doc/api/subscriptions.md#swap-plan)
+
+
+# Create Subscription
+
+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).
+
+```ts
+async createSubscription(
+ body: CreateSubscriptionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`CreateSubscriptionRequest`](../../doc/models/create-subscription-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CreateSubscriptionResponse`](../../doc/models/create-subscription-response.md)
+
+## Example Usage
+
+```ts
+const body: CreateSubscriptionRequest = {
+ locationId: 'S8GWD5R9QB376',
+ customerId: 'CHFGVKYY8RSV93M5KCYTG4PN0G',
+ idempotencyKey: '8193148c-9586-11e6-99f9-28cfe92138cf',
+ planVariationId: '6JHXF3B2CW3YKHDV4XEM674H',
+ startDate: '2023-06-20',
+ cardId: 'ccof:qy5x8hHGYsgLrp4Q4GB',
+ timezone: 'America/Los_Angeles',
+ source: {
+ name: 'My Application',
+ },
+ phases: [
+ {
+ ordinal: BigInt(0),
+ orderTemplateId: 'U2NaowWxzXwpsZU697x7ZHOAnCNZY',
+ }
+ ],
+};
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.createSubscription(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Bulk Swap Plan
+
+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).
+
+```ts
+async bulkSwapPlan(
+ body: BulkSwapPlanRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`BulkSwapPlanRequest`](../../doc/models/bulk-swap-plan-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`BulkSwapPlanResponse`](../../doc/models/bulk-swap-plan-response.md)
+
+## Example Usage
+
+```ts
+const body: BulkSwapPlanRequest = {
+ newPlanVariationId: 'FQ7CDXXWSLUJRPM3GFJSJGZ7',
+ oldPlanVariationId: '6JHXF3B2CW3YKHDV4XEM674H',
+ locationId: 'S8GWD5R9QB376',
+};
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.bulkSwapPlan(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Search Subscriptions
+
+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.
+
+```ts
+async searchSubscriptions(
+ body: SearchSubscriptionsRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `body` | [`SearchSubscriptionsRequest`](../../doc/models/search-subscriptions-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`SearchSubscriptionsResponse`](../../doc/models/search-subscriptions-response.md)
+
+## Example Usage
+
+```ts
+const body: SearchSubscriptionsRequest = {
+ query: {
+ filter: {
+ customerIds: [
+ 'CHFGVKYY8RSV93M5KCYTG4PN0G'
+ ],
+ locationIds: [
+ 'S8GWD5R9QB376'
+ ],
+ sourceNames: [
+ 'My App'
+ ],
+ },
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.searchSubscriptions(body);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Retrieve Subscription
+
+Retrieves a specific subscription.
+
+```ts
+async retrieveSubscription(
+ subscriptionId: string,
+ include?: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `subscriptionId` | `string` | Template, Required | The ID of the subscription to retrieve. |
+| `include` | `string \| undefined` | Query, Optional | 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. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`RetrieveSubscriptionResponse`](../../doc/models/retrieve-subscription-response.md)
+
+## Example Usage
+
+```ts
+const subscriptionId = 'subscription_id0';
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.retrieveSubscription(subscriptionId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Update Subscription
+
+Updates a subscription by modifying or clearing `subscription` field values.
+To clear a field, set its value to `null`.
+
+```ts
+async updateSubscription(
+ subscriptionId: string,
+ body: UpdateSubscriptionRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `subscriptionId` | `string` | Template, Required | The ID of the subscription to update. |
+| `body` | [`UpdateSubscriptionRequest`](../../doc/models/update-subscription-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`UpdateSubscriptionResponse`](../../doc/models/update-subscription-response.md)
+
+## Example Usage
+
+```ts
+const subscriptionId = 'subscription_id0';
+
+const body: UpdateSubscriptionRequest = {
+ subscription: {
+ canceledDate: 'canceled_date6',
+ cardId: '{NEW CARD ID}',
+ },
+};
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.updateSubscription(
+ subscriptionId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Delete Subscription Action
+
+Deletes a scheduled action for a subscription.
+
+```ts
+async deleteSubscriptionAction(
+ subscriptionId: string,
+ actionId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `subscriptionId` | `string` | Template, Required | The ID of the subscription the targeted action is to act upon. |
+| `actionId` | `string` | Template, Required | The ID of the targeted action to be deleted. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`DeleteSubscriptionActionResponse`](../../doc/models/delete-subscription-action-response.md)
+
+## Example Usage
+
+```ts
+const subscriptionId = 'subscription_id0';
+
+const actionId = 'action_id6';
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.deleteSubscriptionAction(
+ subscriptionId,
+ actionId
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Change Billing Anchor Date
+
+Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates)
+for a subscription.
+
+```ts
+async changeBillingAnchorDate(
+ subscriptionId: string,
+ body: ChangeBillingAnchorDateRequest,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `subscriptionId` | `string` | Template, Required | The ID of the subscription to update the billing anchor date. |
+| `body` | [`ChangeBillingAnchorDateRequest`](../../doc/models/change-billing-anchor-date-request.md) | Body, Required | An object containing the fields to POST for the request.
See the corresponding object definition for field details. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`ChangeBillingAnchorDateResponse`](../../doc/models/change-billing-anchor-date-response.md)
+
+## Example Usage
+
+```ts
+const subscriptionId = 'subscription_id0';
+
+const body: ChangeBillingAnchorDateRequest = {
+ monthlyBillingAnchorDate: 1,
+};
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.changeBillingAnchorDate(
+ subscriptionId,
+ body
+);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# Cancel Subscription
+
+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.
+
+```ts
+async cancelSubscription(
+ subscriptionId: string,
+ requestOptions?: RequestOptions
+): Promise>
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `subscriptionId` | `string` | Template, Required | The ID of the subscription to cancel. |
+| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
+
+## Response Type
+
+[`CancelSubscriptionResponse`](../../doc/models/cancel-subscription-response.md)
+
+## Example Usage
+
+```ts
+const subscriptionId = 'subscription_id0';
+
+try {
+ const { result, ...httpResponse } = await subscriptionsApi.cancelSubscription(subscriptionId);
+ // Get more response info...
+ // const { statusCode, headers } = httpResponse;
+} catch (error) {
+ if (error instanceof ApiError) {
+ const errors = error.result;
+ // const { statusCode, headers } = error;
+ }
+}
+```
+
+
+# List Subscription Events
+
+Lists all [events](https://developer.squareup.com/docs/subscriptions-api/actions-events) for a specific subscription.
+
+```ts
+async listSubscriptionEvents(
+ subscriptionId: string,
+ cursor?: string,
+ limit?: number,
+ requestOptions?: RequestOptions
+): Promise