From 87e55cd3474dde83dd36273f73f5ba30165ea7e7 Mon Sep 17 00:00:00 2001 From: autobot Date: Tue, 15 Aug 2023 21:41:25 +0000 Subject: [PATCH] Generated PR for Release: 30.0.0 --- README.md | 8 ++ doc/api/bookings.md | 52 +++++++++++ doc/api/gift-cards.md | 2 +- doc/api/loyalty.md | 2 +- doc/client.md | 6 +- doc/models/accepted-payment-methods.md | 8 +- doc/models/ach-details.md | 6 +- doc/models/additional-recipient.md | 4 +- doc/models/address.md | 26 +++--- doc/models/adjust-loyalty-points-request.md | 2 +- doc/models/afterpay-details.md | 2 +- doc/models/application-details.md | 2 +- doc/models/appointment-segment.md | 6 +- doc/models/archived-state.md | 19 ++++ doc/models/availability.md | 4 +- doc/models/bank-account-payment-details.md | 14 +-- doc/models/bank-account.md | 12 +-- doc/models/batch-change-inventory-request.md | 4 +- .../batch-delete-catalog-objects-request.md | 2 +- .../batch-retrieve-catalog-objects-request.md | 6 +- ...atch-retrieve-inventory-changes-request.md | 16 ++-- ...batch-retrieve-inventory-counts-request.md | 12 +-- doc/models/batch-retrieve-orders-request.md | 2 +- ...booking-custom-attribute-delete-request.md | 2 +- ...booking-custom-attribute-upsert-request.md | 4 +- doc/models/booking.md | 12 +-- doc/models/break.md | 2 +- doc/models/bulk-retrieve-bookings-request.md | 25 ++++++ doc/models/bulk-retrieve-bookings-response.md | 89 +++++++++++++++++++ doc/models/bulk-retrieve-vendors-request.md | 2 +- ...ustomer-custom-attribute-upsert-request.md | 2 +- ...ocation-custom-attribute-upsert-request.md | 2 +- ...erchant-custom-attribute-upsert-request.md | 2 +- ...ributes-request-upsert-custom-attribute.md | 2 +- doc/models/business-appointment-settings.md | 18 ++-- doc/models/business-booking-profile.md | 8 +- doc/models/business-hours-period.md | 4 +- doc/models/business-hours.md | 2 +- doc/models/buy-now-pay-later-details.md | 2 +- .../calculate-loyalty-points-request.md | 4 +- doc/models/calculate-order-request.md | 2 +- doc/models/cancel-booking-request.md | 4 +- .../cancel-loyalty-promotion-response.md | 1 + doc/models/card-payment-details.md | 26 +++--- doc/models/card-payment-timeline.md | 6 +- doc/models/card.md | 10 +-- doc/models/cash-app-details.md | 4 +- doc/models/cash-drawer-device.md | 2 +- doc/models/cash-drawer-shift-event.md | 2 +- doc/models/cash-drawer-shift-summary.md | 8 +- doc/models/cash-drawer-shift.md | 8 +- doc/models/catalog-category.md | 4 +- ...stom-attribute-definition-number-config.md | 2 +- ...ction-config-custom-attribute-selection.md | 2 +- ...m-attribute-definition-selection-config.md | 4 +- ...stom-attribute-definition-string-config.md | 2 +- .../catalog-custom-attribute-definition.md | 4 +- doc/models/catalog-custom-attribute-value.md | 10 +-- doc/models/catalog-discount.md | 8 +- doc/models/catalog-id-mapping.md | 4 +- doc/models/catalog-image.md | 8 +- doc/models/catalog-info-response-limits.md | 22 ++--- doc/models/catalog-item-modifier-list-info.md | 8 +- doc/models/catalog-item-option-for-item.md | 2 +- ...og-item-option-value-for-item-variation.md | 4 +- doc/models/catalog-item-option-value.md | 10 +-- doc/models/catalog-item-option.md | 10 +-- doc/models/catalog-item-variation.md | 33 ++++--- doc/models/catalog-item.md | 33 +++---- doc/models/catalog-measurement-unit.md | 2 +- doc/models/catalog-modifier-list.md | 8 +- doc/models/catalog-modifier-override.md | 2 +- doc/models/catalog-modifier.md | 10 +-- doc/models/catalog-object-reference.md | 4 +- doc/models/catalog-object-type.md | 2 +- doc/models/catalog-object.md | 14 +-- doc/models/catalog-pricing-rule.md | 22 ++--- doc/models/catalog-product-set.md | 14 +-- ...-item-variations-for-item-option-values.md | 2 +- .../catalog-query-items-for-item-options.md | 2 +- doc/models/catalog-query-range.md | 4 +- doc/models/catalog-query-sorted-attribute.md | 2 +- doc/models/catalog-quick-amount.md | 4 +- doc/models/catalog-quick-amounts-settings.md | 4 +- .../catalog-subscription-plan-variation.md | 2 +- doc/models/catalog-subscription-plan.md | 10 +-- doc/models/catalog-tax.md | 10 +-- doc/models/catalog-time-period.md | 2 +- doc/models/catalog-v1-id.md | 4 +- doc/models/charge-request.md | 20 ++--- doc/models/checkout-options.md | 16 ++-- doc/models/checkout.md | 12 +-- doc/models/clearpay-details.md | 2 +- doc/models/clone-order-request.md | 2 +- doc/models/complete-payment-request.md | 2 +- doc/models/confirmation-options.md | 2 +- doc/models/coordinates.md | 4 +- .../create-loyalty-promotion-request.md | 3 +- .../create-loyalty-promotion-response.md | 1 + doc/models/create-payment-request.md | 1 + doc/models/custom-attribute-definition.md | 8 +- doc/models/custom-attribute-filter.md | 10 +-- doc/models/custom-attribute.md | 4 +- doc/models/customer-creation-source-filter.md | 2 +- .../customer-custom-attribute-filter-value.md | 2 +- .../customer-custom-attribute-filters.md | 2 +- doc/models/customer-details.md | 25 ++++++ doc/models/customer-preferences.md | 2 +- doc/models/customer-tax-ids.md | 2 +- doc/models/customer-text-filter.md | 4 +- doc/models/customer.md | 24 ++--- doc/models/date-range.md | 4 +- ...ed-create-dispute-evidence-file-request.md | 2 +- ...destination-details-card-refund-details.md | 2 +- doc/models/device-checkout-options.md | 6 +- doc/models/device-code.md | 4 +- doc/models/device-details.md | 6 +- doc/models/device-metadata.md | 24 ++--- doc/models/device.md | 2 +- doc/models/digital-wallet-details.md | 4 +- doc/models/dispute-evidence-file.md | 4 +- doc/models/dispute-evidence.md | 8 +- doc/models/dispute.md | 14 +-- doc/models/disputed-payment.md | 2 +- doc/models/employee-wage.md | 4 +- doc/models/employee.md | 12 +-- doc/models/event-data.md | 6 +- doc/models/event.md | 8 +- doc/models/external-payment-details.md | 2 +- doc/models/filter-value.md | 6 +- doc/models/float-number-range.md | 4 +- doc/models/fulfillment-delivery-details.md | 30 +++---- doc/models/fulfillment-fulfillment-entry.md | 4 +- ...-pickup-details-curbside-pickup-details.md | 4 +- doc/models/fulfillment-pickup-details.md | 16 ++-- doc/models/fulfillment-recipient.md | 8 +- doc/models/fulfillment-shipment-details.md | 18 ++-- doc/models/fulfillment.md | 4 +- doc/models/gift-card-activity-activate.md | 8 +- doc/models/gift-card-activity-load.md | 8 +- doc/models/gift-card-activity-redeem.md | 2 +- doc/models/gift-card-activity-refund.md | 4 +- ...-card-activity-unlinked-activity-refund.md | 2 +- doc/models/gift-card-activity.md | 4 +- doc/models/gift-card.md | 2 +- doc/models/inventory-adjustment.md | 16 ++-- doc/models/inventory-count.md | 8 +- doc/models/inventory-physical-count.md | 16 ++-- doc/models/inventory-transfer.md | 18 ++-- .../invoice-accepted-payment-methods.md | 10 +-- doc/models/invoice-custom-field.md | 4 +- doc/models/invoice-filter.md | 2 +- doc/models/invoice-payment-reminder.md | 4 +- doc/models/invoice-payment-request.md | 12 +-- doc/models/invoice-recipient.md | 2 +- doc/models/invoice.md | 22 ++--- .../item-variation-location-overrides.md | 6 +- doc/models/job-assignment.md | 2 +- doc/models/list-bank-accounts-request.md | 6 +- ...ng-custom-attribute-definitions-request.md | 4 +- .../list-booking-custom-attributes-request.md | 6 +- doc/models/list-bookings-request.md | 17 ++-- doc/models/list-break-types-request.md | 6 +- doc/models/list-cards-request.md | 8 +- .../list-cash-drawer-shift-events-request.md | 4 +- doc/models/list-cash-drawer-shifts-request.md | 8 +- doc/models/list-catalog-request.md | 6 +- ...er-custom-attribute-definitions-request.md | 4 +- ...list-customer-custom-attributes-request.md | 6 +- doc/models/list-customer-groups-request.md | 4 +- doc/models/list-customer-segments-request.md | 4 +- doc/models/list-customers-request.md | 6 +- doc/models/list-device-codes-request.md | 6 +- doc/models/list-dispute-evidence-request.md | 2 +- doc/models/list-disputes-request.md | 6 +- doc/models/list-employee-wages-request.md | 6 +- doc/models/list-employees-request.md | 6 +- .../list-gift-card-activities-request.md | 16 ++-- doc/models/list-gift-cards-request.md | 10 +-- doc/models/list-invoices-request.md | 4 +- ...on-custom-attribute-definitions-request.md | 4 +- ...list-location-custom-attributes-request.md | 6 +- doc/models/list-loyalty-promotions-request.md | 4 +- .../list-loyalty-promotions-response.md | 2 + ...nt-custom-attribute-definitions-request.md | 4 +- ...list-merchant-custom-attributes-request.md | 6 +- doc/models/list-merchants-request.md | 2 +- ...er-custom-attribute-definitions-request.md | 4 +- .../list-order-custom-attributes-request.md | 6 +- doc/models/list-payment-links-request.md | 4 +- doc/models/list-payment-refunds-request.md | 16 ++-- doc/models/list-payments-request.md | 18 ++-- doc/models/list-payout-entries-request.md | 4 +- doc/models/list-payouts-request.md | 10 +-- doc/models/list-refunds-request.md | 6 +- .../list-subscription-events-request.md | 4 +- ...st-team-member-booking-profiles-request.md | 8 +- doc/models/list-team-member-wages-request.md | 6 +- doc/models/list-transactions-request.md | 6 +- .../list-webhook-event-types-request.md | 2 +- .../list-webhook-subscriptions-request.md | 6 +- doc/models/list-workweek-configs-request.md | 4 +- doc/models/location.md | 24 ++--- doc/models/loyalty-account-mapping.md | 2 +- doc/models/loyalty-account.md | 6 +- doc/models/loyalty-event-accumulate-points.md | 4 +- doc/models/loyalty-event-adjust-points.md | 2 +- ...loyalty-program-accrual-rule-spend-data.md | 4 +- doc/models/loyalty-program-accrual-rule.md | 2 +- doc/models/loyalty-program.md | 6 +- ...motion-incentive-points-multiplier-data.md | 6 +- doc/models/loyalty-promotion-incentive.md | 3 +- doc/models/loyalty-promotion.md | 7 +- doc/models/loyalty-reward.md | 2 +- doc/models/merchant.md | 6 +- doc/models/modifier-location-overrides.md | 2 +- doc/models/money.md | 2 +- doc/models/obtain-token-request.md | 16 ++-- doc/models/order-created.md | 4 +- doc/models/order-entry.md | 4 +- .../order-fulfillment-delivery-details.md | 30 +++---- .../order-fulfillment-fulfillment-entry.md | 4 +- ...-pickup-details-curbside-pickup-details.md | 4 +- .../order-fulfillment-pickup-details.md | 16 ++-- doc/models/order-fulfillment-recipient.md | 8 +- .../order-fulfillment-shipment-details.md | 18 ++-- .../order-fulfillment-updated-update.md | 2 +- doc/models/order-fulfillment-updated.md | 6 +- doc/models/order-fulfillment.md | 4 +- .../order-line-item-applied-discount.md | 2 +- .../order-line-item-applied-service-charge.md | 2 +- doc/models/order-line-item-applied-tax.md | 2 +- doc/models/order-line-item-discount.md | 12 +-- doc/models/order-line-item-modifier.md | 12 +-- ...tem-pricing-blocklists-blocked-discount.md | 6 +- ...ine-item-pricing-blocklists-blocked-tax.md | 6 +- .../order-line-item-pricing-blocklists.md | 4 +- doc/models/order-line-item-tax.md | 12 +-- doc/models/order-line-item.md | 22 ++--- doc/models/order-pricing-options.md | 4 +- doc/models/order-quantity-unit.md | 6 +- doc/models/order-return-discount.md | 12 +-- doc/models/order-return-line-item-modifier.md | 12 +-- doc/models/order-return-line-item.md | 22 ++--- doc/models/order-return-service-charge.md | 16 ++-- doc/models/order-return-tax.md | 12 +-- doc/models/order-return.md | 10 +-- doc/models/order-rounding-adjustment.md | 4 +- doc/models/order-service-charge.md | 16 ++-- doc/models/order-source.md | 2 +- doc/models/order-updated.md | 4 +- doc/models/order.md | 18 ++-- doc/models/pause-subscription-request.md | 8 +- doc/models/pay-order-request.md | 4 +- ...-balance-activity-app-fee-refund-detail.md | 6 +- ...balance-activity-app-fee-revenue-detail.md | 4 +- ...lance-activity-automatic-savings-detail.md | 4 +- ...ivity-automatic-savings-reversed-detail.md | 4 +- .../payment-balance-activity-charge-detail.md | 2 +- ...ent-balance-activity-deposit-fee-detail.md | 2 +- ...payment-balance-activity-dispute-detail.md | 4 +- .../payment-balance-activity-fee-detail.md | 2 +- ...balance-activity-free-processing-detail.md | 2 +- ...balance-activity-hold-adjustment-detail.md | 2 +- ...nt-balance-activity-open-dispute-detail.md | 4 +- ...alance-activity-other-adjustment-detail.md | 2 +- .../payment-balance-activity-other-detail.md | 2 +- .../payment-balance-activity-refund-detail.md | 4 +- ...ance-activity-release-adjustment-detail.md | 2 +- ...nt-balance-activity-reserve-hold-detail.md | 2 +- ...balance-activity-reserve-release-detail.md | 2 +- ...-activity-square-capital-payment-detail.md | 2 +- ...-square-capital-reversed-payment-detail.md | 2 +- ...ment-balance-activity-tax-on-fee-detail.md | 4 +- ...balance-activity-third-party-fee-detail.md | 2 +- ...-activity-third-party-fee-refund-detail.md | 4 +- doc/models/payment-link-related-resources.md | 4 +- doc/models/payment-link.md | 4 +- doc/models/payment-options.md | 6 +- doc/models/payment-refund.md | 14 +-- doc/models/payment.md | 7 +- doc/models/payout-entry.md | 2 +- doc/models/payout-fee.md | 2 +- doc/models/payout.md | 6 +- doc/models/phase-input.md | 2 +- doc/models/phase.md | 8 +- doc/models/pre-populated-data.md | 4 +- doc/models/processing-fee.md | 4 +- doc/models/publish-invoice-request.md | 2 +- doc/models/quantity-ratio.md | 4 +- doc/models/range.md | 4 +- doc/models/receipt-options.md | 4 +- doc/models/refund-payment-request.md | 16 ++-- doc/models/refund.md | 4 +- doc/models/renew-token-request.md | 2 +- doc/models/resume-subscription-request.md | 2 +- ...trieve-booking-custom-attribute-request.md | 2 +- doc/models/retrieve-catalog-object-request.md | 4 +- ...rieve-customer-custom-attribute-request.md | 2 +- .../retrieve-inventory-changes-request.md | 4 +- .../retrieve-inventory-count-request.md | 4 +- ...rieve-location-custom-attribute-request.md | 2 +- .../retrieve-loyalty-promotion-response.md | 1 + ...rieve-merchant-custom-attribute-request.md | 2 +- ...retrieve-order-custom-attribute-request.md | 2 +- doc/models/retrieve-subscription-request.md | 2 +- doc/models/revoke-token-request.md | 8 +- doc/models/save-card-options.md | 2 +- doc/models/search-availability-filter.md | 6 +- doc/models/search-catalog-items-request.md | 1 + ...-accounts-request-loyalty-account-query.md | 4 +- doc/models/search-orders-customer-filter.md | 2 +- .../search-orders-fulfillment-filter.md | 4 +- doc/models/search-orders-source-filter.md | 2 +- doc/models/search-subscriptions-filter.md | 6 +- doc/models/search-team-members-filter.md | 4 +- doc/models/search-vendors-request-filter.md | 4 +- doc/models/shift-filter.md | 6 +- doc/models/shift-wage.md | 2 +- doc/models/shift-workday.md | 2 +- doc/models/shift.md | 12 +-- doc/models/shipping-fee.md | 2 +- doc/models/site.md | 6 +- doc/models/source-application.md | 4 +- doc/models/square-account-details.md | 44 +++++++++ doc/models/standard-unit-description-group.md | 4 +- doc/models/standard-unit-description.md | 4 +- doc/models/subscription-action.md | 6 +- doc/models/subscription-event-info.md | 2 +- doc/models/subscription-event.md | 2 +- doc/models/subscription-phase.md | 6 +- doc/models/subscription-pricing.md | 2 +- doc/models/subscription-source.md | 2 +- doc/models/subscription-test-result.md | 4 +- doc/models/subscription.md | 8 +- doc/models/swap-plan-request.md | 4 +- doc/models/tax-ids.md | 12 +-- doc/models/team-member-assigned-locations.md | 2 +- doc/models/team-member-booking-profile.md | 2 +- doc/models/team-member-wage.md | 6 +- doc/models/team-member.md | 10 +-- .../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-square-account-details-status.md | 16 ++++ doc/models/tender-square-account-details.md | 23 +++++ doc/models/tender-type.md | 3 + doc/models/tender.md | 17 ++-- doc/models/terminal-action-query-filter.md | 4 +- doc/models/terminal-action.md | 8 +- doc/models/terminal-checkout-query-filter.md | 4 +- doc/models/terminal-checkout.md | 14 +-- doc/models/terminal-refund-query-filter.md | 4 +- doc/models/terminal-refund-query-sort.md | 2 +- doc/models/terminal-refund.md | 2 +- .../test-webhook-subscription-request.md | 2 +- doc/models/time-range.md | 4 +- doc/models/tip-settings.md | 10 +-- doc/models/transaction.md | 18 ++-- ...ing-custom-attribute-definition-request.md | 2 +- doc/models/update-booking-request.md | 2 +- ...mer-custom-attribute-definition-request.md | 2 +- doc/models/update-customer-request.md | 18 ++-- doc/models/update-invoice-request.md | 4 +- .../update-item-modifier-lists-request.md | 4 +- .../update-item-modifier-lists-response.md | 2 +- doc/models/update-item-taxes-request.md | 4 +- ...ion-custom-attribute-definition-request.md | 2 +- ...ant-custom-attribute-definition-request.md | 2 +- ...der-custom-attribute-definition-request.md | 2 +- doc/models/update-order-request.md | 4 +- doc/models/update-payment-request.md | 2 +- doc/models/update-vendor-request.md | 2 +- ...hook-subscription-signature-key-request.md | 2 +- ...upsert-booking-custom-attribute-request.md | 2 +- ...psert-customer-custom-attribute-request.md | 2 +- ...psert-location-custom-attribute-request.md | 2 +- ...psert-merchant-custom-attribute-request.md | 2 +- .../upsert-order-custom-attribute-request.md | 2 +- doc/models/v1-create-refund-request.md | 2 +- doc/models/v1-list-orders-request.md | 4 +- doc/models/v1-list-payments-request.md | 10 +-- doc/models/v1-list-refunds-request.md | 8 +- doc/models/v1-list-settlements-request.md | 8 +- doc/models/v1-money.md | 2 +- doc/models/v1-order.md | 28 +++--- doc/models/v1-payment-discount.md | 4 +- doc/models/v1-payment-item-detail.md | 8 +- doc/models/v1-payment-itemization.md | 14 +-- doc/models/v1-payment-modifier.md | 4 +- doc/models/v1-payment-surcharge.md | 10 +-- doc/models/v1-payment-tax.md | 8 +- doc/models/v1-payment.md | 22 ++--- doc/models/v1-refund.md | 16 ++-- doc/models/v1-settlement-entry.md | 2 +- doc/models/v1-settlement.md | 6 +- doc/models/v1-tender.md | 16 ++-- doc/models/v1-update-order-request.md | 8 +- doc/models/vendor-contact.md | 8 +- doc/models/vendor.md | 8 +- doc/models/wage-setting.md | 6 +- doc/models/webhook-subscription.md | 10 +-- package.json | 2 +- src/api/bookingsApi.ts | 38 ++++++++ src/api/giftCardsApi.ts | 4 +- src/client.ts | 4 +- src/defaultConfiguration.ts | 2 +- src/index.ts | 7 ++ src/models/bulkRetrieveBookingsRequest.ts | 11 +++ src/models/bulkRetrieveBookingsResponse.ts | 24 +++++ src/models/catalogItem.ts | 3 + src/models/catalogItemVariation.ts | 9 -- src/models/catalogObject.ts | 2 +- src/models/createPaymentRequest.ts | 7 ++ src/models/customerDetails.ts | 17 ++++ src/models/listBookingsRequest.ts | 3 + src/models/listGiftCardsRequest.ts | 2 +- ...yPromotionIncentivePointsMultiplierData.ts | 27 +++++- src/models/payment.ts | 14 ++- src/models/searchCatalogItemsRequest.ts | 7 ++ src/models/squareAccountDetails.ts | 23 +++++ src/models/taxIds.ts | 6 ++ src/models/tender.ts | 34 +++++++ src/models/tenderBankAccountDetails.ts | 15 ++++ src/models/tenderBuyNowPayLaterDetails.ts | 14 +++ src/models/tenderSquareAccountDetails.ts | 10 +++ src/models/updateItemModifierListsResponse.ts | 2 +- src/models/updatePaymentRequest.ts | 2 +- 430 files changed, 1910 insertions(+), 1248 deletions(-) create mode 100644 doc/models/archived-state.md create mode 100644 doc/models/bulk-retrieve-bookings-request.md create mode 100644 doc/models/bulk-retrieve-bookings-response.md create mode 100644 doc/models/customer-details.md create mode 100644 doc/models/square-account-details.md create mode 100644 doc/models/tender-bank-account-details-status.md create mode 100644 doc/models/tender-bank-account-details.md create mode 100644 doc/models/tender-buy-now-pay-later-details-brand.md create mode 100644 doc/models/tender-buy-now-pay-later-details-status.md create mode 100644 doc/models/tender-buy-now-pay-later-details.md create mode 100644 doc/models/tender-square-account-details-status.md create mode 100644 doc/models/tender-square-account-details.md create mode 100644 src/models/bulkRetrieveBookingsRequest.ts create mode 100644 src/models/bulkRetrieveBookingsResponse.ts create mode 100644 src/models/customerDetails.ts create mode 100644 src/models/squareAccountDetails.ts create mode 100644 src/models/tenderBankAccountDetails.ts create mode 100644 src/models/tenderBuyNowPayLaterDetails.ts create mode 100644 src/models/tenderSquareAccountDetails.ts diff --git a/README.md b/README.md index 260c6837..82be4626 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ npm test ### Orders * [Orders] +* [Order Custom Attributes] ### Subscriptions * [Subscriptions] @@ -104,10 +105,13 @@ npm test ### Bookings * [Bookings] +* [Booking Custom Attributes] ### Business * [Merchants] +* [Merchant Custom Attributes] * [Locations] +* [Location Custom Attributes] * [Devices] * [Cash Drawers] @@ -161,9 +165,13 @@ The following Square APIs are [deprecated](https://developer.squareup.com/docs/b [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 diff --git a/doc/api/bookings.md b/doc/api/bookings.md index 183b5117..8e5f0f01 100644 --- a/doc/api/bookings.md +++ b/doc/api/bookings.md @@ -13,6 +13,7 @@ const bookingsApi = client.bookingsApi; * [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 Team Member Booking Profiles](../../doc/api/bookings.md#list-team-member-booking-profiles) * [Retrieve Team Member Booking Profile](../../doc/api/bookings.md#retrieve-team-member-booking-profile) @@ -32,6 +33,7 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` async listBookings( limit?: number, cursor?: string, + customerId?: string, teamMemberId?: string, locationId?: string, startAtMin?: string, @@ -46,6 +48,7 @@ async listBookings( | --- | --- | --- | --- | | `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. | @@ -177,6 +180,55 @@ try { ``` +# 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. diff --git a/doc/api/gift-cards.md b/doc/api/gift-cards.md index b9216c68..52e23c73 100644 --- a/doc/api/gift-cards.md +++ b/doc/api/gift-cards.md @@ -41,7 +41,7 @@ async listGiftCards( | --- | --- | --- | --- | | `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 50. The default value is 30.
For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). | +| `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. | diff --git a/doc/api/loyalty.md b/doc/api/loyalty.md index 93a3178f..055c1b03 100644 --- a/doc/api/loyalty.md +++ b/doc/api/loyalty.md @@ -584,7 +584,7 @@ const body: CreateLoyaltyPromotionRequest = { incentive: { type: 'POINTS_MULTIPLIER', pointsMultiplierData: { - pointsMultiplier: 3, + multiplier: '3.0', }, }, availableTime: { diff --git a/doc/client.md b/doc/client.md index c2b5d406..6ef810aa 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | -| `squareVersion` | `string` | Square Connect API versions
*Default*: `'2023-07-20'` | +| `squareVersion` | `string` | Square Connect API versions
*Default*: `'2023-08-16'` | | `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`
*Default*: `'https://connect.squareup.com'` | | `environment` | `string` | The API environment.
**Default: `production`** | | `additionalHeaders` | `Readonly>` | Additional headers to add to each API call
*Default*: `{}` | @@ -40,7 +40,7 @@ The API client can be initialized as follows: ```ts const client = new Client({ - squareVersion: '2023-07-20', + squareVersion: '2023-08-16', timeout: 60000, additionalHeaders: {}, userAgentDetail: '', @@ -55,7 +55,7 @@ const client = new Client({ import { ApiError, Client } from 'square'; const client = new Client({ - squareVersion: '2023-07-20', + squareVersion: '2023-08-16', timeout: 60000, additionalHeaders: {}, userAgentDetail: '', diff --git a/doc/models/accepted-payment-methods.md b/doc/models/accepted-payment-methods.md index fc0287c8..c410e19e 100644 --- a/doc/models/accepted-payment-methods.md +++ b/doc/models/accepted-payment-methods.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `applePay` | `boolean \| undefined` | Optional | Whether Apple Pay is accepted at checkout. | -| `googlePay` | `boolean \| undefined` | Optional | Whether Google Pay is accepted at checkout. | -| `cashAppPay` | `boolean \| undefined` | Optional | Whether Cash App Pay is accepted at checkout. | -| `afterpayClearpay` | `boolean \| undefined` | Optional | Whether Afterpay/Clearpay is accepted at checkout. | +| `applePay` | `boolean \| null \| undefined` | Optional | Whether Apple Pay is accepted at checkout. | +| `googlePay` | `boolean \| null \| undefined` | Optional | Whether Google Pay is accepted at checkout. | +| `cashAppPay` | `boolean \| null \| undefined` | Optional | Whether Cash App Pay is accepted at checkout. | +| `afterpayClearpay` | `boolean \| null \| undefined` | Optional | Whether Afterpay/Clearpay is accepted at checkout. | ## Example (as JSON) diff --git a/doc/models/ach-details.md b/doc/models/ach-details.md index af1f689f..0dfde474 100644 --- a/doc/models/ach-details.md +++ b/doc/models/ach-details.md @@ -11,9 +11,9 @@ ACH-specific details about `BANK_ACCOUNT` type payments with the `transfer_type` | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `routingNumber` | `string \| undefined` | Optional | The routing number for the bank account.
**Constraints**: *Maximum Length*: `50` | -| `accountNumberSuffix` | `string \| undefined` | Optional | The last few digits of the bank account number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4` | -| `accountType` | `string \| undefined` | Optional | The type of the bank account performing the transfer. The account type can be `CHECKING`,
`SAVINGS`, or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `routingNumber` | `string \| null \| undefined` | Optional | The routing number for the bank account.
**Constraints**: *Maximum Length*: `50` | +| `accountNumberSuffix` | `string \| null \| undefined` | Optional | The last few digits of the bank account number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4` | +| `accountType` | `string \| null \| undefined` | Optional | The type of the bank account performing the transfer. The account type can be `CHECKING`,
`SAVINGS`, or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | ## Example (as JSON) diff --git a/doc/models/additional-recipient.md b/doc/models/additional-recipient.md index 36a63e7b..2d4cbc9d 100644 --- a/doc/models/additional-recipient.md +++ b/doc/models/additional-recipient.md @@ -12,9 +12,9 @@ Represents an additional recipient (other than the merchant) receiving a portion | Name | Type | Tags | Description | | --- | --- | --- | --- | | `locationId` | `string` | Required | The location ID for a recipient (other than the merchant) receiving a portion of this tender.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50` | -| `description` | `string \| undefined` | Optional | The description of the additional recipient.
**Constraints**: *Maximum Length*: `100` | +| `description` | `string \| null \| undefined` | Optional | The description of the additional recipient.
**Constraints**: *Maximum Length*: `100` | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `receivableId` | `string \| undefined` | Optional | The unique ID for the RETIRED `AdditionalRecipientReceivable` object. This field should be empty for any `AdditionalRecipient` objects created after the retirement.
**Constraints**: *Maximum Length*: `192` | +| `receivableId` | `string \| null \| undefined` | Optional | The unique ID for the RETIRED `AdditionalRecipientReceivable` object. This field should be empty for any `AdditionalRecipient` objects created after the retirement.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/address.md b/doc/models/address.md index b8d16389..549abe34 100644 --- a/doc/models/address.md +++ b/doc/models/address.md @@ -12,20 +12,20 @@ For more information, see [Working with Addresses](https://developer.squareup.co | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `addressLine1` | `string \| undefined` | Optional | The first line of the address.

Fields that start with `address_line` provide the address's most specific
details, like street number, street name, and building name. They do *not*
provide less specific details like city, state/province, or country (these
details are provided in other fields). | -| `addressLine2` | `string \| undefined` | Optional | The second line of the address, if any. | -| `addressLine3` | `string \| undefined` | Optional | The third line of the address, if any. | -| `locality` | `string \| undefined` | Optional | The city or town of the address. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `sublocality` | `string \| undefined` | Optional | A civil region within the address's `locality`, if any. | -| `sublocality2` | `string \| undefined` | Optional | A civil region within the address's `sublocality`, if any. | -| `sublocality3` | `string \| undefined` | Optional | A civil region within the address's `sublocality_2`, if any. | -| `administrativeDistrictLevel1` | `string \| undefined` | Optional | A civil entity within the address's country. In the US, this
is the state. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `administrativeDistrictLevel2` | `string \| undefined` | Optional | A civil entity within the address's `administrative_district_level_1`.
In the US, this is the county. | -| `administrativeDistrictLevel3` | `string \| undefined` | Optional | A civil entity within the address's `administrative_district_level_2`,
if any. | -| `postalCode` | `string \| undefined` | Optional | The address's postal code. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | +| `addressLine1` | `string \| null \| undefined` | Optional | The first line of the address.

Fields that start with `address_line` provide the address's most specific
details, like street number, street name, and building name. They do *not*
provide less specific details like city, state/province, or country (these
details are provided in other fields). | +| `addressLine2` | `string \| null \| undefined` | Optional | The second line of the address, if any. | +| `addressLine3` | `string \| null \| undefined` | Optional | The third line of the address, if any. | +| `locality` | `string \| null \| undefined` | Optional | The city or town of the address. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | +| `sublocality` | `string \| null \| undefined` | Optional | A civil region within the address's `locality`, if any. | +| `sublocality2` | `string \| null \| undefined` | Optional | A civil region within the address's `sublocality`, if any. | +| `sublocality3` | `string \| null \| undefined` | Optional | A civil region within the address's `sublocality_2`, if any. | +| `administrativeDistrictLevel1` | `string \| null \| undefined` | Optional | A civil entity within the address's country. In the US, this
is the state. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | +| `administrativeDistrictLevel2` | `string \| null \| undefined` | Optional | A civil entity within the address's `administrative_district_level_1`.
In the US, this is the county. | +| `administrativeDistrictLevel3` | `string \| null \| undefined` | Optional | A civil entity within the address's `administrative_district_level_2`,
if any. | +| `postalCode` | `string \| null \| undefined` | Optional | The address's postal code. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | | `country` | [`string \| undefined`](../../doc/models/country.md) | Optional | Indicates the country associated with another entity, such as a business.
Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm). | -| `firstName` | `string \| undefined` | Optional | Optional first name when it's representing recipient. | -| `lastName` | `string \| undefined` | Optional | Optional last name when it's representing recipient. | +| `firstName` | `string \| null \| undefined` | Optional | Optional first name when it's representing recipient. | +| `lastName` | `string \| null \| undefined` | Optional | Optional last name when it's representing recipient. | ## Example (as JSON) diff --git a/doc/models/adjust-loyalty-points-request.md b/doc/models/adjust-loyalty-points-request.md index eca0a06a..402941b6 100644 --- a/doc/models/adjust-loyalty-points-request.md +++ b/doc/models/adjust-loyalty-points-request.md @@ -13,7 +13,7 @@ Represents an [AdjustLoyaltyPoints](../../doc/api/loyalty.md#adjust-loyalty-poin | --- | --- | --- | --- | | `idempotencyKey` | `string` | Required | A unique string that identifies this `AdjustLoyaltyPoints` request.
Keys can be any valid string, but must be unique for every request.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` | | `adjustPoints` | [`LoyaltyEventAdjustPoints`](../../doc/models/loyalty-event-adjust-points.md) | Required | Provides metadata when the event `type` is `ADJUST_POINTS`. | -| `allowNegativeBalance` | `boolean \| undefined` | Optional | Indicates whether to allow a negative adjustment to result in a negative balance. If `true`, a negative
balance is allowed when subtracting points. If `false`, Square returns a `BAD_REQUEST` error when subtracting
the specified number of points would result in a negative balance. The default value is `false`. | +| `allowNegativeBalance` | `boolean \| null \| undefined` | Optional | Indicates whether to allow a negative adjustment to result in a negative balance. If `true`, a negative
balance is allowed when subtracting points. If `false`, Square returns a `BAD_REQUEST` error when subtracting
the specified number of points would result in a negative balance. The default value is `false`. | ## Example (as JSON) diff --git a/doc/models/afterpay-details.md b/doc/models/afterpay-details.md index ba2b9e26..e7e09858 100644 --- a/doc/models/afterpay-details.md +++ b/doc/models/afterpay-details.md @@ -11,7 +11,7 @@ Additional details about Afterpay payments. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `emailAddress` | `string \| undefined` | Optional | Email address on the buyer's Afterpay account.
**Constraints**: *Maximum Length*: `255` | +| `emailAddress` | `string \| null \| undefined` | Optional | Email address on the buyer's Afterpay account.
**Constraints**: *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/application-details.md b/doc/models/application-details.md index 573015e8..616a8c42 100644 --- a/doc/models/application-details.md +++ b/doc/models/application-details.md @@ -12,7 +12,7 @@ Details about the application that took the payment. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `squareProduct` | [`string \| undefined`](../../doc/models/application-details-external-square-product.md) | Optional | A list of products to return to external callers. | -| `applicationId` | `string \| undefined` | Optional | The Square ID assigned to the application used to take the payment.
Application developers can use this information to identify payments that
their application processed.
For example, if a developer uses a custom application to process payments,
this field contains the application ID from the Developer Dashboard.
If a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace)
application to process payments, the field contains the corresponding application ID. | +| `applicationId` | `string \| null \| undefined` | Optional | The Square ID assigned to the application used to take the payment.
Application developers can use this information to identify payments that
their application processed.
For example, if a developer uses a custom application to process payments,
this field contains the application ID from the Developer Dashboard.
If a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace)
application to process payments, the field contains the corresponding application ID. | ## Example (as JSON) diff --git a/doc/models/appointment-segment.md b/doc/models/appointment-segment.md index 3f54b069..2a808071 100644 --- a/doc/models/appointment-segment.md +++ b/doc/models/appointment-segment.md @@ -11,10 +11,10 @@ Defines an appointment segment of a booking. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `durationMinutes` | `number \| undefined` | Optional | The time span in minutes of an appointment segment.
**Constraints**: `<= 1500` | -| `serviceVariationId` | `string \| undefined` | Optional | The ID of the [CatalogItemVariation](entity:CatalogItemVariation) object representing the service booked in this segment.
**Constraints**: *Maximum Length*: `36` | +| `durationMinutes` | `number \| null \| undefined` | Optional | The time span in minutes of an appointment segment.
**Constraints**: `<= 1500` | +| `serviceVariationId` | `string \| null \| undefined` | Optional | The ID of the [CatalogItemVariation](entity:CatalogItemVariation) object representing the service booked in this segment.
**Constraints**: *Maximum Length*: `36` | | `teamMemberId` | `string` | Required | The ID of the [TeamMember](entity:TeamMember) object representing the team member booked in this segment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32` | -| `serviceVariationVersion` | `bigint \| undefined` | Optional | The current version of the item variation representing the service booked in this segment. | +| `serviceVariationVersion` | `bigint \| null \| undefined` | Optional | The current version of the item variation representing the service booked in this segment. | | `intermissionMinutes` | `number \| undefined` | Optional | Time between the end of this segment and the beginning of the subsequent segment. | | `anyTeamMember` | `boolean \| undefined` | Optional | Whether the customer accepts any team member, instead of a specific one, to serve this segment. | | `resourceIds` | `string[] \| undefined` | Optional | The IDs of the seller-accessible resources used for this appointment segment. | diff --git a/doc/models/archived-state.md b/doc/models/archived-state.md new file mode 100644 index 00000000..f9e98533 --- /dev/null +++ b/doc/models/archived-state.md @@ -0,0 +1,19 @@ + +# Archived State + +Defines the values for the `archived_state` query expression +used in [SearchCatalogItems](../../doc/api/catalog.md#search-catalog-items) +to return the archived, not archived or either type of catalog items. + +## Enumeration + +`ArchivedState` + +## Fields + +| Name | Description | +| --- | --- | +| `ARCHIVED_STATE_NOT_ARCHIVED` | Requested items are not archived with the `is_archived` attribute set to `false`. | +| `ARCHIVED_STATE_ARCHIVED` | Requested items are archived with the `is_archived` attribute set to `true`. | +| `ARCHIVED_STATE_ALL` | Requested items can be archived or not archived. | + diff --git a/doc/models/availability.md b/doc/models/availability.md index ac5eeae3..48c84fb0 100644 --- a/doc/models/availability.md +++ b/doc/models/availability.md @@ -11,9 +11,9 @@ Defines an appointment slot that encapsulates the appointment segments, location | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `startAt` | `string \| undefined` | Optional | The RFC 3339 timestamp specifying the beginning time of the slot available for booking. | +| `startAt` | `string \| null \| undefined` | Optional | The RFC 3339 timestamp specifying the beginning time of the slot available for booking. | | `locationId` | `string \| undefined` | Optional | The ID of the location available for booking.
**Constraints**: *Maximum Length*: `32` | -| `appointmentSegments` | [`AppointmentSegment[] \| undefined`](../../doc/models/appointment-segment.md) | Optional | The list of appointment segments available for booking | +| `appointmentSegments` | [`AppointmentSegment[] \| null \| undefined`](../../doc/models/appointment-segment.md) | Optional | The list of appointment segments available for booking | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-details.md b/doc/models/bank-account-payment-details.md index c4747c9b..368eb8fe 100644 --- a/doc/models/bank-account-payment-details.md +++ b/doc/models/bank-account-payment-details.md @@ -11,14 +11,14 @@ Additional details about BANK_ACCOUNT type payments. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `bankName` | `string \| undefined` | Optional | The name of the bank associated with the bank account.
**Constraints**: *Maximum Length*: `100` | -| `transferType` | `string \| undefined` | Optional | The type of the bank transfer. The type can be `ACH` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | -| `accountOwnershipType` | `string \| undefined` | Optional | The ownership type of the bank account performing the transfer.
The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | -| `fingerprint` | `string \| undefined` | Optional | Uniquely identifies the bank account for this seller and can be used
to determine if payments are from the same bank account.
**Constraints**: *Maximum Length*: `255` | -| `country` | `string \| undefined` | Optional | The two-letter ISO code representing the country the bank account is located in.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` | -| `statementDescription` | `string \| undefined` | Optional | The statement description as sent to the bank.
**Constraints**: *Maximum Length*: `1000` | +| `bankName` | `string \| null \| undefined` | Optional | The name of the bank associated with the bank account.
**Constraints**: *Maximum Length*: `100` | +| `transferType` | `string \| null \| undefined` | Optional | The type of the bank transfer. The type can be `ACH` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `accountOwnershipType` | `string \| null \| undefined` | Optional | The ownership type of the bank account performing the transfer.
The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `fingerprint` | `string \| null \| undefined` | Optional | Uniquely identifies the bank account for this seller and can be used
to determine if payments are from the same bank account.
**Constraints**: *Maximum Length*: `255` | +| `country` | `string \| null \| undefined` | Optional | The two-letter ISO code representing the country the bank account is located in.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` | +| `statementDescription` | `string \| null \| undefined` | Optional | The statement description as sent to the bank.
**Constraints**: *Maximum Length*: `1000` | | `achDetails` | [`ACHDetails \| undefined`](../../doc/models/ach-details.md) | Optional | ACH-specific details about `BANK_ACCOUNT` type payments with the `transfer_type` of `ACH`. | -| `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Information about errors encountered during the request. | +| `errors` | [`Error[] \| null \| undefined`](../../doc/models/error.md) | Optional | Information about errors encountered during the request. | ## Example (as JSON) diff --git a/doc/models/bank-account.md b/doc/models/bank-account.md index 5522aa2e..11a7ec3a 100644 --- a/doc/models/bank-account.md +++ b/doc/models/bank-account.md @@ -20,16 +20,16 @@ linking a bank account to a Square account, see | `accountType` | [`string`](../../doc/models/bank-account-type.md) | Required | Indicates the financial purpose of the bank account. | | `holderName` | `string` | Required | Name of the account holder. This name must match the name
on the targeted bank account record.
**Constraints**: *Minimum Length*: `1` | | `primaryBankIdentificationNumber` | `string` | Required | Primary identifier for the bank. For more information, see
[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
**Constraints**: *Maximum Length*: `40` | -| `secondaryBankIdentificationNumber` | `string \| undefined` | Optional | Secondary identifier for the bank. For more information, see
[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
**Constraints**: *Maximum Length*: `40` | -| `debitMandateReferenceId` | `string \| undefined` | Optional | Reference identifier that will be displayed to UK bank account owners
when collecting direct debit authorization. Only required for UK bank accounts. | -| `referenceId` | `string \| undefined` | Optional | Client-provided identifier for linking the banking account to an entity
in a third-party system (for example, a bank account number or a user identifier). | -| `locationId` | `string \| undefined` | Optional | The location to which the bank account belongs. | +| `secondaryBankIdentificationNumber` | `string \| null \| undefined` | Optional | Secondary identifier for the bank. For more information, see
[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
**Constraints**: *Maximum Length*: `40` | +| `debitMandateReferenceId` | `string \| null \| undefined` | Optional | Reference identifier that will be displayed to UK bank account owners
when collecting direct debit authorization. Only required for UK bank accounts. | +| `referenceId` | `string \| null \| undefined` | Optional | Client-provided identifier for linking the banking account to an entity
in a third-party system (for example, a bank account number or a user identifier). | +| `locationId` | `string \| null \| undefined` | Optional | The location to which the bank account belongs. | | `status` | [`string`](../../doc/models/bank-account-status.md) | Required | Indicates the current verification status of a `BankAccount` object. | | `creditable` | `boolean` | Required | Indicates whether it is possible for Square to send money to this bank account. | | `debitable` | `boolean` | Required | Indicates whether it is possible for Square to take money from this
bank account. | -| `fingerprint` | `string \| undefined` | Optional | A Square-assigned, unique identifier for the bank account based on the
account information. The account fingerprint can be used to compare account
entries and determine if the they represent the same real-world bank account. | +| `fingerprint` | `string \| null \| undefined` | Optional | A Square-assigned, unique identifier for the bank account based on the
account information. The account fingerprint can be used to compare account
entries and determine if the they represent the same real-world bank account. | | `version` | `number \| undefined` | Optional | The current version of the `BankAccount`. | -| `bankName` | `string \| undefined` | Optional | Read only. Name of actual financial institution.
For example "Bank of America".
**Constraints**: *Maximum Length*: `100` | +| `bankName` | `string \| null \| undefined` | Optional | Read only. Name of actual financial institution.
For example "Bank of America".
**Constraints**: *Maximum Length*: `100` | ## Example (as JSON) diff --git a/doc/models/batch-change-inventory-request.md b/doc/models/batch-change-inventory-request.md index dd2ce4ee..4a98eed5 100644 --- a/doc/models/batch-change-inventory-request.md +++ b/doc/models/batch-change-inventory-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `idempotencyKey` | `string` | Required | A client-supplied, universally unique identifier (UUID) for the
request.

See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
information.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` | -| `changes` | [`InventoryChange[] \| undefined`](../../doc/models/inventory-change.md) | Optional | The set of physical counts and inventory adjustments to be made.
Changes are applied based on the client-supplied timestamp and may be sent
out of order. | -| `ignoreUnchangedCounts` | `boolean \| undefined` | Optional | Indicates whether the current physical count should be ignored if
the quantity is unchanged since the last physical count. Default: `true`. | +| `changes` | [`InventoryChange[] \| null \| undefined`](../../doc/models/inventory-change.md) | Optional | The set of physical counts and inventory adjustments to be made.
Changes are applied based on the client-supplied timestamp and may be sent
out of order. | +| `ignoreUnchangedCounts` | `boolean \| null \| undefined` | Optional | Indicates whether the current physical count should be ignored if
the quantity is unchanged since the last physical count. Default: `true`. | ## Example (as JSON) diff --git a/doc/models/batch-delete-catalog-objects-request.md b/doc/models/batch-delete-catalog-objects-request.md index 6b93e7b7..359ef065 100644 --- a/doc/models/batch-delete-catalog-objects-request.md +++ b/doc/models/batch-delete-catalog-objects-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `objectIds` | `string[] \| undefined` | Optional | The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects
in the graph that depend on that object will be deleted as well (for example, deleting a
CatalogItem will delete its CatalogItemVariation. | +| `objectIds` | `string[] \| null \| undefined` | Optional | The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects
in the graph that depend on that object will be deleted as well (for example, deleting a
CatalogItem will delete its CatalogItemVariation. | ## Example (as JSON) diff --git a/doc/models/batch-retrieve-catalog-objects-request.md b/doc/models/batch-retrieve-catalog-objects-request.md index 3cf07cbf..276e2cc8 100644 --- a/doc/models/batch-retrieve-catalog-objects-request.md +++ b/doc/models/batch-retrieve-catalog-objects-request.md @@ -10,9 +10,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `objectIds` | `string[]` | Required | The IDs of the CatalogObjects to be retrieved. | -| `includeRelatedObjects` | `boolean \| undefined` | 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` | -| `catalogVersion` | `bigint \| undefined` | 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. | -| `includeDeletedObjects` | `boolean \| undefined` | Optional | Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`. | +| `includeRelatedObjects` | `boolean \| null \| undefined` | 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` | +| `catalogVersion` | `bigint \| null \| undefined` | 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. | +| `includeDeletedObjects` | `boolean \| null \| undefined` | Optional | Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`. | ## Example (as JSON) diff --git a/doc/models/batch-retrieve-inventory-changes-request.md b/doc/models/batch-retrieve-inventory-changes-request.md index fe09e1c7..0f9f75c8 100644 --- a/doc/models/batch-retrieve-inventory-changes-request.md +++ b/doc/models/batch-retrieve-inventory-changes-request.md @@ -9,14 +9,14 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `catalogObjectIds` | `string[] \| undefined` | Optional | The filter to return results by `CatalogObject` ID.
The filter is only applicable when set. The default value is null. | -| `locationIds` | `string[] \| undefined` | Optional | The filter to return results by `Location` ID.
The filter is only applicable when set. The default value is null. | -| `types` | [`string[] \| undefined`](../../doc/models/inventory-change-type.md) | Optional | The filter to return results by `InventoryChangeType` values other than `TRANSFER`.
The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. | -| `states` | [`string[] \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return `ADJUSTMENT` query results by
`InventoryState`. This filter is only applied when set.
The default value is null. | -| `updatedAfter` | `string \| undefined` | Optional | The filter to return results with their `calculated_at` value
after the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | -| `updatedBefore` | `string \| undefined` | Optional | The filter to return results with their `created_at` or `calculated_at` value
strictly before the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | -| `cursor` | `string \| undefined` | 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. | -| `limit` | `number \| undefined` | Optional | The number of [records](entity:InventoryChange) to return.
**Constraints**: `>= 1`, `<= 1000` | +| `catalogObjectIds` | `string[] \| null \| undefined` | Optional | The filter to return results by `CatalogObject` ID.
The filter is only applicable when set. The default value is null. | +| `locationIds` | `string[] \| null \| undefined` | Optional | The filter to return results by `Location` ID.
The filter is only applicable when set. The default value is null. | +| `types` | [`string[] \| null \| undefined`](../../doc/models/inventory-change-type.md) | Optional | The filter to return results by `InventoryChangeType` values other than `TRANSFER`.
The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. | +| `states` | [`string[] \| null \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return `ADJUSTMENT` query results by
`InventoryState`. This filter is only applied when set.
The default value is null. | +| `updatedAfter` | `string \| null \| undefined` | Optional | The filter to return results with their `calculated_at` value
after the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | +| `updatedBefore` | `string \| null \| undefined` | Optional | The filter to return results with their `created_at` or `calculated_at` value
strictly before the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | +| `cursor` | `string \| null \| undefined` | 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. | +| `limit` | `number \| null \| undefined` | Optional | The number of [records](entity:InventoryChange) to return.
**Constraints**: `>= 1`, `<= 1000` | ## Example (as JSON) diff --git a/doc/models/batch-retrieve-inventory-counts-request.md b/doc/models/batch-retrieve-inventory-counts-request.md index 9eb2a286..acbe04b8 100644 --- a/doc/models/batch-retrieve-inventory-counts-request.md +++ b/doc/models/batch-retrieve-inventory-counts-request.md @@ -9,12 +9,12 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `catalogObjectIds` | `string[] \| undefined` | Optional | The filter to return results by `CatalogObject` ID.
The filter is applicable only when set. The default is null. | -| `locationIds` | `string[] \| undefined` | Optional | The filter to return results by `Location` ID.
This filter is applicable only when set. The default is null. | -| `updatedAfter` | `string \| undefined` | Optional | The filter to return results with their `calculated_at` value
after the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | -| `cursor` | `string \| undefined` | 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. | -| `states` | [`string[] \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return results by `InventoryState`. The filter is only applicable when set.
Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.
The default is null. | -| `limit` | `number \| undefined` | Optional | The number of [records](entity:InventoryCount) to return.
**Constraints**: `>= 1`, `<= 1000` | +| `catalogObjectIds` | `string[] \| null \| undefined` | Optional | The filter to return results by `CatalogObject` ID.
The filter is applicable only when set. The default is null. | +| `locationIds` | `string[] \| null \| undefined` | Optional | The filter to return results by `Location` ID.
This filter is applicable only when set. The default is null. | +| `updatedAfter` | `string \| null \| undefined` | Optional | The filter to return results with their `calculated_at` value
after the given time as specified in an RFC 3339 timestamp.
The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | +| `cursor` | `string \| null \| undefined` | 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. | +| `states` | [`string[] \| null \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return results by `InventoryState`. The filter is only applicable when set.
Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.
The default is null. | +| `limit` | `number \| null \| undefined` | Optional | The number of [records](entity:InventoryCount) to return.
**Constraints**: `>= 1`, `<= 1000` | ## Example (as JSON) diff --git a/doc/models/batch-retrieve-orders-request.md b/doc/models/batch-retrieve-orders-request.md index 6ed431ab..76f61914 100644 --- a/doc/models/batch-retrieve-orders-request.md +++ b/doc/models/batch-retrieve-orders-request.md @@ -12,7 +12,7 @@ Defines the fields that are included in requests to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | Optional | The ID of the location for these orders. This field is optional: omit it to retrieve
orders within the scope of the current authorization's merchant ID. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location for these orders. This field is optional: omit it to retrieve
orders within the scope of the current authorization's merchant ID. | | `orderIds` | `string[]` | Required | The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request. | ## Example (as JSON) diff --git a/doc/models/booking-custom-attribute-delete-request.md b/doc/models/booking-custom-attribute-delete-request.md index b84766ae..fd8cbfda 100644 --- a/doc/models/booking-custom-attribute-delete-request.md +++ b/doc/models/booking-custom-attribute-delete-request.md @@ -12,7 +12,7 @@ request. An individual request contains a booking ID, the custom attribute to de | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).
**Constraints**: *Minimum Length*: `1` | +| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `key` | `string` | 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.
**Constraints**: *Minimum Length*: `1` | ## Example (as JSON) diff --git a/doc/models/booking-custom-attribute-upsert-request.md b/doc/models/booking-custom-attribute-upsert-request.md index 6d56d475..7c6a79af 100644 --- a/doc/models/booking-custom-attribute-upsert-request.md +++ b/doc/models/booking-custom-attribute-upsert-request.md @@ -13,9 +13,9 @@ and an optional idempotency key. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).
**Constraints**: *Minimum Length*: `1` | +| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/booking.md b/doc/models/booking.md index de5a9ba1..a63d5244 100644 --- a/doc/models/booking.md +++ b/doc/models/booking.md @@ -17,12 +17,12 @@ at a given location to a requesting customer in one or more appointment segments | `status` | [`string \| undefined`](../../doc/models/booking-status.md) | Optional | Supported booking statuses. | | `createdAt` | `string \| undefined` | Optional | The RFC 3339 timestamp specifying the creation time of this booking. | | `updatedAt` | `string \| undefined` | Optional | The RFC 3339 timestamp specifying the most recent update time of this booking. | -| `startAt` | `string \| undefined` | Optional | The RFC 3339 timestamp specifying the starting time of this booking. | -| `locationId` | `string \| undefined` | Optional | The ID of the [Location](entity:Location) object representing the location where the booked service is provided. Once set when the booking is created, its value cannot be changed.
**Constraints**: *Maximum Length*: `32` | -| `customerId` | `string \| undefined` | Optional | The ID of the [Customer](entity:Customer) object representing the customer receiving the booked service.
**Constraints**: *Maximum Length*: `192` | -| `customerNote` | `string \| undefined` | Optional | The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant [CatalogObject](entity:CatalogObject) instance.
**Constraints**: *Maximum Length*: `4096` | -| `sellerNote` | `string \| undefined` | Optional | The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific [CatalogObject](entity:CatalogObject) instance.
This field should not be visible to customers.
**Constraints**: *Maximum Length*: `4096` | -| `appointmentSegments` | [`AppointmentSegment[] \| undefined`](../../doc/models/appointment-segment.md) | Optional | A list of appointment segments for this booking. | +| `startAt` | `string \| null \| undefined` | Optional | The RFC 3339 timestamp specifying the starting time of this booking. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the [Location](entity:Location) object representing the location where the booked service is provided. Once set when the booking is created, its value cannot be changed.
**Constraints**: *Maximum Length*: `32` | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the [Customer](entity:Customer) object representing the customer receiving the booked service.
**Constraints**: *Maximum Length*: `192` | +| `customerNote` | `string \| null \| undefined` | Optional | The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant [CatalogObject](entity:CatalogObject) instance.
**Constraints**: *Maximum Length*: `4096` | +| `sellerNote` | `string \| null \| undefined` | Optional | The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific [CatalogObject](entity:CatalogObject) instance.
This field should not be visible to customers.
**Constraints**: *Maximum Length*: `4096` | +| `appointmentSegments` | [`AppointmentSegment[] \| null \| undefined`](../../doc/models/appointment-segment.md) | Optional | A list of appointment segments for this booking. | | `transitionTimeMinutes` | `number \| undefined` | Optional | Additional time at the end of a booking.
Applications should not make this field visible to customers of a seller. | | `allDay` | `boolean \| undefined` | Optional | Whether the booking is of a full business day. | | `locationType` | [`string \| undefined`](../../doc/models/business-appointment-settings-booking-location-type.md) | Optional | Supported types of location where service is provided. | diff --git a/doc/models/break.md b/doc/models/break.md index 34d87a43..e80b9806 100644 --- a/doc/models/break.md +++ b/doc/models/break.md @@ -13,7 +13,7 @@ A record of an employee's break during a shift. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The UUID for this object. | | `startAt` | `string` | Required | RFC 3339; follows the same timezone information as `Shift`. Precision up to
the minute is respected; seconds are truncated.
**Constraints**: *Minimum Length*: `1` | -| `endAt` | `string \| undefined` | Optional | RFC 3339; follows the same timezone information as `Shift`. Precision up to
the minute is respected; seconds are truncated. | +| `endAt` | `string \| null \| undefined` | Optional | RFC 3339; follows the same timezone information as `Shift`. Precision up to
the minute is respected; seconds are truncated. | | `breakTypeId` | `string` | Required | The `BreakType` that this `Break` was templated on.
**Constraints**: *Minimum Length*: `1` | | `name` | `string` | Required | A human-readable name.
**Constraints**: *Minimum Length*: `1` | | `expectedDuration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of
the break.
**Constraints**: *Minimum Length*: `1` | diff --git a/doc/models/bulk-retrieve-bookings-request.md b/doc/models/bulk-retrieve-bookings-request.md new file mode 100644 index 00000000..70107b28 --- /dev/null +++ b/doc/models/bulk-retrieve-bookings-request.md @@ -0,0 +1,25 @@ + +# Bulk Retrieve Bookings Request + +Request payload for bulk retrieval of bookings. + +## Structure + +`BulkRetrieveBookingsRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `bookingIds` | `string[]` | Required | A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve. | + +## Example (as JSON) + +```json +{ + "booking_ids": [ + "booking_ids4" + ] +} +``` + diff --git a/doc/models/bulk-retrieve-bookings-response.md b/doc/models/bulk-retrieve-bookings-response.md new file mode 100644 index 00000000..da3423e4 --- /dev/null +++ b/doc/models/bulk-retrieve-bookings-response.md @@ -0,0 +1,89 @@ + +# Bulk Retrieve Bookings Response + +Response payload for bulk retrieval of bookings. + +## Structure + +`BulkRetrieveBookingsResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `bookings` | [`Record \| undefined`](../../doc/models/retrieve-booking-response.md) | Optional | Requested bookings returned as a map containing `booking_id` as the key and `RetrieveBookingResponse` as the value. | +| `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Errors that occurred during the request. | + +## Example (as JSON) + +```json +{ + "bookings": { + "sc3p3m7dvctfr1": { + "booking": { + "all_day": false, + "appointment_segments": [ + { + "any_team_member": false, + "duration_minutes": 60, + "service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS", + "service_variation_version": 1641341724039, + "team_member_id": "TMjiqI3PxyLMKr4k" + } + ], + "created_at": "2023-04-26T18:19:21Z", + "customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM", + "id": "sc3p3m7dvctfr1", + "location_id": "LY6WNBPVM6VGV", + "start_at": "2023-05-01T14:00:00Z", + "status": "ACCEPTED", + "updated_at": "2023-04-26T18:19:21Z", + "version": 0 + }, + "errors": [] + }, + "tdegug1dvctdef": { + "errors": [ + { + "category": "INVALID_REQUEST_ERROR", + "code": "NOT_FOUND", + "detail": "Specified booking was not found.", + "field": "booking_id" + } + ], + "booking": { + "id": "id8", + "version": 86, + "status": "CANCELLED_BY_SELLER", + "created_at": "created_at6", + "updated_at": "updated_at6" + } + }, + "tdegug1fqni3wh": { + "booking": { + "all_day": false, + "appointment_segments": [ + { + "any_team_member": false, + "duration_minutes": 60, + "service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS", + "service_variation_version": 1641341724039, + "team_member_id": "TMjiqI3PxyLMKr4k" + } + ], + "created_at": "2023-04-26T18:19:30Z", + "customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM", + "id": "tdegug1fqni3wh", + "location_id": "LY6WNBPVM6VGV", + "start_at": "2023-05-02T14:00:00Z", + "status": "ACCEPTED", + "updated_at": "2023-04-26T18:19:30Z", + "version": 0 + }, + "errors": [] + } + }, + "errors": [] +} +``` + diff --git a/doc/models/bulk-retrieve-vendors-request.md b/doc/models/bulk-retrieve-vendors-request.md index 38091df6..23e96b2d 100644 --- a/doc/models/bulk-retrieve-vendors-request.md +++ b/doc/models/bulk-retrieve-vendors-request.md @@ -11,7 +11,7 @@ Represents an input to a call to [BulkRetrieveVendors](../../doc/api/vendors.md# | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `vendorIds` | `string[] \| undefined` | Optional | IDs of the [Vendor](entity:Vendor) objects to retrieve. | +| `vendorIds` | `string[] \| null \| undefined` | Optional | IDs of the [Vendor](entity:Vendor) objects to retrieve. | ## Example (as JSON) diff --git a/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md b/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md index 8eff0563..552b5be6 100644 --- a/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md +++ b/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md @@ -15,7 +15,7 @@ and an optional idempotency key. | --- | --- | --- | --- | | `customerId` | `string` | Required | The ID of the target [customer profile](entity:Customer).
**Constraints**: *Minimum Length*: `1` | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md b/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md index 7991d45e..7edbdcfe 100644 --- a/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md +++ b/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md @@ -15,7 +15,7 @@ and an optional idempotency key. | --- | --- | --- | --- | | `locationId` | `string` | Required | The ID of the target [location](entity:Location).
**Constraints**: *Minimum Length*: `1` | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/bulk-upsert-merchant-custom-attributes-request-merchant-custom-attribute-upsert-request.md b/doc/models/bulk-upsert-merchant-custom-attributes-request-merchant-custom-attribute-upsert-request.md index 369fe73b..9bc2a900 100644 --- a/doc/models/bulk-upsert-merchant-custom-attributes-request-merchant-custom-attribute-upsert-request.md +++ b/doc/models/bulk-upsert-merchant-custom-attributes-request-merchant-custom-attribute-upsert-request.md @@ -15,7 +15,7 @@ and an optional idempotency key. | --- | --- | --- | --- | | `merchantId` | `string` | Required | The ID of the target [merchant](entity:Merchant).
**Constraints**: *Minimum Length*: `1` | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md b/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md index 183acfe7..1898b742 100644 --- a/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md +++ b/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md @@ -12,7 +12,7 @@ Represents one upsert within the bulk operation. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | | `orderId` | `string` | Required | The ID of the target [order](entity:Order).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/business-appointment-settings.md b/doc/models/business-appointment-settings.md index 78d3a254..006593b7 100644 --- a/doc/models/business-appointment-settings.md +++ b/doc/models/business-appointment-settings.md @@ -11,19 +11,19 @@ The service appointment settings, including where and how the service is provide | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationTypes` | [`string[] \| undefined`](../../doc/models/business-appointment-settings-booking-location-type.md) | Optional | Types of the location allowed for bookings.
See [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) for possible values | +| `locationTypes` | [`string[] \| null \| undefined`](../../doc/models/business-appointment-settings-booking-location-type.md) | Optional | Types of the location allowed for bookings.
See [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) for possible values | | `alignmentTime` | [`string \| undefined`](../../doc/models/business-appointment-settings-alignment-time.md) | Optional | Time units of a service duration for bookings. | -| `minBookingLeadTimeSeconds` | `number \| undefined` | Optional | The minimum lead time in seconds before a service can be booked. A booking must be created at least this amount of time before its starting time. | -| `maxBookingLeadTimeSeconds` | `number \| undefined` | Optional | The maximum lead time in seconds before a service can be booked. A booking must be created at most this amount of time before its starting time. | -| `anyTeamMemberBookingEnabled` | `boolean \| undefined` | Optional | Indicates whether a customer can choose from all available time slots and have a staff member assigned
automatically (`true`) or not (`false`). | -| `multipleServiceBookingEnabled` | `boolean \| undefined` | Optional | Indicates whether a customer can book multiple services in a single online booking. | +| `minBookingLeadTimeSeconds` | `number \| null \| undefined` | Optional | The minimum lead time in seconds before a service can be booked. A booking must be created at least this amount of time before its starting time. | +| `maxBookingLeadTimeSeconds` | `number \| null \| undefined` | Optional | The maximum lead time in seconds before a service can be booked. A booking must be created at most this amount of time before its starting time. | +| `anyTeamMemberBookingEnabled` | `boolean \| null \| undefined` | Optional | Indicates whether a customer can choose from all available time slots and have a staff member assigned
automatically (`true`) or not (`false`). | +| `multipleServiceBookingEnabled` | `boolean \| null \| undefined` | Optional | Indicates whether a customer can book multiple services in a single online booking. | | `maxAppointmentsPerDayLimitType` | [`string \| undefined`](../../doc/models/business-appointment-settings-max-appointments-per-day-limit-type.md) | Optional | Types of daily appointment limits. | -| `maxAppointmentsPerDayLimit` | `number \| undefined` | Optional | The maximum number of daily appointments per team member or per location. | -| `cancellationWindowSeconds` | `number \| undefined` | Optional | The cut-off time in seconds for allowing clients to cancel or reschedule an appointment. | +| `maxAppointmentsPerDayLimit` | `number \| null \| undefined` | Optional | The maximum number of daily appointments per team member or per location. | +| `cancellationWindowSeconds` | `number \| null \| undefined` | Optional | The cut-off time in seconds for allowing clients to cancel or reschedule an appointment. | | `cancellationFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `cancellationPolicy` | [`string \| undefined`](../../doc/models/business-appointment-settings-cancellation-policy.md) | Optional | The category of the seller’s cancellation policy. | -| `cancellationPolicyText` | `string \| undefined` | Optional | The free-form text of the seller's cancellation policy.
**Constraints**: *Maximum Length*: `65536` | -| `skipBookingFlowStaffSelection` | `boolean \| undefined` | Optional | Indicates whether customers has an assigned staff member (`true`) or can select s staff member of their choice (`false`). | +| `cancellationPolicyText` | `string \| null \| undefined` | Optional | The free-form text of the seller's cancellation policy.
**Constraints**: *Maximum Length*: `65536` | +| `skipBookingFlowStaffSelection` | `boolean \| null \| undefined` | Optional | Indicates whether customers has an assigned staff member (`true`) or can select s staff member of their choice (`false`). | ## Example (as JSON) diff --git a/doc/models/business-booking-profile.md b/doc/models/business-booking-profile.md index 7d1105d9..f62e78a0 100644 --- a/doc/models/business-booking-profile.md +++ b/doc/models/business-booking-profile.md @@ -9,14 +9,14 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `sellerId` | `string \| undefined` | Optional | The ID of the seller, obtainable using the Merchants API.
**Constraints**: *Maximum Length*: `32` | +| `sellerId` | `string \| null \| undefined` | Optional | The ID of the seller, obtainable using the Merchants API.
**Constraints**: *Maximum Length*: `32` | | `createdAt` | `string \| undefined` | Optional | The RFC 3339 timestamp specifying the booking's creation time. | -| `bookingEnabled` | `boolean \| undefined` | Optional | Indicates whether the seller is open for booking. | +| `bookingEnabled` | `boolean \| null \| undefined` | Optional | Indicates whether the seller is open for booking. | | `customerTimezoneChoice` | [`string \| undefined`](../../doc/models/business-booking-profile-customer-timezone-choice.md) | Optional | Choices of customer-facing time zone used for bookings. | | `bookingPolicy` | [`string \| undefined`](../../doc/models/business-booking-profile-booking-policy.md) | Optional | Policies for accepting bookings. | -| `allowUserCancel` | `boolean \| undefined` | Optional | Indicates whether customers can cancel or reschedule their own bookings (`true`) or not (`false`). | +| `allowUserCancel` | `boolean \| null \| undefined` | Optional | Indicates whether customers can cancel or reschedule their own bookings (`true`) or not (`false`). | | `businessAppointmentSettings` | [`BusinessAppointmentSettings \| undefined`](../../doc/models/business-appointment-settings.md) | Optional | The service appointment settings, including where and how the service is provided. | -| `supportSellerLevelWrites` | `boolean \| undefined` | Optional | Indicates whether the seller's subscription to Square Appointments supports creating, updating or canceling an appointment through the API (`true`) or not (`false`) using seller permission. | +| `supportSellerLevelWrites` | `boolean \| null \| undefined` | Optional | Indicates whether the seller's subscription to Square Appointments supports creating, updating or canceling an appointment through the API (`true`) or not (`false`) using seller permission. | ## Example (as JSON) diff --git a/doc/models/business-hours-period.md b/doc/models/business-hours-period.md index f39d83f9..c5f91664 100644 --- a/doc/models/business-hours-period.md +++ b/doc/models/business-hours-period.md @@ -12,8 +12,8 @@ Represents a period of time during which a business location is open. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `dayOfWeek` | [`string \| undefined`](../../doc/models/day-of-week.md) | Optional | Indicates the specific day of the week. | -| `startLocalTime` | `string \| undefined` | Optional | The start time of a business hours period, specified in local time using partial-time
RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
Note that the seconds value is always :00, but it is appended for conformance to the RFC. | -| `endLocalTime` | `string \| undefined` | Optional | The end time of a business hours period, specified in local time using partial-time
RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
Note that the seconds value is always :00, but it is appended for conformance to the RFC. | +| `startLocalTime` | `string \| null \| undefined` | Optional | The start time of a business hours period, specified in local time using partial-time
RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
Note that the seconds value is always :00, but it is appended for conformance to the RFC. | +| `endLocalTime` | `string \| null \| undefined` | Optional | The end time of a business hours period, specified in local time using partial-time
RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
Note that the seconds value is always :00, but it is appended for conformance to the RFC. | ## Example (as JSON) diff --git a/doc/models/business-hours.md b/doc/models/business-hours.md index 283572d9..ccf78353 100644 --- a/doc/models/business-hours.md +++ b/doc/models/business-hours.md @@ -11,7 +11,7 @@ The hours of operation for a location. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `periods` | [`BusinessHoursPeriod[] \| undefined`](../../doc/models/business-hours-period.md) | Optional | The list of time periods during which the business is open. There can be at most 10 periods per day. | +| `periods` | [`BusinessHoursPeriod[] \| null \| undefined`](../../doc/models/business-hours-period.md) | Optional | The list of time periods during which the business is open. There can be at most 10 periods per day. | ## Example (as JSON) diff --git a/doc/models/buy-now-pay-later-details.md b/doc/models/buy-now-pay-later-details.md index 507ccdb9..816dd49f 100644 --- a/doc/models/buy-now-pay-later-details.md +++ b/doc/models/buy-now-pay-later-details.md @@ -11,7 +11,7 @@ Additional details about a Buy Now Pay Later payment type. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `brand` | `string \| undefined` | Optional | The brand used for the Buy Now Pay Later payment.
The brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `brand` | `string \| null \| undefined` | Optional | The brand used for the Buy Now Pay Later payment.
The brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | | `afterpayDetails` | [`AfterpayDetails \| undefined`](../../doc/models/afterpay-details.md) | Optional | Additional details about Afterpay payments. | | `clearpayDetails` | [`ClearpayDetails \| undefined`](../../doc/models/clearpay-details.md) | Optional | Additional details about Clearpay payments. | diff --git a/doc/models/calculate-loyalty-points-request.md b/doc/models/calculate-loyalty-points-request.md index f896d587..80522d07 100644 --- a/doc/models/calculate-loyalty-points-request.md +++ b/doc/models/calculate-loyalty-points-request.md @@ -11,9 +11,9 @@ Represents a [CalculateLoyaltyPoints](../../doc/api/loyalty.md#calculate-loyalty | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orderId` | `string \| undefined` | Optional | The [order](entity:Order) ID for which to calculate the points.
Specify this field if your application uses the Orders API to process orders.
Otherwise, specify the `transaction_amount_money`. | +| `orderId` | `string \| null \| undefined` | Optional | The [order](entity:Order) ID for which to calculate the points.
Specify this field if your application uses the Orders API to process orders.
Otherwise, specify the `transaction_amount_money`. | | `transactionAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `loyaltyAccountId` | `string \| undefined` | Optional | The ID of the target [loyalty account](entity:LoyaltyAccount). Optionally specify this field
if your application uses the Orders API to process orders.

If specified, the `promotion_points` field in the response shows the number of points the buyer would
earn from the purchase. In this case, Square uses the account ID to determine whether the promotion's
`trigger_limit` (the maximum number of times that a buyer can trigger the promotion) has been reached.
If not specified, the `promotion_points` field shows the number of points the purchase qualifies
for regardless of the trigger limit.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | +| `loyaltyAccountId` | `string \| null \| undefined` | Optional | The ID of the target [loyalty account](entity:LoyaltyAccount). Optionally specify this field
if your application uses the Orders API to process orders.

If specified, the `promotion_points` field in the response shows the number of points the buyer would
earn from the purchase. In this case, Square uses the account ID to determine whether the promotion's
`trigger_limit` (the maximum number of times that a buyer can trigger the promotion) has been reached.
If not specified, the `promotion_points` field shows the number of points the purchase qualifies
for regardless of the trigger limit.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | ## Example (as JSON) diff --git a/doc/models/calculate-order-request.md b/doc/models/calculate-order-request.md index e0194332..9aa3a657 100644 --- a/doc/models/calculate-order-request.md +++ b/doc/models/calculate-order-request.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`Order`](../../doc/models/order.md) | Required | Contains all information related to a single order to process with Square,
including line items that specify the products to purchase. `Order` objects also
include information about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated
itemization data. | -| `proposedRewards` | [`OrderReward[] \| undefined`](../../doc/models/order-reward.md) | Optional | Identifies one or more loyalty reward tiers to apply during the order calculation.
The discounts defined by the reward tiers are added to the order only to preview the
effect of applying the specified rewards. The rewards do not correspond to actual
redemptions; that is, no `reward`s are created. Therefore, the reward `id`s are
random strings used only to reference the reward tier. | +| `proposedRewards` | [`OrderReward[] \| null \| undefined`](../../doc/models/order-reward.md) | Optional | Identifies one or more loyalty reward tiers to apply during the order calculation.
The discounts defined by the reward tiers are added to the order only to preview the
effect of applying the specified rewards. The rewards do not correspond to actual
redemptions; that is, no `reward`s are created. Therefore, the reward `id`s are
random strings used only to reference the reward tier. | ## Example (as JSON) diff --git a/doc/models/cancel-booking-request.md b/doc/models/cancel-booking-request.md index b0e837de..0b16b622 100644 --- a/doc/models/cancel-booking-request.md +++ b/doc/models/cancel-booking-request.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `idempotencyKey` | `string \| undefined` | Optional | A unique key to make this request an idempotent operation.
**Constraints**: *Maximum Length*: `255` | -| `bookingVersion` | `number \| undefined` | Optional | The revision number for the booking used for optimistic concurrency. | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique key to make this request an idempotent operation.
**Constraints**: *Maximum Length*: `255` | +| `bookingVersion` | `number \| null \| undefined` | Optional | The revision number for the booking used for optimistic concurrency. | ## Example (as JSON) diff --git a/doc/models/cancel-loyalty-promotion-response.md b/doc/models/cancel-loyalty-promotion-response.md index 18da3af4..7b012790 100644 --- a/doc/models/cancel-loyalty-promotion-response.md +++ b/doc/models/cancel-loyalty-promotion-response.md @@ -32,6 +32,7 @@ Either `loyalty_promotion` or `errors` is present in the response. "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "incentive": { "points_multiplier_data": { + "multiplier": "3.000", "points_multiplier": 3 }, "type": "POINTS_MULTIPLIER", diff --git a/doc/models/card-payment-details.md b/doc/models/card-payment-details.md index 048dfc7e..2a749bad 100644 --- a/doc/models/card-payment-details.md +++ b/doc/models/card-payment-details.md @@ -11,22 +11,22 @@ Reflects the current status of a card payment. Contains only non-confidential in | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `status` | `string \| undefined` | Optional | The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or
FAILED.
**Constraints**: *Maximum Length*: `50` | +| `status` | `string \| null \| undefined` | Optional | The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or
FAILED.
**Constraints**: *Maximum Length*: `50` | | `card` | [`Card \| undefined`](../../doc/models/card.md) | Optional | Represents the payment details of a card to be used for payments. These
details are determined by the payment token generated by Web Payments SDK. | -| `entryMethod` | `string \| undefined` | Optional | The method used to enter the card's details for the payment. The method can be
`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
**Constraints**: *Maximum Length*: `50` | -| `cvvStatus` | `string \| undefined` | Optional | The status code returned from the Card Verification Value (CVV) check. The code can be
`CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`.
**Constraints**: *Maximum Length*: `50` | -| `avsStatus` | `string \| undefined` | Optional | The status code returned from the Address Verification System (AVS) check. The code can be
`AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`.
**Constraints**: *Maximum Length*: `50` | -| `authResultCode` | `string \| undefined` | Optional | The status code returned by the card issuer that describes the payment's
authorization status.
**Constraints**: *Maximum Length*: `10` | -| `applicationIdentifier` | `string \| undefined` | Optional | For EMV payments, the application ID identifies the EMV application used for the payment.
**Constraints**: *Maximum Length*: `32` | -| `applicationName` | `string \| undefined` | Optional | For EMV payments, the human-readable name of the EMV application used for the payment.
**Constraints**: *Maximum Length*: `16` | -| `applicationCryptogram` | `string \| undefined` | Optional | For EMV payments, the cryptogram generated for the payment.
**Constraints**: *Maximum Length*: `16` | -| `verificationMethod` | `string \| undefined` | Optional | For EMV payments, the method used to verify the cardholder's identity. The method can be
`PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`.
**Constraints**: *Maximum Length*: `50` | -| `verificationResults` | `string \| undefined` | Optional | For EMV payments, the results of the cardholder verification. The result can be
`SUCCESS`, `FAILURE`, or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | -| `statementDescription` | `string \| undefined` | Optional | The statement description sent to the card networks.

Note: The actual statement description varies and is likely to be truncated and appended with
additional information on a per issuer basis.
**Constraints**: *Maximum Length*: `50` | +| `entryMethod` | `string \| null \| undefined` | Optional | The method used to enter the card's details for the payment. The method can be
`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
**Constraints**: *Maximum Length*: `50` | +| `cvvStatus` | `string \| null \| undefined` | Optional | The status code returned from the Card Verification Value (CVV) check. The code can be
`CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`.
**Constraints**: *Maximum Length*: `50` | +| `avsStatus` | `string \| null \| undefined` | Optional | The status code returned from the Address Verification System (AVS) check. The code can be
`AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`.
**Constraints**: *Maximum Length*: `50` | +| `authResultCode` | `string \| null \| undefined` | Optional | The status code returned by the card issuer that describes the payment's
authorization status.
**Constraints**: *Maximum Length*: `10` | +| `applicationIdentifier` | `string \| null \| undefined` | Optional | For EMV payments, the application ID identifies the EMV application used for the payment.
**Constraints**: *Maximum Length*: `32` | +| `applicationName` | `string \| null \| undefined` | Optional | For EMV payments, the human-readable name of the EMV application used for the payment.
**Constraints**: *Maximum Length*: `16` | +| `applicationCryptogram` | `string \| null \| undefined` | Optional | For EMV payments, the cryptogram generated for the payment.
**Constraints**: *Maximum Length*: `16` | +| `verificationMethod` | `string \| null \| undefined` | Optional | For EMV payments, the method used to verify the cardholder's identity. The method can be
`PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`.
**Constraints**: *Maximum Length*: `50` | +| `verificationResults` | `string \| null \| undefined` | Optional | For EMV payments, the results of the cardholder verification. The result can be
`SUCCESS`, `FAILURE`, or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `statementDescription` | `string \| null \| undefined` | Optional | The statement description sent to the card networks.

Note: The actual statement description varies and is likely to be truncated and appended with
additional information on a per issuer basis.
**Constraints**: *Maximum Length*: `50` | | `deviceDetails` | [`DeviceDetails \| undefined`](../../doc/models/device-details.md) | Optional | Details about the device that took the payment. | | `cardPaymentTimeline` | [`CardPaymentTimeline \| undefined`](../../doc/models/card-payment-timeline.md) | Optional | The timeline for card payments. | -| `refundRequiresCardPresence` | `boolean \| undefined` | Optional | Whether the card must be physically present for the payment to
be refunded. If set to `true`, the card must be present. | -| `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Information about errors encountered during the request. | +| `refundRequiresCardPresence` | `boolean \| null \| undefined` | Optional | Whether the card must be physically present for the payment to
be refunded. If set to `true`, the card must be present. | +| `errors` | [`Error[] \| null \| undefined`](../../doc/models/error.md) | Optional | Information about errors encountered during the request. | ## Example (as JSON) diff --git a/doc/models/card-payment-timeline.md b/doc/models/card-payment-timeline.md index 83c07185..f1f3d76b 100644 --- a/doc/models/card-payment-timeline.md +++ b/doc/models/card-payment-timeline.md @@ -11,9 +11,9 @@ The timeline for card payments. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `authorizedAt` | `string \| undefined` | Optional | The timestamp when the payment was authorized, in RFC 3339 format. | -| `capturedAt` | `string \| undefined` | Optional | The timestamp when the payment was captured, in RFC 3339 format. | -| `voidedAt` | `string \| undefined` | Optional | The timestamp when the payment was voided, in RFC 3339 format. | +| `authorizedAt` | `string \| null \| undefined` | Optional | The timestamp when the payment was authorized, in RFC 3339 format. | +| `capturedAt` | `string \| null \| undefined` | Optional | The timestamp when the payment was captured, in RFC 3339 format. | +| `voidedAt` | `string \| null \| undefined` | Optional | The timestamp when the payment was voided, in RFC 3339 format. | ## Example (as JSON) diff --git a/doc/models/card.md b/doc/models/card.md index bf0ff21e..84b682a1 100644 --- a/doc/models/card.md +++ b/doc/models/card.md @@ -15,14 +15,14 @@ details are determined by the payment token generated by Web Payments SDK. | `id` | `string \| undefined` | Optional | Unique ID for this card. Generated by Square.
**Constraints**: *Maximum Length*: `64` | | `cardBrand` | [`string \| undefined`](../../doc/models/card-brand.md) | Optional | Indicates a card's brand, such as `VISA` or `MASTERCARD`. | | `last4` | `string \| undefined` | Optional | The last 4 digits of the card number.
**Constraints**: *Maximum Length*: `4` | -| `expMonth` | `bigint \| undefined` | Optional | The expiration month of the associated card as an integer between 1 and 12. | -| `expYear` | `bigint \| undefined` | Optional | The four-digit year of the card's expiration date. | -| `cardholderName` | `string \| undefined` | Optional | The name of the cardholder.
**Constraints**: *Maximum Length*: `96` | +| `expMonth` | `bigint \| null \| undefined` | Optional | The expiration month of the associated card as an integer between 1 and 12. | +| `expYear` | `bigint \| null \| undefined` | Optional | The four-digit year of the card's expiration date. | +| `cardholderName` | `string \| null \| undefined` | Optional | The name of the cardholder.
**Constraints**: *Maximum Length*: `96` | | `billingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | | `fingerprint` | `string \| undefined` | Optional | Intended as a Square-assigned identifier, based
on the card number, to identify the card across multiple locations within a
single application.
**Constraints**: *Maximum Length*: `255` | -| `customerId` | `string \| undefined` | Optional | **Required** The ID of a customer created using the Customers API to be associated with the card. | +| `customerId` | `string \| null \| undefined` | Optional | **Required** The ID of a customer created using the Customers API to be associated with the card. | | `merchantId` | `string \| undefined` | Optional | The ID of the merchant associated with the card. | -| `referenceId` | `string \| undefined` | Optional | An optional user-defined reference ID that associates this card with
another entity in an external system. For example, a customer ID from an
external customer management system.
**Constraints**: *Maximum Length*: `128` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional user-defined reference ID that associates this card with
another entity in an external system. For example, a customer ID from an
external customer management system.
**Constraints**: *Maximum Length*: `128` | | `enabled` | `boolean \| undefined` | Optional | Indicates whether or not a card can be used for payments. | | `cardType` | [`string \| undefined`](../../doc/models/card-type.md) | Optional | Indicates a card's type, such as `CREDIT` or `DEBIT`. | | `prepaidType` | [`string \| undefined`](../../doc/models/card-prepaid-type.md) | Optional | Indicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`. | diff --git a/doc/models/cash-app-details.md b/doc/models/cash-app-details.md index b7ce349d..88878e8c 100644 --- a/doc/models/cash-app-details.md +++ b/doc/models/cash-app-details.md @@ -11,8 +11,8 @@ Additional details about `WALLET` type payments with the `brand` of `CASH_APP`. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `buyerFullName` | `string \| undefined` | Optional | The name of the Cash App account holder.
**Constraints**: *Maximum Length*: `255` | -| `buyerCountryCode` | `string \| undefined` | Optional | The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.

For possible values, see [Country](entity:Country).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` | +| `buyerFullName` | `string \| null \| undefined` | Optional | The name of the Cash App account holder.
**Constraints**: *Maximum Length*: `255` | +| `buyerCountryCode` | `string \| null \| undefined` | Optional | The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.

For possible values, see [Country](entity:Country).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` | | `buyerCashtag` | `string \| undefined` | Optional | $Cashtag of the Cash App account holder.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `21` | ## Example (as JSON) diff --git a/doc/models/cash-drawer-device.md b/doc/models/cash-drawer-device.md index 064e7257..d93dc6fa 100644 --- a/doc/models/cash-drawer-device.md +++ b/doc/models/cash-drawer-device.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The device Square-issued ID | -| `name` | `string \| undefined` | Optional | The device merchant-specified name. | +| `name` | `string \| null \| undefined` | Optional | The device merchant-specified name. | ## Example (as JSON) diff --git a/doc/models/cash-drawer-shift-event.md b/doc/models/cash-drawer-shift-event.md index 78a96192..909a8140 100644 --- a/doc/models/cash-drawer-shift-event.md +++ b/doc/models/cash-drawer-shift-event.md @@ -13,7 +13,7 @@ | `eventType` | [`string \| undefined`](../../doc/models/cash-drawer-event-type.md) | Optional | The types of events on a CashDrawerShift.
Each event type represents an employee action on the actual cash drawer
represented by a CashDrawerShift. | | `eventMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `createdAt` | `string \| undefined` | Optional | The event time in RFC 3339 format. | -| `description` | `string \| undefined` | Optional | An optional description of the event, entered by the employee that
created the event. | +| `description` | `string \| null \| undefined` | Optional | An optional description of the event, entered by the employee that
created the event. | | `teamMemberId` | `string \| undefined` | Optional | The ID of the team member that created the event. | ## Example (as JSON) diff --git a/doc/models/cash-drawer-shift-summary.md b/doc/models/cash-drawer-shift-summary.md index 4879e96b..6be35eeb 100644 --- a/doc/models/cash-drawer-shift-summary.md +++ b/doc/models/cash-drawer-shift-summary.md @@ -16,10 +16,10 @@ end based on summing all cash drawer shift events. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The shift unique ID. | | `state` | [`string \| undefined`](../../doc/models/cash-drawer-shift-state.md) | Optional | The current state of a cash drawer shift. | -| `openedAt` | `string \| undefined` | Optional | The shift start time in ISO 8601 format. | -| `endedAt` | `string \| undefined` | Optional | The shift end time in ISO 8601 format. | -| `closedAt` | `string \| undefined` | Optional | The shift close time in ISO 8601 format. | -| `description` | `string \| undefined` | Optional | An employee free-text description of a cash drawer shift. | +| `openedAt` | `string \| null \| undefined` | Optional | The shift start time in ISO 8601 format. | +| `endedAt` | `string \| null \| undefined` | Optional | The shift end time in ISO 8601 format. | +| `closedAt` | `string \| null \| undefined` | Optional | The shift close time in ISO 8601 format. | +| `description` | `string \| null \| undefined` | Optional | An employee free-text description of a cash drawer shift. | | `openedCashMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `expectedCashMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `closedCashMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/cash-drawer-shift.md b/doc/models/cash-drawer-shift.md index 7132c40f..8a468b58 100644 --- a/doc/models/cash-drawer-shift.md +++ b/doc/models/cash-drawer-shift.md @@ -16,10 +16,10 @@ event types. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The shift unique ID. | | `state` | [`string \| undefined`](../../doc/models/cash-drawer-shift-state.md) | Optional | The current state of a cash drawer shift. | -| `openedAt` | `string \| undefined` | Optional | The time when the shift began, in ISO 8601 format. | -| `endedAt` | `string \| undefined` | Optional | The time when the shift ended, in ISO 8601 format. | -| `closedAt` | `string \| undefined` | Optional | The time when the shift was closed, in ISO 8601 format. | -| `description` | `string \| undefined` | Optional | The free-form text description of a cash drawer by an employee. | +| `openedAt` | `string \| null \| undefined` | Optional | The time when the shift began, in ISO 8601 format. | +| `endedAt` | `string \| null \| undefined` | Optional | The time when the shift ended, in ISO 8601 format. | +| `closedAt` | `string \| null \| undefined` | Optional | The time when the shift was closed, in ISO 8601 format. | +| `description` | `string \| null \| undefined` | Optional | The free-form text description of a cash drawer by an employee. | | `openedCashMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `cashPaymentMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `cashRefundsMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/catalog-category.md b/doc/models/catalog-category.md index 1136d50d..5b034f3e 100644 --- a/doc/models/catalog-category.md +++ b/doc/models/catalog-category.md @@ -11,8 +11,8 @@ A category to which a `CatalogItem` instance belongs. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | -| `imageIds` | `string[] \| undefined` | Optional | The IDs of images associated with this `CatalogCategory` instance.
Currently these images are not displayed by Square, but are free to be displayed in 3rd party applications. | +| `name` | `string \| null \| undefined` | Optional | The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `imageIds` | `string[] \| null \| undefined` | Optional | The IDs of images associated with this `CatalogCategory` instance.
Currently these images are not displayed by Square, but are free to be displayed in 3rd party applications. | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-definition-number-config.md b/doc/models/catalog-custom-attribute-definition-number-config.md index 9c6c5aa6..7393b596 100644 --- a/doc/models/catalog-custom-attribute-definition-number-config.md +++ b/doc/models/catalog-custom-attribute-definition-number-config.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `precision` | `number \| undefined` | Optional | An integer between 0 and 5 that represents the maximum number of
positions allowed after the decimal in number custom attribute values
For example:

- if the precision is 0, the quantity can be 1, 2, 3, etc.
- if the precision is 1, the quantity can be 0.1, 0.2, etc.
- if the precision is 2, the quantity can be 0.01, 0.12, etc.

Default: 5
**Constraints**: `<= 5` | +| `precision` | `number \| null \| undefined` | Optional | An integer between 0 and 5 that represents the maximum number of
positions allowed after the decimal in number custom attribute values
For example:

- if the precision is 0, the quantity can be 1, 2, 3, etc.
- if the precision is 1, the quantity can be 0.1, 0.2, etc.
- if the precision is 2, the quantity can be 0.01, 0.12, etc.

Default: 5
**Constraints**: `<= 5` | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md b/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md index 9d87d764..8311b4f3 100644 --- a/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md +++ b/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md @@ -11,7 +11,7 @@ A named selection for this `SELECTION`-type custom attribute definition. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | Unique ID set by Square. | +| `uid` | `string \| null \| undefined` | Optional | Unique ID set by Square. | | `name` | `string` | Required | Selection name, unique within `allowed_selections`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-definition-selection-config.md b/doc/models/catalog-custom-attribute-definition-selection-config.md index 9eb80aab..81ab7469 100644 --- a/doc/models/catalog-custom-attribute-definition-selection-config.md +++ b/doc/models/catalog-custom-attribute-definition-selection-config.md @@ -11,8 +11,8 @@ Configuration associated with `SELECTION`-type custom attribute definitions. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `maxAllowedSelections` | `number \| undefined` | Optional | The maximum number of selections that can be set. The maximum value for this
attribute is 100. The default value is 1. The value can be modified, but changing the value will not
affect existing custom attribute values on objects. Clients need to
handle custom attributes with more selected values than allowed by this limit.
**Constraints**: `<= 100` | -| `allowedSelections` | [`CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection[] \| undefined`](../../doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md) | Optional | The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100
selections can be defined. Can be modified. | +| `maxAllowedSelections` | `number \| null \| undefined` | Optional | The maximum number of selections that can be set. The maximum value for this
attribute is 100. The default value is 1. The value can be modified, but changing the value will not
affect existing custom attribute values on objects. Clients need to
handle custom attributes with more selected values than allowed by this limit.
**Constraints**: `<= 100` | +| `allowedSelections` | [`CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection[] \| null \| undefined`](../../doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md) | Optional | The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100
selections can be defined. Can be modified. | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-definition-string-config.md b/doc/models/catalog-custom-attribute-definition-string-config.md index aa2a3391..f6d4f8a2 100644 --- a/doc/models/catalog-custom-attribute-definition-string-config.md +++ b/doc/models/catalog-custom-attribute-definition-string-config.md @@ -11,7 +11,7 @@ Configuration associated with Custom Attribute Definitions of type `STRING`. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `enforceUniqueness` | `boolean \| undefined` | Optional | If true, each Custom Attribute instance associated with this Custom Attribute
Definition must have a unique value within the seller's catalog. For
example, this may be used for a value like a SKU that should not be
duplicated within a seller's catalog. May not be modified after the
definition has been created. | +| `enforceUniqueness` | `boolean \| null \| undefined` | Optional | If true, each Custom Attribute instance associated with this Custom Attribute
Definition must have a unique value within the seller's catalog. For
example, this may be used for a value like a SKU that should not be
duplicated within a seller's catalog. May not be modified after the
definition has been created. | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-definition.md b/doc/models/catalog-custom-attribute-definition.md index 5aaa2dbb..49bf1839 100644 --- a/doc/models/catalog-custom-attribute-definition.md +++ b/doc/models/catalog-custom-attribute-definition.md @@ -17,7 +17,7 @@ to store any sensitive information (personally identifiable information, card de | --- | --- | --- | --- | | `type` | [`string`](../../doc/models/catalog-custom-attribute-definition-type.md) | Required | Defines the possible types for a custom attribute. | | `name` | `string` | Required | The name of this definition for API and seller-facing UI purposes.
The name must be unique within the (merchant, application) pair. Required.
May not be empty and may not exceed 255 characters. Can be modified after creation.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `description` | `string \| undefined` | Optional | Seller-oriented description of the meaning of this Custom Attribute,
any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs.
**Constraints**: *Maximum Length*: `255` | +| `description` | `string \| null \| undefined` | Optional | Seller-oriented description of the meaning of this Custom Attribute,
any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs.
**Constraints**: *Maximum Length*: `255` | | `sourceApplication` | [`SourceApplication \| undefined`](../../doc/models/source-application.md) | Optional | Represents information about the application used to generate a change. | | `allowedObjectTypes` | [`string[]`](../../doc/models/catalog-object-type.md) | Required | The set of `CatalogObject` types that this custom atttribute may be applied to.
Currently, only `ITEM`, `ITEM_VARIATION`, and `MODIFIER` are allowed. At least one type must be included.
See [CatalogObjectType](#type-catalogobjecttype) for possible values | | `sellerVisibility` | [`string \| undefined`](../../doc/models/catalog-custom-attribute-definition-seller-visibility.md) | Optional | Defines the visibility of a custom attribute to sellers in Square
client applications, Square APIs or in Square UIs (including Square Point
of Sale applications and Square Dashboard). | @@ -26,7 +26,7 @@ to store any sensitive information (personally identifiable information, card de | `numberConfig` | [`CatalogCustomAttributeDefinitionNumberConfig \| undefined`](../../doc/models/catalog-custom-attribute-definition-number-config.md) | Optional | - | | `selectionConfig` | [`CatalogCustomAttributeDefinitionSelectionConfig \| undefined`](../../doc/models/catalog-custom-attribute-definition-selection-config.md) | Optional | Configuration associated with `SELECTION`-type custom attribute definitions. | | `customAttributeUsageCount` | `number \| undefined` | Optional | The number of custom attributes that reference this
custom attribute definition. Set by the server in response to a ListCatalog
request with `include_counts` set to `true`. If the actual count is greater
than 100, `custom_attribute_usage_count` will be set to `100`. | -| `key` | `string \| undefined` | Optional | The name of the desired custom attribute key that can be used to access
the custom attribute value on catalog objects. Cannot be modified after the
custom attribute definition has been created.
Must be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9_-]*$` | +| `key` | `string \| null \| undefined` | Optional | The name of the desired custom attribute key that can be used to access
the custom attribute value on catalog objects. Cannot be modified after the
custom attribute definition has been created.
Must be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9_-]*$` | ## Example (as JSON) diff --git a/doc/models/catalog-custom-attribute-value.md b/doc/models/catalog-custom-attribute-value.md index 456d2e1f..78d8e613 100644 --- a/doc/models/catalog-custom-attribute-value.md +++ b/doc/models/catalog-custom-attribute-value.md @@ -13,13 +13,13 @@ added to `ITEM` and `ITEM_VARIATION` type catalog objects. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name of the custom attribute. | -| `stringValue` | `string \| undefined` | Optional | The string value of the custom attribute. Populated if `type` = `STRING`. | +| `name` | `string \| null \| undefined` | Optional | The name of the custom attribute. | +| `stringValue` | `string \| null \| undefined` | Optional | The string value of the custom attribute. Populated if `type` = `STRING`. | | `customAttributeDefinitionId` | `string \| undefined` | Optional | The id of the [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) this value belongs to. | | `type` | [`string \| undefined`](../../doc/models/catalog-custom-attribute-definition-type.md) | Optional | Defines the possible types for a custom attribute. | -| `numberValue` | `string \| undefined` | Optional | Populated if `type` = `NUMBER`. Contains a string
representation of a decimal number, using a `.` as the decimal separator. | -| `booleanValue` | `boolean \| undefined` | Optional | A `true` or `false` value. Populated if `type` = `BOOLEAN`. | -| `selectionUidValues` | `string[] \| undefined` | Optional | One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`. | +| `numberValue` | `string \| null \| undefined` | Optional | Populated if `type` = `NUMBER`. Contains a string
representation of a decimal number, using a `.` as the decimal separator. | +| `booleanValue` | `boolean \| null \| undefined` | Optional | A `true` or `false` value. Populated if `type` = `BOOLEAN`. | +| `selectionUidValues` | `string[] \| null \| undefined` | Optional | One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`. | | `key` | `string \| undefined` | Optional | If the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key is prefixed by the defining application ID.
For example, if the CatalogCustomAttributeDefinition has a key attribute of "cocoa_brand" and the defining application ID is "abcd1234", this key is "abcd1234:cocoa_brand"
when the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply "cocoa_brand". | ## Example (as JSON) diff --git a/doc/models/catalog-discount.md b/doc/models/catalog-discount.md index 7124b6c1..e694bccb 100644 --- a/doc/models/catalog-discount.md +++ b/doc/models/catalog-discount.md @@ -11,12 +11,12 @@ A discount applicable to items. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `name` | `string \| null \| undefined` | Optional | The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | | `discountType` | [`string \| undefined`](../../doc/models/catalog-discount-type.md) | Optional | How to apply a CatalogDiscount to a CatalogItem. | -| `percentage` | `string \| undefined` | Optional | The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal
separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type`
is `VARIABLE_PERCENTAGE`.

Do not use this field for amount-based or variable discounts. | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal
separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type`
is `VARIABLE_PERCENTAGE`.

Do not use this field for amount-based or variable discounts. | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `pinRequired` | `boolean \| undefined` | Optional | Indicates whether a mobile staff member needs to enter their PIN to apply the
discount to a payment in the Square Point of Sale app. | -| `labelColor` | `string \| undefined` | Optional | The color of the discount display label in the Square Point of Sale app. This must be a valid hex color code. | +| `pinRequired` | `boolean \| null \| undefined` | Optional | Indicates whether a mobile staff member needs to enter their PIN to apply the
discount to a payment in the Square Point of Sale app. | +| `labelColor` | `string \| null \| undefined` | Optional | The color of the discount display label in the Square Point of Sale app. This must be a valid hex color code. | | `modifyTaxBasis` | [`string \| undefined`](../../doc/models/catalog-discount-modify-tax-basis.md) | Optional | - | | `maximumAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/catalog-id-mapping.md b/doc/models/catalog-id-mapping.md index 07c7d4e7..c8b6cbce 100644 --- a/doc/models/catalog-id-mapping.md +++ b/doc/models/catalog-id-mapping.md @@ -21,8 +21,8 @@ to the new object. The permanent ID is unique across the Square catalog. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `clientObjectId` | `string \| undefined` | Optional | The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`. | -| `objectId` | `string \| undefined` | Optional | The permanent ID for the CatalogObject created by the server. | +| `clientObjectId` | `string \| null \| undefined` | Optional | The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`. | +| `objectId` | `string \| null \| undefined` | Optional | The permanent ID for the CatalogObject created by the server. | ## Example (as JSON) diff --git a/doc/models/catalog-image.md b/doc/models/catalog-image.md index 7cb4f050..4a2c01b1 100644 --- a/doc/models/catalog-image.md +++ b/doc/models/catalog-image.md @@ -16,10 +16,10 @@ Images on other object types are for use by 3rd party application developers. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The internal name to identify this image in calls to the Square API.
This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
It is not unique and should not be shown in a buyer facing context. | -| `url` | `string \| undefined` | Optional | The URL of this image, generated by Square after an image is uploaded
using the [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) endpoint.
To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field. | -| `caption` | `string \| undefined` | Optional | A caption that describes what is shown in the image. Displayed in the
Square Online Store. This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). | -| `photoStudioOrderId` | `string \| undefined` | Optional | The immutable order ID for this image object created by the Photo Studio service in Square Online Store. | +| `name` | `string \| null \| undefined` | Optional | The internal name to identify this image in calls to the Square API.
This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
It is not unique and should not be shown in a buyer facing context. | +| `url` | `string \| null \| undefined` | Optional | The URL of this image, generated by Square after an image is uploaded
using the [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) endpoint.
To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field. | +| `caption` | `string \| null \| undefined` | Optional | A caption that describes what is shown in the image. Displayed in the
Square Online Store. This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). | +| `photoStudioOrderId` | `string \| null \| undefined` | Optional | The immutable order ID for this image object created by the Photo Studio service in Square Online Store. | ## Example (as JSON) diff --git a/doc/models/catalog-info-response-limits.md b/doc/models/catalog-info-response-limits.md index 9f263229..d7cb9ed2 100644 --- a/doc/models/catalog-info-response-limits.md +++ b/doc/models/catalog-info-response-limits.md @@ -9,17 +9,17 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `batchUpsertMaxObjectsPerBatch` | `number \| undefined` | Optional | The maximum number of objects that may appear within a single batch in a
`/v2/catalog/batch-upsert` request. | -| `batchUpsertMaxTotalObjects` | `number \| undefined` | Optional | The maximum number of objects that may appear across all batches in a
`/v2/catalog/batch-upsert` request. | -| `batchRetrieveMaxObjectIds` | `number \| undefined` | Optional | The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve`
request. | -| `searchMaxPageLimit` | `number \| undefined` | Optional | The maximum number of results that may be returned in a page of a
`/v2/catalog/search` response. | -| `batchDeleteMaxObjectIds` | `number \| undefined` | Optional | The maximum number of object IDs that may be included in a single
`/v2/catalog/batch-delete` request. | -| `updateItemTaxesMaxItemIds` | `number \| undefined` | Optional | The maximum number of item IDs that may be included in a single
`/v2/catalog/update-item-taxes` request. | -| `updateItemTaxesMaxTaxesToEnable` | `number \| undefined` | Optional | The maximum number of tax IDs to be enabled that may be included in a single
`/v2/catalog/update-item-taxes` request. | -| `updateItemTaxesMaxTaxesToDisable` | `number \| undefined` | Optional | The maximum number of tax IDs to be disabled that may be included in a single
`/v2/catalog/update-item-taxes` request. | -| `updateItemModifierListsMaxItemIds` | `number \| undefined` | Optional | The maximum number of item IDs that may be included in a single
`/v2/catalog/update-item-modifier-lists` request. | -| `updateItemModifierListsMaxModifierListsToEnable` | `number \| undefined` | Optional | The maximum number of modifier list IDs to be enabled that may be included in
a single `/v2/catalog/update-item-modifier-lists` request. | -| `updateItemModifierListsMaxModifierListsToDisable` | `number \| undefined` | Optional | The maximum number of modifier list IDs to be disabled that may be included in
a single `/v2/catalog/update-item-modifier-lists` request. | +| `batchUpsertMaxObjectsPerBatch` | `number \| null \| undefined` | Optional | The maximum number of objects that may appear within a single batch in a
`/v2/catalog/batch-upsert` request. | +| `batchUpsertMaxTotalObjects` | `number \| null \| undefined` | Optional | The maximum number of objects that may appear across all batches in a
`/v2/catalog/batch-upsert` request. | +| `batchRetrieveMaxObjectIds` | `number \| null \| undefined` | Optional | The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve`
request. | +| `searchMaxPageLimit` | `number \| null \| undefined` | Optional | The maximum number of results that may be returned in a page of a
`/v2/catalog/search` response. | +| `batchDeleteMaxObjectIds` | `number \| null \| undefined` | Optional | The maximum number of object IDs that may be included in a single
`/v2/catalog/batch-delete` request. | +| `updateItemTaxesMaxItemIds` | `number \| null \| undefined` | Optional | The maximum number of item IDs that may be included in a single
`/v2/catalog/update-item-taxes` request. | +| `updateItemTaxesMaxTaxesToEnable` | `number \| null \| undefined` | Optional | The maximum number of tax IDs to be enabled that may be included in a single
`/v2/catalog/update-item-taxes` request. | +| `updateItemTaxesMaxTaxesToDisable` | `number \| null \| undefined` | Optional | The maximum number of tax IDs to be disabled that may be included in a single
`/v2/catalog/update-item-taxes` request. | +| `updateItemModifierListsMaxItemIds` | `number \| null \| undefined` | Optional | The maximum number of item IDs that may be included in a single
`/v2/catalog/update-item-modifier-lists` request. | +| `updateItemModifierListsMaxModifierListsToEnable` | `number \| null \| undefined` | Optional | The maximum number of modifier list IDs to be enabled that may be included in
a single `/v2/catalog/update-item-modifier-lists` request. | +| `updateItemModifierListsMaxModifierListsToDisable` | `number \| null \| undefined` | Optional | The maximum number of modifier list IDs to be disabled that may be included in
a single `/v2/catalog/update-item-modifier-lists` request. | ## Example (as JSON) diff --git a/doc/models/catalog-item-modifier-list-info.md b/doc/models/catalog-item-modifier-list-info.md index 2640c6d9..469d7329 100644 --- a/doc/models/catalog-item-modifier-list-info.md +++ b/doc/models/catalog-item-modifier-list-info.md @@ -12,10 +12,10 @@ Options to control the properties of a `CatalogModifierList` applied to a `Catal | Name | Type | Tags | Description | | --- | --- | --- | --- | | `modifierListId` | `string` | Required | The ID of the `CatalogModifierList` controlled by this `CatalogModifierListInfo`.
**Constraints**: *Minimum Length*: `1` | -| `modifierOverrides` | [`CatalogModifierOverride[] \| undefined`](../../doc/models/catalog-modifier-override.md) | Optional | A set of `CatalogModifierOverride` objects that override whether a given `CatalogModifier` is enabled by default. | -| `minSelectedModifiers` | `number \| undefined` | Optional | If 0 or larger, the smallest number of `CatalogModifier`s that must be selected from this `CatalogModifierList`. | -| `maxSelectedModifiers` | `number \| undefined` | Optional | If 0 or larger, the largest number of `CatalogModifier`s that can be selected from this `CatalogModifierList`. | -| `enabled` | `boolean \| undefined` | Optional | If `true`, enable this `CatalogModifierList`. The default value is `true`. | +| `modifierOverrides` | [`CatalogModifierOverride[] \| null \| undefined`](../../doc/models/catalog-modifier-override.md) | Optional | A set of `CatalogModifierOverride` objects that override whether a given `CatalogModifier` is enabled by default. | +| `minSelectedModifiers` | `number \| null \| undefined` | Optional | If 0 or larger, the smallest number of `CatalogModifier`s that must be selected from this `CatalogModifierList`. | +| `maxSelectedModifiers` | `number \| null \| undefined` | Optional | If 0 or larger, the largest number of `CatalogModifier`s that can be selected from this `CatalogModifierList`. | +| `enabled` | `boolean \| null \| undefined` | Optional | If `true`, enable this `CatalogModifierList`. The default value is `true`. | ## Example (as JSON) diff --git a/doc/models/catalog-item-option-for-item.md b/doc/models/catalog-item-option-for-item.md index 05a4f87c..3fba4881 100644 --- a/doc/models/catalog-item-option-for-item.md +++ b/doc/models/catalog-item-option-for-item.md @@ -12,7 +12,7 @@ For example, a t-shirt item may offer a color option or a size option. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemOptionId` | `string \| undefined` | Optional | The unique id of the item option, used to form the dimensions of the item option matrix in a specified order. | +| `itemOptionId` | `string \| null \| undefined` | Optional | The unique id of the item option, used to form the dimensions of the item option matrix in a specified order. | ## Example (as JSON) diff --git a/doc/models/catalog-item-option-value-for-item-variation.md b/doc/models/catalog-item-option-value-for-item-variation.md index c6fed680..8f8e4ec4 100644 --- a/doc/models/catalog-item-option-value-for-item-variation.md +++ b/doc/models/catalog-item-option-value-for-item-variation.md @@ -14,8 +14,8 @@ For example, "Color:Red, Size:Small" or "Color:Blue, Size:Medium". | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemOptionId` | `string \| undefined` | Optional | The unique id of an item option. | -| `itemOptionValueId` | `string \| undefined` | Optional | The unique id of the selected value for the item option. | +| `itemOptionId` | `string \| null \| undefined` | Optional | The unique id of an item option. | +| `itemOptionValueId` | `string \| null \| undefined` | Optional | The unique id of the selected value for the item option. | ## Example (as JSON) diff --git a/doc/models/catalog-item-option-value.md b/doc/models/catalog-item-option-value.md index 97ba6635..7dfdddf1 100644 --- a/doc/models/catalog-item-option-value.md +++ b/doc/models/catalog-item-option-value.md @@ -13,11 +13,11 @@ its item option values. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemOptionId` | `string \| undefined` | Optional | Unique ID of the associated item option. | -| `name` | `string \| undefined` | Optional | Name of this item option value. This is a searchable attribute for use in applicable query filters. | -| `description` | `string \| undefined` | Optional | A human-readable description for the option value. This is a searchable attribute for use in applicable query filters. | -| `color` | `string \| undefined` | Optional | The HTML-supported hex color for the item option (e.g., "#ff8d4e85").
Only displayed if `show_colors` is enabled on the parent `ItemOption`. When
left unset, `color` defaults to white ("#ffffff") when `show_colors` is
enabled on the parent `ItemOption`. | -| `ordinal` | `number \| undefined` | Optional | Determines where this option value appears in a list of option values. | +| `itemOptionId` | `string \| null \| undefined` | Optional | Unique ID of the associated item option. | +| `name` | `string \| null \| undefined` | Optional | Name of this item option value. This is a searchable attribute for use in applicable query filters. | +| `description` | `string \| null \| undefined` | Optional | A human-readable description for the option value. This is a searchable attribute for use in applicable query filters. | +| `color` | `string \| null \| undefined` | Optional | The HTML-supported hex color for the item option (e.g., "#ff8d4e85").
Only displayed if `show_colors` is enabled on the parent `ItemOption`. When
left unset, `color` defaults to white ("#ffffff") when `show_colors` is
enabled on the parent `ItemOption`. | +| `ordinal` | `number \| null \| undefined` | Optional | Determines where this option value appears in a list of option values. | ## Example (as JSON) diff --git a/doc/models/catalog-item-option.md b/doc/models/catalog-item-option.md index 92232c42..62b687b0 100644 --- a/doc/models/catalog-item-option.md +++ b/doc/models/catalog-item-option.md @@ -11,11 +11,11 @@ A group of variations for a `CatalogItem`. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The item option's display name for the seller. Must be unique across
all item options. This is a searchable attribute for use in applicable query filters. | -| `displayName` | `string \| undefined` | Optional | The item option's display name for the customer. This is a searchable attribute for use in applicable query filters. | -| `description` | `string \| undefined` | Optional | The item option's human-readable description. Displayed in the Square
Point of Sale app for the seller and in the Online Store or on receipts for
the buyer. This is a searchable attribute for use in applicable query filters. | -| `showColors` | `boolean \| undefined` | Optional | If true, display colors for entries in `values` when present. | -| `values` | [`CatalogObject[] \| undefined`](../../doc/models/catalog-object.md) | Optional | A list of CatalogObjects containing the
`CatalogItemOptionValue`s for this item. | +| `name` | `string \| null \| undefined` | Optional | The item option's display name for the seller. Must be unique across
all item options. This is a searchable attribute for use in applicable query filters. | +| `displayName` | `string \| null \| undefined` | Optional | The item option's display name for the customer. This is a searchable attribute for use in applicable query filters. | +| `description` | `string \| null \| undefined` | Optional | The item option's human-readable description. Displayed in the Square
Point of Sale app for the seller and in the Online Store or on receipts for
the buyer. This is a searchable attribute for use in applicable query filters. | +| `showColors` | `boolean \| null \| undefined` | Optional | If true, display colors for entries in `values` when present. | +| `values` | [`CatalogObject[] \| null \| undefined`](../../doc/models/catalog-object.md) | Optional | A list of CatalogObjects containing the
`CatalogItemOptionValue`s for this item. | ## Example (as JSON) diff --git a/doc/models/catalog-item-variation.md b/doc/models/catalog-item-variation.md index 94ee596a..6e9e900b 100644 --- a/doc/models/catalog-item-variation.md +++ b/doc/models/catalog-item-variation.md @@ -20,28 +20,27 @@ decreases by 2, and the stockable count automatically decreases by 0.4 bottle ac | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemId` | `string \| undefined` | Optional | The ID of the `CatalogItem` associated with this item variation. | -| `name` | `string \| undefined` | Optional | The item variation's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | -| `sku` | `string \| undefined` | Optional | The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters. | -| `upc` | `string \| undefined` | Optional | The universal product code (UPC) of the item variation, if any. This is a searchable attribute for use in applicable query filters.

The value of this attribute should be a number of 12-14 digits long. This restriction is enforced on the Square Seller Dashboard,
Square Point of Sale or Retail Point of Sale apps, where this attribute shows in the GTIN field. If a non-compliant UPC value is assigned
to this attribute using the API, the value is not editable on the Seller Dashboard, Square Point of Sale or Retail Point of Sale apps
unless it is updated to fit the expected format. | +| `itemId` | `string \| null \| undefined` | Optional | The ID of the `CatalogItem` associated with this item variation. | +| `name` | `string \| null \| undefined` | Optional | The item variation's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `sku` | `string \| null \| undefined` | Optional | The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters. | +| `upc` | `string \| null \| undefined` | Optional | The universal product code (UPC) of the item variation, if any. This is a searchable attribute for use in applicable query filters.

The value of this attribute should be a number of 12-14 digits long. This restriction is enforced on the Square Seller Dashboard,
Square Point of Sale or Retail Point of Sale apps, where this attribute shows in the GTIN field. If a non-compliant UPC value is assigned
to this attribute using the API, the value is not editable on the Seller Dashboard, Square Point of Sale or Retail Point of Sale apps
unless it is updated to fit the expected format. | | `ordinal` | `number \| undefined` | Optional | The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal
for each item variation within a parent `CatalogItem` is set according to the item variations's
position. On reads, the value is not guaranteed to be sequential or unique. | | `pricingType` | [`string \| undefined`](../../doc/models/catalog-pricing-type.md) | Optional | Indicates whether the price of a CatalogItemVariation should be entered manually at the time of sale. | | `priceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `locationOverrides` | [`ItemVariationLocationOverrides[] \| undefined`](../../doc/models/item-variation-location-overrides.md) | Optional | Per-location price and inventory overrides. | -| `trackInventory` | `boolean \| undefined` | Optional | If `true`, inventory tracking is active for the variation. | +| `locationOverrides` | [`ItemVariationLocationOverrides[] \| null \| undefined`](../../doc/models/item-variation-location-overrides.md) | Optional | Per-location price and inventory overrides. | +| `trackInventory` | `boolean \| null \| undefined` | Optional | If `true`, inventory tracking is active for the variation. | | `inventoryAlertType` | [`string \| undefined`](../../doc/models/inventory-alert-type.md) | Optional | Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low. | -| `inventoryAlertThreshold` | `bigint \| undefined` | Optional | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.

This value is always an integer. | -| `userData` | `string \| undefined` | Optional | Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | -| `serviceDuration` | `bigint \| undefined` | Optional | If the `CatalogItem` that owns this item variation is of type
`APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For
example, a 30 minute appointment would have the value `1800000`, which is equal to
30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | -| `availableForBooking` | `boolean \| undefined` | Optional | If the `CatalogItem` that owns this item variation is of type
`APPOINTMENTS_SERVICE`, a bool representing whether this service is available for booking. | -| `itemOptionValues` | [`CatalogItemOptionValueForItemVariation[] \| undefined`](../../doc/models/catalog-item-option-value-for-item-variation.md) | Optional | List of item option values associated with this item variation. Listed
in the same order as the item options of the parent item. | -| `measurementUnitId` | `string \| undefined` | Optional | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity
sold of this item variation. If left unset, the item will be sold in
whole quantities. | -| `sellable` | `boolean \| undefined` | Optional | Whether this variation can be sold. The inventory count of a sellable variation indicates
the number of units available for sale. When a variation is both stockable and sellable,
its sellable inventory count can be smaller than or equal to its stockable count. | -| `stockable` | `boolean \| undefined` | Optional | Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).
When a variation is both stockable and sellable, the inventory count of a stockable variation keeps track of the number of units of this variation in stock
and is not an indicator of the number of units of the variation that can be sold. | -| `imageIds` | `string[] \| undefined` | Optional | The IDs of images associated with this `CatalogItemVariation` instance.
These images will be shown to customers in Square Online Store. | -| `teamMemberIds` | `string[] \| undefined` | Optional | Tokens of employees that can perform the service represented by this variation. Only valid for
variations of type `APPOINTMENTS_SERVICE`. | +| `inventoryAlertThreshold` | `bigint \| null \| undefined` | Optional | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.

This value is always an integer. | +| `userData` | `string \| null \| undefined` | Optional | Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `serviceDuration` | `bigint \| null \| undefined` | Optional | If the `CatalogItem` that owns this item variation is of type
`APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For
example, a 30 minute appointment would have the value `1800000`, which is equal to
30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | +| `availableForBooking` | `boolean \| null \| undefined` | Optional | If the `CatalogItem` that owns this item variation is of type
`APPOINTMENTS_SERVICE`, a bool representing whether this service is available for booking. | +| `itemOptionValues` | [`CatalogItemOptionValueForItemVariation[] \| null \| undefined`](../../doc/models/catalog-item-option-value-for-item-variation.md) | Optional | List of item option values associated with this item variation. Listed
in the same order as the item options of the parent item. | +| `measurementUnitId` | `string \| null \| undefined` | Optional | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity
sold of this item variation. If left unset, the item will be sold in
whole quantities. | +| `sellable` | `boolean \| null \| undefined` | Optional | Whether this variation can be sold. The inventory count of a sellable variation indicates
the number of units available for sale. When a variation is both stockable and sellable,
its sellable inventory count can be smaller than or equal to its stockable count. | +| `stockable` | `boolean \| null \| undefined` | Optional | Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).
When a variation is both stockable and sellable, the inventory count of a stockable variation keeps track of the number of units of this variation in stock
and is not an indicator of the number of units of the variation that can be sold. | +| `imageIds` | `string[] \| null \| undefined` | Optional | The IDs of images associated with this `CatalogItemVariation` instance.
These images will be shown to customers in Square Online Store. | +| `teamMemberIds` | `string[] \| null \| undefined` | Optional | Tokens of employees that can perform the service represented by this variation. Only valid for
variations of type `APPOINTMENTS_SERVICE`. | | `stockableConversion` | [`CatalogStockConversion \| undefined`](../../doc/models/catalog-stock-conversion.md) | Optional | Represents the rule of conversion between a stockable [CatalogItemVariation](../../doc/models/catalog-item-variation.md)
and a non-stockable sell-by or receive-by `CatalogItemVariation` that
share the same underlying stock. | -| `itemVariationVendorInfoIds` | `string[] \| undefined` | Optional | A list of ids of [CatalogItemVariationVendorInfo](entity:CatalogItemVariationVendorInfo) objects that
reference this ItemVariation. (Deprecated in favor of item_variation_vendor_infos) | ## Example (as JSON) diff --git a/doc/models/catalog-item.md b/doc/models/catalog-item.md index 627b5646..7a25a9f9 100644 --- a/doc/models/catalog-item.md +++ b/doc/models/catalog-item.md @@ -11,24 +11,25 @@ A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` typ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points.
**Constraints**: *Maximum Length*: `512` | -| `description` | `string \| undefined` | Optional | The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.

Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description
of the [CatalogItem](entity:CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to
set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,
except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
does not nullify `description_html`.
**Constraints**: *Maximum Length*: `4096` | -| `abbreviation` | `string \| undefined` | Optional | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
This attribute is searchable, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `24` | -| `labelColor` | `string \| undefined` | Optional | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | -| `availableOnline` | `boolean \| undefined` | Optional | If `true`, the item can be added to shipping orders from the merchant's online store. | -| `availableForPickup` | `boolean \| undefined` | Optional | If `true`, the item can be added to pickup orders from the merchant's online store. | -| `availableElectronically` | `boolean \| undefined` | Optional | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. | -| `categoryId` | `string \| undefined` | Optional | The ID of the item's category, if any. | -| `taxIds` | `string[] \| undefined` | Optional | A set of IDs indicating the taxes enabled for
this item. When updating an item, any taxes listed here will be added to the item.
Taxes may also be added to or deleted from an item using `UpdateItemTaxes`. | -| `modifierListInfo` | [`CatalogItemModifierListInfo[] \| undefined`](../../doc/models/catalog-item-modifier-list-info.md) | Optional | A set of `CatalogItemModifierListInfo` objects
representing the modifier lists that apply to this item, along with the overrides and min
and max limits that are specific to this item. Modifier lists
may also be added to or deleted from an item using `UpdateItemModifierLists`. | -| `variations` | [`CatalogObject[] \| undefined`](../../doc/models/catalog-object.md) | Optional | A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item must have
at least one variation. | +| `name` | `string \| null \| undefined` | Optional | The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points.
**Constraints**: *Maximum Length*: `512` | +| `description` | `string \| null \| undefined` | Optional | The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.

Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description
of the [CatalogItem](entity:CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to
set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,
except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
does not nullify `description_html`.
**Constraints**: *Maximum Length*: `4096` | +| `abbreviation` | `string \| null \| undefined` | Optional | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
This attribute is searchable, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `24` | +| `labelColor` | `string \| null \| undefined` | Optional | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | +| `availableOnline` | `boolean \| null \| undefined` | Optional | If `true`, the item can be added to shipping orders from the merchant's online store. | +| `availableForPickup` | `boolean \| null \| undefined` | Optional | If `true`, the item can be added to pickup orders from the merchant's online store. | +| `availableElectronically` | `boolean \| null \| undefined` | Optional | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. | +| `categoryId` | `string \| null \| undefined` | Optional | The ID of the item's category, if any. | +| `taxIds` | `string[] \| null \| undefined` | Optional | A set of IDs indicating the taxes enabled for
this item. When updating an item, any taxes listed here will be added to the item.
Taxes may also be added to or deleted from an item using `UpdateItemTaxes`. | +| `modifierListInfo` | [`CatalogItemModifierListInfo[] \| null \| undefined`](../../doc/models/catalog-item-modifier-list-info.md) | Optional | A set of `CatalogItemModifierListInfo` objects
representing the modifier lists that apply to this item, along with the overrides and min
and max limits that are specific to this item. Modifier lists
may also be added to or deleted from an item using `UpdateItemModifierLists`. | +| `variations` | [`CatalogObject[] \| null \| undefined`](../../doc/models/catalog-object.md) | Optional | A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item must have
at least one variation. | | `productType` | [`string \| undefined`](../../doc/models/catalog-item-product-type.md) | Optional | The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items. | -| `skipModifierScreen` | `boolean \| undefined` | Optional | If `false`, the Square Point of Sale app will present the `CatalogItem`'s
details screen immediately, allowing the merchant to choose `CatalogModifier`s
before adding the item to the cart. This is the default behavior.

If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected
modifiers, and merchants can edit modifiers by drilling down onto the item's details.

Third-party clients are encouraged to implement similar behaviors. | -| `itemOptions` | [`CatalogItemOptionForItem[] \| undefined`](../../doc/models/catalog-item-option-for-item.md) | Optional | List of item options IDs for this item. Used to manage and group item
variations in a specified order.

Maximum: 6 item options. | -| `imageIds` | `string[] \| undefined` | Optional | The IDs of images associated with this `CatalogItem` instance.
These images will be shown to customers in Square Online Store.
The first image will show up as the icon for this item in POS. | -| `sortName` | `string \| undefined` | Optional | A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is absent, the regular `name` field is used for sorting.
Its value must not be empty.

It is currently supported for sellers of the Japanese locale only. | -| `descriptionHtml` | `string \| undefined` | Optional | The item's description as expressed in valid HTML elements. The length of this field value, including those of HTML tags,
is of Unicode points. With application query filters, the text values of the HTML elements and attributes are searchable. Invalid or
unsupported HTML elements or attributes are ignored.

Supported HTML elements include:

- `a`: Link. Supports linking to website URLs, email address, and telephone numbers.
- `b`, `strong`: Bold text
- `br`: Line break
- `code`: Computer code
- `div`: Section
- `h1-h6`: Headings
- `i`, `em`: Italics
- `li`: List element
- `ol`: Numbered list
- `p`: Paragraph
- `ul`: Bullet list
- `u`: Underline

Supported HTML attributes include:

- `align`: Alignment of the text content
- `href`: Link destination
- `rel`: Relationship between link's target and source
- `target`: Place to open the linked document
**Constraints**: *Maximum Length*: `65535` | +| `skipModifierScreen` | `boolean \| null \| undefined` | Optional | If `false`, the Square Point of Sale app will present the `CatalogItem`'s
details screen immediately, allowing the merchant to choose `CatalogModifier`s
before adding the item to the cart. This is the default behavior.

If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected
modifiers, and merchants can edit modifiers by drilling down onto the item's details.

Third-party clients are encouraged to implement similar behaviors. | +| `itemOptions` | [`CatalogItemOptionForItem[] \| null \| undefined`](../../doc/models/catalog-item-option-for-item.md) | Optional | List of item options IDs for this item. Used to manage and group item
variations in a specified order.

Maximum: 6 item options. | +| `imageIds` | `string[] \| null \| undefined` | Optional | The IDs of images associated with this `CatalogItem` instance.
These images will be shown to customers in Square Online Store.
The first image will show up as the icon for this item in POS. | +| `sortName` | `string \| null \| undefined` | Optional | A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is absent, the regular `name` field is used for sorting.
Its value must not be empty.

It is currently supported for sellers of the Japanese locale only. | +| `descriptionHtml` | `string \| null \| undefined` | Optional | The item's description as expressed in valid HTML elements. The length of this field value, including those of HTML tags,
is of Unicode points. With application query filters, the text values of the HTML elements and attributes are searchable. Invalid or
unsupported HTML elements or attributes are ignored.

Supported HTML elements include:

- `a`: Link. Supports linking to website URLs, email address, and telephone numbers.
- `b`, `strong`: Bold text
- `br`: Line break
- `code`: Computer code
- `div`: Section
- `h1-h6`: Headings
- `i`, `em`: Italics
- `li`: List element
- `ol`: Numbered list
- `p`: Paragraph
- `ul`: Bullet list
- `u`: Underline

Supported HTML attributes include:

- `align`: Alignment of the text content
- `href`: Link destination
- `rel`: Relationship between link's target and source
- `target`: Place to open the linked document
**Constraints**: *Maximum Length*: `65535` | | `descriptionPlaintext` | `string \| undefined` | Optional | A server-generated plaintext version of the `description_html` field, without formatting tags.
**Constraints**: *Maximum Length*: `65535` | +| `isArchived` | `boolean \| null \| undefined` | Optional | Indicates whether this item is archived (`true`) or not (`false`). | ## Example (as JSON) diff --git a/doc/models/catalog-measurement-unit.md b/doc/models/catalog-measurement-unit.md index 930e076f..59e0d3d7 100644 --- a/doc/models/catalog-measurement-unit.md +++ b/doc/models/catalog-measurement-unit.md @@ -13,7 +13,7 @@ specifies the precision for decimal quantities. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `measurementUnit` | [`MeasurementUnit \| undefined`](../../doc/models/measurement-unit.md) | Optional | Represents a unit of measurement to use with a quantity, such as ounces
or inches. Exactly one of the following fields are required: `custom_unit`,
`area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. | -| `precision` | `number \| undefined` | Optional | An integer between 0 and 5 that represents the maximum number of
positions allowed after the decimal in quantities measured with this unit.
For example:

- if the precision is 0, the quantity can be 1, 2, 3, etc.
- if the precision is 1, the quantity can be 0.1, 0.2, etc.
- if the precision is 2, the quantity can be 0.01, 0.12, etc.

Default: 3 | +| `precision` | `number \| null \| undefined` | Optional | An integer between 0 and 5 that represents the maximum number of
positions allowed after the decimal in quantities measured with this unit.
For example:

- if the precision is 0, the quantity can be 1, 2, 3, etc.
- if the precision is 1, the quantity can be 0.1, 0.2, etc.
- if the precision is 2, the quantity can be 0.01, 0.12, etc.

Default: 3 | ## Example (as JSON) diff --git a/doc/models/catalog-modifier-list.md b/doc/models/catalog-modifier-list.md index 2a9153a0..0d18ecbc 100644 --- a/doc/models/catalog-modifier-list.md +++ b/doc/models/catalog-modifier-list.md @@ -16,11 +16,11 @@ the modifier list are allowed. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name for the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | -| `ordinal` | `number \| undefined` | Optional | Determines where this modifier list appears in a list of `CatalogModifierList` values. | +| `name` | `string \| null \| undefined` | Optional | The name for the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `ordinal` | `number \| null \| undefined` | Optional | Determines where this modifier list appears in a list of `CatalogModifierList` values. | | `selectionType` | [`string \| undefined`](../../doc/models/catalog-modifier-list-selection-type.md) | Optional | Indicates whether a CatalogModifierList supports multiple selections. | -| `modifiers` | [`CatalogObject[] \| undefined`](../../doc/models/catalog-object.md) | Optional | The options included in the `CatalogModifierList`.
You must include at least one `CatalogModifier`.
Each CatalogObject must have type `MODIFIER` and contain
`CatalogModifier` data. | -| `imageIds` | `string[] \| undefined` | Optional | The IDs of images associated with this `CatalogModifierList` instance.
Currently these images are not displayed by Square, but are free to be displayed in 3rd party applications. | +| `modifiers` | [`CatalogObject[] \| null \| undefined`](../../doc/models/catalog-object.md) | Optional | The options included in the `CatalogModifierList`.
You must include at least one `CatalogModifier`.
Each CatalogObject must have type `MODIFIER` and contain
`CatalogModifier` data. | +| `imageIds` | `string[] \| null \| undefined` | Optional | The IDs of images associated with this `CatalogModifierList` instance.
Currently these images are not displayed by Square, but are free to be displayed in 3rd party applications. | ## Example (as JSON) diff --git a/doc/models/catalog-modifier-override.md b/doc/models/catalog-modifier-override.md index d67a29eb..d996fa7b 100644 --- a/doc/models/catalog-modifier-override.md +++ b/doc/models/catalog-modifier-override.md @@ -12,7 +12,7 @@ Options to control how to override the default behavior of the specified modifie | Name | Type | Tags | Description | | --- | --- | --- | --- | | `modifierId` | `string` | Required | The ID of the `CatalogModifier` whose default behavior is being overridden.
**Constraints**: *Minimum Length*: `1` | -| `onByDefault` | `boolean \| undefined` | Optional | If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`. | +| `onByDefault` | `boolean \| null \| undefined` | Optional | If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`. | ## Example (as JSON) diff --git a/doc/models/catalog-modifier.md b/doc/models/catalog-modifier.md index f0597543..c5329716 100644 --- a/doc/models/catalog-modifier.md +++ b/doc/models/catalog-modifier.md @@ -11,12 +11,12 @@ A modifier applicable to items at the time of sale. An example of a modifier is | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The modifier name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `name` | `string \| null \| undefined` | Optional | The modifier name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | | `priceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `ordinal` | `number \| undefined` | Optional | Determines where this `CatalogModifier` appears in the `CatalogModifierList`. | -| `modifierListId` | `string \| undefined` | Optional | The ID of the `CatalogModifierList` associated with this modifier. | -| `locationOverrides` | [`ModifierLocationOverrides[] \| undefined`](../../doc/models/modifier-location-overrides.md) | Optional | Location-specific price overrides. | -| `imageId` | `string \| undefined` | Optional | The ID of the image associated with this `CatalogModifier` instance.
Currently this image is not displayed by Square, but is free to be displayed in 3rd party applications. | +| `ordinal` | `number \| null \| undefined` | Optional | Determines where this `CatalogModifier` appears in the `CatalogModifierList`. | +| `modifierListId` | `string \| null \| undefined` | Optional | The ID of the `CatalogModifierList` associated with this modifier. | +| `locationOverrides` | [`ModifierLocationOverrides[] \| null \| undefined`](../../doc/models/modifier-location-overrides.md) | Optional | Location-specific price overrides. | +| `imageId` | `string \| null \| undefined` | Optional | The ID of the image associated with this `CatalogModifier` instance.
Currently this image is not displayed by Square, but is free to be displayed in 3rd party applications. | ## Example (as JSON) diff --git a/doc/models/catalog-object-reference.md b/doc/models/catalog-object-reference.md index 9eedc1dd..462cb27e 100644 --- a/doc/models/catalog-object-reference.md +++ b/doc/models/catalog-object-reference.md @@ -13,8 +13,8 @@ at a specific version. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `objectId` | `string \| undefined` | Optional | The ID of the referenced object. | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the object. | +| `objectId` | `string \| null \| undefined` | Optional | The ID of the referenced object. | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the object. | ## Example (as JSON) diff --git a/doc/models/catalog-object-type.md b/doc/models/catalog-object-type.md index d817fb24..6ef39c2e 100644 --- a/doc/models/catalog-object-type.md +++ b/doc/models/catalog-object-type.md @@ -2,7 +2,7 @@ # Catalog Object Type Possible types of CatalogObjects returned from the catalog, each -containing type-specific properties in the `*_data` field corresponding to the specfied object type. +containing type-specific properties in the `*_data` field corresponding to the specified object type. ## Enumeration diff --git a/doc/models/catalog-object.md b/doc/models/catalog-object.md index f944cbe4..0e10f892 100644 --- a/doc/models/catalog-object.md +++ b/doc/models/catalog-object.md @@ -20,16 +20,16 @@ For a more detailed discussion of the Catalog data model, please see the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `type` | [`string`](../../doc/models/catalog-object-type.md) | Required | Possible types of CatalogObjects returned from the catalog, each
containing type-specific properties in the `*_data` field corresponding to the specfied object type. | +| `type` | [`string`](../../doc/models/catalog-object-type.md) | Required | Possible types of CatalogObjects returned from the catalog, each
containing type-specific properties in the `*_data` field corresponding to the specified object type. | | `id` | `string` | Required | An identifier to reference this object in the catalog. When a new `CatalogObject`
is inserted, the client should set the id to a temporary identifier starting with
a "`#`" character. Other objects being inserted or updated within the same request
may use this identifier to refer to the new object.

When the server receives the new object, it will supply a unique identifier that
replaces the temporary identifier for all future references.
**Constraints**: *Minimum Length*: `1` | | `updatedAt` | `string \| undefined` | Optional | Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"`
would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. | | `version` | `bigint \| undefined` | Optional | The version of the object. When updating an object, the version supplied
must match the version in the database, otherwise the write will be rejected as conflicting. | -| `isDeleted` | `boolean \| undefined` | Optional | If `true`, the object has been deleted from the database. Must be `false` for new objects
being inserted. When deleted, the `updated_at` field will equal the deletion time. | -| `customAttributeValues` | [`Record \| undefined`](../../doc/models/catalog-custom-attribute-value.md) | Optional | A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
value defined in the associated [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition)
object defined by the application making the request.

If the `CatalogCustomAttributeDefinition` object is
defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by
the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of
`"cocoa_brand"` and the defining application ID is `"abcd1234"`, the key in the map is `"abcd1234:cocoa_brand"`
if the application making the request is different from the application defining the custom attribute definition.
Otherwise, the key used in the map is simply `"cocoa_brand"`.

Application-defined custom attributes are set at a global (location-independent) level.
Custom attribute values are intended to store additional information about a catalog object
or associations with an entity in another system. Do not use custom attributes
to store any sensitive information (personally identifiable information, card details, etc.). | -| `catalogV1Ids` | [`CatalogV1Id[] \| undefined`](../../doc/models/catalog-v1-id.md) | Optional | The Connect v1 IDs for this object at each location where it is present, where they
differ from the object's Connect V2 ID. The field will only be present for objects that
have been created or modified by legacy APIs. | -| `presentAtAllLocations` | `boolean \| undefined` | Optional | If `true`, this object is present at all locations (including future locations), except where specified in
the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations),
except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | -| `presentAtLocationIds` | `string[] \| undefined` | Optional | A list of locations where the object is present, even if `present_at_all_locations` is `false`.
This can include locations that are deactivated. | -| `absentAtLocationIds` | `string[] \| undefined` | Optional | A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
This can include locations that are deactivated. | +| `isDeleted` | `boolean \| null \| undefined` | Optional | If `true`, the object has been deleted from the database. Must be `false` for new objects
being inserted. When deleted, the `updated_at` field will equal the deletion time. | +| `customAttributeValues` | [`Record \| null \| undefined`](../../doc/models/catalog-custom-attribute-value.md) | Optional | A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
value defined in the associated [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition)
object defined by the application making the request.

If the `CatalogCustomAttributeDefinition` object is
defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by
the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of
`"cocoa_brand"` and the defining application ID is `"abcd1234"`, the key in the map is `"abcd1234:cocoa_brand"`
if the application making the request is different from the application defining the custom attribute definition.
Otherwise, the key used in the map is simply `"cocoa_brand"`.

Application-defined custom attributes are set at a global (location-independent) level.
Custom attribute values are intended to store additional information about a catalog object
or associations with an entity in another system. Do not use custom attributes
to store any sensitive information (personally identifiable information, card details, etc.). | +| `catalogV1Ids` | [`CatalogV1Id[] \| null \| undefined`](../../doc/models/catalog-v1-id.md) | Optional | The Connect v1 IDs for this object at each location where it is present, where they
differ from the object's Connect V2 ID. The field will only be present for objects that
have been created or modified by legacy APIs. | +| `presentAtAllLocations` | `boolean \| null \| undefined` | Optional | If `true`, this object is present at all locations (including future locations), except where specified in
the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations),
except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | +| `presentAtLocationIds` | `string[] \| null \| undefined` | Optional | A list of locations where the object is present, even if `present_at_all_locations` is `false`.
This can include locations that are deactivated. | +| `absentAtLocationIds` | `string[] \| null \| undefined` | Optional | A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
This can include locations that are deactivated. | | `itemData` | [`CatalogItem \| undefined`](../../doc/models/catalog-item.md) | Optional | A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` type, also referred to as an item, in the catalog. | | `categoryData` | [`CatalogCategory \| undefined`](../../doc/models/catalog-category.md) | Optional | A category to which a `CatalogItem` instance belongs. | | `itemVariationData` | [`CatalogItemVariation \| undefined`](../../doc/models/catalog-item-variation.md) | Optional | An item variation, representing a product for sale, in the Catalog object model. Each [item](../../doc/models/catalog-item.md) must have at least one
item variation and can have at most 250 item variations.

An item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold number of the variation, the stocked
number of the variation, or both. For example, when a variation representing wine is stocked and sold by the bottle, the variation is both
stockable and sellable. But when a variation of the wine is sold by the glass, the sold units cannot be used as a measure of the stocked units. This by-the-glass
variation is sellable, but not stockable. To accurately keep track of the wine's inventory count at any time, the sellable count must be
converted to stockable count. Typically, the seller defines this unit conversion. For example, 1 bottle equals 5 glasses. The Square API exposes
the `stockable_conversion` property on the variation to specify the conversion. Thus, when two glasses of the wine are sold, the sellable count
decreases by 2, and the stockable count automatically decreases by 0.4 bottle according to the conversion. | diff --git a/doc/models/catalog-pricing-rule.md b/doc/models/catalog-pricing-rule.md index 8ddae275..3d896913 100644 --- a/doc/models/catalog-pricing-rule.md +++ b/doc/models/catalog-pricing-rule.md @@ -12,19 +12,19 @@ during the active time period. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User-defined name for the pricing rule. For example, "Buy one get one
free" or "10% off". | -| `timePeriodIds` | `string[] \| undefined` | Optional | A list of unique IDs for the catalog time periods when
this pricing rule is in effect. If left unset, the pricing rule is always
in effect. | -| `discountId` | `string \| undefined` | Optional | Unique ID for the `CatalogDiscount` to take off
the price of all matched items. | -| `matchProductsId` | `string \| undefined` | Optional | Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule
matches within the entire cart, and can match multiple times. This field will always be set. | -| `applyProductsId` | `string \| undefined` | Optional | __Deprecated__: Please use the `exclude_products_id` field to apply
an exclude set instead. Exclude sets allow better control over quantity
ranges and offer more flexibility for which matched items receive a discount.

`CatalogProductSet` to apply the pricing to.
An apply rule matches within the subset of the cart that fits the match rules (the match set).
An apply rule can only match once in the match set.
If not supplied, the pricing will be applied to all products in the match set.
Other products retain their base price, or a price generated by other rules. | -| `excludeProductsId` | `string \| undefined` | Optional | `CatalogProductSet` to exclude from the pricing rule.
An exclude rule matches within the subset of the cart that fits the match rules (the match set).
An exclude rule can only match once in the match set.
If not supplied, the pricing will be applied to all products in the match set.
Other products retain their base price, or a price generated by other rules. | -| `validFromDate` | `string \| undefined` | Optional | Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD). | -| `validFromLocalTime` | `string \| undefined` | Optional | Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format
(HH:MM:SS). Partial seconds will be truncated. | -| `validUntilDate` | `string \| undefined` | Optional | Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD). | -| `validUntilLocalTime` | `string \| undefined` | Optional | Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format
(HH:MM:SS). Partial seconds will be truncated. | +| `name` | `string \| null \| undefined` | Optional | User-defined name for the pricing rule. For example, "Buy one get one
free" or "10% off". | +| `timePeriodIds` | `string[] \| null \| undefined` | Optional | A list of unique IDs for the catalog time periods when
this pricing rule is in effect. If left unset, the pricing rule is always
in effect. | +| `discountId` | `string \| null \| undefined` | Optional | Unique ID for the `CatalogDiscount` to take off
the price of all matched items. | +| `matchProductsId` | `string \| null \| undefined` | Optional | Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule
matches within the entire cart, and can match multiple times. This field will always be set. | +| `applyProductsId` | `string \| null \| undefined` | Optional | __Deprecated__: Please use the `exclude_products_id` field to apply
an exclude set instead. Exclude sets allow better control over quantity
ranges and offer more flexibility for which matched items receive a discount.

`CatalogProductSet` to apply the pricing to.
An apply rule matches within the subset of the cart that fits the match rules (the match set).
An apply rule can only match once in the match set.
If not supplied, the pricing will be applied to all products in the match set.
Other products retain their base price, or a price generated by other rules. | +| `excludeProductsId` | `string \| null \| undefined` | Optional | `CatalogProductSet` to exclude from the pricing rule.
An exclude rule matches within the subset of the cart that fits the match rules (the match set).
An exclude rule can only match once in the match set.
If not supplied, the pricing will be applied to all products in the match set.
Other products retain their base price, or a price generated by other rules. | +| `validFromDate` | `string \| null \| undefined` | Optional | Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD). | +| `validFromLocalTime` | `string \| null \| undefined` | Optional | Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format
(HH:MM:SS). Partial seconds will be truncated. | +| `validUntilDate` | `string \| null \| undefined` | Optional | Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD). | +| `validUntilLocalTime` | `string \| null \| undefined` | Optional | Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format
(HH:MM:SS). Partial seconds will be truncated. | | `excludeStrategy` | [`string \| undefined`](../../doc/models/exclude-strategy.md) | Optional | Indicates which products matched by a CatalogPricingRule
will be excluded if the pricing rule uses an exclude set. | | `minimumOrderSubtotalMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `customerGroupIdsAny` | `string[] \| undefined` | Optional | A list of IDs of customer groups, the members of which are eligible for discounts specified in this pricing rule.
Notice that a group ID is generated by the Customers API.
If this field is not set, the specified discount applies to matched products sold to anyone whether the buyer
has a customer profile created or not. If this `customer_group_ids_any` field is set, the specified discount
applies only to matched products sold to customers belonging to the specified customer groups. | +| `customerGroupIdsAny` | `string[] \| null \| undefined` | Optional | A list of IDs of customer groups, the members of which are eligible for discounts specified in this pricing rule.
Notice that a group ID is generated by the Customers API.
If this field is not set, the specified discount applies to matched products sold to anyone whether the buyer
has a customer profile created or not. If this `customer_group_ids_any` field is set, the specified discount
applies only to matched products sold to customers belonging to the specified customer groups. | ## Example (as JSON) diff --git a/doc/models/catalog-product-set.md b/doc/models/catalog-product-set.md index 7cd67561..d341bc87 100644 --- a/doc/models/catalog-product-set.md +++ b/doc/models/catalog-product-set.md @@ -15,13 +15,13 @@ a product set will also include its item variations. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User-defined name for the product set. For example, "Clearance Items"
or "Winter Sale Items". | -| `productIdsAny` | `string[] \| undefined` | Optional | Unique IDs for any `CatalogObject` included in this product set. Any
number of these catalog objects can be in an order for a pricing rule to apply.

This can be used with `product_ids_all` in a parent `CatalogProductSet` to
match groups of products for a bulk discount, such as a discount for an
entree and side combo.

Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.

Max: 500 catalog object IDs. | -| `productIdsAll` | `string[] \| undefined` | Optional | Unique IDs for any `CatalogObject` included in this product set.
All objects in this set must be included in an order for a pricing rule to apply.

Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.

Max: 500 catalog object IDs. | -| `quantityExact` | `bigint \| undefined` | Optional | If set, there must be exactly this many items from `products_any` or `products_all`
in the cart for the discount to apply.

Cannot be combined with either `quantity_min` or `quantity_max`. | -| `quantityMin` | `bigint \| undefined` | Optional | If set, there must be at least this many items from `products_any` or `products_all`
in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if
`quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. | -| `quantityMax` | `bigint \| undefined` | Optional | If set, the pricing rule will apply to a maximum of this many items from
`products_any` or `products_all`. | -| `allProducts` | `boolean \| undefined` | Optional | If set to `true`, the product set will include every item in the catalog.
Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. | +| `name` | `string \| null \| undefined` | Optional | User-defined name for the product set. For example, "Clearance Items"
or "Winter Sale Items". | +| `productIdsAny` | `string[] \| null \| undefined` | Optional | Unique IDs for any `CatalogObject` included in this product set. Any
number of these catalog objects can be in an order for a pricing rule to apply.

This can be used with `product_ids_all` in a parent `CatalogProductSet` to
match groups of products for a bulk discount, such as a discount for an
entree and side combo.

Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.

Max: 500 catalog object IDs. | +| `productIdsAll` | `string[] \| null \| undefined` | Optional | Unique IDs for any `CatalogObject` included in this product set.
All objects in this set must be included in an order for a pricing rule to apply.

Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.

Max: 500 catalog object IDs. | +| `quantityExact` | `bigint \| null \| undefined` | Optional | If set, there must be exactly this many items from `products_any` or `products_all`
in the cart for the discount to apply.

Cannot be combined with either `quantity_min` or `quantity_max`. | +| `quantityMin` | `bigint \| null \| undefined` | Optional | If set, there must be at least this many items from `products_any` or `products_all`
in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if
`quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. | +| `quantityMax` | `bigint \| null \| undefined` | Optional | If set, the pricing rule will apply to a maximum of this many items from
`products_any` or `products_all`. | +| `allProducts` | `boolean \| null \| undefined` | Optional | If set to `true`, the product set will include every item in the catalog.
Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. | ## Example (as JSON) diff --git a/doc/models/catalog-query-item-variations-for-item-option-values.md b/doc/models/catalog-query-item-variations-for-item-option-values.md index c610794b..d223ed76 100644 --- a/doc/models/catalog-query-item-variations-for-item-option-values.md +++ b/doc/models/catalog-query-item-variations-for-item-option-values.md @@ -11,7 +11,7 @@ The query filter to return the item variations containing the specified item opt | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemOptionValueIds` | `string[] \| undefined` | Optional | A set of `CatalogItemOptionValue` IDs to be used to find associated
`CatalogItemVariation`s. All ItemVariations that contain all of the given
Item Option Values (in any order) will be returned. | +| `itemOptionValueIds` | `string[] \| null \| undefined` | Optional | A set of `CatalogItemOptionValue` IDs to be used to find associated
`CatalogItemVariation`s. All ItemVariations that contain all of the given
Item Option Values (in any order) will be returned. | ## Example (as JSON) diff --git a/doc/models/catalog-query-items-for-item-options.md b/doc/models/catalog-query-items-for-item-options.md index ac51c247..c0ba891c 100644 --- a/doc/models/catalog-query-items-for-item-options.md +++ b/doc/models/catalog-query-items-for-item-options.md @@ -11,7 +11,7 @@ The query filter to return the items containing the specified item option IDs. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `itemOptionIds` | `string[] \| undefined` | Optional | A set of `CatalogItemOption` IDs to be used to find associated
`CatalogItem`s. All Items that contain all of the given Item Options (in any order)
will be returned. | +| `itemOptionIds` | `string[] \| null \| undefined` | Optional | A set of `CatalogItemOption` IDs to be used to find associated
`CatalogItem`s. All Items that contain all of the given Item Options (in any order)
will be returned. | ## Example (as JSON) diff --git a/doc/models/catalog-query-range.md b/doc/models/catalog-query-range.md index 8d52119a..3a316d10 100644 --- a/doc/models/catalog-query-range.md +++ b/doc/models/catalog-query-range.md @@ -12,8 +12,8 @@ The query filter to return the search result whose named attribute values fall b | Name | Type | Tags | Description | | --- | --- | --- | --- | | `attributeName` | `string` | Required | The name of the attribute to be searched.
**Constraints**: *Minimum Length*: `1` | -| `attributeMinValue` | `bigint \| undefined` | Optional | The desired minimum value for the search attribute (inclusive). | -| `attributeMaxValue` | `bigint \| undefined` | Optional | The desired maximum value for the search attribute (inclusive). | +| `attributeMinValue` | `bigint \| null \| undefined` | Optional | The desired minimum value for the search attribute (inclusive). | +| `attributeMaxValue` | `bigint \| null \| undefined` | Optional | The desired maximum value for the search attribute (inclusive). | ## Example (as JSON) diff --git a/doc/models/catalog-query-sorted-attribute.md b/doc/models/catalog-query-sorted-attribute.md index ec2f5d4a..5c22f0d4 100644 --- a/doc/models/catalog-query-sorted-attribute.md +++ b/doc/models/catalog-query-sorted-attribute.md @@ -12,7 +12,7 @@ The query expression to specify the key to sort search results. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `attributeName` | `string` | Required | The attribute whose value is used as the sort key.
**Constraints**: *Minimum Length*: `1` | -| `initialAttributeValue` | `string \| undefined` | Optional | The first attribute value to be returned by the query. Ascending sorts will return only
objects with this value or greater, while descending sorts will return only objects with this value
or less. If unset, start at the beginning (for ascending sorts) or end (for descending sorts). | +| `initialAttributeValue` | `string \| null \| undefined` | Optional | The first attribute value to be returned by the query. Ascending sorts will return only
objects with this value or greater, while descending sorts will return only objects with this value
or less. If unset, start at the beginning (for ascending sorts) or end (for descending sorts). | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | ## Example (as JSON) diff --git a/doc/models/catalog-quick-amount.md b/doc/models/catalog-quick-amount.md index 85788a22..14774997 100644 --- a/doc/models/catalog-quick-amount.md +++ b/doc/models/catalog-quick-amount.md @@ -13,8 +13,8 @@ Represents a Quick Amount in the Catalog. | --- | --- | --- | --- | | `type` | [`string`](../../doc/models/catalog-quick-amount-type.md) | Required | Determines the type of a specific Quick Amount. | | `amount` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `score` | `bigint \| undefined` | Optional | Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100].
MANUAL type amount will always have score = 100. | -| `ordinal` | `bigint \| undefined` | Optional | The order in which this Quick Amount should be displayed. | +| `score` | `bigint \| null \| undefined` | Optional | Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100].
MANUAL type amount will always have score = 100. | +| `ordinal` | `bigint \| null \| undefined` | Optional | The order in which this Quick Amount should be displayed. | ## Example (as JSON) diff --git a/doc/models/catalog-quick-amounts-settings.md b/doc/models/catalog-quick-amounts-settings.md index 453bac7f..3f9f0c28 100644 --- a/doc/models/catalog-quick-amounts-settings.md +++ b/doc/models/catalog-quick-amounts-settings.md @@ -12,8 +12,8 @@ A parent Catalog Object model represents a set of Quick Amounts and the settings | Name | Type | Tags | Description | | --- | --- | --- | --- | | `option` | [`string`](../../doc/models/catalog-quick-amounts-settings-option.md) | Required | Determines a seller's option on Quick Amounts feature. | -| `eligibleForAutoAmounts` | `boolean \| undefined` | Optional | Represents location's eligibility for auto amounts
The boolean should be consistent with whether there are AUTO amounts in the `amounts`. | -| `amounts` | [`CatalogQuickAmount[] \| undefined`](../../doc/models/catalog-quick-amount.md) | Optional | Represents a set of Quick Amounts at this location. | +| `eligibleForAutoAmounts` | `boolean \| null \| undefined` | Optional | Represents location's eligibility for auto amounts
The boolean should be consistent with whether there are AUTO amounts in the `amounts`. | +| `amounts` | [`CatalogQuickAmount[] \| null \| undefined`](../../doc/models/catalog-quick-amount.md) | Optional | Represents a set of Quick Amounts at this location. | ## Example (as JSON) diff --git a/doc/models/catalog-subscription-plan-variation.md b/doc/models/catalog-subscription-plan-variation.md index a243c83d..17d7bd05 100644 --- a/doc/models/catalog-subscription-plan-variation.md +++ b/doc/models/catalog-subscription-plan-variation.md @@ -14,7 +14,7 @@ For more information, see [Subscription Plans and Variations](https://developer. | --- | --- | --- | --- | | `name` | `string` | Required | The name of the plan variation. | | `phases` | [`SubscriptionPhase[]`](../../doc/models/subscription-phase.md) | Required | A list containing each [SubscriptionPhase](entity:SubscriptionPhase) for this plan variation. | -| `subscriptionPlanId` | `string \| undefined` | Optional | The id of the subscription plan, if there is one. | +| `subscriptionPlanId` | `string \| null \| undefined` | Optional | The id of the subscription plan, if there is one. | ## Example (as JSON) diff --git a/doc/models/catalog-subscription-plan.md b/doc/models/catalog-subscription-plan.md index 2fb26ebe..672872b9 100644 --- a/doc/models/catalog-subscription-plan.md +++ b/doc/models/catalog-subscription-plan.md @@ -13,11 +13,11 @@ For more information, see [Subscription Plans and Variations](https://developer. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `string` | Required | The name of the plan. | -| `phases` | [`SubscriptionPhase[] \| undefined`](../../doc/models/subscription-phase.md) | Optional | A list of SubscriptionPhase containing the [SubscriptionPhase](entity:SubscriptionPhase) for this plan.
This field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error | -| `subscriptionPlanVariations` | [`CatalogObject[] \| undefined`](../../doc/models/catalog-object.md) | Optional | The list of subscription plan variations available for this product | -| `eligibleItemIds` | `string[] \| undefined` | Optional | The list of IDs of `CatalogItems` that are eligible for subscription by this SubscriptionPlan's variations. | -| `eligibleCategoryIds` | `string[] \| undefined` | Optional | The list of IDs of `CatalogCategory` that are eligible for subscription by this SubscriptionPlan's variations. | -| `allItems` | `boolean \| undefined` | Optional | If true, all items in the merchant's catalog are subscribable by this SubscriptionPlan. | +| `phases` | [`SubscriptionPhase[] \| null \| undefined`](../../doc/models/subscription-phase.md) | Optional | A list of SubscriptionPhase containing the [SubscriptionPhase](entity:SubscriptionPhase) for this plan.
This field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error | +| `subscriptionPlanVariations` | [`CatalogObject[] \| null \| undefined`](../../doc/models/catalog-object.md) | Optional | The list of subscription plan variations available for this product | +| `eligibleItemIds` | `string[] \| null \| undefined` | Optional | The list of IDs of `CatalogItems` that are eligible for subscription by this SubscriptionPlan's variations. | +| `eligibleCategoryIds` | `string[] \| null \| undefined` | Optional | The list of IDs of `CatalogCategory` that are eligible for subscription by this SubscriptionPlan's variations. | +| `allItems` | `boolean \| null \| undefined` | Optional | If true, all items in the merchant's catalog are subscribable by this SubscriptionPlan. | ## Example (as JSON) diff --git a/doc/models/catalog-tax.md b/doc/models/catalog-tax.md index 577febb7..0886fca5 100644 --- a/doc/models/catalog-tax.md +++ b/doc/models/catalog-tax.md @@ -11,13 +11,13 @@ A tax applicable to an item. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | +| `name` | `string \| null \| undefined` | Optional | The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `255` | | `calculationPhase` | [`string \| undefined`](../../doc/models/tax-calculation-phase.md) | Optional | When to calculate the taxes due on a cart. | | `inclusionType` | [`string \| undefined`](../../doc/models/tax-inclusion-type.md) | Optional | Whether to the tax amount should be additional to or included in the CatalogItem price. | -| `percentage` | `string \| undefined` | Optional | The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign.
A value of `7.5` corresponds to 7.5%. For a location-specific tax rate, contact the tax authority of the location or a tax consultant. | -| `appliesToCustomAmounts` | `boolean \| undefined` | Optional | If `true`, the fee applies to custom amounts entered into the Square Point of Sale
app that are not associated with a particular `CatalogItem`. | -| `enabled` | `boolean \| undefined` | Optional | A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`). | -| `appliesToProductSetId` | `string \| undefined` | Optional | The ID of a `CatalogProductSet` object. If set, the tax is applicable to all products in the product set. | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign.
A value of `7.5` corresponds to 7.5%. For a location-specific tax rate, contact the tax authority of the location or a tax consultant. | +| `appliesToCustomAmounts` | `boolean \| null \| undefined` | Optional | If `true`, the fee applies to custom amounts entered into the Square Point of Sale
app that are not associated with a particular `CatalogItem`. | +| `enabled` | `boolean \| null \| undefined` | Optional | A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`). | +| `appliesToProductSetId` | `string \| null \| undefined` | Optional | The ID of a `CatalogProductSet` object. If set, the tax is applicable to all products in the product set. | ## Example (as JSON) diff --git a/doc/models/catalog-time-period.md b/doc/models/catalog-time-period.md index 7a3f8774..ab5cbcbb 100644 --- a/doc/models/catalog-time-period.md +++ b/doc/models/catalog-time-period.md @@ -11,7 +11,7 @@ Represents a time period - either a single period or a repeating period. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `event` | `string \| undefined` | Optional | An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which
specifies the name, timing, duration and recurrence of this time period.

Example:

```
DTSTART:20190707T180000
DURATION:P2H
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR
```

Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported.
`DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT`
and `END:VEVENT` is not required in the request. The response will always
include them. | +| `event` | `string \| null \| undefined` | Optional | An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which
specifies the name, timing, duration and recurrence of this time period.

Example:

```
DTSTART:20190707T180000
DURATION:P2H
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR
```

Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported.
`DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT`
and `END:VEVENT` is not required in the request. The response will always
include them. | ## Example (as JSON) diff --git a/doc/models/catalog-v1-id.md b/doc/models/catalog-v1-id.md index c60a187f..8626438e 100644 --- a/doc/models/catalog-v1-id.md +++ b/doc/models/catalog-v1-id.md @@ -11,8 +11,8 @@ A Square API V1 identifier of an item, including the object ID and its associate | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `catalogV1Id` | `string \| undefined` | Optional | The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID. | -| `locationId` | `string \| undefined` | Optional | The ID of the `Location` this Connect V1 ID is associated with. | +| `catalogV1Id` | `string \| null \| undefined` | Optional | The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the `Location` this Connect V1 ID is associated with. | ## Example (as JSON) diff --git a/doc/models/charge-request.md b/doc/models/charge-request.md index 409e5136..9d4e0f88 100644 --- a/doc/models/charge-request.md +++ b/doc/models/charge-request.md @@ -16,18 +16,18 @@ Deprecated - recommend using [CreatePayment](api-endpoint:Payments-CreatePayment | --- | --- | --- | --- | | `idempotencyKey` | `string` | Required | A value you specify that uniquely identifies this
transaction among transactions you've created.

If you're unsure whether a particular transaction succeeded,
you can reattempt it with the same idempotency key without
worrying about double-charging the buyer.

See [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `192` | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `cardNonce` | `string \| undefined` | Optional | A payment token generated from the [Card.tokenize()](https://developer.squareup.com/reference/sdks/web/payments/objects/Card#Card.tokenize) that represents the card
to charge.

The application that provides a payment token to this endpoint must be the
_same application_ that generated the payment token with the Web Payments SDK.
Otherwise, the nonce is invalid.

Do not provide a value for this field if you provide a value for
`customer_card_id`.
**Constraints**: *Maximum Length*: `192` | -| `customerCardId` | `string \| undefined` | Optional | The ID of the customer card on file to charge. Do
not provide a value for this field if you provide a value for `card_nonce`.

If you provide this value, you _must_ also provide a value for
`customer_id`.
**Constraints**: *Maximum Length*: `192` | -| `delayCapture` | `boolean \| undefined` | Optional | If `true`, the request will only perform an Auth on the provided
card. You can then later perform either a Capture (with the
[CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) endpoint) or a Void
(with the [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint).

Default value: `false` | -| `referenceId` | `string \| undefined` | Optional | An optional ID you can associate with the transaction for your own
purposes (such as to associate the transaction with an entity ID in your
own database).

This value cannot exceed 40 characters.
**Constraints**: *Maximum Length*: `40` | -| `note` | `string \| undefined` | Optional | An optional note to associate with the transaction.

This value cannot exceed 60 characters.
**Constraints**: *Maximum Length*: `60` | -| `customerId` | `string \| undefined` | Optional | The ID of the customer to associate this transaction with. This field
is required if you provide a value for `customer_card_id`, and optional
otherwise.
**Constraints**: *Maximum Length*: `50` | +| `cardNonce` | `string \| null \| undefined` | Optional | A payment token generated from the [Card.tokenize()](https://developer.squareup.com/reference/sdks/web/payments/objects/Card#Card.tokenize) that represents the card
to charge.

The application that provides a payment token to this endpoint must be the
_same application_ that generated the payment token with the Web Payments SDK.
Otherwise, the nonce is invalid.

Do not provide a value for this field if you provide a value for
`customer_card_id`.
**Constraints**: *Maximum Length*: `192` | +| `customerCardId` | `string \| null \| undefined` | Optional | The ID of the customer card on file to charge. Do
not provide a value for this field if you provide a value for `card_nonce`.

If you provide this value, you _must_ also provide a value for
`customer_id`.
**Constraints**: *Maximum Length*: `192` | +| `delayCapture` | `boolean \| null \| undefined` | Optional | If `true`, the request will only perform an Auth on the provided
card. You can then later perform either a Capture (with the
[CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) endpoint) or a Void
(with the [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint).

Default value: `false` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional ID you can associate with the transaction for your own
purposes (such as to associate the transaction with an entity ID in your
own database).

This value cannot exceed 40 characters.
**Constraints**: *Maximum Length*: `40` | +| `note` | `string \| null \| undefined` | Optional | An optional note to associate with the transaction.

This value cannot exceed 60 characters.
**Constraints**: *Maximum Length*: `60` | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the customer to associate this transaction with. This field
is required if you provide a value for `customer_card_id`, and optional
otherwise.
**Constraints**: *Maximum Length*: `50` | | `billingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | | `shippingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `buyerEmailAddress` | `string \| undefined` | Optional | The buyer's email address, if available. This value is optional,
but this transaction is ineligible for chargeback protection if it is not
provided. | -| `orderId` | `string \| undefined` | Optional | The ID of the order to associate with this transaction.

If you provide this value, the `amount_money` value of your request must
__exactly match__ the value of the order's `total_money` field.
**Constraints**: *Maximum Length*: `192` | -| `additionalRecipients` | [`ChargeRequestAdditionalRecipient[] \| undefined`](../../doc/models/charge-request-additional-recipient.md) | Optional | The basic primitive of multi-party transaction. The value is optional.
The transaction facilitated by you can be split from here.

If you provide this value, the `amount_money` value in your additional_recipients
must not be more than 90% of the `amount_money` value in the charge request.
The `location_id` must be the valid location of the app owner merchant.

This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.

This field is currently not supported in sandbox. | -| `verificationToken` | `string \| undefined` | Optional | A token generated by SqPaymentForm's verifyBuyer() that represents
customer's device info and 3ds challenge result. | +| `buyerEmailAddress` | `string \| null \| undefined` | Optional | The buyer's email address, if available. This value is optional,
but this transaction is ineligible for chargeback protection if it is not
provided. | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the order to associate with this transaction.

If you provide this value, the `amount_money` value of your request must
__exactly match__ the value of the order's `total_money` field.
**Constraints**: *Maximum Length*: `192` | +| `additionalRecipients` | [`ChargeRequestAdditionalRecipient[] \| null \| undefined`](../../doc/models/charge-request-additional-recipient.md) | Optional | The basic primitive of multi-party transaction. The value is optional.
The transaction facilitated by you can be split from here.

If you provide this value, the `amount_money` value in your additional_recipients
must not be more than 90% of the `amount_money` value in the charge request.
The `location_id` must be the valid location of the app owner merchant.

This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.

This field is currently not supported in sandbox. | +| `verificationToken` | `string \| null \| undefined` | Optional | A token generated by SqPaymentForm's verifyBuyer() that represents
customer's device info and 3ds challenge result. | ## Example (as JSON) diff --git a/doc/models/checkout-options.md b/doc/models/checkout-options.md index f2bf0a41..b8c671fb 100644 --- a/doc/models/checkout-options.md +++ b/doc/models/checkout-options.md @@ -9,17 +9,17 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `allowTipping` | `boolean \| undefined` | Optional | Indicates whether the payment allows tipping. | -| `customFields` | [`CustomField[] \| undefined`](../../doc/models/custom-field.md) | Optional | The custom fields requesting information from the buyer. | -| `subscriptionPlanId` | `string \| undefined` | Optional | The ID of the subscription plan for the buyer to pay and subscribe.
For more information, see [Subscription Plan Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout).
**Constraints**: *Maximum Length*: `255` | -| `redirectUrl` | `string \| undefined` | Optional | The confirmation page URL to redirect the buyer to after Square processes the payment.
**Constraints**: *Maximum Length*: `2048` | -| `merchantSupportEmail` | `string \| undefined` | Optional | The email address that buyers can use to contact the seller.
**Constraints**: *Maximum Length*: `256` | -| `askForShippingAddress` | `boolean \| undefined` | Optional | Indicates whether to include the address fields in the payment form. | +| `allowTipping` | `boolean \| null \| undefined` | Optional | Indicates whether the payment allows tipping. | +| `customFields` | [`CustomField[] \| null \| undefined`](../../doc/models/custom-field.md) | Optional | The custom fields requesting information from the buyer. | +| `subscriptionPlanId` | `string \| null \| undefined` | Optional | The ID of the subscription plan for the buyer to pay and subscribe.
For more information, see [Subscription Plan Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout).
**Constraints**: *Maximum Length*: `255` | +| `redirectUrl` | `string \| null \| undefined` | Optional | The confirmation page URL to redirect the buyer to after Square processes the payment.
**Constraints**: *Maximum Length*: `2048` | +| `merchantSupportEmail` | `string \| null \| undefined` | Optional | The email address that buyers can use to contact the seller.
**Constraints**: *Maximum Length*: `256` | +| `askForShippingAddress` | `boolean \| null \| undefined` | Optional | Indicates whether to include the address fields in the payment form. | | `acceptedPaymentMethods` | [`AcceptedPaymentMethods \| undefined`](../../doc/models/accepted-payment-methods.md) | Optional | - | | `appFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `shippingFee` | [`ShippingFee \| undefined`](../../doc/models/shipping-fee.md) | Optional | - | -| `enableCoupon` | `boolean \| undefined` | Optional | Indicates whether to include the `Add coupon` section for the buyer to provide a Square marketing coupon in the payment form. | -| `enableLoyalty` | `boolean \| undefined` | Optional | Indicates whether to include the `REWARDS` section for the buyer to opt in to loyalty, redeem rewards in the payment form, or both. | +| `enableCoupon` | `boolean \| null \| undefined` | Optional | Indicates whether to include the `Add coupon` section for the buyer to provide a Square marketing coupon in the payment form. | +| `enableLoyalty` | `boolean \| null \| undefined` | Optional | Indicates whether to include the `REWARDS` section for the buyer to opt in to loyalty, redeem rewards in the payment form, or both. | ## Example (as JSON) diff --git a/doc/models/checkout.md b/doc/models/checkout.md index 8dfe9c6f..aa4e6307 100644 --- a/doc/models/checkout.md +++ b/doc/models/checkout.md @@ -13,15 +13,15 @@ payment types using a checkout workflow hosted on squareup.com. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | ID generated by Square Checkout when a new checkout is requested. | -| `checkoutPageUrl` | `string \| undefined` | Optional | The URL that the buyer's browser should be redirected to after the
checkout is completed. | -| `askForShippingAddress` | `boolean \| undefined` | Optional | If `true`, Square Checkout will collect shipping information on your
behalf and store that information with the transaction information in your
Square Dashboard.

Default: `false`. | -| `merchantSupportEmail` | `string \| undefined` | Optional | The email address to display on the Square Checkout confirmation page
and confirmation email that the buyer can use to contact the merchant.

If this value is not set, the confirmation page and email will display the
primary email address associated with the merchant's Square account.

Default: none; only exists if explicitly set. | -| `prePopulateBuyerEmail` | `string \| undefined` | Optional | If provided, the buyer's email is pre-populated on the checkout page
as an editable text field.

Default: none; only exists if explicitly set. | +| `checkoutPageUrl` | `string \| null \| undefined` | Optional | The URL that the buyer's browser should be redirected to after the
checkout is completed. | +| `askForShippingAddress` | `boolean \| null \| undefined` | Optional | If `true`, Square Checkout will collect shipping information on your
behalf and store that information with the transaction information in your
Square Dashboard.

Default: `false`. | +| `merchantSupportEmail` | `string \| null \| undefined` | Optional | The email address to display on the Square Checkout confirmation page
and confirmation email that the buyer can use to contact the merchant.

If this value is not set, the confirmation page and email will display the
primary email address associated with the merchant's Square account.

Default: none; only exists if explicitly set. | +| `prePopulateBuyerEmail` | `string \| null \| undefined` | Optional | If provided, the buyer's email is pre-populated on the checkout page
as an editable text field.

Default: none; only exists if explicitly set. | | `prePopulateShippingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `redirectUrl` | `string \| undefined` | Optional | The URL to redirect to after checkout is completed with `checkoutId`,
Square's `orderId`, `transactionId`, and `referenceId` appended as URL
parameters. For example, if the provided redirect_url is
`http://www.example.com/order-complete`, a successful transaction redirects
the customer to:

http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx

If you do not provide a redirect URL, Square Checkout will display an order
confirmation page on your behalf; however Square strongly recommends that
you provide a redirect URL so you can verify the transaction results and
finalize the order through your existing/normal confirmation workflow. | +| `redirectUrl` | `string \| null \| undefined` | Optional | The URL to redirect to after checkout is completed with `checkoutId`,
Square's `orderId`, `transactionId`, and `referenceId` appended as URL
parameters. For example, if the provided redirect_url is
`http://www.example.com/order-complete`, a successful transaction redirects
the customer to:

http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx

If you do not provide a redirect URL, Square Checkout will display an order
confirmation page on your behalf; however Square strongly recommends that
you provide a redirect URL so you can verify the transaction results and
finalize the order through your existing/normal confirmation workflow. | | `order` | [`Order \| undefined`](../../doc/models/order.md) | Optional | Contains all information related to a single order to process with Square,
including line items that specify the products to purchase. `Order` objects also
include information about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated
itemization data. | | `createdAt` | `string \| undefined` | Optional | The time when the checkout was created, in RFC 3339 format. | -| `additionalRecipients` | [`AdditionalRecipient[] \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this checkout.
For example, fees assessed on the purchase by a third party integration. | +| `additionalRecipients` | [`AdditionalRecipient[] \| null \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this checkout.
For example, fees assessed on the purchase by a third party integration. | ## Example (as JSON) diff --git a/doc/models/clearpay-details.md b/doc/models/clearpay-details.md index 42557722..51e49e6b 100644 --- a/doc/models/clearpay-details.md +++ b/doc/models/clearpay-details.md @@ -11,7 +11,7 @@ Additional details about Clearpay payments. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `emailAddress` | `string \| undefined` | Optional | Email address on the buyer's Clearpay account.
**Constraints**: *Maximum Length*: `255` | +| `emailAddress` | `string \| null \| undefined` | Optional | Email address on the buyer's Clearpay account.
**Constraints**: *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/clone-order-request.md b/doc/models/clone-order-request.md index e41b8031..cd967a3b 100644 --- a/doc/models/clone-order-request.md +++ b/doc/models/clone-order-request.md @@ -14,7 +14,7 @@ Defines the fields that are included in requests to the | --- | --- | --- | --- | | `orderId` | `string` | Required | The ID of the order to clone. | | `version` | `number \| undefined` | Optional | An optional order version for concurrency protection.

If a version is provided, it must match the latest stored version of the order to clone.
If a version is not provided, the API clones the latest version. | -| `idempotencyKey` | `string \| undefined` | Optional | A value you specify that uniquely identifies this clone request.

If you are unsure whether a particular order was cloned successfully,
you can reattempt the call with the same idempotency key without
worrying about creating duplicate cloned orders.
The originally cloned order is returned.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A value you specify that uniquely identifies this clone request.

If you are unsure whether a particular order was cloned successfully,
you can reattempt the call with the same idempotency key without
worrying about creating duplicate cloned orders.
The originally cloned order is returned.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). | ## Example (as JSON) diff --git a/doc/models/complete-payment-request.md b/doc/models/complete-payment-request.md index 45661efd..71227d59 100644 --- a/doc/models/complete-payment-request.md +++ b/doc/models/complete-payment-request.md @@ -15,7 +15,7 @@ To complete payments manually, set `autocomplete` to `false`. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `versionToken` | `string \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned. | +| `versionToken` | `string \| null \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned. | ## Example (as JSON) diff --git a/doc/models/confirmation-options.md b/doc/models/confirmation-options.md index 1f629028..b63598b8 100644 --- a/doc/models/confirmation-options.md +++ b/doc/models/confirmation-options.md @@ -12,7 +12,7 @@ | `title` | `string` | Required | The title text to display in the confirmation screen flow on the Terminal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250` | | `body` | `string` | Required | The agreement details to display in the confirmation flow on the Terminal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000` | | `agreeButtonText` | `string` | Required | The button text to display indicating the customer agrees to the displayed terms.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250` | -| `disagreeButtonText` | `string \| undefined` | Optional | The button text to display indicating the customer does not agree to the displayed terms.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250` | +| `disagreeButtonText` | `string \| null \| undefined` | Optional | The button text to display indicating the customer does not agree to the displayed terms.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250` | | `decision` | [`ConfirmationDecision \| undefined`](../../doc/models/confirmation-decision.md) | Optional | - | ## Example (as JSON) diff --git a/doc/models/coordinates.md b/doc/models/coordinates.md index 3a72e40e..ec0e51d7 100644 --- a/doc/models/coordinates.md +++ b/doc/models/coordinates.md @@ -11,8 +11,8 @@ Latitude and longitude coordinates. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `latitude` | `number \| undefined` | Optional | The latitude of the coordinate expressed in degrees. | -| `longitude` | `number \| undefined` | Optional | The longitude of the coordinate expressed in degrees. | +| `latitude` | `number \| null \| undefined` | Optional | The latitude of the coordinate expressed in degrees. | +| `longitude` | `number \| null \| undefined` | Optional | The longitude of the coordinate expressed in degrees. | ## Example (as JSON) diff --git a/doc/models/create-loyalty-promotion-request.md b/doc/models/create-loyalty-promotion-request.md index 95d66b6f..6579e5b5 100644 --- a/doc/models/create-loyalty-promotion-request.md +++ b/doc/models/create-loyalty-promotion-request.md @@ -29,7 +29,8 @@ Represents a [CreateLoyaltyPromotion](../../doc/api/loyalty.md#create-loyalty-pr }, "incentive": { "points_multiplier_data": { - "points_multiplier": 3 + "multiplier": "3.0", + "points_multiplier": 160 }, "type": "POINTS_MULTIPLIER", "points_addition_data": { diff --git a/doc/models/create-loyalty-promotion-response.md b/doc/models/create-loyalty-promotion-response.md index 71b99a63..926d319f 100644 --- a/doc/models/create-loyalty-promotion-response.md +++ b/doc/models/create-loyalty-promotion-response.md @@ -31,6 +31,7 @@ Either `loyalty_promotion` or `errors` is present in the response. "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "incentive": { "points_multiplier_data": { + "multiplier": "3.000", "points_multiplier": 3 }, "type": "POINTS_MULTIPLIER", diff --git a/doc/models/create-payment-request.md b/doc/models/create-payment-request.md index f89451c9..7feb1b0f 100644 --- a/doc/models/create-payment-request.md +++ b/doc/models/create-payment-request.md @@ -34,6 +34,7 @@ Describes a request to create a payment using | `statementDescriptionIdentifier` | `string \| undefined` | Optional | Optional additional payment information to include on the customer's card statement
as part of the statement description. This can be, for example, an invoice number, ticket number,
or short description that uniquely identifies the purchase.

Note that the `statement_description_identifier` might get truncated on the statement description
to fit the required information including the Square identifier (SQ *) and name of the
seller taking the payment.
**Constraints**: *Maximum Length*: `20` | | `cashDetails` | [`CashPaymentDetails \| undefined`](../../doc/models/cash-payment-details.md) | Optional | Stores details about a cash payment. Contains only non-confidential information. For more information, see
[Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments). | | `externalDetails` | [`ExternalPaymentDetails \| undefined`](../../doc/models/external-payment-details.md) | Optional | Stores details about an external payment. Contains only non-confidential information.
For more information, see
[Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). | +| `customerDetails` | [`CustomerDetails \| undefined`](../../doc/models/customer-details.md) | Optional | Details about the customer making the payment. | ## Example (as JSON) diff --git a/doc/models/custom-attribute-definition.md b/doc/models/custom-attribute-definition.md index 786c341b..621a4727 100644 --- a/doc/models/custom-attribute-definition.md +++ b/doc/models/custom-attribute-definition.md @@ -12,10 +12,10 @@ specifies the key, visibility, schema, and other properties for a custom attribu | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `key` | `string \| undefined` | Optional | The identifier
of the custom attribute definition and its corresponding custom attributes. This value
can be a simple key, which is the key that is provided when the custom attribute definition
is created, or a qualified key, if the requesting
application is not the definition owner. The qualified key consists of the application ID
of the custom attribute definition owner
followed by the simple key that was provided when the definition was created. It has the
format application_id:simple key.

The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
underscores (_), and hyphens (-).

This field can not be changed
after the custom attribute definition is created. This field is required when creating
a definition and must be unique per application, seller, and resource type.
**Constraints**: *Minimum Length*: `1`, *Pattern*: `^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$` | -| `schema` | `Record \| undefined` | Optional | The JSON schema for the custom attribute definition, which determines the data type of the corresponding custom attributes. For more information,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). This field is required when creating a definition. | -| `name` | `string \| undefined` | Optional | The name of the custom attribute definition for API and seller-facing UI purposes. The name must
be unique within the seller and application pair. This field is required if the
`visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
**Constraints**: *Maximum Length*: `255` | -| `description` | `string \| undefined` | Optional | Seller-oriented description of the custom attribute definition, including any constraints
that the seller should observe. May be displayed as a tooltip in Square UIs. This field is
required if the `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
**Constraints**: *Maximum Length*: `255` | +| `key` | `string \| null \| undefined` | Optional | The identifier
of the custom attribute definition and its corresponding custom attributes. This value
can be a simple key, which is the key that is provided when the custom attribute definition
is created, or a qualified key, if the requesting
application is not the definition owner. The qualified key consists of the application ID
of the custom attribute definition owner
followed by the simple key that was provided when the definition was created. It has the
format application_id:simple key.

The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
underscores (_), and hyphens (-).

This field can not be changed
after the custom attribute definition is created. This field is required when creating
a definition and must be unique per application, seller, and resource type.
**Constraints**: *Minimum Length*: `1`, *Pattern*: `^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$` | +| `schema` | `Record \| null \| undefined` | Optional | The JSON schema for the custom attribute definition, which determines the data type of the corresponding custom attributes. For more information,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). This field is required when creating a definition. | +| `name` | `string \| null \| undefined` | Optional | The name of the custom attribute definition for API and seller-facing UI purposes. The name must
be unique within the seller and application pair. This field is required if the
`visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
**Constraints**: *Maximum Length*: `255` | +| `description` | `string \| null \| undefined` | Optional | Seller-oriented description of the custom attribute definition, including any constraints
that the seller should observe. May be displayed as a tooltip in Square UIs. This field is
required if the `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
**Constraints**: *Maximum Length*: `255` | | `visibility` | [`string \| undefined`](../../doc/models/custom-attribute-definition-visibility.md) | Optional | The level of permission that a seller or other applications requires to
view this custom attribute definition.
The `Visibility` field controls who can read and write the custom attribute values
and custom attribute definition. | | `version` | `number \| undefined` | Optional | Read only. The current version of the custom attribute definition.
The value is incremented each time the custom attribute definition is updated.
When updating a custom attribute definition, you can provide this field
and specify the current version of the custom attribute definition to enable
[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).

On writes, this field must be set to the latest version. Stale writes are rejected.

This field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). | | `updatedAt` | `string \| undefined` | Optional | The timestamp that indicates when the custom attribute definition was created or most recently updated,
in RFC 3339 format. | diff --git a/doc/models/custom-attribute-filter.md b/doc/models/custom-attribute-filter.md index cd23207b..7e20916f 100644 --- a/doc/models/custom-attribute-filter.md +++ b/doc/models/custom-attribute-filter.md @@ -13,12 +13,12 @@ endpoint to search for items or item variations. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customAttributeDefinitionId` | `string \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`custom_attribute_definition_id` property value against the the specified id.
Exactly one of `custom_attribute_definition_id` or `key` must be specified. | -| `key` | `string \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`key` property value against the specified key.
Exactly one of `custom_attribute_definition_id` or `key` must be specified. | -| `stringFilter` | `string \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`string_value` property value against the specified text.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | +| `customAttributeDefinitionId` | `string \| null \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`custom_attribute_definition_id` property value against the the specified id.
Exactly one of `custom_attribute_definition_id` or `key` must be specified. | +| `key` | `string \| null \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`key` property value against the specified key.
Exactly one of `custom_attribute_definition_id` or `key` must be specified. | +| `stringFilter` | `string \| null \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`string_value` property value against the specified text.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | | `numberFilter` | [`Range \| undefined`](../../doc/models/range.md) | Optional | The range of a number value between the specified lower and upper bounds. | -| `selectionUidsFilter` | `string[] \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`selection_uid_values` values against the specified selection uids.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | -| `boolFilter` | `boolean \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`boolean_value` property values against the specified Boolean expression.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | +| `selectionUidsFilter` | `string[] \| null \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`selection_uid_values` values against the specified selection uids.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | +| `boolFilter` | `boolean \| null \| undefined` | Optional | A query expression to filter items or item variations by matching their custom attributes'
`boolean_value` property values against the specified Boolean expression.
Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified. | ## Example (as JSON) diff --git a/doc/models/custom-attribute.md b/doc/models/custom-attribute.md index 18299b68..0be26eed 100644 --- a/doc/models/custom-attribute.md +++ b/doc/models/custom-attribute.md @@ -12,8 +12,8 @@ A custom attribute value. Each custom attribute value has a corresponding | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `key` | `string \| undefined` | Optional | The identifier
of the custom attribute definition and its corresponding custom attributes. This value
can be a simple key, which is the key that is provided when the custom attribute definition
is created, or a qualified key, if the requesting
application is not the definition owner. The qualified key consists of the application ID
of the custom attribute definition owner
followed by the simple key that was provided when the definition was created. It has the
format application_id:simple key.

The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
underscores (_), and hyphens (-).
**Constraints**: *Minimum Length*: `1`, *Pattern*: `^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$` | -| `value` | `unknown \| undefined` | Optional | The value assigned to the custom attribute. It is validated against the custom
attribute definition's schema on write operations. For more information about custom
attribute values,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). | +| `key` | `string \| null \| undefined` | Optional | The identifier
of the custom attribute definition and its corresponding custom attributes. This value
can be a simple key, which is the key that is provided when the custom attribute definition
is created, or a qualified key, if the requesting
application is not the definition owner. The qualified key consists of the application ID
of the custom attribute definition owner
followed by the simple key that was provided when the definition was created. It has the
format application_id:simple key.

The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
underscores (_), and hyphens (-).
**Constraints**: *Minimum Length*: `1`, *Pattern*: `^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$` | +| `value` | `unknown \| null \| undefined` | Optional | The value assigned to the custom attribute. It is validated against the custom
attribute definition's schema on write operations. For more information about custom
attribute values,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). | | `version` | `number \| undefined` | Optional | Read only. The current version of the custom attribute. This field is incremented when the custom attribute is changed.
When updating an existing custom attribute value, you can provide this field
and specify the current version of the custom attribute to enable
[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).
This field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,
see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). | | `visibility` | [`string \| undefined`](../../doc/models/custom-attribute-definition-visibility.md) | Optional | The level of permission that a seller or other applications requires to
view this custom attribute definition.
The `Visibility` field controls who can read and write the custom attribute values
and custom attribute definition. | | `definition` | [`CustomAttributeDefinition \| undefined`](../../doc/models/custom-attribute-definition.md) | Optional | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | diff --git a/doc/models/customer-creation-source-filter.md b/doc/models/customer-creation-source-filter.md index 12d576fa..04e5bf3d 100644 --- a/doc/models/customer-creation-source-filter.md +++ b/doc/models/customer-creation-source-filter.md @@ -14,7 +14,7 @@ or excluded from, the result if they match at least one of the filter criteria. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `values` | [`string[] \| undefined`](../../doc/models/customer-creation-source.md) | Optional | The list of creation sources used as filtering criteria.
See [CustomerCreationSource](#type-customercreationsource) for possible values | +| `values` | [`string[] \| null \| undefined`](../../doc/models/customer-creation-source.md) | Optional | The list of creation sources used as filtering criteria.
See [CustomerCreationSource](#type-customercreationsource) for possible values | | `rule` | [`string \| undefined`](../../doc/models/customer-inclusion-exclusion.md) | Optional | Indicates whether customers should be included in, or excluded from,
the result set when they match the filtering criteria. | ## Example (as JSON) diff --git a/doc/models/customer-custom-attribute-filter-value.md b/doc/models/customer-custom-attribute-filter-value.md index b7c277bd..51859c88 100644 --- a/doc/models/customer-custom-attribute-filter-value.md +++ b/doc/models/customer-custom-attribute-filter-value.md @@ -18,7 +18,7 @@ of a customer-related [custom attribute](../../doc/models/custom-attribute.md). | `selection` | [`FilterValue \| undefined`](../../doc/models/filter-value.md) | Optional | A filter to select resources based on an exact field value. For any given
value, the value can only be in one property. Depending on the field, either
all properties can be set or only a subset will be available.

Refer to the documentation of the field. | | `date` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | | `number` | [`FloatNumberRange \| undefined`](../../doc/models/float-number-range.md) | Optional | Specifies a decimal number range. | -| `mBoolean` | `boolean \| undefined` | Optional | A filter for a query based on the value of a `Boolean`-type custom attribute. | +| `mBoolean` | `boolean \| null \| undefined` | Optional | A filter for a query based on the value of a `Boolean`-type custom attribute. | | `address` | [`CustomerAddressFilter \| undefined`](../../doc/models/customer-address-filter.md) | Optional | The customer address filter. This filter is used in a [CustomerCustomAttributeFilterValue](../../doc/models/customer-custom-attribute-filter-value.md) filter when
searching by an `Address`-type custom attribute. | ## Example (as JSON) diff --git a/doc/models/customer-custom-attribute-filters.md b/doc/models/customer-custom-attribute-filters.md index 382b3e0d..b17b6415 100644 --- a/doc/models/customer-custom-attribute-filters.md +++ b/doc/models/customer-custom-attribute-filters.md @@ -13,7 +13,7 @@ to search based on [custom attributes](../../doc/models/custom-attribute.md) tha | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `filters` | [`CustomerCustomAttributeFilter[] \| undefined`](../../doc/models/customer-custom-attribute-filter.md) | Optional | The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,
the `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters. | +| `filters` | [`CustomerCustomAttributeFilter[] \| null \| undefined`](../../doc/models/customer-custom-attribute-filter.md) | Optional | The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,
the `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters. | ## Example (as JSON) diff --git a/doc/models/customer-details.md b/doc/models/customer-details.md new file mode 100644 index 00000000..4e8a07f2 --- /dev/null +++ b/doc/models/customer-details.md @@ -0,0 +1,25 @@ + +# Customer Details + +Details about the customer making the payment. + +## Structure + +`CustomerDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customerInitiated` | `boolean \| null \| undefined` | Optional | Indicates whether the customer initiated the payment. | +| `sellerKeyedIn` | `boolean \| null \| undefined` | Optional | Indicates that the seller keyed in payment details on behalf of the customer.
This is used to flag a payment as Mail Order / Telephone Order (MOTO). | + +## Example (as JSON) + +```json +{ + "customer_initiated": false, + "seller_keyed_in": false +} +``` + diff --git a/doc/models/customer-preferences.md b/doc/models/customer-preferences.md index 2d4efc67..6ba15e69 100644 --- a/doc/models/customer-preferences.md +++ b/doc/models/customer-preferences.md @@ -11,7 +11,7 @@ Represents communication preferences for the customer profile. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `emailUnsubscribed` | `boolean \| undefined` | Optional | Indicates whether the customer has unsubscribed from marketing campaign emails. A value of `true` means that the customer chose to opt out of email marketing from the current Square seller or from all Square sellers. This value is read-only from the Customers API. | +| `emailUnsubscribed` | `boolean \| null \| undefined` | Optional | Indicates whether the customer has unsubscribed from marketing campaign emails. A value of `true` means that the customer chose to opt out of email marketing from the current Square seller or from all Square sellers. This value is read-only from the Customers API. | ## Example (as JSON) diff --git a/doc/models/customer-tax-ids.md b/doc/models/customer-tax-ids.md index bd50b361..cb662d37 100644 --- a/doc/models/customer-tax-ids.md +++ b/doc/models/customer-tax-ids.md @@ -12,7 +12,7 @@ For more information, see [Customer tax IDs](https://developer.squareup.com/docs | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `euVat` | `string \| undefined` | Optional | The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only.
**Constraints**: *Maximum Length*: `20` | +| `euVat` | `string \| null \| undefined` | Optional | The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only.
**Constraints**: *Maximum Length*: `20` | ## Example (as JSON) diff --git a/doc/models/customer-text-filter.md b/doc/models/customer-text-filter.md index 2d76650e..5b4ade8d 100644 --- a/doc/models/customer-text-filter.md +++ b/doc/models/customer-text-filter.md @@ -13,8 +13,8 @@ the filter can be case-sensitive. This filter can be exact or fuzzy, but it cann | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `exact` | `string \| undefined` | Optional | Use the exact filter to select customers whose attributes match exactly the specified query. | -| `fuzzy` | `string \| undefined` | Optional | Use the fuzzy filter to select customers whose attributes match the specified query
in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then
each query token must be matched somewhere in the searched attribute. For single token queries,
this is effectively the same behavior as a partial match operation. | +| `exact` | `string \| null \| undefined` | Optional | Use the exact filter to select customers whose attributes match exactly the specified query. | +| `fuzzy` | `string \| null \| undefined` | Optional | Use the fuzzy filter to select customers whose attributes match the specified query
in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then
each query token must be matched somewhere in the searched attribute. For single token queries,
this is effectively the same behavior as a partial match operation. | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 322839aa..1abc4502 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -14,21 +14,21 @@ Represents a Square customer profile in the Customer Directory of a Square selle | `id` | `string \| undefined` | Optional | A unique Square-assigned ID for the customer profile.

If you need this ID for an API request, use the ID returned when you created the customer profile or call the [SearchCustomers](api-endpoint:Customers-SearchCustomers)
or [ListCustomers](api-endpoint:Customers-ListCustomers) endpoint. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the customer profile was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the customer profile was last updated, in RFC 3339 format. | -| `cards` | [`Card[] \| undefined`](../../doc/models/card.md) | Optional | Payment details of the credit, debit, and gift cards stored on file for the customer profile.

DEPRECATED at version 2021-06-16. Replaced by calling [ListCards](api-endpoint:Cards-ListCards) (for credit and debit cards on file)
or [ListGiftCards](api-endpoint:GiftCards-ListGiftCards) (for gift cards on file) and including the `customer_id` query parameter.
For more information, see [Migration notes](https://developer.squareup.com/docs/customers-api/what-it-does#migrate-customer-cards). | -| `givenName` | `string \| undefined` | Optional | The given name (that is, the first name) associated with the customer profile. | -| `familyName` | `string \| undefined` | Optional | The family name (that is, the last name) associated with the customer profile. | -| `nickname` | `string \| undefined` | Optional | A nickname for the customer profile. | -| `companyName` | `string \| undefined` | Optional | A business name associated with the customer profile. | -| `emailAddress` | `string \| undefined` | Optional | The email address associated with the customer profile. | +| `cards` | [`Card[] \| null \| undefined`](../../doc/models/card.md) | Optional | Payment details of the credit, debit, and gift cards stored on file for the customer profile.

DEPRECATED at version 2021-06-16. Replaced by calling [ListCards](api-endpoint:Cards-ListCards) (for credit and debit cards on file)
or [ListGiftCards](api-endpoint:GiftCards-ListGiftCards) (for gift cards on file) and including the `customer_id` query parameter.
For more information, see [Migration notes](https://developer.squareup.com/docs/customers-api/what-it-does#migrate-customer-cards). | +| `givenName` | `string \| null \| undefined` | Optional | The given name (that is, the first name) associated with the customer profile. | +| `familyName` | `string \| null \| undefined` | Optional | The family name (that is, the last name) associated with the customer profile. | +| `nickname` | `string \| null \| undefined` | Optional | A nickname for the customer profile. | +| `companyName` | `string \| null \| undefined` | Optional | A business name associated with the customer profile. | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address associated with the customer profile. | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `phoneNumber` | `string \| undefined` | Optional | The phone number associated with the customer profile. | -| `birthday` | `string \| undefined` | Optional | The birthday associated with the customer profile, in `YYYY-MM-DD` format. For example, `1998-09-21`
represents September 21, 1998, and `0000-09-21` represents September 21 (without a birth year). | -| `referenceId` | `string \| undefined` | Optional | An optional second ID used to associate the customer profile with an
entity in another system. | -| `note` | `string \| undefined` | Optional | A custom note associated with the customer profile. | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number associated with the customer profile. | +| `birthday` | `string \| null \| undefined` | Optional | The birthday associated with the customer profile, in `YYYY-MM-DD` format. For example, `1998-09-21`
represents September 21, 1998, and `0000-09-21` represents September 21 (without a birth year). | +| `referenceId` | `string \| null \| undefined` | Optional | An optional second ID used to associate the customer profile with an
entity in another system. | +| `note` | `string \| null \| undefined` | Optional | A custom note associated with the customer profile. | | `preferences` | [`CustomerPreferences \| undefined`](../../doc/models/customer-preferences.md) | Optional | Represents communication preferences for the customer profile. | | `creationSource` | [`string \| undefined`](../../doc/models/customer-creation-source.md) | Optional | Indicates the method used to create the customer profile. | -| `groupIds` | `string[] \| undefined` | Optional | The IDs of [customer groups](entity:CustomerGroup) the customer belongs to. | -| `segmentIds` | `string[] \| undefined` | Optional | The IDs of [customer segments](entity:CustomerSegment) the customer belongs to. | +| `groupIds` | `string[] \| null \| undefined` | Optional | The IDs of [customer groups](entity:CustomerGroup) the customer belongs to. | +| `segmentIds` | `string[] \| null \| undefined` | Optional | The IDs of [customer segments](entity:CustomerSegment) the customer belongs to. | | `version` | `bigint \| undefined` | Optional | The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership and cards on file. | | `taxIds` | [`CustomerTaxIds \| undefined`](../../doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a [customer profile](../../doc/models/customer.md). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.
For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). | diff --git a/doc/models/date-range.md b/doc/models/date-range.md index 87465e54..d51d5071 100644 --- a/doc/models/date-range.md +++ b/doc/models/date-range.md @@ -12,8 +12,8 @@ objects that have date properties. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `startDate` | `string \| undefined` | Optional | A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601
extended format for calendar dates.
The beginning of a date range (inclusive). | -| `endDate` | `string \| undefined` | Optional | A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601
extended format for calendar dates.
The end of a date range (inclusive). | +| `startDate` | `string \| null \| undefined` | Optional | A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601
extended format for calendar dates.
The beginning of a date range (inclusive). | +| `endDate` | `string \| null \| undefined` | Optional | A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601
extended format for calendar dates.
The end of a date range (inclusive). | ## Example (as JSON) diff --git a/doc/models/deprecated-create-dispute-evidence-file-request.md b/doc/models/deprecated-create-dispute-evidence-file-request.md index eac3b672..3ae17a6f 100644 --- a/doc/models/deprecated-create-dispute-evidence-file-request.md +++ b/doc/models/deprecated-create-dispute-evidence-file-request.md @@ -13,7 +13,7 @@ Defines the parameters for a `DeprecatedCreateDisputeEvidenceFile` request. | --- | --- | --- | --- | | `idempotencyKey` | `string` | Required | The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | | `evidenceType` | [`string \| undefined`](../../doc/models/dispute-evidence-type.md) | Optional | The type of the dispute evidence. | -| `contentType` | `string \| undefined` | Optional | The MIME type of the uploaded file.
The type can be image/heic, image/heif, image/jpeg, application/pdf, image/png, or image/tiff.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `contentType` | `string \| null \| undefined` | Optional | The MIME type of the uploaded file.
The type can be image/heic, image/heif, image/jpeg, application/pdf, image/png, or image/tiff.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | ## Example (as JSON) diff --git a/doc/models/destination-details-card-refund-details.md b/doc/models/destination-details-card-refund-details.md index 65d5edd1..c776f257 100644 --- a/doc/models/destination-details-card-refund-details.md +++ b/doc/models/destination-details-card-refund-details.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `card` | [`Card \| undefined`](../../doc/models/card.md) | Optional | Represents the payment details of a card to be used for payments. These
details are determined by the payment token generated by Web Payments SDK. | -| `entryMethod` | `string \| undefined` | Optional | The method used to enter the card's details for the refund. The method can be
`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
**Constraints**: *Maximum Length*: `50` | +| `entryMethod` | `string \| null \| undefined` | Optional | The method used to enter the card's details for the refund. The method can be
`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
**Constraints**: *Maximum Length*: `50` | ## Example (as JSON) diff --git a/doc/models/device-checkout-options.md b/doc/models/device-checkout-options.md index b9378555..a5f49e3a 100644 --- a/doc/models/device-checkout-options.md +++ b/doc/models/device-checkout-options.md @@ -10,10 +10,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `deviceId` | `string` | Required | The unique ID of the device intended for this `TerminalCheckout`.
A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint.
Match a `DeviceCode.device_id` value with `device_id` to get the associated device code. | -| `skipReceiptScreen` | `boolean \| undefined` | Optional | Instructs the device to skip the receipt screen. Defaults to false. | -| `collectSignature` | `boolean \| undefined` | Optional | Indicates that signature collection is desired during checkout. Defaults to false. | +| `skipReceiptScreen` | `boolean \| null \| undefined` | Optional | Instructs the device to skip the receipt screen. Defaults to false. | +| `collectSignature` | `boolean \| null \| undefined` | Optional | Indicates that signature collection is desired during checkout. Defaults to false. | | `tipSettings` | [`TipSettings \| undefined`](../../doc/models/tip-settings.md) | Optional | - | -| `showItemizedCart` | `boolean \| undefined` | Optional | Show the itemization screen prior to taking a payment. This field is only meaningful when the
checkout includes an order ID. Defaults to true. | +| `showItemizedCart` | `boolean \| null \| undefined` | Optional | Show the itemization screen prior to taking a payment. This field is only meaningful when the
checkout includes an order ID. Defaults to true. | ## Example (as JSON) diff --git a/doc/models/device-code.md b/doc/models/device-code.md index 60ca8f42..05cc730e 100644 --- a/doc/models/device-code.md +++ b/doc/models/device-code.md @@ -10,11 +10,11 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The unique id for this device code. | -| `name` | `string \| undefined` | Optional | An optional user-defined name for the device code.
**Constraints**: *Maximum Length*: `128` | +| `name` | `string \| null \| undefined` | Optional | An optional user-defined name for the device code.
**Constraints**: *Maximum Length*: `128` | | `code` | `string \| undefined` | Optional | The unique code that can be used to login. | | `deviceId` | `string \| undefined` | Optional | The unique id of the device that used this code. Populated when the device is paired up. | | `productType` | `string` | Required, Constant | **Default**: `'TERMINAL_API'` | -| `locationId` | `string \| undefined` | Optional | The location assigned to this code.
**Constraints**: *Maximum Length*: `50` | +| `locationId` | `string \| null \| undefined` | Optional | The location assigned to this code.
**Constraints**: *Maximum Length*: `50` | | `status` | [`string \| undefined`](../../doc/models/device-code-status.md) | Optional | DeviceCode.Status enum. | | `pairBy` | `string \| undefined` | Optional | When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. | | `createdAt` | `string \| undefined` | Optional | When this DeviceCode was created. Timestamp in RFC 3339 format. | diff --git a/doc/models/device-details.md b/doc/models/device-details.md index d1598792..a41561a5 100644 --- a/doc/models/device-details.md +++ b/doc/models/device-details.md @@ -11,9 +11,9 @@ Details about the device that took the payment. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `deviceId` | `string \| undefined` | Optional | The Square-issued ID of the device.
**Constraints**: *Maximum Length*: `255` | -| `deviceInstallationId` | `string \| undefined` | Optional | The Square-issued installation ID for the device.
**Constraints**: *Maximum Length*: `255` | -| `deviceName` | `string \| undefined` | Optional | The name of the device set by the seller.
**Constraints**: *Maximum Length*: `255` | +| `deviceId` | `string \| null \| undefined` | Optional | The Square-issued ID of the device.
**Constraints**: *Maximum Length*: `255` | +| `deviceInstallationId` | `string \| null \| undefined` | Optional | The Square-issued installation ID for the device.
**Constraints**: *Maximum Length*: `255` | +| `deviceName` | `string \| null \| undefined` | Optional | The name of the device set by the seller.
**Constraints**: *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/device-metadata.md b/doc/models/device-metadata.md index f3bcf256..ab771b4d 100644 --- a/doc/models/device-metadata.md +++ b/doc/models/device-metadata.md @@ -9,18 +9,18 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `batteryPercentage` | `string \| undefined` | Optional | The Terminal’s remaining battery percentage, between 1-100. | -| `chargingState` | `string \| undefined` | Optional | The current charging state of the Terminal.
Options: `CHARGING`, `NOT_CHARGING` | -| `locationId` | `string \| undefined` | Optional | The ID of the Square seller business location associated with the Terminal. | -| `merchantId` | `string \| undefined` | Optional | The ID of the Square merchant account that is currently signed-in to the Terminal. | -| `networkConnectionType` | `string \| undefined` | Optional | The Terminal’s current network connection type.
Options: `WIFI`, `ETHERNET` | -| `paymentRegion` | `string \| undefined` | Optional | The country in which the Terminal is authorized to take payments. | -| `serialNumber` | `string \| undefined` | Optional | The unique identifier assigned to the Terminal, which can be found on the lower back
of the device. | -| `osVersion` | `string \| undefined` | Optional | The current version of the Terminal’s operating system. | -| `appVersion` | `string \| undefined` | Optional | The current version of the application running on the Terminal. | -| `wifiNetworkName` | `string \| undefined` | Optional | The name of the Wi-Fi network to which the Terminal is connected. | -| `wifiNetworkStrength` | `string \| undefined` | Optional | The signal strength of the Wi-FI network connection.
Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT` | -| `ipAddress` | `string \| undefined` | Optional | The IP address of the Terminal. | +| `batteryPercentage` | `string \| null \| undefined` | Optional | The Terminal’s remaining battery percentage, between 1-100. | +| `chargingState` | `string \| null \| undefined` | Optional | The current charging state of the Terminal.
Options: `CHARGING`, `NOT_CHARGING` | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the Square seller business location associated with the Terminal. | +| `merchantId` | `string \| null \| undefined` | Optional | The ID of the Square merchant account that is currently signed-in to the Terminal. | +| `networkConnectionType` | `string \| null \| undefined` | Optional | The Terminal’s current network connection type.
Options: `WIFI`, `ETHERNET` | +| `paymentRegion` | `string \| null \| undefined` | Optional | The country in which the Terminal is authorized to take payments. | +| `serialNumber` | `string \| null \| undefined` | Optional | The unique identifier assigned to the Terminal, which can be found on the lower back
of the device. | +| `osVersion` | `string \| null \| undefined` | Optional | The current version of the Terminal’s operating system. | +| `appVersion` | `string \| null \| undefined` | Optional | The current version of the application running on the Terminal. | +| `wifiNetworkName` | `string \| null \| undefined` | Optional | The name of the Wi-Fi network to which the Terminal is connected. | +| `wifiNetworkStrength` | `string \| null \| undefined` | Optional | The signal strength of the Wi-FI network connection.
Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT` | +| `ipAddress` | `string \| null \| undefined` | Optional | The IP address of the Terminal. | ## Example (as JSON) diff --git a/doc/models/device.md b/doc/models/device.md index 852d12fd..db220117 100644 --- a/doc/models/device.md +++ b/doc/models/device.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The device's Square-issued ID. | -| `name` | `string \| undefined` | Optional | The device's merchant-specified name. | +| `name` | `string \| null \| undefined` | Optional | The device's merchant-specified name. | ## Example (as JSON) diff --git a/doc/models/digital-wallet-details.md b/doc/models/digital-wallet-details.md index 93644716..358e8c24 100644 --- a/doc/models/digital-wallet-details.md +++ b/doc/models/digital-wallet-details.md @@ -11,8 +11,8 @@ Additional details about `WALLET` type payments. Contains only non-confidential | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `status` | `string \| undefined` | Optional | The status of the `WALLET` payment. The status can be `AUTHORIZED`, `CAPTURED`, `VOIDED`, or
`FAILED`.
**Constraints**: *Maximum Length*: `50` | -| `brand` | `string \| undefined` | Optional | The brand used for the `WALLET` payment. The brand can be `CASH_APP`, `PAYPAY` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | +| `status` | `string \| null \| undefined` | Optional | The status of the `WALLET` payment. The status can be `AUTHORIZED`, `CAPTURED`, `VOIDED`, or
`FAILED`.
**Constraints**: *Maximum Length*: `50` | +| `brand` | `string \| null \| undefined` | Optional | The brand used for the `WALLET` payment. The brand can be `CASH_APP`, `PAYPAY` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | | `cashAppDetails` | [`CashAppDetails \| undefined`](../../doc/models/cash-app-details.md) | Optional | Additional details about `WALLET` type payments with the `brand` of `CASH_APP`. | ## Example (as JSON) diff --git a/doc/models/dispute-evidence-file.md b/doc/models/dispute-evidence-file.md index cfeb0145..03066fb7 100644 --- a/doc/models/dispute-evidence-file.md +++ b/doc/models/dispute-evidence-file.md @@ -11,8 +11,8 @@ A file to be uploaded as dispute evidence. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `filename` | `string \| undefined` | Optional | The file name including the file extension. For example: "receipt.tiff".
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | -| `filetype` | `string \| undefined` | Optional | Dispute evidence files must be application/pdf, image/heic, image/heif, image/jpeg, image/png, or image/tiff formats.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `filename` | `string \| null \| undefined` | Optional | The file name including the file extension. For example: "receipt.tiff".
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `filetype` | `string \| null \| undefined` | Optional | Dispute evidence files must be application/pdf, image/heic, image/heif, image/jpeg, image/png, or image/tiff formats.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | ## Example (as JSON) diff --git a/doc/models/dispute-evidence.md b/doc/models/dispute-evidence.md index c831f248..81307739 100644 --- a/doc/models/dispute-evidence.md +++ b/doc/models/dispute-evidence.md @@ -9,12 +9,12 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `evidenceId` | `string \| undefined` | Optional | The Square-generated ID of the evidence.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `evidenceId` | `string \| null \| undefined` | Optional | The Square-generated ID of the evidence.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `id` | `string \| undefined` | Optional | The Square-generated ID of the evidence.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | -| `disputeId` | `string \| undefined` | Optional | The ID of the dispute the evidence is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `disputeId` | `string \| null \| undefined` | Optional | The ID of the dispute the evidence is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `evidenceFile` | [`DisputeEvidenceFile \| undefined`](../../doc/models/dispute-evidence-file.md) | Optional | A file to be uploaded as dispute evidence. | -| `evidenceText` | `string \| undefined` | Optional | Raw text
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500` | -| `uploadedAt` | `string \| undefined` | Optional | The time when the evidence was uploaded, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `evidenceText` | `string \| null \| undefined` | Optional | Raw text
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500` | +| `uploadedAt` | `string \| null \| undefined` | Optional | The time when the evidence was uploaded, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `evidenceType` | [`string \| undefined`](../../doc/models/dispute-evidence-type.md) | Optional | The type of the dispute evidence. | ## Example (as JSON) diff --git a/doc/models/dispute.md b/doc/models/dispute.md index 8b92fdae..c47b27c1 100644 --- a/doc/models/dispute.md +++ b/doc/models/dispute.md @@ -11,22 +11,22 @@ Represents a [dispute](https://developer.squareup.com/docs/disputes-api/overview | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `disputeId` | `string \| undefined` | Optional | The unique ID for this `Dispute`, generated by Square.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `disputeId` | `string \| null \| undefined` | Optional | The unique ID for this `Dispute`, generated by Square.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `id` | `string \| undefined` | Optional | The unique ID for this `Dispute`, generated by Square.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `reason` | [`string \| undefined`](../../doc/models/dispute-reason.md) | Optional | The list of possible reasons why a cardholder might initiate a
dispute with their bank. | | `state` | [`string \| undefined`](../../doc/models/dispute-state.md) | Optional | The list of possible dispute states. | -| `dueAt` | `string \| undefined` | Optional | The deadline by which the seller must respond to the dispute, in [RFC 3339 format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `dueAt` | `string \| null \| undefined` | Optional | The deadline by which the seller must respond to the dispute, in [RFC 3339 format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `disputedPayment` | [`DisputedPayment \| undefined`](../../doc/models/disputed-payment.md) | Optional | The payment the cardholder disputed. | -| `evidenceIds` | `string[] \| undefined` | Optional | The IDs of the evidence associated with the dispute. | +| `evidenceIds` | `string[] \| null \| undefined` | Optional | The IDs of the evidence associated with the dispute. | | `cardBrand` | [`string \| undefined`](../../doc/models/card-brand.md) | Optional | Indicates a card's brand, such as `VISA` or `MASTERCARD`. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the dispute was created, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the dispute was last updated, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | -| `brandDisputeId` | `string \| undefined` | Optional | The ID of the dispute in the card brand system, generated by the card brand.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | -| `reportedDate` | `string \| undefined` | Optional | The timestamp when the dispute was reported, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | -| `reportedAt` | `string \| undefined` | Optional | The timestamp when the dispute was reported, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `brandDisputeId` | `string \| null \| undefined` | Optional | The ID of the dispute in the card brand system, generated by the card brand.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `reportedDate` | `string \| null \| undefined` | Optional | The timestamp when the dispute was reported, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `reportedAt` | `string \| null \| undefined` | Optional | The timestamp when the dispute was reported, in RFC 3339 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | | `version` | `number \| undefined` | Optional | The current version of the `Dispute`. | -| `locationId` | `string \| undefined` | Optional | The ID of the location where the dispute originated.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location where the dispute originated.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | ## Example (as JSON) diff --git a/doc/models/disputed-payment.md b/doc/models/disputed-payment.md index 922cda30..1b1024ce 100644 --- a/doc/models/disputed-payment.md +++ b/doc/models/disputed-payment.md @@ -11,7 +11,7 @@ The payment the cardholder disputed. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | Square-generated unique ID of the payment being disputed.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `192` | +| `paymentId` | `string \| null \| undefined` | Optional | Square-generated unique ID of the payment being disputed.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/employee-wage.md b/doc/models/employee-wage.md index 5b323df4..46ee0f98 100644 --- a/doc/models/employee-wage.md +++ b/doc/models/employee-wage.md @@ -12,8 +12,8 @@ The hourly wage rate that an employee earns on a `Shift` for doing the job speci | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The UUID for this object. | -| `employeeId` | `string \| undefined` | Optional | The `Employee` that this wage is assigned to. | -| `title` | `string \| undefined` | Optional | The job title that this wage relates to. | +| `employeeId` | `string \| null \| undefined` | Optional | The `Employee` that this wage is assigned to. | +| `title` | `string \| null \| undefined` | Optional | The job title that this wage relates to. | | `hourlyRate` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/employee.md b/doc/models/employee.md index b943f53c..2badba89 100644 --- a/doc/models/employee.md +++ b/doc/models/employee.md @@ -12,13 +12,13 @@ An employee object that is used by the external API. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | UUID for this object. | -| `firstName` | `string \| undefined` | Optional | The employee's first name. | -| `lastName` | `string \| undefined` | Optional | The employee's last name. | -| `email` | `string \| undefined` | Optional | The employee's email address | -| `phoneNumber` | `string \| undefined` | Optional | The employee's phone number in E.164 format, i.e. "+12125554250" | -| `locationIds` | `string[] \| undefined` | Optional | A list of location IDs where this employee has access to. | +| `firstName` | `string \| null \| undefined` | Optional | The employee's first name. | +| `lastName` | `string \| null \| undefined` | Optional | The employee's last name. | +| `email` | `string \| null \| undefined` | Optional | The employee's email address | +| `phoneNumber` | `string \| null \| undefined` | Optional | The employee's phone number in E.164 format, i.e. "+12125554250" | +| `locationIds` | `string[] \| null \| undefined` | Optional | A list of location IDs where this employee has access to. | | `status` | [`string \| undefined`](../../doc/models/employee-status.md) | Optional | The status of the Employee being retrieved. | -| `isOwner` | `boolean \| undefined` | Optional | Whether this employee is the owner of the merchant. Each merchant
has one owner employee, and that employee has full authority over
the account. | +| `isOwner` | `boolean \| null \| undefined` | Optional | Whether this employee is the owner of the merchant. Each merchant
has one owner employee, and that employee has full authority over
the account. | | `createdAt` | `string \| undefined` | Optional | A read-only timestamp in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | A read-only timestamp in RFC 3339 format. | diff --git a/doc/models/event-data.md b/doc/models/event-data.md index 9175af01..65ca36cc 100644 --- a/doc/models/event-data.md +++ b/doc/models/event-data.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `type` | `string \| undefined` | Optional | Name of the affected object’s type. | +| `type` | `string \| null \| undefined` | Optional | Name of the affected object’s type. | | `id` | `string \| undefined` | Optional | ID of the affected object. | -| `deleted` | `boolean \| undefined` | Optional | Is true if the affected object was deleted. Otherwise absent. | -| `object` | `Record \| undefined` | Optional | An object containing fields and values relevant to the event. Is absent if affected object was deleted. | +| `deleted` | `boolean \| null \| undefined` | Optional | Is true if the affected object was deleted. Otherwise absent. | +| `object` | `Record \| null \| undefined` | Optional | An object containing fields and values relevant to the event. Is absent if affected object was deleted. | ## Example (as JSON) diff --git a/doc/models/event.md b/doc/models/event.md index d973f6c0..b7f16466 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `merchantId` | `string \| undefined` | Optional | The ID of the target merchant associated with the event. | -| `locationId` | `string \| undefined` | Optional | The ID of the location associated with the event. | -| `type` | `string \| undefined` | Optional | The type of event this represents. | -| `eventId` | `string \| undefined` | Optional | A unique ID for the event. | +| `merchantId` | `string \| null \| undefined` | Optional | The ID of the target merchant associated with the event. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location associated with the event. | +| `type` | `string \| null \| undefined` | Optional | The type of event this represents. | +| `eventId` | `string \| null \| undefined` | Optional | A unique ID for the event. | | `createdAt` | `string \| undefined` | Optional | Timestamp of when the event was created, in RFC 3339 format. | | `data` | [`EventData \| undefined`](../../doc/models/event-data.md) | Optional | - | diff --git a/doc/models/external-payment-details.md b/doc/models/external-payment-details.md index 1a0b767c..36e98236 100644 --- a/doc/models/external-payment-details.md +++ b/doc/models/external-payment-details.md @@ -15,7 +15,7 @@ For more information, see | --- | --- | --- | --- | | `type` | `string` | Required | The type of external payment the seller received. It can be one of the following:

- CHECK - Paid using a physical check.
- BANK_TRANSFER - Paid using external bank transfer.
- OTHER\_GIFT\_CARD - Paid using a non-Square gift card.
- CRYPTO - Paid using a crypto currency.
- SQUARE_CASH - Paid using Square Cash App.
- SOCIAL - Paid using peer-to-peer payment applications.
- EXTERNAL - A third-party application gathered this payment outside of Square.
- EMONEY - Paid using an E-money provider.
- CARD - A credit or debit card that Square does not support.
- STORED_BALANCE - Use for house accounts, store credit, and so forth.
- FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals
- OTHER - A type not listed here.
**Constraints**: *Maximum Length*: `50` | | `source` | `string` | Required | A description of the external payment source. For example,
"Food Delivery Service".
**Constraints**: *Maximum Length*: `255` | -| `sourceId` | `string \| undefined` | Optional | An ID to associate the payment to its originating source.
**Constraints**: *Maximum Length*: `255` | +| `sourceId` | `string \| null \| undefined` | Optional | An ID to associate the payment to its originating source.
**Constraints**: *Maximum Length*: `255` | | `sourceFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/filter-value.md b/doc/models/filter-value.md index dc5392f8..1e558944 100644 --- a/doc/models/filter-value.md +++ b/doc/models/filter-value.md @@ -15,9 +15,9 @@ Refer to the documentation of the field. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `all` | `string[] \| undefined` | Optional | A list of terms that must be present on the field of the resource. | -| `any` | `string[] \| undefined` | Optional | A list of terms where at least one of them must be present on the
field of the resource. | -| `none` | `string[] \| undefined` | Optional | A list of terms that must not be present on the field the resource | +| `all` | `string[] \| null \| undefined` | Optional | A list of terms that must be present on the field of the resource. | +| `any` | `string[] \| null \| undefined` | Optional | A list of terms where at least one of them must be present on the
field of the resource. | +| `none` | `string[] \| null \| undefined` | Optional | A list of terms that must not be present on the field the resource | ## Example (as JSON) diff --git a/doc/models/float-number-range.md b/doc/models/float-number-range.md index e4091341..dd0a8dec 100644 --- a/doc/models/float-number-range.md +++ b/doc/models/float-number-range.md @@ -11,8 +11,8 @@ Specifies a decimal number range. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `startAt` | `string \| undefined` | Optional | A decimal value indicating where the range starts. | -| `endAt` | `string \| undefined` | Optional | A decimal value indicating where the range ends. | +| `startAt` | `string \| null \| undefined` | Optional | A decimal value indicating where the range starts. | +| `endAt` | `string \| null \| undefined` | Optional | A decimal value indicating where the range ends. | ## Example (as JSON) diff --git a/doc/models/fulfillment-delivery-details.md b/doc/models/fulfillment-delivery-details.md index 691f608b..820e7e1b 100644 --- a/doc/models/fulfillment-delivery-details.md +++ b/doc/models/fulfillment-delivery-details.md @@ -14,26 +14,26 @@ Describes delivery details of an order fulfillment. | `recipient` | [`FulfillmentRecipient \| undefined`](../../doc/models/fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | | `scheduleType` | [`string \| undefined`](../../doc/models/fulfillment-delivery-details-order-fulfillment-delivery-details-schedule-type.md) | Optional | The schedule type of the delivery fulfillment. | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was placed.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").

Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z". | -| `deliverAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the delivery period.
When the fulfillment `schedule_type` is `ASAP`, the field is automatically
set to the current time plus the `prep_time_duration`.
Otherwise, the application can set this field while the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `prepTimeDuration` | `string \| undefined` | Optional | The duration of time it takes to prepare and deliver this fulfillment.
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | -| `deliveryWindowDuration` | `string \| undefined` | Optional | The time period after the `deliver_at` timestamp in which to deliver the order.
Applications can set this field when the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format (for example, "P1W3D"). | -| `note` | `string \| undefined` | Optional | Provides additional instructions about the delivery fulfillment.
It is displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `550` | -| `completedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller completed the fulfillment.
This field is automatically set when fulfillment `state` changes to `COMPLETED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `deliverAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the delivery period.
When the fulfillment `schedule_type` is `ASAP`, the field is automatically
set to the current time plus the `prep_time_duration`.
Otherwise, the application can set this field while the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | +| `prepTimeDuration` | `string \| null \| undefined` | Optional | The duration of time it takes to prepare and deliver this fulfillment.
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | +| `deliveryWindowDuration` | `string \| null \| undefined` | Optional | The time period after the `deliver_at` timestamp in which to deliver the order.
Applications can set this field when the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format (for example, "P1W3D"). | +| `note` | `string \| null \| undefined` | Optional | Provides additional instructions about the delivery fulfillment.
It is displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `550` | +| `completedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller completed the fulfillment.
This field is automatically set when fulfillment `state` changes to `COMPLETED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `inProgressAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller started processing the fulfillment.
This field is automatically set when the fulfillment `state` changes to `RESERVED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `rejectedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was rejected. This field is
automatically set when the fulfillment `state` changes to `FAILED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `readyAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the seller marked the fulfillment as ready for
courier pickup. This field is automatically set when the fulfillment `state` changes
to PREPARED.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `deliveredAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was delivered to the recipient.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was canceled. This field is automatically
set when the fulfillment `state` changes to `CANCELED`.

The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | The delivery cancellation reason. Max length: 100 characters.
**Constraints**: *Maximum Length*: `100` | -| `courierPickupAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when an order can be picked up by the courier for delivery.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `courierPickupWindowDuration` | `string \| undefined` | Optional | The period of time in which the order should be picked up by the courier after the
`courier_pickup_at` timestamp.
The time must be in RFC 3339 format (for example, "P1W3D"). | -| `isNoContactDelivery` | `boolean \| undefined` | Optional | Whether the delivery is preferred to be no contact. | -| `dropoffNotes` | `string \| undefined` | Optional | A note to provide additional instructions about how to deliver the order.
**Constraints**: *Maximum Length*: `550` | -| `courierProviderName` | `string \| undefined` | Optional | The name of the courier provider.
**Constraints**: *Maximum Length*: `255` | -| `courierSupportPhoneNumber` | `string \| undefined` | Optional | The support phone number of the courier.
**Constraints**: *Maximum Length*: `17` | -| `squareDeliveryId` | `string \| undefined` | Optional | The identifier for the delivery created by Square.
**Constraints**: *Maximum Length*: `50` | -| `externalDeliveryId` | `string \| undefined` | Optional | The identifier for the delivery created by the third-party courier service.
**Constraints**: *Maximum Length*: `50` | -| `managedDelivery` | `boolean \| undefined` | Optional | The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
we may not receive all recipient information for PII purposes. | +| `cancelReason` | `string \| null \| undefined` | Optional | The delivery cancellation reason. Max length: 100 characters.
**Constraints**: *Maximum Length*: `100` | +| `courierPickupAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when an order can be picked up by the courier for delivery.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `courierPickupWindowDuration` | `string \| null \| undefined` | Optional | The period of time in which the order should be picked up by the courier after the
`courier_pickup_at` timestamp.
The time must be in RFC 3339 format (for example, "P1W3D"). | +| `isNoContactDelivery` | `boolean \| null \| undefined` | Optional | Whether the delivery is preferred to be no contact. | +| `dropoffNotes` | `string \| null \| undefined` | Optional | A note to provide additional instructions about how to deliver the order.
**Constraints**: *Maximum Length*: `550` | +| `courierProviderName` | `string \| null \| undefined` | Optional | The name of the courier provider.
**Constraints**: *Maximum Length*: `255` | +| `courierSupportPhoneNumber` | `string \| null \| undefined` | Optional | The support phone number of the courier.
**Constraints**: *Maximum Length*: `17` | +| `squareDeliveryId` | `string \| null \| undefined` | Optional | The identifier for the delivery created by Square.
**Constraints**: *Maximum Length*: `50` | +| `externalDeliveryId` | `string \| null \| undefined` | Optional | The identifier for the delivery created by the third-party courier service.
**Constraints**: *Maximum Length*: `50` | +| `managedDelivery` | `boolean \| null \| undefined` | Optional | The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
we may not receive all recipient information for PII purposes. | ## Example (as JSON) diff --git a/doc/models/fulfillment-fulfillment-entry.md b/doc/models/fulfillment-fulfillment-entry.md index a5ed4a45..11eb6c8e 100644 --- a/doc/models/fulfillment-fulfillment-entry.md +++ b/doc/models/fulfillment-fulfillment-entry.md @@ -13,10 +13,10 @@ fulfill. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the fulfillment entry only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the fulfillment entry only within this order.
**Constraints**: *Maximum Length*: `60` | | `lineItemUid` | `string` | Required | The `uid` from the order line item.
**Constraints**: *Minimum Length*: `1` | | `quantity` | `string` | Required | The quantity of the line item being fulfilled, formatted as a decimal number.
For example, `"3"`.

Fulfillments for line items with a `quantity_unit` can have non-integer quantities.
For example, `"1.70000"`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12` | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this fulfillment entry. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this fulfillment entry. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | ## Example (as JSON) diff --git a/doc/models/fulfillment-pickup-details-curbside-pickup-details.md b/doc/models/fulfillment-pickup-details-curbside-pickup-details.md index 4adad113..0d05bf33 100644 --- a/doc/models/fulfillment-pickup-details-curbside-pickup-details.md +++ b/doc/models/fulfillment-pickup-details-curbside-pickup-details.md @@ -11,8 +11,8 @@ Specific details for curbside pickup. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `curbsideDetails` | `string \| undefined` | Optional | Specific details for curbside pickup, such as parking number and vehicle model.
**Constraints**: *Maximum Length*: `250` | -| `buyerArrivedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | +| `curbsideDetails` | `string \| null \| undefined` | Optional | Specific details for curbside pickup, such as parking number and vehicle model.
**Constraints**: *Maximum Length*: `250` | +| `buyerArrivedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | ## Example (as JSON) diff --git a/doc/models/fulfillment-pickup-details.md b/doc/models/fulfillment-pickup-details.md index 4ac07197..aed63297 100644 --- a/doc/models/fulfillment-pickup-details.md +++ b/doc/models/fulfillment-pickup-details.md @@ -12,13 +12,13 @@ Contains details necessary to fulfill a pickup order. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient` | [`FulfillmentRecipient \| undefined`](../../doc/models/fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | -| `expiresAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment expires if it is not accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set up to 7 days in the future.
If `expires_at` is not set, this pickup fulfillment is automatically accepted when
placed. | -| `autoCompleteDuration` | `string \| undefined` | Optional | The duration of time after which an open and accepted pickup fulfillment
is automatically moved to the `COMPLETED` state. The duration must be in RFC 3339
format (for example, "P1W3D").

If not set, this pickup fulfillment remains accepted until it is canceled or completed. | +| `expiresAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment expires if it is not accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set up to 7 days in the future.
If `expires_at` is not set, this pickup fulfillment is automatically accepted when
placed. | +| `autoCompleteDuration` | `string \| null \| undefined` | Optional | The duration of time after which an open and accepted pickup fulfillment
is automatically moved to the `COMPLETED` state. The duration must be in RFC 3339
format (for example, "P1W3D").

If not set, this pickup fulfillment remains accepted until it is canceled or completed. | | `scheduleType` | [`string \| undefined`](../../doc/models/fulfillment-pickup-details-schedule-type.md) | Optional | The schedule type of the pickup fulfillment. | -| `pickupAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,
"2016-09-04T23:59:33.123Z".

For fulfillments with the schedule type `ASAP`, this is automatically set
to the current time plus the expected duration to prepare the fulfillment. | -| `pickupWindowDuration` | `string \| undefined` | Optional | The window of time in which the order should be picked up after the `pickup_at` timestamp.
Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an
informational guideline for merchants. | -| `prepTimeDuration` | `string \| undefined` | Optional | The duration of time it takes to prepare this fulfillment.
The duration must be in RFC 3339 format (for example, "P1W3D"). | -| `note` | `string \| undefined` | Optional | A note to provide additional instructions about the pickup
fulfillment displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `500` | +| `pickupAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,
"2016-09-04T23:59:33.123Z".

For fulfillments with the schedule type `ASAP`, this is automatically set
to the current time plus the expected duration to prepare the fulfillment. | +| `pickupWindowDuration` | `string \| null \| undefined` | Optional | The window of time in which the order should be picked up after the `pickup_at` timestamp.
Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an
informational guideline for merchants. | +| `prepTimeDuration` | `string \| null \| undefined` | Optional | The duration of time it takes to prepare this fulfillment.
The duration must be in RFC 3339 format (for example, "P1W3D"). | +| `note` | `string \| null \| undefined` | Optional | A note to provide additional instructions about the pickup
fulfillment displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `500` | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `acceptedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `rejectedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | @@ -26,8 +26,8 @@ Contains details necessary to fulfill a pickup order. | `expiredAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment expired. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `pickedUpAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | A description of why the pickup was canceled. The maximum length: 100 characters.
**Constraints**: *Maximum Length*: `100` | -| `isCurbsidePickup` | `boolean \| undefined` | Optional | If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup. | +| `cancelReason` | `string \| null \| undefined` | Optional | A description of why the pickup was canceled. The maximum length: 100 characters.
**Constraints**: *Maximum Length*: `100` | +| `isCurbsidePickup` | `boolean \| null \| undefined` | Optional | If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup. | | `curbsidePickupDetails` | [`FulfillmentPickupDetailsCurbsidePickupDetails \| undefined`](../../doc/models/fulfillment-pickup-details-curbside-pickup-details.md) | Optional | Specific details for curbside pickup. | ## Example (as JSON) diff --git a/doc/models/fulfillment-recipient.md b/doc/models/fulfillment-recipient.md index 02c38ca3..4cbb1dc0 100644 --- a/doc/models/fulfillment-recipient.md +++ b/doc/models/fulfillment-recipient.md @@ -11,10 +11,10 @@ Information about the fulfillment recipient. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customerId` | `string \| undefined` | Optional | The ID of the customer associated with the fulfillment.

If `customer_id` is provided, the fulfillment recipient's `display_name`,
`email_address`, and `phone_number` are automatically populated from the
targeted customer profile. If these fields are set in the request, the request
values override the information from the customer profile. If the
targeted customer profile does not contain the necessary information and
these fields are left unset, the request results in an error.
**Constraints**: *Maximum Length*: `191` | -| `displayName` | `string \| undefined` | Optional | The display name of the fulfillment recipient. This field is required.

If provided, the display name overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | -| `emailAddress` | `string \| undefined` | Optional | The email address of the fulfillment recipient.

If provided, the email address overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | -| `phoneNumber` | `string \| undefined` | Optional | The phone number of the fulfillment recipient. This field is required.

If provided, the phone number overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `17` | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the customer associated with the fulfillment.

If `customer_id` is provided, the fulfillment recipient's `display_name`,
`email_address`, and `phone_number` are automatically populated from the
targeted customer profile. If these fields are set in the request, the request
values override the information from the customer profile. If the
targeted customer profile does not contain the necessary information and
these fields are left unset, the request results in an error.
**Constraints**: *Maximum Length*: `191` | +| `displayName` | `string \| null \| undefined` | Optional | The display name of the fulfillment recipient. This field is required.

If provided, the display name overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address of the fulfillment recipient.

If provided, the email address overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number of the fulfillment recipient. This field is required.

If provided, the phone number overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `17` | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | ## Example (as JSON) diff --git a/doc/models/fulfillment-shipment-details.md b/doc/models/fulfillment-shipment-details.md index d854b35f..7755f854 100644 --- a/doc/models/fulfillment-shipment-details.md +++ b/doc/models/fulfillment-shipment-details.md @@ -12,20 +12,20 @@ Contains the details necessary to fulfill a shipment order. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient` | [`FulfillmentRecipient \| undefined`](../../doc/models/fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | -| `carrier` | `string \| undefined` | Optional | The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
**Constraints**: *Maximum Length*: `50` | -| `shippingNote` | `string \| undefined` | Optional | A note with additional information for the shipping carrier.
**Constraints**: *Maximum Length*: `500` | -| `shippingType` | `string \| undefined` | Optional | A description of the type of shipping product purchased from the carrier
(such as First Class, Priority, or Express).
**Constraints**: *Maximum Length*: `50` | -| `trackingNumber` | `string \| undefined` | Optional | The reference number provided by the carrier to track the shipment's progress.
**Constraints**: *Maximum Length*: `100` | -| `trackingUrl` | `string \| undefined` | Optional | A link to the tracking webpage on the carrier's website.
**Constraints**: *Maximum Length*: `2000` | +| `carrier` | `string \| null \| undefined` | Optional | The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
**Constraints**: *Maximum Length*: `50` | +| `shippingNote` | `string \| null \| undefined` | Optional | A note with additional information for the shipping carrier.
**Constraints**: *Maximum Length*: `500` | +| `shippingType` | `string \| null \| undefined` | Optional | A description of the type of shipping product purchased from the carrier
(such as First Class, Priority, or Express).
**Constraints**: *Maximum Length*: `50` | +| `trackingNumber` | `string \| null \| undefined` | Optional | The reference number provided by the carrier to track the shipment's progress.
**Constraints**: *Maximum Length*: `100` | +| `trackingUrl` | `string \| null \| undefined` | Optional | A link to the tracking webpage on the carrier's website.
**Constraints**: *Maximum Length*: `2000` | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment was requested. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `inProgressAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation
of this shipment has begun. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `packagedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `PREPARED` state, which indicates that the
fulfillment is packaged. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `expectedShippedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment is expected to be delivered to the shipping carrier.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `expectedShippedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment is expected to be delivered to the shipping carrier.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `shippedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `COMPLETED` state, which indicates that
the fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating the shipment was canceled.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | A description of why the shipment was canceled.
**Constraints**: *Maximum Length*: `100` | +| `canceledAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating the shipment was canceled.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `cancelReason` | `string \| null \| undefined` | Optional | A description of why the shipment was canceled.
**Constraints**: *Maximum Length*: `100` | | `failedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `failureReason` | `string \| undefined` | Optional | A description of why the shipment failed to be completed.
**Constraints**: *Maximum Length*: `100` | +| `failureReason` | `string \| null \| undefined` | Optional | A description of why the shipment failed to be completed.
**Constraints**: *Maximum Length*: `100` | ## Example (as JSON) diff --git a/doc/models/fulfillment.md b/doc/models/fulfillment.md index 1e0b1ee7..9aeafa52 100644 --- a/doc/models/fulfillment.md +++ b/doc/models/fulfillment.md @@ -13,12 +13,12 @@ However, orders returned by the Orders API might contain multiple fulfillments b | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order.
**Constraints**: *Maximum Length*: `60` | | `type` | [`string \| undefined`](../../doc/models/fulfillment-type.md) | Optional | The type of fulfillment. | | `state` | [`string \| undefined`](../../doc/models/fulfillment-state.md) | Optional | The current state of this fulfillment. | | `lineItemApplication` | [`string \| undefined`](../../doc/models/fulfillment-fulfillment-line-item-application.md) | Optional | The `line_item_application` describes what order line items this fulfillment applies
to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries. | | `entries` | [`FulfillmentFulfillmentEntry[] \| undefined`](../../doc/models/fulfillment-fulfillment-entry.md) | Optional | A list of entries pertaining to the fulfillment of an order. Each entry must reference
a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to
fulfill.

Multiple entries can reference the same line item `uid`, as long as the total quantity among
all fulfillment entries referencing a single line item does not exceed the quantity of the
order's line item itself.

An order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,
`CANCELED`, or `FAILED`. Fulfillments can be created and completed independently
before order completion. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this fulfillment. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this fulfillment. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `pickupDetails` | [`FulfillmentPickupDetails \| undefined`](../../doc/models/fulfillment-pickup-details.md) | Optional | Contains details necessary to fulfill a pickup order. | | `shipmentDetails` | [`FulfillmentShipmentDetails \| undefined`](../../doc/models/fulfillment-shipment-details.md) | Optional | Contains the details necessary to fulfill a shipment order. | | `deliveryDetails` | [`FulfillmentDeliveryDetails \| undefined`](../../doc/models/fulfillment-delivery-details.md) | Optional | Describes delivery details of an order fulfillment. | diff --git a/doc/models/gift-card-activity-activate.md b/doc/models/gift-card-activity-activate.md index f531b625..a853cd8a 100644 --- a/doc/models/gift-card-activity-activate.md +++ b/doc/models/gift-card-activity-activate.md @@ -12,10 +12,10 @@ Represents details about an `ACTIVATE` [gift card activity type](../../doc/model | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `orderId` | `string \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.

Applications that use the Square Orders API to process orders must specify the order ID
[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | -| `lineItemUid` | `string \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.

Applications that use the Square Orders API to process orders must specify the line item UID
in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom order processing system can use this field to track information
related to an order or payment. | -| `buyerPaymentInstrumentIds` | `string[] \| undefined` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID
or bank account ID.

Applications that use a custom order processing system must specify payment instrument IDs in
the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
Square uses this information to perform compliance checks.

For applications that use the Square Orders API to process payments, Square has the necessary
instrument IDs to perform compliance checks. | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.

Applications that use the Square Orders API to process orders must specify the order ID
[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | +| `lineItemUid` | `string \| null \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.

Applications that use the Square Orders API to process orders must specify the line item UID
in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom order processing system can use this field to track information
related to an order or payment. | +| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID
or bank account ID.

Applications that use a custom order processing system must specify payment instrument IDs in
the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
Square uses this information to perform compliance checks.

For applications that use the Square Orders API to process payments, Square has the necessary
instrument IDs to perform compliance checks. | ## Example (as JSON) diff --git a/doc/models/gift-card-activity-load.md b/doc/models/gift-card-activity-load.md index 9e4be49e..03ea1347 100644 --- a/doc/models/gift-card-activity-load.md +++ b/doc/models/gift-card-activity-load.md @@ -12,10 +12,10 @@ Represents details about a `LOAD` [gift card activity type](../../doc/models/gif | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `orderId` | `string \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.

Applications that use the Square Orders API to process orders must specify the order ID in the
[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | -| `lineItemUid` | `string \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.

Applications that use the Square Orders API to process orders must specify the line item UID
in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom order processing system can use this field to track information related to
an order or payment. | -| `buyerPaymentInstrumentIds` | `string[] \| undefined` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID
or bank account ID.

Applications that use a custom order processing system must specify payment instrument IDs in
the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
Square uses this information to perform compliance checks.

For applications that use the Square Orders API to process payments, Square has the necessary
instrument IDs to perform compliance checks. | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.

Applications that use the Square Orders API to process orders must specify the order ID in the
[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | +| `lineItemUid` | `string \| null \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.

Applications that use the Square Orders API to process orders must specify the line item UID
in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom order processing system can use this field to track information related to
an order or payment. | +| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID
or bank account ID.

Applications that use a custom order processing system must specify payment instrument IDs in
the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
Square uses this information to perform compliance checks.

For applications that use the Square Orders API to process payments, Square has the necessary
instrument IDs to perform compliance checks. | ## Example (as JSON) diff --git a/doc/models/gift-card-activity-redeem.md b/doc/models/gift-card-activity-redeem.md index 71186ac6..ac18d673 100644 --- a/doc/models/gift-card-activity-redeem.md +++ b/doc/models/gift-card-activity-redeem.md @@ -13,7 +13,7 @@ Represents details about a `REDEEM` [gift card activity type](../../doc/models/g | --- | --- | --- | --- | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `paymentId` | `string \| undefined` | Optional | The ID of the payment that represents the gift card redemption. Square populates this field
if the payment was processed by Square. | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom payment processing system can use this field to track information
related to an order or payment. | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.

Applications that use a custom payment processing system can use this field to track information
related to an order or payment. | | `status` | [`string \| undefined`](../../doc/models/gift-card-activity-redeem-status.md) | Optional | Indicates the status of a [gift card](../../doc/models/gift-card.md) redemption. This status is relevant only for
redemptions made from Square products (such as Square Point of Sale) because Square products use a
two-state process. Gift cards redeemed using the Gift Card Activities API always have a `COMPLETED` status. | ## Example (as JSON) diff --git a/doc/models/gift-card-activity-refund.md b/doc/models/gift-card-activity-refund.md index 20677f1a..80477de1 100644 --- a/doc/models/gift-card-activity-refund.md +++ b/doc/models/gift-card-activity-refund.md @@ -11,9 +11,9 @@ Represents details about a `REFUND` [gift card activity type](../../doc/models/g | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `redeemActivityId` | `string \| undefined` | Optional | The ID of the refunded `REDEEM` gift card activity. Square populates this field if the
`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request
represents a redemption made by the same gift card. Note that you must use `RefundPayment`
to refund a gift card payment to the same gift card if the payment was processed by Square.

For applications that use a custom payment processing system, this field is required when creating
a `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card. | +| `redeemActivityId` | `string \| null \| undefined` | Optional | The ID of the refunded `REDEEM` gift card activity. Square populates this field if the
`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request
represents a redemption made by the same gift card. Note that you must use `RefundPayment`
to refund a gift card payment to the same gift card if the payment was processed by Square.

For applications that use a custom payment processing system, this field is required when creating
a `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card. | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. | | `paymentId` | `string \| undefined` | Optional | The ID of the refunded payment. Square populates this field if the refund is for a
payment processed by Square and one of the following conditions is true:

- The Refunds API is used to refund a gift card payment to the same gift card.
- A seller initiated the refund from Square Point of Sale or the Seller Dashboard. The payment source can be the
same gift card or a cross-tender payment from a credit card or a different gift card. | ## Example (as JSON) diff --git a/doc/models/gift-card-activity-unlinked-activity-refund.md b/doc/models/gift-card-activity-unlinked-activity-refund.md index da467051..2909b883 100644 --- a/doc/models/gift-card-activity-unlinked-activity-refund.md +++ b/doc/models/gift-card-activity-unlinked-activity-refund.md @@ -12,7 +12,7 @@ Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type] | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. | | `paymentId` | `string \| undefined` | Optional | The ID of the refunded payment. This field is not used starting in Square version 2022-06-16. | ## Example (as JSON) diff --git a/doc/models/gift-card-activity.md b/doc/models/gift-card-activity.md index 1658ef78..f928abd4 100644 --- a/doc/models/gift-card-activity.md +++ b/doc/models/gift-card-activity.md @@ -17,8 +17,8 @@ includes a `redeem_activity_details` field that contains information about the r | `type` | [`string`](../../doc/models/gift-card-activity-type.md) | Required | Indicates the type of [gift card activity](../../doc/models/gift-card-activity.md). | | `locationId` | `string` | Required | The ID of the [business location](entity:Location) where the activity occurred. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the gift card activity was created, in RFC 3339 format. | -| `giftCardId` | `string \| undefined` | Optional | The gift card ID. When creating a gift card activity, `gift_card_id` is not required if
`gift_card_gan` is specified. | -| `giftCardGan` | `string \| undefined` | Optional | The gift card account number (GAN). When creating a gift card activity, `gift_card_gan`
is not required if `gift_card_id` is specified. | +| `giftCardId` | `string \| null \| undefined` | Optional | The gift card ID. When creating a gift card activity, `gift_card_id` is not required if
`gift_card_gan` is specified. | +| `giftCardGan` | `string \| null \| undefined` | Optional | The gift card account number (GAN). When creating a gift card activity, `gift_card_gan`
is not required if `gift_card_id` is specified. | | `giftCardBalanceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `loadActivityDetails` | [`GiftCardActivityLoad \| undefined`](../../doc/models/gift-card-activity-load.md) | Optional | Represents details about a `LOAD` [gift card activity type](../../doc/models/gift-card-activity-type.md). | | `activateActivityDetails` | [`GiftCardActivityActivate \| undefined`](../../doc/models/gift-card-activity-activate.md) | Optional | Represents details about an `ACTIVATE` [gift card activity type](../../doc/models/gift-card-activity-type.md). | diff --git a/doc/models/gift-card.md b/doc/models/gift-card.md index e02bf498..f7fc3b13 100644 --- a/doc/models/gift-card.md +++ b/doc/models/gift-card.md @@ -16,7 +16,7 @@ Represents a Square gift card. | `ganSource` | [`string \| undefined`](../../doc/models/gift-card-gan-source.md) | Optional | Indicates the source that generated the gift card
account number (GAN). | | `state` | [`string \| undefined`](../../doc/models/gift-card-status.md) | Optional | Indicates the gift card state. | | `balanceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `gan` | `string \| undefined` | Optional | The gift card account number (GAN). Buyers can use the GAN to make purchases or check
the gift card balance. | +| `gan` | `string \| null \| undefined` | Optional | The gift card account number (GAN). Buyers can use the GAN to make purchases or check
the gift card balance. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the gift card was created, in RFC 3339 format.
In the case of a digital gift card, it is the time when you create a card
(using the Square Point of Sale application, Seller Dashboard, or Gift Cards API).
In the case of a plastic gift card, it is the time when Square associates the card with the
seller at the time of activation. | | `customerIds` | `string[] \| undefined` | Optional | The IDs of the [customer profiles](entity:Customer) to whom this gift card is linked. | diff --git a/doc/models/inventory-adjustment.md b/doc/models/inventory-adjustment.md index 4255a9c2..1764d7bc 100644 --- a/doc/models/inventory-adjustment.md +++ b/doc/models/inventory-adjustment.md @@ -13,19 +13,19 @@ particular time and location. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique ID generated by Square for the
`InventoryAdjustment`.
**Constraints**: *Maximum Length*: `100` | -| `referenceId` | `string \| undefined` | Optional | An optional ID provided by the application to tie the
`InventoryAdjustment` to an external
system.
**Constraints**: *Maximum Length*: `255` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional ID provided by the application to tie the
`InventoryAdjustment` to an external
system.
**Constraints**: *Maximum Length*: `255` | | `fromState` | [`string \| undefined`](../../doc/models/inventory-state.md) | Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | | `toState` | [`string \| undefined`](../../doc/models/inventory-state.md) | Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | -| `locationId` | `string \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectId` | `string \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectType` | `string \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | -| `quantity` | `string \| undefined` | Optional | The number of items affected by the adjustment as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | +| `locationId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectType` | `string \| null \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | +| `quantity` | `string \| null \| undefined` | Optional | The number of items affected by the adjustment as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | | `totalPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `occurredAt` | `string \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the inventory adjustment took place. For inventory adjustment updates, the `occurred_at`
timestamp cannot be older than 24 hours or in the future relative to the
time of the request.
**Constraints**: *Maximum Length*: `34` | +| `occurredAt` | `string \| null \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the inventory adjustment took place. For inventory adjustment updates, the `occurred_at`
timestamp cannot be older than 24 hours or in the future relative to the
time of the request.
**Constraints**: *Maximum Length*: `34` | | `createdAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.
**Constraints**: *Maximum Length*: `34` | | `source` | [`SourceApplication \| undefined`](../../doc/models/source-application.md) | Optional | Represents information about the application used to generate a change. | -| `employeeId` | `string \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
inventory adjustment.
**Constraints**: *Maximum Length*: `100` | -| `teamMemberId` | `string \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
inventory adjustment.
**Constraints**: *Maximum Length*: `100` | +| `employeeId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
inventory adjustment.
**Constraints**: *Maximum Length*: `100` | +| `teamMemberId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
inventory adjustment.
**Constraints**: *Maximum Length*: `100` | | `transactionId` | `string \| undefined` | Optional | The Square-generated ID of the [Transaction](entity:Transaction) that
caused the adjustment. Only relevant for payment-related state
transitions.
**Constraints**: *Maximum Length*: `255` | | `refundId` | `string \| undefined` | Optional | The Square-generated ID of the [Refund](entity:Refund) that
caused the adjustment. Only relevant for refund-related state
transitions.
**Constraints**: *Maximum Length*: `255` | | `purchaseOrderId` | `string \| undefined` | Optional | The Square-generated ID of the purchase order that caused the
adjustment. Only relevant for state transitions from the Square for Retail
app.
**Constraints**: *Maximum Length*: `100` | diff --git a/doc/models/inventory-count.md b/doc/models/inventory-count.md index 10a547b2..c440121c 100644 --- a/doc/models/inventory-count.md +++ b/doc/models/inventory-count.md @@ -13,11 +13,11 @@ inventory adjustments. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `catalogObjectId` | `string \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectType` | `string \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectType` | `string \| null \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | | `state` | [`string \| undefined`](../../doc/models/inventory-state.md) | Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | -| `locationId` | `string \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | -| `quantity` | `string \| undefined` | Optional | The number of items affected by the estimated count as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | +| `locationId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | +| `quantity` | `string \| null \| undefined` | Optional | The number of items affected by the estimated count as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | | `calculatedAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting
the estimated count is received.
**Constraints**: *Maximum Length*: `34` | | `isEstimated` | `boolean \| undefined` | Optional | Whether the inventory count is for composed variation (TRUE) or not (FALSE). If true, the inventory count will not be present in the response of
any of these endpoints: [BatchChangeInventory](../../doc/api/inventory.md#batch-change-inventory),
[BatchRetrieveInventoryChanges](../../doc/api/inventory.md#batch-retrieve-inventory-changes),
[BatchRetrieveInventoryCounts](../../doc/api/inventory.md#batch-retrieve-inventory-counts), and
[RetrieveInventoryChanges](../../doc/api/inventory.md#retrieve-inventory-changes). | diff --git a/doc/models/inventory-physical-count.md b/doc/models/inventory-physical-count.md index 68709f4f..e6badd51 100644 --- a/doc/models/inventory-physical-count.md +++ b/doc/models/inventory-physical-count.md @@ -15,16 +15,16 @@ hand or from syncing with an external system. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique Square-generated ID for the
[InventoryPhysicalCount](entity:InventoryPhysicalCount).
**Constraints**: *Maximum Length*: `100` | -| `referenceId` | `string \| undefined` | Optional | An optional ID provided by the application to tie the
[InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external
system.
**Constraints**: *Maximum Length*: `255` | -| `catalogObjectId` | `string \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectType` | `string \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional ID provided by the application to tie the
[InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external
system.
**Constraints**: *Maximum Length*: `255` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectType` | `string \| null \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | | `state` | [`string \| undefined`](../../doc/models/inventory-state.md) | Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | -| `locationId` | `string \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | -| `quantity` | `string \| undefined` | Optional | The number of items affected by the physical count as a decimal string.
The number can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | +| `locationId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items is being tracked.
**Constraints**: *Maximum Length*: `100` | +| `quantity` | `string \| null \| undefined` | Optional | The number of items affected by the physical count as a decimal string.
The number can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | | `source` | [`SourceApplication \| undefined`](../../doc/models/source-application.md) | Optional | Represents information about the application used to generate a change. | -| `employeeId` | `string \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
physical count.
**Constraints**: *Maximum Length*: `100` | -| `teamMemberId` | `string \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
physical count.
**Constraints**: *Maximum Length*: `100` | -| `occurredAt` | `string \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the physical count was examined. For physical count updates, the `occurred_at`
timestamp cannot be older than 24 hours or in the future relative to the
time of the request.
**Constraints**: *Maximum Length*: `34` | +| `employeeId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
physical count.
**Constraints**: *Maximum Length*: `100` | +| `teamMemberId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
physical count.
**Constraints**: *Maximum Length*: `100` | +| `occurredAt` | `string \| null \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the physical count was examined. For physical count updates, the `occurred_at`
timestamp cannot be older than 24 hours or in the future relative to the
time of the request.
**Constraints**: *Maximum Length*: `34` | | `createdAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when the physical count is received.
**Constraints**: *Maximum Length*: `34` | ## Example (as JSON) diff --git a/doc/models/inventory-transfer.md b/doc/models/inventory-transfer.md index da21ce00..7a9f41f2 100644 --- a/doc/models/inventory-transfer.md +++ b/doc/models/inventory-transfer.md @@ -13,18 +13,18 @@ particular time from one location to another. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique ID generated by Square for the
`InventoryTransfer`.
**Constraints**: *Maximum Length*: `100` | -| `referenceId` | `string \| undefined` | Optional | An optional ID provided by the application to tie the
`InventoryTransfer` to an external system.
**Constraints**: *Maximum Length*: `255` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional ID provided by the application to tie the
`InventoryTransfer` to an external system.
**Constraints**: *Maximum Length*: `255` | | `state` | [`string \| undefined`](../../doc/models/inventory-state.md) | Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | -| `fromLocationId` | `string \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items was tracked before the transfer.
**Constraints**: *Maximum Length*: `100` | -| `toLocationId` | `string \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items was tracked after the transfer.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectId` | `string \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | -| `catalogObjectType` | `string \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | -| `quantity` | `string \| undefined` | Optional | The number of items affected by the transfer as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | -| `occurredAt` | `string \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the transfer took place. For write actions, the `occurred_at` timestamp
cannot be older than 24 hours or in the future relative to the time of the
request.
**Constraints**: *Maximum Length*: `34` | +| `fromLocationId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items was tracked before the transfer.
**Constraints**: *Maximum Length*: `100` | +| `toLocationId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Location](entity:Location) where the related
quantity of items was tracked after the transfer.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
**Constraints**: *Maximum Length*: `100` | +| `catalogObjectType` | `string \| null \| undefined` | Optional | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.

The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
**Constraints**: *Maximum Length*: `14` | +| `quantity` | `string \| null \| undefined` | Optional | The number of items affected by the transfer as a decimal string.
Can support up to 5 digits after the decimal point.
**Constraints**: *Maximum Length*: `26` | +| `occurredAt` | `string \| null \| undefined` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when
the transfer took place. For write actions, the `occurred_at` timestamp
cannot be older than 24 hours or in the future relative to the time of the
request.
**Constraints**: *Maximum Length*: `34` | | `createdAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when Square
received the transfer request.
**Constraints**: *Maximum Length*: `34` | | `source` | [`SourceApplication \| undefined`](../../doc/models/source-application.md) | Optional | Represents information about the application used to generate a change. | -| `employeeId` | `string \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
inventory transfer.
**Constraints**: *Maximum Length*: `100` | -| `teamMemberId` | `string \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
inventory transfer.
**Constraints**: *Maximum Length*: `100` | +| `employeeId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Employee](entity:Employee) responsible for the
inventory transfer.
**Constraints**: *Maximum Length*: `100` | +| `teamMemberId` | `string \| null \| undefined` | Optional | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
inventory transfer.
**Constraints**: *Maximum Length*: `100` | ## Example (as JSON) diff --git a/doc/models/invoice-accepted-payment-methods.md b/doc/models/invoice-accepted-payment-methods.md index 5d164e2e..19a4550d 100644 --- a/doc/models/invoice-accepted-payment-methods.md +++ b/doc/models/invoice-accepted-payment-methods.md @@ -11,11 +11,11 @@ The payment methods that customers can use to pay an [invoice](../../doc/models/ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `card` | `boolean \| undefined` | Optional | Indicates whether credit card or debit card payments are accepted. The default value is `false`. | -| `squareGiftCard` | `boolean \| undefined` | Optional | Indicates whether Square gift card payments are accepted. The default value is `false`. | -| `bankAccount` | `boolean \| undefined` | Optional | Indicates whether ACH bank transfer payments are accepted. The default value is `false`. | -| `buyNowPayLater` | `boolean \| undefined` | Optional | Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.

This option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is
supported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay
invoice payments are supported. As a best practice, consider enabling an additional payment method when allowing
`buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see
[Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). | -| `cashAppPay` | `boolean \| undefined` | Optional | Indicates whether Cash App payments are accepted. The default value is `false`.

This payment method is supported only for seller [locations](entity:Location) in the United States. | +| `card` | `boolean \| null \| undefined` | Optional | Indicates whether credit card or debit card payments are accepted. The default value is `false`. | +| `squareGiftCard` | `boolean \| null \| undefined` | Optional | Indicates whether Square gift card payments are accepted. The default value is `false`. | +| `bankAccount` | `boolean \| null \| undefined` | Optional | Indicates whether ACH bank transfer payments are accepted. The default value is `false`. | +| `buyNowPayLater` | `boolean \| null \| undefined` | Optional | Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.

This option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is
supported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay
invoice payments are supported. As a best practice, consider enabling an additional payment method when allowing
`buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see
[Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). | +| `cashAppPay` | `boolean \| null \| undefined` | Optional | Indicates whether Cash App payments are accepted. The default value is `false`.

This payment method is supported only for seller [locations](entity:Location) in the United States. | ## Example (as JSON) diff --git a/doc/models/invoice-custom-field.md b/doc/models/invoice-custom-field.md index a7fcea75..d227ecb3 100644 --- a/doc/models/invoice-custom-field.md +++ b/doc/models/invoice-custom-field.md @@ -15,8 +15,8 @@ Adding custom fields to an invoice requires an | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `label` | `string \| undefined` | Optional | The label or title of the custom field. This field is required for a custom field.
**Constraints**: *Maximum Length*: `30` | -| `value` | `string \| undefined` | Optional | The text of the custom field. If omitted, only the label is rendered.
**Constraints**: *Maximum Length*: `2000` | +| `label` | `string \| null \| undefined` | Optional | The label or title of the custom field. This field is required for a custom field.
**Constraints**: *Maximum Length*: `30` | +| `value` | `string \| null \| undefined` | Optional | The text of the custom field. If omitted, only the label is rendered.
**Constraints**: *Maximum Length*: `2000` | | `placement` | [`string \| undefined`](../../doc/models/invoice-custom-field-placement.md) | Optional | Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF
copies of the invoice. | ## Example (as JSON) diff --git a/doc/models/invoice-filter.md b/doc/models/invoice-filter.md index 938eaff6..caf91ee2 100644 --- a/doc/models/invoice-filter.md +++ b/doc/models/invoice-filter.md @@ -12,7 +12,7 @@ Describes query filters to apply. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `locationIds` | `string[]` | Required | Limits the search to the specified locations. A location is required.
In the current implementation, only one location can be specified. | -| `customerIds` | `string[] \| undefined` | Optional | Limits the search to the specified customers, within the specified locations.
Specifying a customer is optional. In the current implementation,
a maximum of one customer can be specified. | +| `customerIds` | `string[] \| null \| undefined` | Optional | Limits the search to the specified customers, within the specified locations.
Specifying a customer is optional. In the current implementation,
a maximum of one customer can be specified. | ## Example (as JSON) diff --git a/doc/models/invoice-payment-reminder.md b/doc/models/invoice-payment-reminder.md index c65f0bc2..bf457423 100644 --- a/doc/models/invoice-payment-reminder.md +++ b/doc/models/invoice-payment-reminder.md @@ -14,8 +14,8 @@ to the customer. You configure a reminder relative to the payment request | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `string \| undefined` | Optional | A Square-assigned ID that uniquely identifies the reminder within the
`InvoicePaymentRequest`. | -| `relativeScheduledDays` | `number \| undefined` | Optional | The number of days before (a negative number) or after (a positive number)
the payment request `due_date` when the reminder is sent. For example, -3 indicates that
the reminder should be sent 3 days before the payment request `due_date`.
**Constraints**: `>= -32767`, `<= 32767` | -| `message` | `string \| undefined` | Optional | The reminder message.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1000` | +| `relativeScheduledDays` | `number \| null \| undefined` | Optional | The number of days before (a negative number) or after (a positive number)
the payment request `due_date` when the reminder is sent. For example, -3 indicates that
the reminder should be sent 3 days before the payment request `due_date`.
**Constraints**: `>= -32767`, `<= 32767` | +| `message` | `string \| null \| undefined` | Optional | The reminder message.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1000` | | `status` | [`string \| undefined`](../../doc/models/invoice-payment-reminder-status.md) | Optional | The status of a payment request reminder. | | `sentAt` | `string \| undefined` | Optional | If sent, the timestamp when the reminder was sent, in RFC 3339 format. | diff --git a/doc/models/invoice-payment-request.md b/doc/models/invoice-payment-request.md index 00ee73f4..0d9efea3 100644 --- a/doc/models/invoice-payment-request.md +++ b/doc/models/invoice-payment-request.md @@ -16,16 +16,16 @@ Adding `INSTALLMENT` payment requests to an invoice requires an | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | The Square-generated ID of the payment request in an [invoice](entity:Invoice).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | The Square-generated ID of the payment request in an [invoice](entity:Invoice).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | | `requestMethod` | [`string \| undefined`](../../doc/models/invoice-request-method.md) | Optional | Specifies the action for Square to take for processing the invoice. For example,
email the invoice, charge a customer's card on file, or do nothing. DEPRECATED at
version 2021-01-21. The corresponding `request_method` field is replaced by the
`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields. | | `requestType` | [`string \| undefined`](../../doc/models/invoice-request-type.md) | Optional | Indicates the type of the payment request. For more information, see
[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). | -| `dueDate` | `string \| undefined` | Optional | The due date (in the invoice's time zone) for the payment request, in `YYYY-MM-DD` format. This field
is required to create a payment request. If an `automatic_payment_source` is defined for the request, Square
charges the payment source on this date.

After this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`
of America/Los\_Angeles becomes overdue at midnight on March 9 in America/Los\_Angeles (which equals a UTC
timestamp of 2021-03-10T08:00:00Z). | +| `dueDate` | `string \| null \| undefined` | Optional | The due date (in the invoice's time zone) for the payment request, in `YYYY-MM-DD` format. This field
is required to create a payment request. If an `automatic_payment_source` is defined for the request, Square
charges the payment source on this date.

After this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`
of America/Los\_Angeles becomes overdue at midnight on March 9 in America/Los\_Angeles (which equals a UTC
timestamp of 2021-03-10T08:00:00Z). | | `fixedAmountRequestedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `percentageRequested` | `string \| undefined` | Optional | Specifies the amount for the payment request in percentage:

- When the payment `request_type` is `DEPOSIT`, it is the percentage of the order's total amount.
- When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order's total less
the deposit, if requested. The sum of the `percentage_requested` in all installment
payment requests must be equal to 100.

You cannot specify this when the payment `request_type` is `BALANCE` or when the
payment request specifies the `fixed_amount_requested_money` field. | -| `tippingEnabled` | `boolean \| undefined` | Optional | If set to true, the Square-hosted invoice page (the `public_url` field of the invoice)
provides a place for the customer to pay a tip.

This field is allowed only on the final payment request
and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. | +| `percentageRequested` | `string \| null \| undefined` | Optional | Specifies the amount for the payment request in percentage:

- When the payment `request_type` is `DEPOSIT`, it is the percentage of the order's total amount.
- When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order's total less
the deposit, if requested. The sum of the `percentage_requested` in all installment
payment requests must be equal to 100.

You cannot specify this when the payment `request_type` is `BALANCE` or when the
payment request specifies the `fixed_amount_requested_money` field. | +| `tippingEnabled` | `boolean \| null \| undefined` | Optional | If set to true, the Square-hosted invoice page (the `public_url` field of the invoice)
provides a place for the customer to pay a tip.

This field is allowed only on the final payment request
and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. | | `automaticPaymentSource` | [`string \| undefined`](../../doc/models/invoice-automatic-payment-source.md) | Optional | Indicates the automatic payment method for an [invoice payment request](../../doc/models/invoice-payment-request.md). | -| `cardId` | `string \| undefined` | Optional | The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer,
call [ListCards](api-endpoint:Cards-ListCards) and include the `customer_id` of the invoice recipient.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `reminders` | [`InvoicePaymentReminder[] \| undefined`](../../doc/models/invoice-payment-reminder.md) | Optional | A list of one or more reminders to send for the payment request. | +| `cardId` | `string \| null \| undefined` | Optional | The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer,
call [ListCards](api-endpoint:Cards-ListCards) and include the `customer_id` of the invoice recipient.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `reminders` | [`InvoicePaymentReminder[] \| null \| undefined`](../../doc/models/invoice-payment-reminder.md) | Optional | A list of one or more reminders to send for the payment request. | | `computedAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalCompletedAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `roundingAdjustmentIncludedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/invoice-recipient.md b/doc/models/invoice-recipient.md index baf92a00..dfe5637a 100644 --- a/doc/models/invoice-recipient.md +++ b/doc/models/invoice-recipient.md @@ -16,7 +16,7 @@ Square updates the customer ID in response to a merge operation, but does not up | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customerId` | `string \| undefined` | Optional | The ID of the customer. This is the customer profile ID that
you provide when creating a draft invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the customer. This is the customer profile ID that
you provide when creating a draft invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | | `givenName` | `string \| undefined` | Optional | The recipient's given (that is, first) name. | | `familyName` | `string \| undefined` | Optional | The recipient's family (that is, last) name. | | `emailAddress` | `string \| undefined` | Optional | The recipient's email address. | diff --git a/doc/models/invoice.md b/doc/models/invoice.md index 742095c6..1639fca9 100644 --- a/doc/models/invoice.md +++ b/doc/models/invoice.md @@ -14,15 +14,15 @@ invoices. For more information, see [Invoices API Overview](https://developer.sq | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-assigned ID of the invoice. | | `version` | `number \| undefined` | Optional | The Square-assigned version number, which is incremented each time an update is committed to the invoice. | -| `locationId` | `string \| undefined` | Optional | The ID of the location that this invoice is associated with.

If specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `orderId` | `string \| undefined` | Optional | The ID of the [order](entity:Order) for which the invoice is created.
This field is required when creating an invoice, and the order must be in the `OPEN` state.

To view the line items and other information for the associated order, call the
[RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the order ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location that this invoice is associated with.

If specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) for which the invoice is created.
This field is required when creating an invoice, and the order must be in the `OPEN` state.

To view the line items and other information for the associated order, call the
[RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the order ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | | `primaryRecipient` | [`InvoiceRecipient \| undefined`](../../doc/models/invoice-recipient.md) | Optional | Represents a snapshot of customer data. This object stores customer data that is displayed on the invoice
and that Square uses to deliver the invoice.

When you provide a customer ID for a draft invoice, Square retrieves the associated customer profile and populates
the remaining `InvoiceRecipient` fields. You cannot update these fields after the invoice is published.
Square updates the customer ID in response to a merge operation, but does not update other fields. | -| `paymentRequests` | [`InvoicePaymentRequest[] \| undefined`](../../doc/models/invoice-payment-request.md) | Optional | The payment schedule for the invoice, represented by one or more payment requests that
define payment settings, such as amount due and due date. An invoice supports the following payment request combinations:

- One balance
- One deposit with one balance
- 2–12 installments
- One deposit with 2–12 installments

This field is required when creating an invoice. It must contain at least one payment request.
All payment requests for the invoice must equal the total order amount. For more information, see
[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).

Adding `INSTALLMENT` payment requests to an invoice requires an
[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). | +| `paymentRequests` | [`InvoicePaymentRequest[] \| null \| undefined`](../../doc/models/invoice-payment-request.md) | Optional | The payment schedule for the invoice, represented by one or more payment requests that
define payment settings, such as amount due and due date. An invoice supports the following payment request combinations:

- One balance
- One deposit with one balance
- 2–12 installments
- One deposit with 2–12 installments

This field is required when creating an invoice. It must contain at least one payment request.
All payment requests for the invoice must equal the total order amount. For more information, see
[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).

Adding `INSTALLMENT` payment requests to an invoice requires an
[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). | | `deliveryMethod` | [`string \| undefined`](../../doc/models/invoice-delivery-method.md) | Optional | Indicates how Square delivers the [invoice](../../doc/models/invoice.md) to the customer. | -| `invoiceNumber` | `string \| undefined` | Optional | A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.
If not provided when creating an invoice, Square assigns a value.
It increments from 1 and is padded with zeros making it 7 characters long
(for example, 0000001 and 0000002).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `191` | -| `title` | `string \| undefined` | Optional | The title of the invoice, which is displayed on the invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `description` | `string \| undefined` | Optional | The description of the invoice, which is displayed on the invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `65536` | -| `scheduledAt` | `string \| undefined` | Optional | The timestamp when the invoice is scheduled for processing, in RFC 3339 format.
After the invoice is published, Square processes the invoice on the specified date,
according to the delivery method and payment request settings.

If the field is not set, Square processes the invoice immediately after it is published. | +| `invoiceNumber` | `string \| null \| undefined` | Optional | A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.
If not provided when creating an invoice, Square assigns a value.
It increments from 1 and is padded with zeros making it 7 characters long
(for example, 0000001 and 0000002).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `191` | +| `title` | `string \| null \| undefined` | Optional | The title of the invoice, which is displayed on the invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `description` | `string \| null \| undefined` | Optional | The description of the invoice, which is displayed on the invoice.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `65536` | +| `scheduledAt` | `string \| null \| undefined` | Optional | The timestamp when the invoice is scheduled for processing, in RFC 3339 format.
After the invoice is published, Square processes the invoice on the specified date,
according to the delivery method and payment request settings.

If the field is not set, Square processes the invoice immediately after it is published. | | `publicUrl` | `string \| undefined` | Optional | The URL of the Square-hosted invoice page.
After you publish the invoice using the `PublishInvoice` endpoint, Square hosts the invoice
page and returns the page URL in the response. | | `nextPaymentAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `status` | [`string \| undefined`](../../doc/models/invoice-status.md) | Optional | Indicates the status of an invoice. | @@ -30,11 +30,11 @@ invoices. For more information, see [Invoices API Overview](https://developer.sq | `createdAt` | `string \| undefined` | Optional | The timestamp when the invoice was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the invoice was last updated, in RFC 3339 format. | | `acceptedPaymentMethods` | [`InvoiceAcceptedPaymentMethods \| undefined`](../../doc/models/invoice-accepted-payment-methods.md) | Optional | The payment methods that customers can use to pay an [invoice](../../doc/models/invoice.md) on the Square-hosted invoice payment page. | -| `customFields` | [`InvoiceCustomField[] \| undefined`](../../doc/models/invoice-custom-field.md) | Optional | Additional seller-defined fields that are displayed on the invoice. For more information, see
[Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).

Adding custom fields to an invoice requires an
[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).

Max: 2 custom fields | +| `customFields` | [`InvoiceCustomField[] \| null \| undefined`](../../doc/models/invoice-custom-field.md) | Optional | Additional seller-defined fields that are displayed on the invoice. For more information, see
[Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).

Adding custom fields to an invoice requires an
[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).

Max: 2 custom fields | | `subscriptionId` | `string \| undefined` | Optional | The ID of the [subscription](entity:Subscription) associated with the invoice.
This field is present only on subscription billing invoices. | -| `saleOrServiceDate` | `string \| undefined` | Optional | The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.
This field can be used to specify a past or future date which is displayed on the invoice. | -| `paymentConditions` | `string \| undefined` | Optional | **France only.** The payment terms and conditions that are displayed on the invoice. For more information,
see [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).

For countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and
"Payment conditions are not supported for this location's country" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | -| `storePaymentMethodEnabled` | `boolean \| undefined` | Optional | Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a
bank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the
invoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`. | +| `saleOrServiceDate` | `string \| null \| undefined` | Optional | The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.
This field can be used to specify a past or future date which is displayed on the invoice. | +| `paymentConditions` | `string \| null \| undefined` | Optional | **France only.** The payment terms and conditions that are displayed on the invoice. For more information,
see [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).

For countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and
"Payment conditions are not supported for this location's country" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | +| `storePaymentMethodEnabled` | `boolean \| null \| undefined` | Optional | Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a
bank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the
invoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`. | ## Example (as JSON) diff --git a/doc/models/item-variation-location-overrides.md b/doc/models/item-variation-location-overrides.md index 060aa4e9..ee633a6b 100644 --- a/doc/models/item-variation-location-overrides.md +++ b/doc/models/item-variation-location-overrides.md @@ -11,12 +11,12 @@ Price and inventory alerting overrides for a `CatalogItemVariation` at a specifi | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | Optional | The ID of the `Location`. This can include locations that are deactivated. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the `Location`. This can include locations that are deactivated. | | `priceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `pricingType` | [`string \| undefined`](../../doc/models/catalog-pricing-type.md) | Optional | Indicates whether the price of a CatalogItemVariation should be entered manually at the time of sale. | -| `trackInventory` | `boolean \| undefined` | Optional | If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`. | +| `trackInventory` | `boolean \| null \| undefined` | Optional | If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`. | | `inventoryAlertType` | [`string \| undefined`](../../doc/models/inventory-alert-type.md) | Optional | Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low. | -| `inventoryAlertThreshold` | `bigint \| undefined` | Optional | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.

This value is always an integer. | +| `inventoryAlertThreshold` | `bigint \| null \| undefined` | Optional | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.

This value is always an integer. | | `soldOut` | `boolean \| undefined` | Optional | Indicates whether the overridden item variation is sold out at the specified location.

When inventory tracking is enabled on the item variation either globally or at the specified location,
the item variation is automatically marked as sold out when its inventory count reaches zero. The seller
can manually set the item variation as sold out even when the inventory count is greater than zero.
Attempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,
applications should treat its inventory count as zero when this attribute value is `true`. | | `soldOutValidUntil` | `string \| undefined` | Optional | The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation
becomes available again at the specified location. Attempts by an application to set this attribute are ignored.
When the current time is later than this attribute value, the affected item variation is no longer sold out. | diff --git a/doc/models/job-assignment.md b/doc/models/job-assignment.md index b4e6e5d5..87745c9b 100644 --- a/doc/models/job-assignment.md +++ b/doc/models/job-assignment.md @@ -15,7 +15,7 @@ An object describing a job that a team member is assigned to. | `payType` | [`string`](../../doc/models/job-assignment-pay-type.md) | Required | Enumerates the possible pay types that a job can be assigned. | | `hourlyRate` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `annualRate` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `weeklyHours` | `number \| undefined` | Optional | The planned hours per week for the job. Set if the job `PayType` is `SALARY`. | +| `weeklyHours` | `number \| null \| undefined` | Optional | The planned hours per week for the job. Set if the job `PayType` is `SALARY`. | ## Example (as JSON) diff --git a/doc/models/list-bank-accounts-request.md b/doc/models/list-bank-accounts-request.md index b6a5a08d..cd5344c0 100644 --- a/doc/models/list-bank-accounts-request.md +++ b/doc/models/list-bank-accounts-request.md @@ -12,9 +12,9 @@ objects linked to a account. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | 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` | Optional | Location ID. You can specify this optional filter
to retrieve only the linked bank accounts belonging to a specific location. | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | Optional | Location ID. You can specify this optional filter
to retrieve only the linked bank accounts belonging to a specific location. | ## Example (as JSON) diff --git a/doc/models/list-booking-custom-attribute-definitions-request.md b/doc/models/list-booking-custom-attribute-definitions-request.md index ac04a08f..baf4ac64 100644 --- a/doc/models/list-booking-custom-attribute-definitions-request.md +++ b/doc/models/list-booking-custom-attribute-definitions-request.md @@ -11,8 +11,8 @@ Represents a [ListBookingCustomAttributeDefinitions](../../doc/api/booking-custo | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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). | ## Example (as JSON) diff --git a/doc/models/list-booking-custom-attributes-request.md b/doc/models/list-booking-custom-attributes-request.md index 6dbece83..4e7598f1 100644 --- a/doc/models/list-booking-custom-attributes-request.md +++ b/doc/models/list-booking-custom-attributes-request.md @@ -11,9 +11,9 @@ Represents a [ListBookingCustomAttributes](../../doc/api/booking-custom-attribut | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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` | 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`. | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/list-bookings-request.md b/doc/models/list-bookings-request.md index 726751f3..83ebd37b 100644 --- a/doc/models/list-bookings-request.md +++ b/doc/models/list-bookings-request.md @@ -9,12 +9,13 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | Optional | The maximum number of results per page to return in a paged response.
**Constraints**: `>= 1`, `<= 10000` | -| `cursor` | `string \| undefined` | 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.
**Constraints**: *Maximum Length*: `65536` | -| `teamMemberId` | `string \| undefined` | Optional | The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved.
**Constraints**: *Maximum Length*: `32` | -| `locationId` | `string \| undefined` | Optional | The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved.
**Constraints**: *Maximum Length*: `32` | -| `startAtMin` | `string \| undefined` | 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` | 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. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of results per page to return in a paged response.
**Constraints**: `>= 1`, `<= 10000` | +| `cursor` | `string \| null \| undefined` | 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.
**Constraints**: *Maximum Length*: `65536` | +| `customerId` | `string \| null \| undefined` | Optional | The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved.
**Constraints**: *Maximum Length*: `192` | +| `teamMemberId` | `string \| null \| undefined` | Optional | The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved.
**Constraints**: *Maximum Length*: `32` | +| `locationId` | `string \| null \| undefined` | Optional | The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved.
**Constraints**: *Maximum Length*: `32` | +| `startAtMin` | `string \| null \| undefined` | Optional | The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used. | +| `startAtMax` | `string \| null \| undefined` | 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. | ## Example (as JSON) @@ -22,9 +23,9 @@ { "limit": 172, "cursor": "cursor6", + "customer_id": "customer_id8", "team_member_id": "team_member_id0", - "location_id": "location_id4", - "start_at_min": "start_at_min8" + "location_id": "location_id4" } ``` diff --git a/doc/models/list-break-types-request.md b/doc/models/list-break-types-request.md index f158402f..2f7d1b42 100644 --- a/doc/models/list-break-types-request.md +++ b/doc/models/list-break-types-request.md @@ -11,9 +11,9 @@ A request for a filtered set of `BreakType` objects. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | Optional | Filter the returned `BreakType` results to only those that are associated with the
specified location. | -| `limit` | `number \| undefined` | Optional | The maximum number of `BreakType` results to return per page. The number can range between 1
and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | -| `cursor` | `string \| undefined` | Optional | A pointer to the next page of `BreakType` results to fetch. | +| `locationId` | `string \| null \| undefined` | Optional | Filter the returned `BreakType` results to only those that are associated with the
specified location. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of `BreakType` results to return per page. The number can range between 1
and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | +| `cursor` | `string \| null \| undefined` | Optional | A pointer to the next page of `BreakType` results to fetch. | ## Example (as JSON) diff --git a/doc/models/list-cards-request.md b/doc/models/list-cards-request.md index 82220421..69736b1d 100644 --- a/doc/models/list-cards-request.md +++ b/doc/models/list-cards-request.md @@ -12,10 +12,10 @@ HTTP requests at GET https://connect.squareup.com/v2/cards | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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.
**Constraints**: *Maximum Length*: `256` | -| `customerId` | `string \| undefined` | Optional | Limit results to cards associated with the customer supplied.
By default, all cards owned by the merchant are returned. | -| `includeDisabled` | `boolean \| undefined` | Optional | Includes disabled cards.
By default, all enabled cards owned by the merchant are returned. | -| `referenceId` | `string \| undefined` | Optional | Limit results to cards associated with the reference_id supplied. | +| `cursor` | `string \| null \| undefined` | 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.
**Constraints**: *Maximum Length*: `256` | +| `customerId` | `string \| null \| undefined` | Optional | Limit results to cards associated with the customer supplied.
By default, all cards owned by the merchant are returned. | +| `includeDisabled` | `boolean \| null \| undefined` | Optional | Includes disabled cards.
By default, all enabled cards owned by the merchant are returned. | +| `referenceId` | `string \| null \| undefined` | Optional | Limit results to cards associated with the reference_id supplied. | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | ## Example (as JSON) diff --git a/doc/models/list-cash-drawer-shift-events-request.md b/doc/models/list-cash-drawer-shift-events-request.md index f00440c6..72f6f87b 100644 --- a/doc/models/list-cash-drawer-shift-events-request.md +++ b/doc/models/list-cash-drawer-shift-events-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `locationId` | `string` | Required | The ID of the location to list cash drawer shifts for.
**Constraints**: *Minimum Length*: `1` | -| `limit` | `number \| undefined` | Optional | Number of resources to be returned in a page of results (200 by
default, 1000 max).
**Constraints**: `<= 1000` | -| `cursor` | `string \| undefined` | Optional | Opaque cursor for fetching the next page of results. | +| `limit` | `number \| null \| undefined` | Optional | Number of resources to be returned in a page of results (200 by
default, 1000 max).
**Constraints**: `<= 1000` | +| `cursor` | `string \| null \| undefined` | Optional | Opaque cursor for fetching the next page of results. | ## Example (as JSON) diff --git a/doc/models/list-cash-drawer-shifts-request.md b/doc/models/list-cash-drawer-shifts-request.md index 6a3c622b..5ca986e2 100644 --- a/doc/models/list-cash-drawer-shifts-request.md +++ b/doc/models/list-cash-drawer-shifts-request.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | | `locationId` | `string` | Required | The ID of the location to query for a list of cash drawer shifts.
**Constraints**: *Minimum Length*: `1` | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `beginTime` | `string \| undefined` | Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. | -| `endTime` | `string \| undefined` | Optional | The exclusive end date of the query on opened_at, in ISO 8601 format. | -| `limit` | `number \| undefined` | Optional | Number of cash drawer shift events in a page of results (200 by
default, 1000 max).
**Constraints**: `<= 1000` | -| `cursor` | `string \| undefined` | Optional | Opaque cursor for fetching the next page of results. | +| `beginTime` | `string \| null \| undefined` | Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. | +| `endTime` | `string \| null \| undefined` | Optional | The exclusive end date of the query on opened_at, in ISO 8601 format. | +| `limit` | `number \| null \| undefined` | Optional | Number of cash drawer shift events in a page of results (200 by
default, 1000 max).
**Constraints**: `<= 1000` | +| `cursor` | `string \| null \| undefined` | Optional | Opaque cursor for fetching the next page of results. | ## Example (as JSON) diff --git a/doc/models/list-catalog-request.md b/doc/models/list-catalog-request.md index d36fb5c3..04f5ddd6 100644 --- a/doc/models/list-catalog-request.md +++ b/doc/models/list-catalog-request.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | 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` | 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. | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/list-customer-custom-attribute-definitions-request.md b/doc/models/list-customer-custom-attribute-definitions-request.md index e6737e7d..fcc6fcb1 100644 --- a/doc/models/list-customer-custom-attribute-definitions-request.md +++ b/doc/models/list-customer-custom-attribute-definitions-request.md @@ -11,8 +11,8 @@ Represents a [ListCustomerCustomAttributeDefinitions](../../doc/api/customer-cus | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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). | ## Example (as JSON) diff --git a/doc/models/list-customer-custom-attributes-request.md b/doc/models/list-customer-custom-attributes-request.md index 406e73f8..2e17b3d7 100644 --- a/doc/models/list-customer-custom-attributes-request.md +++ b/doc/models/list-customer-custom-attributes-request.md @@ -11,9 +11,9 @@ Represents a [ListCustomerCustomAttributes](../../doc/api/customer-custom-attrib | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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` | 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`. | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/list-customer-groups-request.md b/doc/models/list-customer-groups-request.md index 45527ff7..e5261f10 100644 --- a/doc/models/list-customer-groups-request.md +++ b/doc/models/list-customer-groups-request.md @@ -12,8 +12,8 @@ Defines the query parameters that can be included in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | 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).
**Constraints**: `>= 1`, `<= 50` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 50` | ## Example (as JSON) diff --git a/doc/models/list-customer-segments-request.md b/doc/models/list-customer-segments-request.md index 804f9c83..66ab7966 100644 --- a/doc/models/list-customer-segments-request.md +++ b/doc/models/list-customer-segments-request.md @@ -11,8 +11,8 @@ Defines the valid parameters for requests to the `ListCustomerSegments` endpoint | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | 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).
**Constraints**: `>= 1`, `<= 50` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 50` | ## Example (as JSON) diff --git a/doc/models/list-customers-request.md b/doc/models/list-customers-request.md index 8dd9abe9..2093ee7a 100644 --- a/doc/models/list-customers-request.md +++ b/doc/models/list-customers-request.md @@ -12,11 +12,11 @@ Defines the query parameters that can be included in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | | `sortField` | [`string \| undefined`](../../doc/models/customer-sort-field.md) | Optional | Specifies customer attributes as the sort key to customer profiles returned from a search. | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `count` | `boolean \| undefined` | Optional | Indicates whether to return the total count of customers in the `count` field of the response.

The default value is `false`. | +| `count` | `boolean \| null \| undefined` | Optional | Indicates whether to return the total count of customers in the `count` field of the response.

The default value is `false`. | ## Example (as JSON) diff --git a/doc/models/list-device-codes-request.md b/doc/models/list-device-codes-request.md index 3e7fb677..8256dbfe 100644 --- a/doc/models/list-device-codes-request.md +++ b/doc/models/list-device-codes-request.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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` | Optional | If specified, only returns DeviceCodes of the specified location.
Returns DeviceCodes of all locations if empty. | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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) | Optional | - | -| `status` | [`string[] \| undefined`](../../doc/models/device-code-status.md) | Optional | If specified, returns DeviceCodes with the specified statuses.
Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.
See [DeviceCodeStatus](#type-devicecodestatus) for possible values | +| `status` | [`string[] \| null \| undefined`](../../doc/models/device-code-status.md) | Optional | If specified, returns DeviceCodes with the specified statuses.
Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.
See [DeviceCodeStatus](#type-devicecodestatus) for possible values | ## Example (as JSON) diff --git a/doc/models/list-dispute-evidence-request.md b/doc/models/list-dispute-evidence-request.md index ace8bcda..41a39218 100644 --- a/doc/models/list-dispute-evidence-request.md +++ b/doc/models/list-dispute-evidence-request.md @@ -11,7 +11,7 @@ Defines the parameters for a `ListDisputeEvidence` request. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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). | +| `cursor` | `string \| null \| undefined` | 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). | ## Example (as JSON) diff --git a/doc/models/list-disputes-request.md b/doc/models/list-disputes-request.md index aac83eff..44b022a5 100644 --- a/doc/models/list-disputes-request.md +++ b/doc/models/list-disputes-request.md @@ -11,9 +11,9 @@ Defines the request parameters for the `ListDisputes` endpoint. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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) | Optional | The dispute states used to filter the result. If not specified, the endpoint returns all disputes.
See [DisputeState](#type-disputestate) for possible values | -| `locationId` | `string \| undefined` | 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.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | +| `cursor` | `string \| null \| undefined` | 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[] \| null \| undefined`](../../doc/models/dispute-state.md) | Optional | The dispute states used to filter the result. If not specified, the endpoint returns all disputes.
See [DisputeState](#type-disputestate) for possible values | +| `locationId` | `string \| null \| undefined` | 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.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `40` | ## Example (as JSON) diff --git a/doc/models/list-employee-wages-request.md b/doc/models/list-employee-wages-request.md index 0128c18a..4e509e01 100644 --- a/doc/models/list-employee-wages-request.md +++ b/doc/models/list-employee-wages-request.md @@ -11,9 +11,9 @@ A request for a set of `EmployeeWage` objects. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `employeeId` | `string \| undefined` | Optional | Filter the returned wages to only those that are associated with the specified employee. | -| `limit` | `number \| undefined` | Optional | The maximum number of `EmployeeWage` results to return per page. The number can range between
1 and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | -| `cursor` | `string \| undefined` | Optional | A pointer to the next page of `EmployeeWage` results to fetch. | +| `employeeId` | `string \| null \| undefined` | Optional | Filter the returned wages to only those that are associated with the specified employee. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of `EmployeeWage` results to return per page. The number can range between
1 and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | +| `cursor` | `string \| null \| undefined` | Optional | A pointer to the next page of `EmployeeWage` results to fetch. | ## Example (as JSON) diff --git a/doc/models/list-employees-request.md b/doc/models/list-employees-request.md index 4b6ac1ed..98050163 100644 --- a/doc/models/list-employees-request.md +++ b/doc/models/list-employees-request.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | Optional | - | +| `locationId` | `string \| null \| undefined` | Optional | - | | `status` | [`string \| undefined`](../../doc/models/employee-status.md) | Optional | The status of the Employee being retrieved. | -| `limit` | `number \| undefined` | Optional | The number of employees to be returned on each page. | -| `cursor` | `string \| undefined` | Optional | The token required to retrieve the specified page of results. | +| `limit` | `number \| null \| undefined` | Optional | The number of employees to be returned on each page. | +| `cursor` | `string \| null \| undefined` | Optional | The token required to retrieve the specified page of results. | ## Example (as JSON) diff --git a/doc/models/list-gift-card-activities-request.md b/doc/models/list-gift-card-activities-request.md index 06db5ea0..db47eec5 100644 --- a/doc/models/list-gift-card-activities-request.md +++ b/doc/models/list-gift-card-activities-request.md @@ -12,14 +12,14 @@ subset of activites. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `giftCardId` | `string \| undefined` | 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.
**Constraints**: *Maximum Length*: `50` | -| `type` | `string \| undefined` | 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` | 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` | 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` | 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` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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` | Optional | The order in which the endpoint returns the activities, based on `created_at`.

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | +| `giftCardId` | `string \| null \| undefined` | 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.
**Constraints**: *Maximum Length*: `50` | +| `type` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | Optional | The order in which the endpoint returns the activities, based on `created_at`.

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | ## Example (as JSON) diff --git a/doc/models/list-gift-cards-request.md b/doc/models/list-gift-cards-request.md index 87e915ea..3ff743e4 100644 --- a/doc/models/list-gift-cards-request.md +++ b/doc/models/list-gift-cards-request.md @@ -12,11 +12,11 @@ gift cards. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `type` | `string \| undefined` | 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` | 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` | Optional | If a limit is provided, the endpoint returns only the specified number of results per page.
The maximum value is 50. The default value is 30.
For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
**Constraints**: `>= 1`, `<= 50` | -| `cursor` | `string \| undefined` | 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` | Optional | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.
**Constraints**: *Maximum Length*: `191` | +| `type` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 200` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | Optional | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.
**Constraints**: *Maximum Length*: `191` | ## Example (as JSON) diff --git a/doc/models/list-invoices-request.md b/doc/models/list-invoices-request.md index 6e3a391c..627f8aa7 100644 --- a/doc/models/list-invoices-request.md +++ b/doc/models/list-invoices-request.md @@ -12,8 +12,8 @@ Describes a `ListInvoice` request. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `locationId` | `string` | Required | The ID of the location for which to list invoices.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `cursor` | `string \| undefined` | 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` | 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. | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/list-location-custom-attribute-definitions-request.md b/doc/models/list-location-custom-attribute-definitions-request.md index d7f06d43..60a10f36 100644 --- a/doc/models/list-location-custom-attribute-definitions-request.md +++ b/doc/models/list-location-custom-attribute-definitions-request.md @@ -12,8 +12,8 @@ Represents a [ListLocationCustomAttributeDefinitions](../../doc/api/location-cus | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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). | ## Example (as JSON) diff --git a/doc/models/list-location-custom-attributes-request.md b/doc/models/list-location-custom-attributes-request.md index 6cba4b8a..b4800219 100644 --- a/doc/models/list-location-custom-attributes-request.md +++ b/doc/models/list-location-custom-attributes-request.md @@ -12,9 +12,9 @@ Represents a [ListLocationCustomAttributes](../../doc/api/location-custom-attrib | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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` | 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`. | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/list-loyalty-promotions-request.md b/doc/models/list-loyalty-promotions-request.md index 904383a1..85cc41a5 100644 --- a/doc/models/list-loyalty-promotions-request.md +++ b/doc/models/list-loyalty-promotions-request.md @@ -12,8 +12,8 @@ Represents a [ListLoyaltyPromotions](../../doc/api/loyalty.md#list-loyalty-promo | Name | Type | Tags | Description | | --- | --- | --- | --- | | `status` | [`string \| undefined`](../../doc/models/loyalty-promotion-status.md) | Optional | Indicates the status of a [loyalty promotion](../../doc/models/loyalty-promotion.md). | -| `cursor` | `string \| undefined` | 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` | 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).
**Constraints**: `>= 1`, `<= 30` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 30` | ## Example (as JSON) diff --git a/doc/models/list-loyalty-promotions-response.md b/doc/models/list-loyalty-promotions-response.md index 960635cb..cac0a708 100644 --- a/doc/models/list-loyalty-promotions-response.md +++ b/doc/models/list-loyalty-promotions-response.md @@ -34,6 +34,7 @@ If additional results are available, the `cursor` field is also present along wi "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "incentive": { "points_multiplier_data": { + "multiplier": "3.000", "points_multiplier": 3 }, "type": "POINTS_MULTIPLIER", @@ -71,6 +72,7 @@ If additional results are available, the `cursor` field is also present along wi "id": "loypromo_e696f057-2286-35ff-8108-132241328106", "incentive": { "points_multiplier_data": { + "multiplier": "2.000", "points_multiplier": 2 }, "type": "POINTS_MULTIPLIER", diff --git a/doc/models/list-merchant-custom-attribute-definitions-request.md b/doc/models/list-merchant-custom-attribute-definitions-request.md index 39ceeeb2..cfc24364 100644 --- a/doc/models/list-merchant-custom-attribute-definitions-request.md +++ b/doc/models/list-merchant-custom-attribute-definitions-request.md @@ -12,8 +12,8 @@ Represents a [ListMerchantCustomAttributeDefinitions](../../doc/api/merchant-cus | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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 \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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). | ## Example (as JSON) diff --git a/doc/models/list-merchant-custom-attributes-request.md b/doc/models/list-merchant-custom-attributes-request.md index c76b862f..7f3a0a18 100644 --- a/doc/models/list-merchant-custom-attributes-request.md +++ b/doc/models/list-merchant-custom-attributes-request.md @@ -12,9 +12,9 @@ Represents a [ListMerchantCustomAttributes](../../doc/api/merchant-custom-attrib | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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` | 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`. | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/list-merchants-request.md b/doc/models/list-merchants-request.md index a85c80bc..e1715340 100644 --- a/doc/models/list-merchants-request.md +++ b/doc/models/list-merchants-request.md @@ -11,7 +11,7 @@ Request object for the [ListMerchant](../../doc/api/merchants.md#list-merchants) | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `number \| undefined` | Optional | The cursor generated by the previous response. | +| `cursor` | `number \| null \| undefined` | Optional | The cursor generated by the previous response. | ## Example (as JSON) diff --git a/doc/models/list-order-custom-attribute-definitions-request.md b/doc/models/list-order-custom-attribute-definitions-request.md index 5f46a8eb..d16ee936 100644 --- a/doc/models/list-order-custom-attribute-definitions-request.md +++ b/doc/models/list-order-custom-attribute-definitions-request.md @@ -12,8 +12,8 @@ Represents a list request for order custom attribute definitions. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `cursor` | `string \| undefined` | 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).
**Constraints**: *Minimum Length*: `1` | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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).
**Constraints**: *Minimum Length*: `1` | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | ## Example (as JSON) diff --git a/doc/models/list-order-custom-attributes-request.md b/doc/models/list-order-custom-attributes-request.md index e04b02bd..602b06cf 100644 --- a/doc/models/list-order-custom-attributes-request.md +++ b/doc/models/list-order-custom-attributes-request.md @@ -12,9 +12,9 @@ Represents a list request for order custom attributes. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `visibilityFilter` | [`string \| undefined`](../../doc/models/visibility-filter.md) | Optional | Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions. | -| `cursor` | `string \| undefined` | 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).
**Constraints**: *Minimum Length*: `1` | -| `limit` | `number \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | -| `withDefinitions` | `boolean \| undefined` | 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`. | +| `cursor` | `string \| null \| undefined` | 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).
**Constraints**: *Minimum Length*: `1` | +| `limit` | `number \| null \| undefined` | 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).
**Constraints**: `>= 1`, `<= 100` | +| `withDefinitions` | `boolean \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/list-payment-links-request.md b/doc/models/list-payment-links-request.md index 7324d982..1ac89fd2 100644 --- a/doc/models/list-payment-links-request.md +++ b/doc/models/list-payment-links-request.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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/basics/api101/pagination). | -| `limit` | `number \| undefined` | 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` | +| `cursor` | `string \| null \| undefined` | 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/basics/api101/pagination). | +| `limit` | `number \| null \| undefined` | 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` | ## Example (as JSON) diff --git a/doc/models/list-payment-refunds-request.md b/doc/models/list-payment-refunds-request.md index 7f123645..6a527cf0 100644 --- a/doc/models/list-payment-refunds-request.md +++ b/doc/models/list-payment-refunds-request.md @@ -14,14 +14,14 @@ The maximum results per page is 100. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `beginTime` | `string \| undefined` | 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` | 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` | Optional | The order in which results are listed by `PaymentRefund.created_at`:

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | -| `cursor` | `string \| undefined` | 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` | Optional | Limit results to the location supplied. By default, results are returned
for all locations associated with the seller. | -| `status` | `string \| undefined` | 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` | 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` | 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 | +| `beginTime` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | Optional | The order in which results are listed by `PaymentRefund.created_at`:

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | Optional | Limit results to the location supplied. By default, results are returned
for all locations associated with the seller. | +| `status` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | 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 | ## Example (as JSON) diff --git a/doc/models/list-payments-request.md b/doc/models/list-payments-request.md index e5113423..7c38cde8 100644 --- a/doc/models/list-payments-request.md +++ b/doc/models/list-payments-request.md @@ -14,15 +14,15 @@ The maximum results per page is 100. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `beginTime` | `string \| undefined` | 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` | 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` | Optional | The order in which results are listed by `Payment.created_at`:

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | -| `cursor` | `string \| undefined` | 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` | Optional | Limit results to the location supplied. By default, results are returned
for the default (main) location associated with the seller. | -| `total` | `bigint \| undefined` | Optional | The exact amount in the `total_money` for a payment. | -| `last4` | `string \| undefined` | Optional | The last four digits of a payment card. | -| `cardBrand` | `string \| undefined` | Optional | The brand of the payment card (for example, VISA). | -| `limit` | `number \| undefined` | 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` | +| `beginTime` | `string \| null \| undefined` | 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 \| null \| undefined` | 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 \| null \| undefined` | Optional | The order in which results are listed by `Payment.created_at`:

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | Optional | Limit results to the location supplied. By default, results are returned
for the default (main) location associated with the seller. | +| `total` | `bigint \| null \| undefined` | Optional | The exact amount in the `total_money` for a payment. | +| `last4` | `string \| null \| undefined` | Optional | The last four digits of a payment card. | +| `cardBrand` | `string \| null \| undefined` | Optional | The brand of the payment card (for example, VISA). | +| `limit` | `number \| null \| undefined` | 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` | ## Example (as JSON) diff --git a/doc/models/list-payout-entries-request.md b/doc/models/list-payout-entries-request.md index ddfb052b..c183bcae 100644 --- a/doc/models/list-payout-entries-request.md +++ b/doc/models/list-payout-entries-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `cursor` | `string \| undefined` | 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` | 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` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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` | ## Example (as JSON) diff --git a/doc/models/list-payouts-request.md b/doc/models/list-payouts-request.md index d5edf5d1..3f5e4bb9 100644 --- a/doc/models/list-payouts-request.md +++ b/doc/models/list-payouts-request.md @@ -11,13 +11,13 @@ A request to retrieve payout records. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | 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.
**Constraints**: *Maximum Length*: `255` | +| `locationId` | `string \| null \| undefined` | 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.
**Constraints**: *Maximum Length*: `255` | | `status` | [`string \| undefined`](../../doc/models/payout-status.md) | Optional | Payout status types | -| `beginTime` | `string \| undefined` | 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` | Optional | The timestamp for the end of the payout creation time, in RFC 3339 format.
Default: The current time. | +| `beginTime` | `string \| null \| undefined` | 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 \| null \| undefined` | 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) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `cursor` | `string \| undefined` | 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` | 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` | +| `cursor` | `string \| null \| undefined` | 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 \| null \| undefined` | 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` | ## Example (as JSON) diff --git a/doc/models/list-refunds-request.md b/doc/models/list-refunds-request.md index 51cc9a2e..f7f58b14 100644 --- a/doc/models/list-refunds-request.md +++ b/doc/models/list-refunds-request.md @@ -14,10 +14,10 @@ Deprecated - recommend using [SearchOrders](api-endpoint:Orders-SearchOrders) | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `beginTime` | `string \| undefined` | Optional | The beginning of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time minus one year. | -| `endTime` | `string \| undefined` | Optional | The end of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time. | +| `beginTime` | `string \| null \| undefined` | Optional | The beginning of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time minus one year. | +| `endTime` | `string \| null \| undefined` | Optional | The end of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time. | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `cursor` | `string \| undefined` | 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. | +| `cursor` | `string \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/list-subscription-events-request.md b/doc/models/list-subscription-events-request.md index c1d1fc08..7ab68305 100644 --- a/doc/models/list-subscription-events-request.md +++ b/doc/models/list-subscription-events-request.md @@ -13,8 +13,8 @@ endpoint. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | Optional | When the total number of resulting subscription events exceeds the limit of a paged response,
specify the cursor returned from a preceding response here to fetch the next set of results.
If the cursor is unset, the response contains the last page of the results.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). | -| `limit` | `number \| undefined` | Optional | The upper limit on the number of subscription events to return
in a paged response.
**Constraints**: `>= 1` | +| `cursor` | `string \| null \| undefined` | Optional | When the total number of resulting subscription events exceeds the limit of a paged response,
specify the cursor returned from a preceding response here to fetch the next set of results.
If the cursor is unset, the response contains the last page of the results.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). | +| `limit` | `number \| null \| undefined` | Optional | The upper limit on the number of subscription events to return
in a paged response.
**Constraints**: `>= 1` | ## Example (as JSON) diff --git a/doc/models/list-team-member-booking-profiles-request.md b/doc/models/list-team-member-booking-profiles-request.md index 41f876a1..9a719563 100644 --- a/doc/models/list-team-member-booking-profiles-request.md +++ b/doc/models/list-team-member-booking-profiles-request.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `bookableOnly` | `boolean \| undefined` | Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`). | -| `limit` | `number \| undefined` | Optional | The maximum number of results to return in a paged response.
**Constraints**: `>= 1`, `<= 100` | -| `cursor` | `string \| undefined` | 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.
**Constraints**: *Maximum Length*: `65536` | -| `locationId` | `string \| undefined` | Optional | Indicates whether to include only team members enabled at the given location in the returned result.
**Constraints**: *Maximum Length*: `32` | +| `bookableOnly` | `boolean \| null \| undefined` | Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`). | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of results to return in a paged response.
**Constraints**: `>= 1`, `<= 100` | +| `cursor` | `string \| null \| undefined` | 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.
**Constraints**: *Maximum Length*: `65536` | +| `locationId` | `string \| null \| undefined` | Optional | Indicates whether to include only team members enabled at the given location in the returned result.
**Constraints**: *Maximum Length*: `32` | ## Example (as JSON) diff --git a/doc/models/list-team-member-wages-request.md b/doc/models/list-team-member-wages-request.md index f3f3d64b..f38716cc 100644 --- a/doc/models/list-team-member-wages-request.md +++ b/doc/models/list-team-member-wages-request.md @@ -11,9 +11,9 @@ A request for a set of `TeamMemberWage` objects. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `teamMemberId` | `string \| undefined` | Optional | Filter the returned wages to only those that are associated with the
specified team member. | -| `limit` | `number \| undefined` | Optional | The maximum number of `TeamMemberWage` results to return per page. The number can range between
1 and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | -| `cursor` | `string \| undefined` | Optional | A pointer to the next page of `EmployeeWage` results to fetch. | +| `teamMemberId` | `string \| null \| undefined` | Optional | Filter the returned wages to only those that are associated with the
specified team member. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of `TeamMemberWage` results to return per page. The number can range between
1 and 200. The default is 200.
**Constraints**: `>= 1`, `<= 200` | +| `cursor` | `string \| null \| undefined` | Optional | A pointer to the next page of `EmployeeWage` results to fetch. | ## Example (as JSON) diff --git a/doc/models/list-transactions-request.md b/doc/models/list-transactions-request.md index 50eda9bf..83c115e3 100644 --- a/doc/models/list-transactions-request.md +++ b/doc/models/list-transactions-request.md @@ -14,10 +14,10 @@ Deprecated - recommend using [SearchOrders](api-endpoint:Orders-SearchOrders) | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `beginTime` | `string \| undefined` | Optional | The beginning of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time minus one year. | -| `endTime` | `string \| undefined` | Optional | The end of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time. | +| `beginTime` | `string \| null \| undefined` | Optional | The beginning of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time minus one year. | +| `endTime` | `string \| null \| undefined` | Optional | The end of the requested reporting period, in RFC 3339 format.

See [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.

Default value: The current time. | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `cursor` | `string \| undefined` | 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. | +| `cursor` | `string \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/list-webhook-event-types-request.md b/doc/models/list-webhook-event-types-request.md index 93a1acb5..33a534b3 100644 --- a/doc/models/list-webhook-event-types-request.md +++ b/doc/models/list-webhook-event-types-request.md @@ -11,7 +11,7 @@ Lists all webhook event types that can be subscribed to. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `apiVersion` | `string \| undefined` | Optional | The API version for which to list event types. Setting this field overrides the default version used by the application. | +| `apiVersion` | `string \| null \| undefined` | Optional | The API version for which to list event types. Setting this field overrides the default version used by the application. | ## Example (as JSON) diff --git a/doc/models/list-webhook-subscriptions-request.md b/doc/models/list-webhook-subscriptions-request.md index a5ba103a..eb8015d0 100644 --- a/doc/models/list-webhook-subscriptions-request.md +++ b/doc/models/list-webhook-subscriptions-request.md @@ -11,10 +11,10 @@ Lists all [Subscription](../../doc/models/webhook-subscription.md)s owned by you | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `cursor` | `string \| undefined` | 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.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
**Constraints**: *Maximum Length*: `256` | -| `includeDisabled` | `boolean \| undefined` | Optional | Includes disabled [Subscription](entity:WebhookSubscription)s.
By default, all enabled [Subscription](entity:WebhookSubscription)s are returned. | +| `cursor` | `string \| null \| undefined` | 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.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
**Constraints**: *Maximum Length*: `256` | +| `includeDisabled` | `boolean \| null \| undefined` | Optional | Includes disabled [Subscription](entity:WebhookSubscription)s.
By default, all enabled [Subscription](entity:WebhookSubscription)s are returned. | | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `limit` | `number \| undefined` | 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.

Default: 100
**Constraints**: `>= 1`, `<= 100` | +| `limit` | `number \| null \| undefined` | 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.

Default: 100
**Constraints**: `>= 1`, `<= 100` | ## Example (as JSON) diff --git a/doc/models/list-workweek-configs-request.md b/doc/models/list-workweek-configs-request.md index 2acd0df9..e9ecb660 100644 --- a/doc/models/list-workweek-configs-request.md +++ b/doc/models/list-workweek-configs-request.md @@ -11,8 +11,8 @@ A request for a set of `WorkweekConfig` objects. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `limit` | `number \| undefined` | Optional | The maximum number of `WorkweekConfigs` results to return per page. | -| `cursor` | `string \| undefined` | Optional | A pointer to the next page of `WorkweekConfig` results to fetch. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of `WorkweekConfigs` results to return per page. | +| `cursor` | `string \| null \| undefined` | Optional | A pointer to the next page of `WorkweekConfig` results to fetch. | ## Example (as JSON) diff --git a/doc/models/location.md b/doc/models/location.md index 7da9efea..67c7dc09 100644 --- a/doc/models/location.md +++ b/doc/models/location.md @@ -12,30 +12,30 @@ Represents one of a business' [locations](https://developer.squareup.com/docs/lo | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A short generated string of letters and numbers that uniquely identifies this location instance.
**Constraints**: *Maximum Length*: `32` | -| `name` | `string \| undefined` | Optional | The name of the location.
This information appears in the Seller Dashboard as the nickname.
A location name must be unique within a seller account.
**Constraints**: *Maximum Length*: `255` | +| `name` | `string \| null \| undefined` | Optional | The name of the location.
This information appears in the Seller Dashboard as the nickname.
A location name must be unique within a seller account.
**Constraints**: *Maximum Length*: `255` | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `timezone` | `string \| undefined` | Optional | The [IANA time zone](https://www.iana.org/time-zones) identifier for
the time zone of the location. For example, `America/Los_Angeles`.
**Constraints**: *Maximum Length*: `30` | +| `timezone` | `string \| null \| undefined` | Optional | The [IANA time zone](https://www.iana.org/time-zones) identifier for
the time zone of the location. For example, `America/Los_Angeles`.
**Constraints**: *Maximum Length*: `30` | | `capabilities` | [`string[] \| undefined`](../../doc/models/location-capability.md) | Optional | The Square features that are enabled for the location.
See [LocationCapability](entity:LocationCapability) for possible values.
See [LocationCapability](#type-locationcapability) for possible values | | `status` | [`string \| undefined`](../../doc/models/location-status.md) | Optional | A location's status. | | `createdAt` | `string \| undefined` | Optional | The time when the location was created, in RFC 3339 format.
For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `25` | | `merchantId` | `string \| undefined` | Optional | The ID of the merchant that owns the location.
**Constraints**: *Maximum Length*: `32` | | `country` | [`string \| undefined`](../../doc/models/country.md) | Optional | Indicates the country associated with another entity, such as a business.
Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm). | -| `languageCode` | `string \| undefined` | Optional | The language associated with the location, in
[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).
For more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `5` | +| `languageCode` | `string \| null \| undefined` | Optional | The language associated with the location, in
[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).
For more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `5` | | `currency` | [`string \| undefined`](../../doc/models/currency.md) | Optional | Indicates the associated currency for an amount of money. Values correspond
to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). | -| `phoneNumber` | `string \| undefined` | Optional | The phone number of the location. For example, `+1 855-700-6000`.
**Constraints**: *Maximum Length*: `17` | -| `businessName` | `string \| undefined` | Optional | The name of the location's overall business. This name is present on receipts and other customer-facing branding, and can be changed no more than three times in a twelve-month period.
**Constraints**: *Maximum Length*: `255` | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number of the location. For example, `+1 855-700-6000`.
**Constraints**: *Maximum Length*: `17` | +| `businessName` | `string \| null \| undefined` | Optional | The name of the location's overall business. This name is present on receipts and other customer-facing branding, and can be changed no more than three times in a twelve-month period.
**Constraints**: *Maximum Length*: `255` | | `type` | [`string \| undefined`](../../doc/models/location-type.md) | Optional | A location's type. | -| `websiteUrl` | `string \| undefined` | Optional | The website URL of the location. For example, `https://squareup.com`.
**Constraints**: *Maximum Length*: `255` | +| `websiteUrl` | `string \| null \| undefined` | Optional | The website URL of the location. For example, `https://squareup.com`.
**Constraints**: *Maximum Length*: `255` | | `businessHours` | [`BusinessHours \| undefined`](../../doc/models/business-hours.md) | Optional | The hours of operation for a location. | -| `businessEmail` | `string \| undefined` | Optional | The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator.
**Constraints**: *Maximum Length*: `255` | -| `description` | `string \| undefined` | Optional | The description of the location. For example, `Main Street location`.
**Constraints**: *Maximum Length*: `1024` | -| `twitterUsername` | `string \| undefined` | Optional | The Twitter username of the location without the '@' symbol. For example, `Square`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `15` | -| `instagramUsername` | `string \| undefined` | Optional | The Instagram username of the location without the '@' symbol. For example, `square`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` | -| `facebookUrl` | `string \| undefined` | Optional | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`.
**Constraints**: *Maximum Length*: `255` | +| `businessEmail` | `string \| null \| undefined` | Optional | The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator.
**Constraints**: *Maximum Length*: `255` | +| `description` | `string \| null \| undefined` | Optional | The description of the location. For example, `Main Street location`.
**Constraints**: *Maximum Length*: `1024` | +| `twitterUsername` | `string \| null \| undefined` | Optional | The Twitter username of the location without the '@' symbol. For example, `Square`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `15` | +| `instagramUsername` | `string \| null \| undefined` | Optional | The Instagram username of the location without the '@' symbol. For example, `square`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` | +| `facebookUrl` | `string \| null \| undefined` | Optional | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`.
**Constraints**: *Maximum Length*: `255` | | `coordinates` | [`Coordinates \| undefined`](../../doc/models/coordinates.md) | Optional | Latitude and longitude coordinates. | | `logoUrl` | `string \| undefined` | Optional | The URL of the logo image for the location. When configured in the Seller
Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
This image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.
**Constraints**: *Maximum Length*: `255` | | `posBackgroundUrl` | `string \| undefined` | Optional | The URL of the Point of Sale background image for the location.
**Constraints**: *Maximum Length*: `255` | -| `mcc` | `string \| undefined` | Optional | A four-digit number that describes the kind of goods or services sold at the location.
The [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.
For example, `5045`, for a location that sells computer goods and software.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4` | +| `mcc` | `string \| null \| undefined` | Optional | A four-digit number that describes the kind of goods or services sold at the location.
The [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.
For example, `5045`, for a location that sells computer goods and software.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4` | | `fullFormatLogoUrl` | `string \| undefined` | Optional | The URL of a full-format logo image for the location. When configured in the Seller
Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
This image can be wider than it is tall and should be at least 1280x648 pixels. | | `taxIds` | [`TaxIds \| undefined`](../../doc/models/tax-ids.md) | Optional | Identifiers for the location used by various governments for tax purposes. | diff --git a/doc/models/loyalty-account-mapping.md b/doc/models/loyalty-account-mapping.md index c9b86d48..b03e7459 100644 --- a/doc/models/loyalty-account-mapping.md +++ b/doc/models/loyalty-account-mapping.md @@ -16,7 +16,7 @@ Currently, a loyalty account can only be mapped to a buyer by phone number. For | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-assigned ID of the mapping.
**Constraints**: *Maximum Length*: `36` | | `createdAt` | `string \| undefined` | Optional | The timestamp when the mapping was created, in RFC 3339 format. | -| `phoneNumber` | `string \| undefined` | Optional | The phone number of the buyer, in E.164 format. For example, "+14155551111". | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number of the buyer, in E.164 format. For example, "+14155551111". | ## Example (as JSON) diff --git a/doc/models/loyalty-account.md b/doc/models/loyalty-account.md index fe5969ec..f4a2c858 100644 --- a/doc/models/loyalty-account.md +++ b/doc/models/loyalty-account.md @@ -16,12 +16,12 @@ Describes a loyalty account in a [loyalty program](../../doc/models/loyalty-prog | `programId` | `string` | Required | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) to which the account belongs.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `balance` | `number \| undefined` | Optional | The available point balance in the loyalty account. If points are scheduled to expire, they are listed in the `expiring_point_deadlines` field.

Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange. | | `lifetimePoints` | `number \| undefined` | Optional | The total points accrued during the lifetime of the account. | -| `customerId` | `string \| undefined` | Optional | The Square-assigned ID of the [customer](entity:Customer) that is associated with the account. | -| `enrolledAt` | `string \| undefined` | Optional | The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products.

If this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer's first action on their account
(when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service in Square Point of Sale.

This field is typically specified in a `CreateLoyaltyAccount` request when creating a loyalty account for a buyer who already interacted with their account.
For example, you would set this field when migrating accounts from an external system. The timestamp in the request can represent a current or previous date and time, but it cannot be set for the future. | +| `customerId` | `string \| null \| undefined` | Optional | The Square-assigned ID of the [customer](entity:Customer) that is associated with the account. | +| `enrolledAt` | `string \| null \| undefined` | Optional | The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products.

If this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer's first action on their account
(when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service in Square Point of Sale.

This field is typically specified in a `CreateLoyaltyAccount` request when creating a loyalty account for a buyer who already interacted with their account.
For example, you would set this field when migrating accounts from an external system. The timestamp in the request can represent a current or previous date and time, but it cannot be set for the future. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the loyalty account was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the loyalty account was last updated, in RFC 3339 format. | | `mapping` | [`LoyaltyAccountMapping \| undefined`](../../doc/models/loyalty-account-mapping.md) | Optional | Represents the mapping that associates a loyalty account with a buyer.

Currently, a loyalty account can only be mapped to a buyer by phone number. For more information, see
[Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview). | -| `expiringPointDeadlines` | [`LoyaltyAccountExpiringPointDeadline[] \| undefined`](../../doc/models/loyalty-account-expiring-point-deadline.md) | Optional | The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire.

The total number of points in this field equals the number of points in the `balance` field. | +| `expiringPointDeadlines` | [`LoyaltyAccountExpiringPointDeadline[] \| null \| undefined`](../../doc/models/loyalty-account-expiring-point-deadline.md) | Optional | The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire.

The total number of points in this field equals the number of points in the `balance` field. | ## Example (as JSON) diff --git a/doc/models/loyalty-event-accumulate-points.md b/doc/models/loyalty-event-accumulate-points.md index 60b002a2..f6be9e68 100644 --- a/doc/models/loyalty-event-accumulate-points.md +++ b/doc/models/loyalty-event-accumulate-points.md @@ -12,8 +12,8 @@ Provides metadata when the event `type` is `ACCUMULATE_POINTS`. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `loyaltyProgramId` | `string \| undefined` | Optional | The ID of the [loyalty program](entity:LoyaltyProgram).
**Constraints**: *Maximum Length*: `36` | -| `points` | `number \| undefined` | Optional | The number of points accumulated by the event.
**Constraints**: `>= 1` | -| `orderId` | `string \| undefined` | Optional | The ID of the [order](entity:Order) for which the buyer accumulated the points.
This field is returned only if the Orders API is used to process orders. | +| `points` | `number \| null \| undefined` | Optional | The number of points accumulated by the event.
**Constraints**: `>= 1` | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) for which the buyer accumulated the points.
This field is returned only if the Orders API is used to process orders. | ## Example (as JSON) diff --git a/doc/models/loyalty-event-adjust-points.md b/doc/models/loyalty-event-adjust-points.md index 68592902..5414be50 100644 --- a/doc/models/loyalty-event-adjust-points.md +++ b/doc/models/loyalty-event-adjust-points.md @@ -13,7 +13,7 @@ Provides metadata when the event `type` is `ADJUST_POINTS`. | --- | --- | --- | --- | | `loyaltyProgramId` | `string \| undefined` | Optional | The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram).
**Constraints**: *Maximum Length*: `36` | | `points` | `number` | Required | The number of points added or removed. | -| `reason` | `string \| undefined` | Optional | The reason for the adjustment of points. | +| `reason` | `string \| null \| undefined` | Optional | The reason for the adjustment of points. | ## Example (as JSON) diff --git a/doc/models/loyalty-program-accrual-rule-spend-data.md b/doc/models/loyalty-program-accrual-rule-spend-data.md index fb354f40..cf8d0273 100644 --- a/doc/models/loyalty-program-accrual-rule-spend-data.md +++ b/doc/models/loyalty-program-accrual-rule-spend-data.md @@ -12,8 +12,8 @@ Represents additional data for rules with the `SPEND` accrual type. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `excludedCategoryIds` | `string[] \| undefined` | Optional | The IDs of any `CATEGORY` catalog objects that are excluded from points accrual.

You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
endpoint to retrieve information about the excluded categories. | -| `excludedItemVariationIds` | `string[] \| undefined` | Optional | The IDs of any `ITEM_VARIATION` catalog objects that are excluded from points accrual.

You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
endpoint to retrieve information about the excluded item variations. | +| `excludedCategoryIds` | `string[] \| null \| undefined` | Optional | The IDs of any `CATEGORY` catalog objects that are excluded from points accrual.

You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
endpoint to retrieve information about the excluded categories. | +| `excludedItemVariationIds` | `string[] \| null \| undefined` | Optional | The IDs of any `ITEM_VARIATION` catalog objects that are excluded from points accrual.

You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
endpoint to retrieve information about the excluded item variations. | | `taxMode` | [`string`](../../doc/models/loyalty-program-accrual-rule-tax-mode.md) | Required | Indicates how taxes should be treated when calculating the purchase amount used for loyalty points accrual.
This setting applies only to `SPEND` accrual rules or `VISIT` accrual rules that have a minimum spend requirement. | ## Example (as JSON) diff --git a/doc/models/loyalty-program-accrual-rule.md b/doc/models/loyalty-program-accrual-rule.md index 77094571..bd02e6ad 100644 --- a/doc/models/loyalty-program-accrual-rule.md +++ b/doc/models/loyalty-program-accrual-rule.md @@ -12,7 +12,7 @@ Represents an accrual rule, which defines how buyers can earn points from the ba | Name | Type | Tags | Description | | --- | --- | --- | --- | | `accrualType` | [`string`](../../doc/models/loyalty-program-accrual-rule-type.md) | Required | The type of the accrual rule that defines how buyers can earn points. | -| `points` | `number \| undefined` | Optional | The number of points that
buyers earn based on the `accrual_type`.
**Constraints**: `>= 1` | +| `points` | `number \| null \| undefined` | Optional | The number of points that
buyers earn based on the `accrual_type`.
**Constraints**: `>= 1` | | `visitData` | [`LoyaltyProgramAccrualRuleVisitData \| undefined`](../../doc/models/loyalty-program-accrual-rule-visit-data.md) | Optional | Represents additional data for rules with the `VISIT` accrual type. | | `spendData` | [`LoyaltyProgramAccrualRuleSpendData \| undefined`](../../doc/models/loyalty-program-accrual-rule-spend-data.md) | Optional | Represents additional data for rules with the `SPEND` accrual type. | | `itemVariationData` | [`LoyaltyProgramAccrualRuleItemVariationData \| undefined`](../../doc/models/loyalty-program-accrual-rule-item-variation-data.md) | Optional | Represents additional data for rules with the `ITEM_VARIATION` accrual type. | diff --git a/doc/models/loyalty-program.md b/doc/models/loyalty-program.md index 0bea4927..aa3fa9ab 100644 --- a/doc/models/loyalty-program.md +++ b/doc/models/loyalty-program.md @@ -15,13 +15,13 @@ For more information, see [Loyalty Program Overview](https://developer.squareup. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-assigned ID of the loyalty program. Updates to
the loyalty program do not modify the identifier.
**Constraints**: *Maximum Length*: `36` | | `status` | [`string \| undefined`](../../doc/models/loyalty-program-status.md) | Optional | Indicates whether the program is currently active. | -| `rewardTiers` | [`LoyaltyProgramRewardTier[] \| undefined`](../../doc/models/loyalty-program-reward-tier.md) | Optional | The list of rewards for buyers, sorted by ascending points. | +| `rewardTiers` | [`LoyaltyProgramRewardTier[] \| null \| undefined`](../../doc/models/loyalty-program-reward-tier.md) | Optional | The list of rewards for buyers, sorted by ascending points. | | `expirationPolicy` | [`LoyaltyProgramExpirationPolicy \| undefined`](../../doc/models/loyalty-program-expiration-policy.md) | Optional | Describes when the loyalty program expires. | | `terminology` | [`LoyaltyProgramTerminology \| undefined`](../../doc/models/loyalty-program-terminology.md) | Optional | Represents the naming used for loyalty points. | -| `locationIds` | `string[] \| undefined` | Optional | The [locations](entity:Location) at which the program is active. | +| `locationIds` | `string[] \| null \| undefined` | Optional | The [locations](entity:Location) at which the program is active. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the program was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the reward was last updated, in RFC 3339 format. | -| `accrualRules` | [`LoyaltyProgramAccrualRule[] \| undefined`](../../doc/models/loyalty-program-accrual-rule.md) | Optional | Defines how buyers can earn loyalty points from the base loyalty program.
To check for associated [loyalty promotions](entity:LoyaltyPromotion) that enable
buyers to earn extra points, call [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). | +| `accrualRules` | [`LoyaltyProgramAccrualRule[] \| null \| undefined`](../../doc/models/loyalty-program-accrual-rule.md) | Optional | Defines how buyers can earn loyalty points from the base loyalty program.
To check for associated [loyalty promotions](entity:LoyaltyPromotion) that enable
buyers to earn extra points, call [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). | ## Example (as JSON) diff --git a/doc/models/loyalty-promotion-incentive-points-multiplier-data.md b/doc/models/loyalty-promotion-incentive-points-multiplier-data.md index 41cf3fcb..1a94dafd 100644 --- a/doc/models/loyalty-promotion-incentive-points-multiplier-data.md +++ b/doc/models/loyalty-promotion-incentive-points-multiplier-data.md @@ -11,13 +11,15 @@ Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion inc | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `pointsMultiplier` | `number` | Required | The multiplier used to calculate the number of points earned each time the promotion
is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program.
If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier`
of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points).
**Constraints**: `>= 2`, `<= 10` | +| `pointsMultiplier` | `number \| null \| undefined` | Optional | The multiplier used to calculate the number of points earned each time the promotion
is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program.
If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier`
of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points).

DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field.

One of the following is required when specifying a points multiplier:

- (Recommended) The `multiplier` field.
- This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`
with the equivalent value.
**Constraints**: `>= 2`, `<= 10` | +| `multiplier` | `string \| null \| undefined` | Optional | The multiplier used to calculate the number of points earned each time the promotion is triggered,
specified as a string representation of a decimal. Square supports multipliers up to 10x, with three
point precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the
base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a
`multiplier` of "1.5", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier = 6 points).
Fractional points are dropped.

One of the following is required when specifying a points multiplier:

- (Recommended) This `multiplier` field.
- The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`
with the equivalent value.
**Constraints**: *Maximum Length*: `5` | ## Example (as JSON) ```json { - "points_multiplier": 8 + "points_multiplier": 8, + "multiplier": "multiplier4" } ``` diff --git a/doc/models/loyalty-promotion-incentive.md b/doc/models/loyalty-promotion-incentive.md index e8a4d816..d97f1b5a 100644 --- a/doc/models/loyalty-promotion-incentive.md +++ b/doc/models/loyalty-promotion-incentive.md @@ -23,7 +23,8 @@ of points to the points earned from the base program. { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { - "points_multiplier": 134 + "points_multiplier": 134, + "multiplier": "multiplier4" }, "points_addition_data": { "points_addition": 218 diff --git a/doc/models/loyalty-promotion.md b/doc/models/loyalty-promotion.md index f9a1b27d..f2d28711 100644 --- a/doc/models/loyalty-promotion.md +++ b/doc/models/loyalty-promotion.md @@ -25,8 +25,8 @@ A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` o | `updatedAt` | `string \| undefined` | Optional | The timestamp when the promotion was last updated, in RFC 3339 format. | | `loyaltyProgramId` | `string \| undefined` | Optional | The ID of the [loyalty program](entity:LoyaltyProgram) associated with the promotion. | | `minimumSpendAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `qualifyingItemVariationIds` | `string[] \| undefined` | Optional | The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified,
the purchase must include at least one of these items to qualify for the promotion.

This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.

You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both. | -| `qualifyingCategoryIds` | `string[] \| undefined` | Optional | The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified,
the purchase must include at least one item from one of these categories to qualify for the promotion.

This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.

You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both. | +| `qualifyingItemVariationIds` | `string[] \| null \| undefined` | Optional | The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified,
the purchase must include at least one of these items to qualify for the promotion.

This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.

You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both. | +| `qualifyingCategoryIds` | `string[] \| null \| undefined` | Optional | The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified,
the purchase must include at least one item from one of these categories to qualify for the promotion.

This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.

You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both. | ## Example (as JSON) @@ -37,7 +37,8 @@ A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` o "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { - "points_multiplier": 16 + "points_multiplier": 16, + "multiplier": "multiplier8" }, "points_addition_data": { "points_addition": 16 diff --git a/doc/models/loyalty-reward.md b/doc/models/loyalty-reward.md index 89bfcdc0..032b4f7f 100644 --- a/doc/models/loyalty-reward.md +++ b/doc/models/loyalty-reward.md @@ -17,7 +17,7 @@ For more information, see [Manage loyalty rewards](https://developer.squareup.co | `loyaltyAccountId` | `string` | Required | The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) to which the reward belongs.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `rewardTierId` | `string` | Required | The Square-assigned ID of the [reward tier](entity:LoyaltyProgramRewardTier) used to create the reward.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `points` | `number \| undefined` | Optional | The number of loyalty points used for the reward.
**Constraints**: `>= 1` | -| `orderId` | `string \| undefined` | Optional | The Square-assigned ID of the [order](entity:Order) to which the reward is attached. | +| `orderId` | `string \| null \| undefined` | Optional | The Square-assigned ID of the [order](entity:Order) to which the reward is attached. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the reward was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the reward was last updated, in RFC 3339 format. | | `redeemedAt` | `string \| undefined` | Optional | The timestamp when the reward was redeemed, in RFC 3339 format. | diff --git a/doc/models/merchant.md b/doc/models/merchant.md index 63eef83f..ac5a5b8d 100644 --- a/doc/models/merchant.md +++ b/doc/models/merchant.md @@ -12,12 +12,12 @@ Represents a business that sells with Square. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-issued ID of the merchant. | -| `businessName` | `string \| undefined` | Optional | The name of the merchant's overall business. | +| `businessName` | `string \| null \| undefined` | Optional | The name of the merchant's overall business. | | `country` | [`string`](../../doc/models/country.md) | Required | Indicates the country associated with another entity, such as a business.
Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm). | -| `languageCode` | `string \| undefined` | Optional | The code indicating the [language preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) of the merchant, in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). For example, `en-US` or `fr-CA`. | +| `languageCode` | `string \| null \| undefined` | Optional | The code indicating the [language preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) of the merchant, in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). For example, `en-US` or `fr-CA`. | | `currency` | [`string \| undefined`](../../doc/models/currency.md) | Optional | Indicates the associated currency for an amount of money. Values correspond
to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). | | `status` | [`string \| undefined`](../../doc/models/merchant-status.md) | Optional | - | -| `mainLocationId` | `string \| undefined` | Optional | The ID of the [main `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) for this merchant. | +| `mainLocationId` | `string \| null \| undefined` | Optional | The ID of the [main `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) for this merchant. | | `createdAt` | `string \| undefined` | Optional | The time when the merchant was created, in RFC 3339 format.
For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). | ## Example (as JSON) diff --git a/doc/models/modifier-location-overrides.md b/doc/models/modifier-location-overrides.md index 51cf64de..6414e29c 100644 --- a/doc/models/modifier-location-overrides.md +++ b/doc/models/modifier-location-overrides.md @@ -11,7 +11,7 @@ Location-specific overrides for specified properties of a `CatalogModifier` obje | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationId` | `string \| undefined` | Optional | The ID of the `Location` object representing the location. This can include a deactivated location. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the `Location` object representing the location. This can include a deactivated location. | | `priceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/money.md b/doc/models/money.md index dc502459..0114b113 100644 --- a/doc/models/money.md +++ b/doc/models/money.md @@ -16,7 +16,7 @@ for more information. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `amount` | `bigint \| undefined` | Optional | The amount of money, in the smallest denomination of the currency
indicated by `currency`. For example, when `currency` is `USD`, `amount` is
in cents. Monetary amounts can be positive or negative. See the specific
field description to determine the meaning of the sign in a particular case. | +| `amount` | `bigint \| null \| undefined` | Optional | The amount of money, in the smallest denomination of the currency
indicated by `currency`. For example, when `currency` is `USD`, `amount` is
in cents. Monetary amounts can be positive or negative. See the specific
field description to determine the meaning of the sign in a particular case. | | `currency` | [`string \| undefined`](../../doc/models/currency.md) | Optional | Indicates the associated currency for an amount of money. Values correspond
to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). | ## Example (as JSON) diff --git a/doc/models/obtain-token-request.md b/doc/models/obtain-token-request.md index 3f6d2b24..6620f718 100644 --- a/doc/models/obtain-token-request.md +++ b/doc/models/obtain-token-request.md @@ -10,15 +10,15 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `clientId` | `string` | Required | The Square-issued ID of your application, which is available on the **OAuth** page in the
[Developer Dashboard](https://developer.squareup.com/apps).
**Constraints**: *Maximum Length*: `191` | -| `clientSecret` | `string \| undefined` | Optional | The Square-issued application secret for your application, which is available on the **OAuth** page
in the [Developer Dashboard](https://developer.squareup.com/apps). This parameter is only required when
you're not using the [OAuth PKCE (Proof Key for Code Exchange) flow](https://developer.squareup.com/docs/oauth-api/overview#pkce-flow).
The PKCE flow requires a `code_verifier` instead of a `client_secret` when `grant_type` is set to `authorization_code`.
If `grant_type` is set to `refresh_token` and the `refresh_token` is obtained uaing PKCE, the PKCE flow only requires `client_id`, 
`grant_type`, and `refresh_token`.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | -| `code` | `string \| undefined` | Optional | The authorization code to exchange.
This code is required if `grant_type` is set to `authorization_code` to indicate that
the application wants to exchange an authorization code for an OAuth access token.
**Constraints**: *Maximum Length*: `191` | -| `redirectUri` | `string \| undefined` | Optional | The redirect URL assigned on the **OAuth** page for your application in the [Developer Dashboard](https://developer.squareup.com/apps).
**Constraints**: *Maximum Length*: `2048` | +| `clientSecret` | `string \| null \| undefined` | Optional | The Square-issued application secret for your application, which is available on the **OAuth** page
in the [Developer Dashboard](https://developer.squareup.com/apps). This parameter is only required when
you're not using the [OAuth PKCE (Proof Key for Code Exchange) flow](https://developer.squareup.com/docs/oauth-api/overview#pkce-flow).
The PKCE flow requires a `code_verifier` instead of a `client_secret` when `grant_type` is set to `authorization_code`.
If `grant_type` is set to `refresh_token` and the `refresh_token` is obtained uaing PKCE, the PKCE flow only requires `client_id`, 
`grant_type`, and `refresh_token`.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | +| `code` | `string \| null \| undefined` | Optional | The authorization code to exchange.
This code is required if `grant_type` is set to `authorization_code` to indicate that
the application wants to exchange an authorization code for an OAuth access token.
**Constraints**: *Maximum Length*: `191` | +| `redirectUri` | `string \| null \| undefined` | Optional | The redirect URL assigned on the **OAuth** page for your application in the [Developer Dashboard](https://developer.squareup.com/apps).
**Constraints**: *Maximum Length*: `2048` | | `grantType` | `string` | Required | Specifies the method to request an OAuth access token.
Valid values are `authorization_code`, `refresh_token`, and `migration_token`.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `20` | -| `refreshToken` | `string \| undefined` | Optional | A valid refresh token for generating a new OAuth access token.

A valid refresh token is required if `grant_type` is set to `refresh_token`
to indicate that the application wants a replacement for an expired OAuth access token.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | -| `migrationToken` | `string \| undefined` | Optional | A legacy OAuth access token obtained using a Connect API version prior
to 2019-03-13. This parameter is required if `grant_type` is set to
`migration_token` to indicate that the application wants to get a replacement
OAuth access token. The response also returns a refresh token.
For more information, see [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | -| `scopes` | `string[] \| undefined` | Optional | A JSON list of strings representing the permissions that the application is requesting.
For example, "`["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"]`".

The access token returned in the response is granted the permissions
that comprise the intersection between the requested list of permissions and those
that belong to the provided refresh token. | -| `shortLived` | `boolean \| undefined` | Optional | A Boolean indicating a request for a short-lived access token.

The short-lived access token returned in the response expires in 24 hours. | -| `codeVerifier` | `string \| undefined` | Optional | Must be provided when using the PKCE OAuth flow if `grant_type` is set to `authorization_code`. The `code_verifier` is used to verify against the
`code_challenge` associated with the `authorization_code`. | +| `refreshToken` | `string \| null \| undefined` | Optional | A valid refresh token for generating a new OAuth access token.

A valid refresh token is required if `grant_type` is set to `refresh_token`
to indicate that the application wants a replacement for an expired OAuth access token.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | +| `migrationToken` | `string \| null \| undefined` | Optional | A legacy OAuth access token obtained using a Connect API version prior
to 2019-03-13. This parameter is required if `grant_type` is set to
`migration_token` to indicate that the application wants to get a replacement
OAuth access token. The response also returns a refresh token.
For more information, see [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | +| `scopes` | `string[] \| null \| undefined` | Optional | A JSON list of strings representing the permissions that the application is requesting.
For example, "`["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"]`".

The access token returned in the response is granted the permissions
that comprise the intersection between the requested list of permissions and those
that belong to the provided refresh token. | +| `shortLived` | `boolean \| null \| undefined` | Optional | A Boolean indicating a request for a short-lived access token.

The short-lived access token returned in the response expires in 24 hours. | +| `codeVerifier` | `string \| null \| undefined` | Optional | Must be provided when using the PKCE OAuth flow if `grant_type` is set to `authorization_code`. The `code_verifier` is used to verify against the
`code_challenge` associated with the `authorization_code`. | ## Example (as JSON) diff --git a/doc/models/order-created.md b/doc/models/order-created.md index 8edc8e47..5378169b 100644 --- a/doc/models/order-created.md +++ b/doc/models/order-created.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orderId` | `string \| undefined` | Optional | The order's unique ID. | +| `orderId` | `string \| null \| undefined` | Optional | The order's unique ID. | | `version` | `number \| undefined` | Optional | The version number, which is incremented each time an update is committed to the order.
Orders that were not created through the API do not include a version number and
therefore cannot be updated.

[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) | -| `locationId` | `string \| undefined` | Optional | The ID of the seller location that this order is associated with. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the seller location that this order is associated with. | | `state` | [`string \| undefined`](../../doc/models/order-state.md) | Optional | The state of the order. | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the order was created, in RFC 3339 format. | diff --git a/doc/models/order-entry.md b/doc/models/order-entry.md index a03a4975..b49bc88a 100644 --- a/doc/models/order-entry.md +++ b/doc/models/order-entry.md @@ -12,9 +12,9 @@ A lightweight description of an [order](../../doc/models/order.md) that is retur | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orderId` | `string \| undefined` | Optional | The ID of the order. | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the order. | | `version` | `number \| undefined` | Optional | The version number, which is incremented each time an update is committed to the order.
Orders that were not created through the API do not include a version number and
therefore cannot be updated.

[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) | -| `locationId` | `string \| undefined` | Optional | The location ID the order belongs to. | +| `locationId` | `string \| null \| undefined` | Optional | The location ID the order belongs to. | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-delivery-details.md b/doc/models/order-fulfillment-delivery-details.md index cb10df97..ee5c0be0 100644 --- a/doc/models/order-fulfillment-delivery-details.md +++ b/doc/models/order-fulfillment-delivery-details.md @@ -14,26 +14,26 @@ Describes delivery details of an order fulfillment. | `recipient` | [`OrderFulfillmentRecipient \| undefined`](../../doc/models/order-fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | | `scheduleType` | [`string \| undefined`](../../doc/models/order-fulfillment-delivery-details-schedule-type.md) | Optional | The schedule type of the delivery fulfillment. | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was placed.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z". | -| `deliverAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the delivery period.
When the fulfillment `schedule_type` is `ASAP`, the field is automatically
set to the current time plus the `prep_time_duration`.
Otherwise, the application can set this field while the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `prepTimeDuration` | `string \| undefined` | Optional | The duration of time it takes to prepare and deliver this fulfillment.
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | -| `deliveryWindowDuration` | `string \| undefined` | Optional | The time period after the `deliver_at` timestamp in which to deliver the order.
Applications can set this field when the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
such as `COMPLETED`, `CANCELED`, and `FAILED`).
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | -| `note` | `string \| undefined` | Optional | Provides additional instructions about the delivery fulfillment.
It is displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `550` | -| `completedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller completed the fulfillment.
This field is automatically set when fulfillment `state` changes to `COMPLETED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `deliverAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the delivery period.
When the fulfillment `schedule_type` is `ASAP`, the field is automatically
set to the current time plus the `prep_time_duration`.
Otherwise, the application can set this field while the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).

The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | +| `prepTimeDuration` | `string \| null \| undefined` | Optional | The duration of time it takes to prepare and deliver this fulfillment.
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | +| `deliveryWindowDuration` | `string \| null \| undefined` | Optional | The time period after the `deliver_at` timestamp in which to deliver the order.
Applications can set this field when the fulfillment `state` is
`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
such as `COMPLETED`, `CANCELED`, and `FAILED`).
The timestamp must be in RFC 3339 format (for example, "P1W3D"). | +| `note` | `string \| null \| undefined` | Optional | Provides additional instructions about the delivery fulfillment.
It is displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `550` | +| `completedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller completed the fulfillment.
This field is automatically set when fulfillment `state` changes to `COMPLETED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `inProgressAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicates when the seller started processing the fulfillment.
This field is automatically set when the fulfillment `state` changes to `RESERVED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `rejectedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was rejected. This field is
automatically set when the fulfillment `state` changes to `FAILED`.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `readyAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the seller marked the fulfillment as ready for
courier pickup. This field is automatically set when the fulfillment `state` changes
to PREPARED.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `deliveredAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was delivered to the recipient.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was canceled. This field is automatically
set when the fulfillment `state` changes to `CANCELED`.

The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | The delivery cancellation reason. Max length: 100 characters.
**Constraints**: *Maximum Length*: `100` | -| `courierPickupAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when an order can be picked up by the courier for delivery.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `courierPickupWindowDuration` | `string \| undefined` | Optional | The period of time in which the order should be picked up by the courier after the
`courier_pickup_at` timestamp.
The time must be in RFC 3339 format (for example, "P1W3D"). | -| `isNoContactDelivery` | `boolean \| undefined` | Optional | Whether the delivery is preferred to be no contact. | -| `dropoffNotes` | `string \| undefined` | Optional | A note to provide additional instructions about how to deliver the order.
**Constraints**: *Maximum Length*: `550` | -| `courierProviderName` | `string \| undefined` | Optional | The name of the courier provider.
**Constraints**: *Maximum Length*: `255` | -| `courierSupportPhoneNumber` | `string \| undefined` | Optional | The support phone number of the courier.
**Constraints**: *Maximum Length*: `17` | -| `squareDeliveryId` | `string \| undefined` | Optional | The identifier for the delivery created by Square.
**Constraints**: *Maximum Length*: `50` | -| `externalDeliveryId` | `string \| undefined` | Optional | The identifier for the delivery created by the third-party courier service.
**Constraints**: *Maximum Length*: `50` | -| `managedDelivery` | `boolean \| undefined` | Optional | The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
we may not receive all recipient information for PII purposes. | +| `cancelReason` | `string \| null \| undefined` | Optional | The delivery cancellation reason. Max length: 100 characters.
**Constraints**: *Maximum Length*: `100` | +| `courierPickupAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when an order can be picked up by the courier for delivery.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `courierPickupWindowDuration` | `string \| null \| undefined` | Optional | The period of time in which the order should be picked up by the courier after the
`courier_pickup_at` timestamp.
The time must be in RFC 3339 format (for example, "P1W3D"). | +| `isNoContactDelivery` | `boolean \| null \| undefined` | Optional | Whether the delivery is preferred to be no contact. | +| `dropoffNotes` | `string \| null \| undefined` | Optional | A note to provide additional instructions about how to deliver the order.
**Constraints**: *Maximum Length*: `550` | +| `courierProviderName` | `string \| null \| undefined` | Optional | The name of the courier provider.
**Constraints**: *Maximum Length*: `255` | +| `courierSupportPhoneNumber` | `string \| null \| undefined` | Optional | The support phone number of the courier.
**Constraints**: *Maximum Length*: `17` | +| `squareDeliveryId` | `string \| null \| undefined` | Optional | The identifier for the delivery created by Square.
**Constraints**: *Maximum Length*: `50` | +| `externalDeliveryId` | `string \| null \| undefined` | Optional | The identifier for the delivery created by the third-party courier service.
**Constraints**: *Maximum Length*: `50` | +| `managedDelivery` | `boolean \| null \| undefined` | Optional | The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
we may not receive all recipient information for PII purposes. | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-fulfillment-entry.md b/doc/models/order-fulfillment-fulfillment-entry.md index 3930588b..dec217a1 100644 --- a/doc/models/order-fulfillment-fulfillment-entry.md +++ b/doc/models/order-fulfillment-fulfillment-entry.md @@ -13,10 +13,10 @@ fulfill. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the fulfillment entry only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the fulfillment entry only within this order.
**Constraints**: *Maximum Length*: `60` | | `lineItemUid` | `string` | Required | The `uid` from the order line item.
**Constraints**: *Minimum Length*: `1` | | `quantity` | `string` | Required | The quantity of the line item being fulfilled, formatted as a decimal number.
For example, `"3"`.
Fulfillments for line items with a `quantity_unit` can have non-integer quantities.
For example, `"1.70000"`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12` | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this fulfillment entry. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).
Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.
Values have a maximum length of 255 characters.
An application can have up to 10 entries per metadata field.
Entries written by applications are private and can only be read or modified by the same
application.
For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this fulfillment entry. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).
Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.
Values have a maximum length of 255 characters.
An application can have up to 10 entries per metadata field.
Entries written by applications are private and can only be read or modified by the same
application.
For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md b/doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md index 64a08841..80cdca6c 100644 --- a/doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md +++ b/doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md @@ -11,8 +11,8 @@ Specific details for curbside pickup. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `curbsideDetails` | `string \| undefined` | Optional | Specific details for curbside pickup, such as parking number and vehicle model.
**Constraints**: *Maximum Length*: `250` | -| `buyerArrivedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | +| `curbsideDetails` | `string \| null \| undefined` | Optional | Specific details for curbside pickup, such as parking number and vehicle model.
**Constraints**: *Maximum Length*: `250` | +| `buyerArrivedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-pickup-details.md b/doc/models/order-fulfillment-pickup-details.md index 949b5d94..130659eb 100644 --- a/doc/models/order-fulfillment-pickup-details.md +++ b/doc/models/order-fulfillment-pickup-details.md @@ -12,13 +12,13 @@ Contains details necessary to fulfill a pickup order. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient` | [`OrderFulfillmentRecipient \| undefined`](../../doc/models/order-fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | -| `expiresAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment expires if it is not accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set up to 7 days in the future.
If `expires_at` is not set, this pickup fulfillment is automatically accepted when
placed. | -| `autoCompleteDuration` | `string \| undefined` | Optional | The duration of time after which an open and accepted pickup fulfillment
is automatically moved to the `COMPLETED` state. The duration must be in RFC 3339
format (for example, "P1W3D").
If not set, this pickup fulfillment remains accepted until it is canceled or completed. | +| `expiresAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment expires if it is not accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set up to 7 days in the future.
If `expires_at` is not set, this pickup fulfillment is automatically accepted when
placed. | +| `autoCompleteDuration` | `string \| null \| undefined` | Optional | The duration of time after which an open and accepted pickup fulfillment
is automatically moved to the `COMPLETED` state. The duration must be in RFC 3339
format (for example, "P1W3D").
If not set, this pickup fulfillment remains accepted until it is canceled or completed. | | `scheduleType` | [`string \| undefined`](../../doc/models/order-fulfillment-pickup-details-schedule-type.md) | Optional | The schedule type of the pickup fulfillment. | -| `pickupAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,
"2016-09-04T23:59:33.123Z".
For fulfillments with the schedule type `ASAP`, this is automatically set
to the current time plus the expected duration to prepare the fulfillment. | -| `pickupWindowDuration` | `string \| undefined` | Optional | The window of time in which the order should be picked up after the `pickup_at` timestamp.
Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an
informational guideline for merchants. | -| `prepTimeDuration` | `string \| undefined` | Optional | The duration of time it takes to prepare this fulfillment.
The duration must be in RFC 3339 format (for example, "P1W3D"). | -| `note` | `string \| undefined` | Optional | A note to provide additional instructions about the pickup
fulfillment displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `500` | +| `pickupAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
that represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,
"2016-09-04T23:59:33.123Z".
For fulfillments with the schedule type `ASAP`, this is automatically set
to the current time plus the expected duration to prepare the fulfillment. | +| `pickupWindowDuration` | `string \| null \| undefined` | Optional | The window of time in which the order should be picked up after the `pickup_at` timestamp.
Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an
informational guideline for merchants. | +| `prepTimeDuration` | `string \| null \| undefined` | Optional | The duration of time it takes to prepare this fulfillment.
The duration must be in RFC 3339 format (for example, "P1W3D"). | +| `note` | `string \| null \| undefined` | Optional | A note to provide additional instructions about the pickup
fulfillment displayed in the Square Point of Sale application and set by the API.
**Constraints**: *Maximum Length*: `500` | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `acceptedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was accepted. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `rejectedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | @@ -26,8 +26,8 @@ Contains details necessary to fulfill a pickup order. | `expiredAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment expired. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `pickedUpAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | A description of why the pickup was canceled. The maximum length: 100 characters.
**Constraints**: *Maximum Length*: `100` | -| `isCurbsidePickup` | `boolean \| undefined` | Optional | If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup. | +| `cancelReason` | `string \| null \| undefined` | Optional | A description of why the pickup was canceled. The maximum length: 100 characters.
**Constraints**: *Maximum Length*: `100` | +| `isCurbsidePickup` | `boolean \| null \| undefined` | Optional | If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup. | | `curbsidePickupDetails` | [`OrderFulfillmentPickupDetailsCurbsidePickupDetails \| undefined`](../../doc/models/order-fulfillment-pickup-details-curbside-pickup-details.md) | Optional | Specific details for curbside pickup. | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-recipient.md b/doc/models/order-fulfillment-recipient.md index fd899057..200c5632 100644 --- a/doc/models/order-fulfillment-recipient.md +++ b/doc/models/order-fulfillment-recipient.md @@ -11,10 +11,10 @@ Information about the fulfillment recipient. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customerId` | `string \| undefined` | Optional | The ID of the customer associated with the fulfillment.
If `customer_id` is provided, the fulfillment recipient's `display_name`,
`email_address`, and `phone_number` are automatically populated from the
targeted customer profile. If these fields are set in the request, the request
values override the information from the customer profile. If the
targeted customer profile does not contain the necessary information and
these fields are left unset, the request results in an error.
**Constraints**: *Maximum Length*: `191` | -| `displayName` | `string \| undefined` | Optional | The display name of the fulfillment recipient. This field is required.
If provided, the display name overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | -| `emailAddress` | `string \| undefined` | Optional | The email address of the fulfillment recipient.
If provided, the email address overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | -| `phoneNumber` | `string \| undefined` | Optional | The phone number of the fulfillment recipient. This field is required.
If provided, the phone number overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `17` | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the customer associated with the fulfillment.
If `customer_id` is provided, the fulfillment recipient's `display_name`,
`email_address`, and `phone_number` are automatically populated from the
targeted customer profile. If these fields are set in the request, the request
values override the information from the customer profile. If the
targeted customer profile does not contain the necessary information and
these fields are left unset, the request results in an error.
**Constraints**: *Maximum Length*: `191` | +| `displayName` | `string \| null \| undefined` | Optional | The display name of the fulfillment recipient. This field is required.
If provided, the display name overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address of the fulfillment recipient.
If provided, the email address overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `255` | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number of the fulfillment recipient. This field is required.
If provided, the phone number overrides the corresponding customer profile value
indicated by `customer_id`.
**Constraints**: *Maximum Length*: `17` | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-shipment-details.md b/doc/models/order-fulfillment-shipment-details.md index 29468ce0..0ac38999 100644 --- a/doc/models/order-fulfillment-shipment-details.md +++ b/doc/models/order-fulfillment-shipment-details.md @@ -12,20 +12,20 @@ Contains the details necessary to fulfill a shipment order. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient` | [`OrderFulfillmentRecipient \| undefined`](../../doc/models/order-fulfillment-recipient.md) | Optional | Information about the fulfillment recipient. | -| `carrier` | `string \| undefined` | Optional | The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
**Constraints**: *Maximum Length*: `50` | -| `shippingNote` | `string \| undefined` | Optional | A note with additional information for the shipping carrier.
**Constraints**: *Maximum Length*: `500` | -| `shippingType` | `string \| undefined` | Optional | A description of the type of shipping product purchased from the carrier
(such as First Class, Priority, or Express).
**Constraints**: *Maximum Length*: `50` | -| `trackingNumber` | `string \| undefined` | Optional | The reference number provided by the carrier to track the shipment's progress.
**Constraints**: *Maximum Length*: `100` | -| `trackingUrl` | `string \| undefined` | Optional | A link to the tracking webpage on the carrier's website.
**Constraints**: *Maximum Length*: `2000` | +| `carrier` | `string \| null \| undefined` | Optional | The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
**Constraints**: *Maximum Length*: `50` | +| `shippingNote` | `string \| null \| undefined` | Optional | A note with additional information for the shipping carrier.
**Constraints**: *Maximum Length*: `500` | +| `shippingType` | `string \| null \| undefined` | Optional | A description of the type of shipping product purchased from the carrier
(such as First Class, Priority, or Express).
**Constraints**: *Maximum Length*: `50` | +| `trackingNumber` | `string \| null \| undefined` | Optional | The reference number provided by the carrier to track the shipment's progress.
**Constraints**: *Maximum Length*: `100` | +| `trackingUrl` | `string \| null \| undefined` | Optional | A link to the tracking webpage on the carrier's website.
**Constraints**: *Maximum Length*: `2000` | | `placedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment was requested. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | | `inProgressAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation
of this shipment has begun. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `packagedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `PREPARED` state, which indicates that the
fulfillment is packaged. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `expectedShippedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment is expected to be delivered to the shipping carrier.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `expectedShippedAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment is expected to be delivered to the shipping carrier.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `shippedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when this fulfillment was moved to the `COMPLETED` state, which indicates that
the fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `canceledAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating the shipment was canceled.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | -| `cancelReason` | `string \| undefined` | Optional | A description of why the shipment was canceled.
**Constraints**: *Maximum Length*: `100` | +| `canceledAt` | `string \| null \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating the shipment was canceled.
The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | +| `cancelReason` | `string \| null \| undefined` | Optional | A description of why the shipment was canceled.
**Constraints**: *Maximum Length*: `100` | | `failedAt` | `string \| undefined` | Optional | The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
indicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format
(for example, "2016-09-04T23:59:33.123Z"). | -| `failureReason` | `string \| undefined` | Optional | A description of why the shipment failed to be completed.
**Constraints**: *Maximum Length*: `100` | +| `failureReason` | `string \| null \| undefined` | Optional | A description of why the shipment failed to be completed.
**Constraints**: *Maximum Length*: `100` | ## Example (as JSON) diff --git a/doc/models/order-fulfillment-updated-update.md b/doc/models/order-fulfillment-updated-update.md index 862fe7cd..fe4e1686 100644 --- a/doc/models/order-fulfillment-updated-update.md +++ b/doc/models/order-fulfillment-updated-update.md @@ -11,7 +11,7 @@ Information about fulfillment updates. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `fulfillmentUid` | `string \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order. | +| `fulfillmentUid` | `string \| null \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order. | | `oldState` | [`string \| undefined`](../../doc/models/fulfillment-state.md) | Optional | The current state of this fulfillment. | | `newState` | [`string \| undefined`](../../doc/models/fulfillment-state.md) | Optional | The current state of this fulfillment. | diff --git a/doc/models/order-fulfillment-updated.md b/doc/models/order-fulfillment-updated.md index f65f4a37..ab9132d5 100644 --- a/doc/models/order-fulfillment-updated.md +++ b/doc/models/order-fulfillment-updated.md @@ -9,13 +9,13 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orderId` | `string \| undefined` | Optional | The order's unique ID. | +| `orderId` | `string \| null \| undefined` | Optional | The order's unique ID. | | `version` | `number \| undefined` | Optional | The version number, which is incremented each time an update is committed to the order.
Orders that were not created through the API do not include a version number and
therefore cannot be updated.

[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) | -| `locationId` | `string \| undefined` | Optional | The ID of the seller location that this order is associated with. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the seller location that this order is associated with. | | `state` | [`string \| undefined`](../../doc/models/order-state.md) | Optional | The state of the order. | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the order was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp for when the order was last updated, in RFC 3339 format. | -| `fulfillmentUpdate` | [`OrderFulfillmentUpdatedUpdate[] \| undefined`](../../doc/models/order-fulfillment-updated-update.md) | Optional | The fulfillments that were updated with this version change. | +| `fulfillmentUpdate` | [`OrderFulfillmentUpdatedUpdate[] \| null \| undefined`](../../doc/models/order-fulfillment-updated-update.md) | Optional | The fulfillments that were updated with this version change. | ## Example (as JSON) diff --git a/doc/models/order-fulfillment.md b/doc/models/order-fulfillment.md index d48211bf..1e055bba 100644 --- a/doc/models/order-fulfillment.md +++ b/doc/models/order-fulfillment.md @@ -13,12 +13,12 @@ However, orders returned by the Orders API might contain multiple fulfillments b | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the fulfillment only within this order.
**Constraints**: *Maximum Length*: `60` | | `type` | [`string \| undefined`](../../doc/models/order-fulfillment-type.md) | Optional | The type of fulfillment. | | `state` | [`string \| undefined`](../../doc/models/order-fulfillment-state.md) | Optional | The current state of this fulfillment. | | `lineItemApplication` | [`string \| undefined`](../../doc/models/order-fulfillment-fulfillment-line-item-application.md) | Optional | The `line_item_application` describes what order line items this fulfillment applies
to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries. | | `entries` | [`OrderFulfillmentFulfillmentEntry[] \| undefined`](../../doc/models/order-fulfillment-fulfillment-entry.md) | Optional | A list of entries pertaining to the fulfillment of an order. Each entry must reference
a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to
fulfill.
Multiple entries can reference the same line item `uid`, as long as the total quantity among
all fulfillment entries referencing a single line item does not exceed the quantity of the
order's line item itself.
An order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,
`CANCELED`, or `FAILED`. Fulfillments can be created and completed independently
before order completion. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this fulfillment. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).
Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.
Values have a maximum length of 255 characters.
An application can have up to 10 entries per metadata field.
Entries written by applications are private and can only be read or modified by the same
application.
For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this fulfillment. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).
Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.
Values have a maximum length of 255 characters.
An application can have up to 10 entries per metadata field.
Entries written by applications are private and can only be read or modified by the same
application.
For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `pickupDetails` | [`OrderFulfillmentPickupDetails \| undefined`](../../doc/models/order-fulfillment-pickup-details.md) | Optional | Contains details necessary to fulfill a pickup order. | | `shipmentDetails` | [`OrderFulfillmentShipmentDetails \| undefined`](../../doc/models/order-fulfillment-shipment-details.md) | Optional | Contains the details necessary to fulfill a shipment order. | | `deliveryDetails` | [`OrderFulfillmentDeliveryDetails \| undefined`](../../doc/models/order-fulfillment-delivery-details.md) | Optional | Describes delivery details of an order fulfillment. | diff --git a/doc/models/order-line-item-applied-discount.md b/doc/models/order-line-item-applied-discount.md index a27b2f3e..04ec0735 100644 --- a/doc/models/order-line-item-applied-discount.md +++ b/doc/models/order-line-item-applied-discount.md @@ -16,7 +16,7 @@ line items. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the applied discount only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the applied discount only within this order.
**Constraints**: *Maximum Length*: `60` | | `discountUid` | `string` | Required | The `uid` of the discount that the applied discount represents. It must
reference a discount present in the `order.discounts` field.

This field is immutable. To change which discounts apply to a line item,
you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60` | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/order-line-item-applied-service-charge.md b/doc/models/order-line-item-applied-service-charge.md index 0fb56027..13fa3998 100644 --- a/doc/models/order-line-item-applied-service-charge.md +++ b/doc/models/order-line-item-applied-service-charge.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the applied service charge only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the applied service charge only within this order.
**Constraints**: *Maximum Length*: `60` | | `serviceChargeUid` | `string` | Required | The `uid` of the service charge that the applied service charge represents. It must
reference a service charge present in the `order.service_charges` field.

This field is immutable. To change which service charges apply to a line item,
delete and add a new `OrderLineItemAppliedServiceCharge`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60` | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/order-line-item-applied-tax.md b/doc/models/order-line-item-applied-tax.md index dfa060d4..1b0c9006 100644 --- a/doc/models/order-line-item-applied-tax.md +++ b/doc/models/order-line-item-applied-tax.md @@ -16,7 +16,7 @@ set of participating line items. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the applied tax only within this order.
**Constraints**: *Maximum Length*: `60` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the applied tax only within this order.
**Constraints**: *Maximum Length*: `60` | | `taxUid` | `string` | Required | The `uid` of the tax for which this applied tax represents. It must reference
a tax present in the `order.taxes` field.

This field is immutable. To change which taxes apply to a line item, delete and add a new
`OrderLineItemAppliedTax`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60` | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/order-line-item-discount.md b/doc/models/order-line-item-discount.md index f2fcc216..9d2a393d 100644 --- a/doc/models/order-line-item-discount.md +++ b/doc/models/order-line-item-discount.md @@ -16,15 +16,15 @@ amount contributed by the item to the order subtotal. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the discount only within this order.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this discount references. | -| `name` | `string \| undefined` | Optional | The discount's name.
**Constraints**: *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the discount only within this order.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this discount references. | +| `name` | `string \| null \| undefined` | Optional | The discount's name.
**Constraints**: *Maximum Length*: `255` | | `type` | [`string \| undefined`](../../doc/models/order-line-item-discount-type.md) | Optional | Indicates how the discount is applied to the associated line item or order. | -| `percentage` | `string \| undefined` | Optional | The percentage of the discount, as a string representation of a decimal number.
A value of `7.25` corresponds to a percentage of 7.25%.

`percentage` is not set for amount-based discounts.
**Constraints**: *Maximum Length*: `10` | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the discount, as a string representation of a decimal number.
A value of `7.25` corresponds to a percentage of 7.25%.

`percentage` is not set for amount-based discounts.
**Constraints**: *Maximum Length*: `10` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this discount. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this discount. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `scope` | [`string \| undefined`](../../doc/models/order-line-item-discount-scope.md) | Optional | Indicates whether this is a line-item or order-level discount. | | `rewardIds` | `string[] \| undefined` | Optional | The reward IDs corresponding to this discount. The application and
specification of discounts that have `reward_ids` are completely controlled by the backing
criteria corresponding to the reward tiers of the rewards that are added to the order
through the Loyalty API. To manually unapply discounts that are the result of added rewards,
the rewards must be removed from the order through the Loyalty API. | | `pricingRuleId` | `string \| undefined` | Optional | The object ID of a [pricing rule](entity:CatalogPricingRule) to be applied
automatically to this discount. The specification and application of the discounts, to
which a `pricing_rule_id` is assigned, are completely controlled by the corresponding
pricing rule. | diff --git a/doc/models/order-line-item-modifier.md b/doc/models/order-line-item-modifier.md index 8d65a40f..f9287a76 100644 --- a/doc/models/order-line-item-modifier.md +++ b/doc/models/order-line-item-modifier.md @@ -11,14 +11,14 @@ A [CatalogModifier](../../doc/models/catalog-modifier.md). | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the modifier only within this order.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this modifier references. | -| `name` | `string \| undefined` | Optional | The name of the item modifier.
**Constraints**: *Maximum Length*: `255` | -| `quantity` | `string \| undefined` | Optional | The quantity of the line item modifier. The modifier quantity can be 0 or more.
For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
this item, the restaurant records the purchase by creating an `Order` object with a line item
for a burger. The line item includes a line item modifier: the name is cheese and the quantity
is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
any cheese, the modifier quantity is set to 0. | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the modifier only within this order.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this modifier references. | +| `name` | `string \| null \| undefined` | Optional | The name of the item modifier.
**Constraints**: *Maximum Length*: `255` | +| `quantity` | `string \| null \| undefined` | Optional | The quantity of the line item modifier. The modifier quantity can be 0 or more.
For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
this item, the restaurant records the purchase by creating an `Order` object with a line item
for a burger. The line item includes a line item modifier: the name is cheese and the quantity
is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
any cheese, the modifier quantity is set to 0. | | `basePriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this order. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this order. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | ## Example (as JSON) diff --git a/doc/models/order-line-item-pricing-blocklists-blocked-discount.md b/doc/models/order-line-item-pricing-blocklists-blocked-discount.md index c663c6ce..936f9a68 100644 --- a/doc/models/order-line-item-pricing-blocklists-blocked-discount.md +++ b/doc/models/order-line-item-pricing-blocklists-blocked-discount.md @@ -12,9 +12,9 @@ identified by either `discount_uid` or `discount_catalog_object_id`, but not bot | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID of the `BlockedDiscount` within the order.
**Constraints**: *Maximum Length*: `60` | -| `discountUid` | `string \| undefined` | Optional | The `uid` of the discount that should be blocked. Use this field to block
ad hoc discounts. For catalog discounts, use the `discount_catalog_object_id` field.
**Constraints**: *Maximum Length*: `60` | -| `discountCatalogObjectId` | `string \| undefined` | Optional | The `catalog_object_id` of the discount that should be blocked.
Use this field to block catalog discounts. For ad hoc discounts, use the
`discount_uid` field.
**Constraints**: *Maximum Length*: `192` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID of the `BlockedDiscount` within the order.
**Constraints**: *Maximum Length*: `60` | +| `discountUid` | `string \| null \| undefined` | Optional | The `uid` of the discount that should be blocked. Use this field to block
ad hoc discounts. For catalog discounts, use the `discount_catalog_object_id` field.
**Constraints**: *Maximum Length*: `60` | +| `discountCatalogObjectId` | `string \| null \| undefined` | Optional | The `catalog_object_id` of the discount that should be blocked.
Use this field to block catalog discounts. For ad hoc discounts, use the
`discount_uid` field.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/order-line-item-pricing-blocklists-blocked-tax.md b/doc/models/order-line-item-pricing-blocklists-blocked-tax.md index de81bd4f..32baa487 100644 --- a/doc/models/order-line-item-pricing-blocklists-blocked-tax.md +++ b/doc/models/order-line-item-pricing-blocklists-blocked-tax.md @@ -12,9 +12,9 @@ identified by either `tax_uid` or `tax_catalog_object_id`, but not both. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID of the `BlockedTax` within the order.
**Constraints**: *Maximum Length*: `60` | -| `taxUid` | `string \| undefined` | Optional | The `uid` of the tax that should be blocked. Use this field to block
ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` field.
**Constraints**: *Maximum Length*: `60` | -| `taxCatalogObjectId` | `string \| undefined` | Optional | The `catalog_object_id` of the tax that should be blocked.
Use this field to block catalog taxes. For ad hoc taxes, use the
`tax_uid` field.
**Constraints**: *Maximum Length*: `192` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID of the `BlockedTax` within the order.
**Constraints**: *Maximum Length*: `60` | +| `taxUid` | `string \| null \| undefined` | Optional | The `uid` of the tax that should be blocked. Use this field to block
ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` field.
**Constraints**: *Maximum Length*: `60` | +| `taxCatalogObjectId` | `string \| null \| undefined` | Optional | The `catalog_object_id` of the tax that should be blocked.
Use this field to block catalog taxes. For ad hoc taxes, use the
`tax_uid` field.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/order-line-item-pricing-blocklists.md b/doc/models/order-line-item-pricing-blocklists.md index 6cff0955..d2115b3e 100644 --- a/doc/models/order-line-item-pricing-blocklists.md +++ b/doc/models/order-line-item-pricing-blocklists.md @@ -13,8 +13,8 @@ application to a line item. For more information, see | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `blockedDiscounts` | [`OrderLineItemPricingBlocklistsBlockedDiscount[] \| undefined`](../../doc/models/order-line-item-pricing-blocklists-blocked-discount.md) | Optional | A list of discounts blocked from applying to the line item.
Discounts can be blocked by the `discount_uid` (for ad hoc discounts) or
the `discount_catalog_object_id` (for catalog discounts). | -| `blockedTaxes` | [`OrderLineItemPricingBlocklistsBlockedTax[] \| undefined`](../../doc/models/order-line-item-pricing-blocklists-blocked-tax.md) | Optional | A list of taxes blocked from applying to the line item.
Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or
the `tax_catalog_object_id` (for catalog taxes). | +| `blockedDiscounts` | [`OrderLineItemPricingBlocklistsBlockedDiscount[] \| null \| undefined`](../../doc/models/order-line-item-pricing-blocklists-blocked-discount.md) | Optional | A list of discounts blocked from applying to the line item.
Discounts can be blocked by the `discount_uid` (for ad hoc discounts) or
the `discount_catalog_object_id` (for catalog discounts). | +| `blockedTaxes` | [`OrderLineItemPricingBlocklistsBlockedTax[] \| null \| undefined`](../../doc/models/order-line-item-pricing-blocklists-blocked-tax.md) | Optional | A list of taxes blocked from applying to the line item.
Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or
the `tax_catalog_object_id` (for catalog taxes). | ## Example (as JSON) diff --git a/doc/models/order-line-item-tax.md b/doc/models/order-line-item-tax.md index 6241fc71..ec166623 100644 --- a/doc/models/order-line-item-tax.md +++ b/doc/models/order-line-item-tax.md @@ -15,13 +15,13 @@ contributes to the order subtotal. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the tax only within this order.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogTax](entity:CatalogTax).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this tax references. | -| `name` | `string \| undefined` | Optional | The tax's name.
**Constraints**: *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the tax only within this order.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogTax](entity:CatalogTax).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this tax references. | +| `name` | `string \| null \| undefined` | Optional | The tax's name.
**Constraints**: *Maximum Length*: `255` | | `type` | [`string \| undefined`](../../doc/models/order-line-item-tax-type.md) | Optional | Indicates how the tax is applied to the associated line item or order. | -| `percentage` | `string \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal
number. For example, a value of `"7.25"` corresponds to a percentage of
7.25%.
**Constraints**: *Maximum Length*: `10` | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this tax. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal
number. For example, a value of `"7.25"` corresponds to a percentage of
7.25%.
**Constraints**: *Maximum Length*: `10` | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this tax. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `scope` | [`string \| undefined`](../../doc/models/order-line-item-tax-scope.md) | Optional | Indicates whether this is a line-item or order-level tax. | | `autoApplied` | `boolean \| undefined` | Optional | Determines whether the tax was automatically applied to the order based on
the catalog configuration. For an example, see
[Automatically Apply Taxes to an Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes). | diff --git a/doc/models/order-line-item.md b/doc/models/order-line-item.md index 99daace7..e6544bab 100644 --- a/doc/models/order-line-item.md +++ b/doc/models/order-line-item.md @@ -12,20 +12,20 @@ product to purchase, with its own quantity and price details. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the line item only within this order.
**Constraints**: *Maximum Length*: `60` | -| `name` | `string \| undefined` | Optional | The name of the line item.
**Constraints**: *Maximum Length*: `512` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the line item only within this order.
**Constraints**: *Maximum Length*: `60` | +| `name` | `string \| null \| undefined` | Optional | The name of the line item.
**Constraints**: *Maximum Length*: `512` | | `quantity` | `string` | Required | The quantity purchased, formatted as a decimal number.
For example, `"3"`.

Line items with a quantity of `"0"` are automatically removed
when paying for or otherwise completing the order.

Line items with a `quantity_unit` can have non-integer quantities.
For example, `"1.70000"`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12` | | `quantityUnit` | [`OrderQuantityUnit \| undefined`](../../doc/models/order-quantity-unit.md) | Optional | Contains the measurement unit for a quantity and a precision that
specifies the number of digits after the decimal point for decimal quantities. | -| `note` | `string \| undefined` | Optional | The note of the line item.
**Constraints**: *Maximum Length*: `2000` | -| `catalogObjectId` | `string \| undefined` | Optional | The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this line item.
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this line item references. | -| `variationName` | `string \| undefined` | Optional | The name of the variation applied to this line item.
**Constraints**: *Maximum Length*: `400` | +| `note` | `string \| null \| undefined` | Optional | The note of the line item.
**Constraints**: *Maximum Length*: `2000` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this line item.
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this line item references. | +| `variationName` | `string \| null \| undefined` | Optional | The name of the variation applied to this line item.
**Constraints**: *Maximum Length*: `400` | | `itemType` | [`string \| undefined`](../../doc/models/order-line-item-item-type.md) | Optional | Represents the line item type. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this line item. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | -| `modifiers` | [`OrderLineItemModifier[] \| undefined`](../../doc/models/order-line-item-modifier.md) | Optional | The [CatalogModifier](entity:CatalogModifier)s applied to this line item. | -| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to taxes applied to this line item. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a
top-level `OrderLineItemTax` applied to the line item. On reads, the
amount applied is populated.

An `OrderLineItemAppliedTax` is automatically created on every line
item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax`
records for `LINE_ITEM` scoped taxes must be added in requests for the tax
to apply to any line items.

To change the amount of a tax, modify the referenced top-level tax. | -| `appliedDiscounts` | [`OrderLineItemAppliedDiscount[] \| undefined`](../../doc/models/order-line-item-applied-discount.md) | Optional | The list of references to discounts applied to this line item. Each
`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
`OrderLineItemDiscounts` applied to the line item. On reads, the amount
applied is populated.

An `OrderLineItemAppliedDiscount` is automatically created on every line item for all
`ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records
for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any
line items.

To change the amount of a discount, modify the referenced top-level discount. | -| `appliedServiceCharges` | [`OrderLineItemAppliedServiceCharge[] \| undefined`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to this line item. Each
`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
top-level `OrderServiceCharge` applied to the line item. On reads, the amount applied is
populated.

To change the amount of a service charge, modify the referenced top-level service charge. | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this line item. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `modifiers` | [`OrderLineItemModifier[] \| null \| undefined`](../../doc/models/order-line-item-modifier.md) | Optional | The [CatalogModifier](entity:CatalogModifier)s applied to this line item. | +| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| null \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to taxes applied to this line item. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a
top-level `OrderLineItemTax` applied to the line item. On reads, the
amount applied is populated.

An `OrderLineItemAppliedTax` is automatically created on every line
item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax`
records for `LINE_ITEM` scoped taxes must be added in requests for the tax
to apply to any line items.

To change the amount of a tax, modify the referenced top-level tax. | +| `appliedDiscounts` | [`OrderLineItemAppliedDiscount[] \| null \| undefined`](../../doc/models/order-line-item-applied-discount.md) | Optional | The list of references to discounts applied to this line item. Each
`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
`OrderLineItemDiscounts` applied to the line item. On reads, the amount
applied is populated.

An `OrderLineItemAppliedDiscount` is automatically created on every line item for all
`ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records
for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any
line items.

To change the amount of a discount, modify the referenced top-level discount. | +| `appliedServiceCharges` | [`OrderLineItemAppliedServiceCharge[] \| null \| undefined`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to this line item. Each
`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
top-level `OrderServiceCharge` applied to the line item. On reads, the amount applied is
populated.

To change the amount of a service charge, modify the referenced top-level service charge. | | `basePriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `variationTotalPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `grossSalesMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/order-pricing-options.md b/doc/models/order-pricing-options.md index 2b298e75..8a68c263 100644 --- a/doc/models/order-pricing-options.md +++ b/doc/models/order-pricing-options.md @@ -13,8 +13,8 @@ They can be used, for example, to apply automatic price adjustments that are bas | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `autoApplyDiscounts` | `boolean \| undefined` | Optional | The option to determine whether pricing rule-based
discounts are automatically applied to an order. | -| `autoApplyTaxes` | `boolean \| undefined` | Optional | The option to determine whether rule-based taxes are automatically
applied to an order when the criteria of the corresponding rules are met. | +| `autoApplyDiscounts` | `boolean \| null \| undefined` | Optional | The option to determine whether pricing rule-based
discounts are automatically applied to an order. | +| `autoApplyTaxes` | `boolean \| null \| undefined` | Optional | The option to determine whether rule-based taxes are automatically
applied to an order when the criteria of the corresponding rules are met. | ## Example (as JSON) diff --git a/doc/models/order-quantity-unit.md b/doc/models/order-quantity-unit.md index 6b778db3..5983435e 100644 --- a/doc/models/order-quantity-unit.md +++ b/doc/models/order-quantity-unit.md @@ -13,9 +13,9 @@ specifies the number of digits after the decimal point for decimal quantities. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `measurementUnit` | [`MeasurementUnit \| undefined`](../../doc/models/measurement-unit.md) | Optional | Represents a unit of measurement to use with a quantity, such as ounces
or inches. Exactly one of the following fields are required: `custom_unit`,
`area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. | -| `precision` | `number \| undefined` | Optional | For non-integer quantities, represents the number of digits after the decimal point that are
recorded for this quantity.

For example, a precision of 1 allows quantities such as `"1.0"` and `"1.1"`, but not `"1.01"`.

Min: 0. Max: 5. | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing the
[CatalogMeasurementUnit](entity:CatalogMeasurementUnit).

This field is set when this is a catalog-backed measurement unit. | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this measurement unit references.

This field is set when this is a catalog-backed measurement unit. | +| `precision` | `number \| null \| undefined` | Optional | For non-integer quantities, represents the number of digits after the decimal point that are
recorded for this quantity.

For example, a precision of 1 allows quantities such as `"1.0"` and `"1.1"`, but not `"1.01"`.

Min: 0. Max: 5. | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing the
[CatalogMeasurementUnit](entity:CatalogMeasurementUnit).

This field is set when this is a catalog-backed measurement unit. | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this measurement unit references.

This field is set when this is a catalog-backed measurement unit. | ## Example (as JSON) diff --git a/doc/models/order-return-discount.md b/doc/models/order-return-discount.md index c490f592..e24cb5b3 100644 --- a/doc/models/order-return-discount.md +++ b/doc/models/order-return-discount.md @@ -16,13 +16,13 @@ order subtotal. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the returned discount only within this order.
**Constraints**: *Maximum Length*: `60` | -| `sourceDiscountUid` | `string \| undefined` | Optional | The discount `uid` from the order that contains the original application of this discount.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this discount references. | -| `name` | `string \| undefined` | Optional | The discount's name.
**Constraints**: *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the returned discount only within this order.
**Constraints**: *Maximum Length*: `60` | +| `sourceDiscountUid` | `string \| null \| undefined` | Optional | The discount `uid` from the order that contains the original application of this discount.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this discount references. | +| `name` | `string \| null \| undefined` | Optional | The discount's name.
**Constraints**: *Maximum Length*: `255` | | `type` | [`string \| undefined`](../../doc/models/order-line-item-discount-type.md) | Optional | Indicates how the discount is applied to the associated line item or order. | -| `percentage` | `string \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal number.
A value of `"7.25"` corresponds to a percentage of 7.25%.

`percentage` is not set for amount-based discounts.
**Constraints**: *Maximum Length*: `10` | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal number.
A value of `"7.25"` corresponds to a percentage of 7.25%.

`percentage` is not set for amount-based discounts.
**Constraints**: *Maximum Length*: `10` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `scope` | [`string \| undefined`](../../doc/models/order-line-item-discount-scope.md) | Optional | Indicates whether this is a line-item or order-level discount. | diff --git a/doc/models/order-return-line-item-modifier.md b/doc/models/order-return-line-item-modifier.md index df0de0d0..db52def3 100644 --- a/doc/models/order-return-line-item-modifier.md +++ b/doc/models/order-return-line-item-modifier.md @@ -11,14 +11,14 @@ A line item modifier being returned. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the return modifier only within this order.
**Constraints**: *Maximum Length*: `60` | -| `sourceModifierUid` | `string \| undefined` | Optional | The modifier `uid` from the order's line item that contains the
original sale of this line item modifier.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this line item modifier references. | -| `name` | `string \| undefined` | Optional | The name of the item modifier.
**Constraints**: *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the return modifier only within this order.
**Constraints**: *Maximum Length*: `60` | +| `sourceModifierUid` | `string \| null \| undefined` | Optional | The modifier `uid` from the order's line item that contains the
original sale of this line item modifier.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this line item modifier references. | +| `name` | `string \| null \| undefined` | Optional | The name of the item modifier.
**Constraints**: *Maximum Length*: `255` | | `basePriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `quantity` | `string \| undefined` | Optional | The quantity of the line item modifier. The modifier quantity can be 0 or more.
For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
this item, the restaurant records the purchase by creating an `Order` object with a line item
for a burger. The line item includes a line item modifier: the name is cheese and the quantity
is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
any cheese, the modifier quantity is set to 0. | +| `quantity` | `string \| null \| undefined` | Optional | The quantity of the line item modifier. The modifier quantity can be 0 or more.
For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
this item, the restaurant records the purchase by creating an `Order` object with a line item
for a burger. The line item includes a line item modifier: the name is cheese and the quantity
is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
any cheese, the modifier quantity is set to 0. | ## Example (as JSON) diff --git a/doc/models/order-return-line-item.md b/doc/models/order-return-line-item.md index 8bd51647..73e0db19 100644 --- a/doc/models/order-return-line-item.md +++ b/doc/models/order-return-line-item.md @@ -11,26 +11,26 @@ The line item being returned in an order. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID for this return line-item entry.
**Constraints**: *Maximum Length*: `60` | -| `sourceLineItemUid` | `string \| undefined` | Optional | The `uid` of the line item in the original sale order.
**Constraints**: *Maximum Length*: `60` | -| `name` | `string \| undefined` | Optional | The name of the line item.
**Constraints**: *Maximum Length*: `512` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID for this return line-item entry.
**Constraints**: *Maximum Length*: `60` | +| `sourceLineItemUid` | `string \| null \| undefined` | Optional | The `uid` of the line item in the original sale order.
**Constraints**: *Maximum Length*: `60` | +| `name` | `string \| null \| undefined` | Optional | The name of the line item.
**Constraints**: *Maximum Length*: `512` | | `quantity` | `string` | Required | The quantity returned, formatted as a decimal number.
For example, `"3"`.

Line items with a `quantity_unit` can have non-integer quantities.
For example, `"1.70000"`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12` | | `quantityUnit` | [`OrderQuantityUnit \| undefined`](../../doc/models/order-quantity-unit.md) | Optional | Contains the measurement unit for a quantity and a precision that
specifies the number of digits after the decimal point for decimal quantities. | -| `note` | `string \| undefined` | Optional | The note of the return line item.
**Constraints**: *Maximum Length*: `2000` | -| `catalogObjectId` | `string \| undefined` | Optional | The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this return line item.
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this line item references. | -| `variationName` | `string \| undefined` | Optional | The name of the variation applied to this return line item.
**Constraints**: *Maximum Length*: `400` | +| `note` | `string \| null \| undefined` | Optional | The note of the return line item.
**Constraints**: *Maximum Length*: `2000` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this return line item.
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this line item references. | +| `variationName` | `string \| null \| undefined` | Optional | The name of the variation applied to this return line item.
**Constraints**: *Maximum Length*: `400` | | `itemType` | [`string \| undefined`](../../doc/models/order-line-item-item-type.md) | Optional | Represents the line item type. | -| `returnModifiers` | [`OrderReturnLineItemModifier[] \| undefined`](../../doc/models/order-return-line-item-modifier.md) | Optional | The [CatalogModifier](entity:CatalogModifier)s applied to this line item. | -| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the return line item. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
`OrderReturnTax` applied to the return line item. On reads, the applied amount
is populated. | -| `appliedDiscounts` | [`OrderLineItemAppliedDiscount[] \| undefined`](../../doc/models/order-line-item-applied-discount.md) | Optional | The list of references to `OrderReturnDiscount` entities applied to the return line item. Each
`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
`OrderReturnDiscount` applied to the return line item. On reads, the applied amount
is populated. | +| `returnModifiers` | [`OrderReturnLineItemModifier[] \| null \| undefined`](../../doc/models/order-return-line-item-modifier.md) | Optional | The [CatalogModifier](entity:CatalogModifier)s applied to this line item. | +| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| null \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the return line item. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
`OrderReturnTax` applied to the return line item. On reads, the applied amount
is populated. | +| `appliedDiscounts` | [`OrderLineItemAppliedDiscount[] \| null \| undefined`](../../doc/models/order-line-item-applied-discount.md) | Optional | The list of references to `OrderReturnDiscount` entities applied to the return line item. Each
`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
`OrderReturnDiscount` applied to the return line item. On reads, the applied amount
is populated. | | `basePriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `variationTotalPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `grossReturnMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalTaxMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalDiscountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `appliedServiceCharges` | [`OrderLineItemAppliedServiceCharge[] \| undefined`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to `OrderReturnServiceCharge` entities applied to the return
line item. Each `OrderLineItemAppliedServiceCharge` has a `service_charge_uid` that
references the `uid` of a top-level `OrderReturnServiceCharge` applied to the return line
item. On reads, the applied amount is populated. | +| `appliedServiceCharges` | [`OrderLineItemAppliedServiceCharge[] \| null \| undefined`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to `OrderReturnServiceCharge` entities applied to the return
line item. Each `OrderLineItemAppliedServiceCharge` has a `service_charge_uid` that
references the `uid` of a top-level `OrderReturnServiceCharge` applied to the return line
item. On reads, the applied amount is populated. | | `totalServiceChargeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/order-return-service-charge.md b/doc/models/order-return-service-charge.md index 601aba10..21b014d6 100644 --- a/doc/models/order-return-service-charge.md +++ b/doc/models/order-return-service-charge.md @@ -11,19 +11,19 @@ Represents the service charge applied to the original order. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the return service charge only within this order.
**Constraints**: *Maximum Length*: `60` | -| `sourceServiceChargeUid` | `string \| undefined` | Optional | The service charge `uid` from the order containing the original
service charge. `source_service_charge_uid` is `null` for
unlinked returns.
**Constraints**: *Maximum Length*: `60` | -| `name` | `string \| undefined` | Optional | The name of the service charge.
**Constraints**: *Maximum Length*: `255` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID of the associated [OrderServiceCharge](entity:OrderServiceCharge).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this service charge references. | -| `percentage` | `string \| undefined` | Optional | The percentage of the service charge, as a string representation of
a decimal number. For example, a value of `"7.25"` corresponds to a
percentage of 7.25%.

Either `percentage` or `amount_money` should be set, but not both.
**Constraints**: *Maximum Length*: `10` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the return service charge only within this order.
**Constraints**: *Maximum Length*: `60` | +| `sourceServiceChargeUid` | `string \| null \| undefined` | Optional | The service charge `uid` from the order containing the original
service charge. `source_service_charge_uid` is `null` for
unlinked returns.
**Constraints**: *Maximum Length*: `60` | +| `name` | `string \| null \| undefined` | Optional | The name of the service charge.
**Constraints**: *Maximum Length*: `255` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID of the associated [OrderServiceCharge](entity:OrderServiceCharge).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this service charge references. | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the service charge, as a string representation of
a decimal number. For example, a value of `"7.25"` corresponds to a
percentage of 7.25%.

Either `percentage` or `amount_money` should be set, but not both.
**Constraints**: *Maximum Length*: `10` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalTaxMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `calculationPhase` | [`string \| undefined`](../../doc/models/order-service-charge-calculation-phase.md) | Optional | Represents a phase in the process of calculating order totals.
Service charges are applied after the indicated phase.

[Read more about how order totals are calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated) | -| `taxable` | `boolean \| undefined` | Optional | Indicates whether the surcharge can be taxed. Service charges
calculated in the `TOTAL_PHASE` cannot be marked as taxable. | -| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the
`OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`
that references the `uid` of a top-level `OrderReturnTax` that is being
applied to the `OrderReturnServiceCharge`. On reads, the applied amount is
populated. | +| `taxable` | `boolean \| null \| undefined` | Optional | Indicates whether the surcharge can be taxed. Service charges
calculated in the `TOTAL_PHASE` cannot be marked as taxable. | +| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| null \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the
`OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`
that references the `uid` of a top-level `OrderReturnTax` that is being
applied to the `OrderReturnServiceCharge`. On reads, the applied amount is
populated. | | `treatmentType` | [`string \| undefined`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or
apportioned toward a line item. | | `scope` | [`string \| undefined`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned
service charge. | diff --git a/doc/models/order-return-tax.md b/doc/models/order-return-tax.md index df0a0101..b6535d22 100644 --- a/doc/models/order-return-tax.md +++ b/doc/models/order-return-tax.md @@ -15,13 +15,13 @@ order subtotal. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the returned tax only within this order.
**Constraints**: *Maximum Length*: `60` | -| `sourceTaxUid` | `string \| undefined` | Optional | The tax `uid` from the order that contains the original tax charge.
**Constraints**: *Maximum Length*: `60` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing [CatalogTax](entity:CatalogTax).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this tax references. | -| `name` | `string \| undefined` | Optional | The tax's name.
**Constraints**: *Maximum Length*: `255` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the returned tax only within this order.
**Constraints**: *Maximum Length*: `60` | +| `sourceTaxUid` | `string \| null \| undefined` | Optional | The tax `uid` from the order that contains the original tax charge.
**Constraints**: *Maximum Length*: `60` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing [CatalogTax](entity:CatalogTax).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this tax references. | +| `name` | `string \| null \| undefined` | Optional | The tax's name.
**Constraints**: *Maximum Length*: `255` | | `type` | [`string \| undefined`](../../doc/models/order-line-item-tax-type.md) | Optional | Indicates how the tax is applied to the associated line item or order. | -| `percentage` | `string \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal number.
For example, a value of `"7.25"` corresponds to a percentage of 7.25%.
**Constraints**: *Maximum Length*: `10` | +| `percentage` | `string \| null \| undefined` | Optional | The percentage of the tax, as a string representation of a decimal number.
For example, a value of `"7.25"` corresponds to a percentage of 7.25%.
**Constraints**: *Maximum Length*: `10` | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `scope` | [`string \| undefined`](../../doc/models/order-line-item-tax-scope.md) | Optional | Indicates whether this is a line-item or order-level tax. | diff --git a/doc/models/order-return.md b/doc/models/order-return.md index fbf2b261..e590a1b3 100644 --- a/doc/models/order-return.md +++ b/doc/models/order-return.md @@ -11,12 +11,12 @@ The set of line items, service charges, taxes, discounts, tips, and other items | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the return only within this order.
**Constraints**: *Maximum Length*: `60` | -| `sourceOrderId` | `string \| undefined` | Optional | An order that contains the original sale of these return line items. This is unset
for unlinked returns. | -| `returnLineItems` | [`OrderReturnLineItem[] \| undefined`](../../doc/models/order-return-line-item.md) | Optional | A collection of line items that are being returned. | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the return only within this order.
**Constraints**: *Maximum Length*: `60` | +| `sourceOrderId` | `string \| null \| undefined` | Optional | An order that contains the original sale of these return line items. This is unset
for unlinked returns. | +| `returnLineItems` | [`OrderReturnLineItem[] \| null \| undefined`](../../doc/models/order-return-line-item.md) | Optional | A collection of line items that are being returned. | | `returnServiceCharges` | [`OrderReturnServiceCharge[] \| undefined`](../../doc/models/order-return-service-charge.md) | Optional | A collection of service charges that are being returned. | -| `returnTaxes` | [`OrderReturnTax[] \| undefined`](../../doc/models/order-return-tax.md) | Optional | A collection of references to taxes being returned for an order, including the total
applied tax amount to be returned. The taxes must reference a top-level tax ID from the source
order. | -| `returnDiscounts` | [`OrderReturnDiscount[] \| undefined`](../../doc/models/order-return-discount.md) | Optional | A collection of references to discounts being returned for an order, including the total
applied discount amount to be returned. The discounts must reference a top-level discount ID
from the source order. | +| `returnTaxes` | [`OrderReturnTax[] \| null \| undefined`](../../doc/models/order-return-tax.md) | Optional | A collection of references to taxes being returned for an order, including the total
applied tax amount to be returned. The taxes must reference a top-level tax ID from the source
order. | +| `returnDiscounts` | [`OrderReturnDiscount[] \| null \| undefined`](../../doc/models/order-return-discount.md) | Optional | A collection of references to discounts being returned for an order, including the total
applied discount amount to be returned. The discounts must reference a top-level discount ID
from the source order. | | `roundingAdjustment` | [`OrderRoundingAdjustment \| undefined`](../../doc/models/order-rounding-adjustment.md) | Optional | A rounding adjustment of the money being returned. Commonly used to apply cash rounding
when the minimum unit of the account is smaller than the lowest physical denomination of the currency. | | `returnAmounts` | [`OrderMoneyAmounts \| undefined`](../../doc/models/order-money-amounts.md) | Optional | A collection of various money amounts. | diff --git a/doc/models/order-rounding-adjustment.md b/doc/models/order-rounding-adjustment.md index 797efeb0..89e2d033 100644 --- a/doc/models/order-rounding-adjustment.md +++ b/doc/models/order-rounding-adjustment.md @@ -12,8 +12,8 @@ when the minimum unit of the account is smaller than the lowest physical denomin | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the rounding adjustment only within this order.
**Constraints**: *Maximum Length*: `60` | -| `name` | `string \| undefined` | Optional | The name of the rounding adjustment from the original sale order. | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the rounding adjustment only within this order.
**Constraints**: *Maximum Length*: `60` | +| `name` | `string \| null \| undefined` | Optional | The name of the rounding adjustment from the original sale order. | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/order-service-charge.md b/doc/models/order-service-charge.md index ffe692d9..6c74d5ef 100644 --- a/doc/models/order-service-charge.md +++ b/doc/models/order-service-charge.md @@ -11,19 +11,19 @@ Represents a service charge applied to an order. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | A unique ID that identifies the service charge only within this order.
**Constraints**: *Maximum Length*: `60` | -| `name` | `string \| undefined` | Optional | The name of the service charge.
**Constraints**: *Maximum Length*: `512` | -| `catalogObjectId` | `string \| undefined` | Optional | The catalog object ID referencing the service charge [CatalogObject](entity:CatalogObject).
**Constraints**: *Maximum Length*: `192` | -| `catalogVersion` | `bigint \| undefined` | Optional | The version of the catalog object that this service charge references. | -| `percentage` | `string \| undefined` | Optional | The service charge percentage as a string representation of a
decimal number. For example, `"7.25"` indicates a service charge of 7.25%.

Exactly 1 of `percentage` or `amount_money` should be set.
**Constraints**: *Maximum Length*: `10` | +| `uid` | `string \| null \| undefined` | Optional | A unique ID that identifies the service charge only within this order.
**Constraints**: *Maximum Length*: `60` | +| `name` | `string \| null \| undefined` | Optional | The name of the service charge.
**Constraints**: *Maximum Length*: `512` | +| `catalogObjectId` | `string \| null \| undefined` | Optional | The catalog object ID referencing the service charge [CatalogObject](entity:CatalogObject).
**Constraints**: *Maximum Length*: `192` | +| `catalogVersion` | `bigint \| null \| undefined` | Optional | The version of the catalog object that this service charge references. | +| `percentage` | `string \| null \| undefined` | Optional | The service charge percentage as a string representation of a
decimal number. For example, `"7.25"` indicates a service charge of 7.25%.

Exactly 1 of `percentage` or `amount_money` should be set.
**Constraints**: *Maximum Length*: `10` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appliedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalTaxMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `calculationPhase` | [`string \| undefined`](../../doc/models/order-service-charge-calculation-phase.md) | Optional | Represents a phase in the process of calculating order totals.
Service charges are applied after the indicated phase.

[Read more about how order totals are calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated) | -| `taxable` | `boolean \| undefined` | Optional | Indicates whether the service charge can be taxed. If set to `true`,
order-level taxes automatically apply to the service charge. Note that
service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | -| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to the taxes applied to this service charge. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
`OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied
is populated.

An `OrderLineItemAppliedTax` is automatically created on every taxable service charge
for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records
for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable
service charge. Taxable service charges have the `taxable` field set to `true` and calculated
in the `SUBTOTAL_PHASE`.

To change the amount of a tax, modify the referenced top-level tax. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this service charge. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `taxable` | `boolean \| null \| undefined` | Optional | Indicates whether the service charge can be taxed. If set to `true`,
order-level taxes automatically apply to the service charge. Note that
service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | +| `appliedTaxes` | [`OrderLineItemAppliedTax[] \| null \| undefined`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to the taxes applied to this service charge. Each
`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
`OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied
is populated.

An `OrderLineItemAppliedTax` is automatically created on every taxable service charge
for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records
for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable
service charge. Taxable service charges have the `taxable` field set to `true` and calculated
in the `SUBTOTAL_PHASE`.

To change the amount of a tax, modify the referenced top-level tax. | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this service charge. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `type` | [`string \| undefined`](../../doc/models/order-service-charge-type.md) | Optional | - | | `treatmentType` | [`string \| undefined`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or
apportioned toward a line item. | | `scope` | [`string \| undefined`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned
service charge. | diff --git a/doc/models/order-source.md b/doc/models/order-source.md index 85748e93..75ec97a9 100644 --- a/doc/models/order-source.md +++ b/doc/models/order-source.md @@ -11,7 +11,7 @@ Represents the origination details of an order. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name used to identify the place (physical or digital) that an order originates.
If unset, the name defaults to the name of the application that created the order. | +| `name` | `string \| null \| undefined` | Optional | The name used to identify the place (physical or digital) that an order originates.
If unset, the name defaults to the name of the application that created the order. | ## Example (as JSON) diff --git a/doc/models/order-updated.md b/doc/models/order-updated.md index 34ac765d..c986ffad 100644 --- a/doc/models/order-updated.md +++ b/doc/models/order-updated.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orderId` | `string \| undefined` | Optional | The order's unique ID. | +| `orderId` | `string \| null \| undefined` | Optional | The order's unique ID. | | `version` | `number \| undefined` | Optional | The version number, which is incremented each time an update is committed to the order.
Orders that were not created through the API do not include a version number and
therefore cannot be updated.

[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) | -| `locationId` | `string \| undefined` | Optional | The ID of the seller location that this order is associated with. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the seller location that this order is associated with. | | `state` | [`string \| undefined`](../../doc/models/order-state.md) | Optional | The state of the order. | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the order was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp for when the order was last updated, in RFC 3339 format. | diff --git a/doc/models/order.md b/doc/models/order.md index 322bbafa..b1a29eff 100644 --- a/doc/models/order.md +++ b/doc/models/order.md @@ -18,21 +18,21 @@ itemization data. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The order's unique ID. | | `locationId` | `string` | Required | The ID of the seller location that this order is associated with.
**Constraints**: *Minimum Length*: `1` | -| `referenceId` | `string \| undefined` | Optional | A client-specified ID to associate an entity in another system
with this order.
**Constraints**: *Maximum Length*: `40` | +| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID to associate an entity in another system
with this order.
**Constraints**: *Maximum Length*: `40` | | `source` | [`OrderSource \| undefined`](../../doc/models/order-source.md) | Optional | Represents the origination details of an order. | -| `customerId` | `string \| undefined` | Optional | The ID of the [customer](../../doc/models/customer.md) associated with the order.

You should specify a `customer_id` on the order (or the payment) to ensure that transactions
are reliably linked to customers. Omitting this field might result in the creation of new
[instant profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
**Constraints**: *Maximum Length*: `191` | -| `lineItems` | [`OrderLineItem[] \| undefined`](../../doc/models/order-line-item.md) | Optional | The line items included in the order. | -| `taxes` | [`OrderLineItemTax[] \| undefined`](../../doc/models/order-line-item-tax.md) | Optional | The list of all taxes associated with the order.

Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an
`OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes
with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` for every line item.

On reads, each tax in the list includes the total amount of that tax applied to the order.

__IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, using the deprecated
`line_items.taxes` field results in an error. Use `line_items.applied_taxes`
instead. | -| `discounts` | [`OrderLineItemDiscount[] \| undefined`](../../doc/models/order-line-item-discount.md) | Optional | The list of all discounts associated with the order.

Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`,
an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to.
For discounts with `ORDER` scope, the server generates an `OrderLineItemAppliedDiscount`
for every line item.

__IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, using the deprecated
`line_items.discounts` field results in an error. Use `line_items.applied_discounts`
instead. | -| `serviceCharges` | [`OrderServiceCharge[] \| undefined`](../../doc/models/order-service-charge.md) | Optional | A list of service charges applied to the order. | -| `fulfillments` | [`Fulfillment[] \| undefined`](../../doc/models/fulfillment.md) | Optional | Details about order fulfillment.

Orders can only be created with at most one fulfillment. However, orders returned
by the API might contain multiple fulfillments. | +| `customerId` | `string \| null \| undefined` | Optional | The ID of the [customer](../../doc/models/customer.md) associated with the order.

You should specify a `customer_id` on the order (or the payment) to ensure that transactions
are reliably linked to customers. Omitting this field might result in the creation of new
[instant profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
**Constraints**: *Maximum Length*: `191` | +| `lineItems` | [`OrderLineItem[] \| null \| undefined`](../../doc/models/order-line-item.md) | Optional | The line items included in the order. | +| `taxes` | [`OrderLineItemTax[] \| null \| undefined`](../../doc/models/order-line-item-tax.md) | Optional | The list of all taxes associated with the order.

Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an
`OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes
with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` for every line item.

On reads, each tax in the list includes the total amount of that tax applied to the order.

__IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, using the deprecated
`line_items.taxes` field results in an error. Use `line_items.applied_taxes`
instead. | +| `discounts` | [`OrderLineItemDiscount[] \| null \| undefined`](../../doc/models/order-line-item-discount.md) | Optional | The list of all discounts associated with the order.

Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`,
an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to.
For discounts with `ORDER` scope, the server generates an `OrderLineItemAppliedDiscount`
for every line item.

__IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, using the deprecated
`line_items.discounts` field results in an error. Use `line_items.applied_discounts`
instead. | +| `serviceCharges` | [`OrderServiceCharge[] \| null \| undefined`](../../doc/models/order-service-charge.md) | Optional | A list of service charges applied to the order. | +| `fulfillments` | [`Fulfillment[] \| null \| undefined`](../../doc/models/fulfillment.md) | Optional | Details about order fulfillment.

Orders can only be created with at most one fulfillment. However, orders returned
by the API might contain multiple fulfillments. | | `returns` | [`OrderReturn[] \| undefined`](../../doc/models/order-return.md) | Optional | A collection of items from sale orders being returned in this one. Normally part of an
itemized return or exchange. There is exactly one `Return` object per sale `Order` being
referenced. | | `returnAmounts` | [`OrderMoneyAmounts \| undefined`](../../doc/models/order-money-amounts.md) | Optional | A collection of various money amounts. | | `netAmounts` | [`OrderMoneyAmounts \| undefined`](../../doc/models/order-money-amounts.md) | Optional | A collection of various money amounts. | | `roundingAdjustment` | [`OrderRoundingAdjustment \| undefined`](../../doc/models/order-rounding-adjustment.md) | Optional | A rounding adjustment of the money being returned. Commonly used to apply cash rounding
when the minimum unit of the account is smaller than the lowest physical denomination of the currency. | | `tenders` | [`Tender[] \| undefined`](../../doc/models/tender.md) | Optional | The tenders that were used to pay for the order. | | `refunds` | [`Refund[] \| undefined`](../../doc/models/refund.md) | Optional | The refunds that are part of this order. | -| `metadata` | `Record \| undefined` | Optional | Application-defined data attached to this order. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | +| `metadata` | `Record \| null \| undefined` | Optional | Application-defined data attached to this order. Metadata fields are intended
to store descriptive references or associations with an entity in another system or store brief
information about the object. Square does not process this field; it only stores and returns it
in relevant API calls. Do not use metadata to store any sensitive information (such as personally
identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set
`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same
application.

For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the order was created, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `updatedAt` | `string \| undefined` | Optional | The timestamp for when the order was last updated, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). | | `closedAt` | `string \| undefined` | Optional | The timestamp for when the order reached a terminal [state](entity:OrderState), in RFC 3339 format (for example "2016-09-04T23:59:33.123Z"). | @@ -43,7 +43,7 @@ itemization data. | `totalDiscountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalTipMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `totalServiceChargeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `ticketName` | `string \| undefined` | Optional | A short-term identifier for the order (such as a customer first name,
table number, or auto-generated order number that resets daily).
**Constraints**: *Maximum Length*: `30` | +| `ticketName` | `string \| null \| undefined` | Optional | A short-term identifier for the order (such as a customer first name,
table number, or auto-generated order number that resets daily).
**Constraints**: *Maximum Length*: `30` | | `pricingOptions` | [`OrderPricingOptions \| undefined`](../../doc/models/order-pricing-options.md) | Optional | Pricing options for an order. The options affect how the order's price is calculated.
They can be used, for example, to apply automatic price adjustments that are based on preconfigured
[pricing rules](../../doc/models/catalog-pricing-rule.md). | | `rewards` | [`OrderReward[] \| undefined`](../../doc/models/order-reward.md) | Optional | A set-like list of Rewards that have been added to the Order. | | `netAmountDueMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/pause-subscription-request.md b/doc/models/pause-subscription-request.md index 1ce08d1b..01a5941e 100644 --- a/doc/models/pause-subscription-request.md +++ b/doc/models/pause-subscription-request.md @@ -12,11 +12,11 @@ Defines input parameters in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `pauseEffectiveDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` action takes place on the subscription.

When this date is unspecified or falls within the current billing cycle, the subscription is paused
on the starting date of the next billing cycle. | -| `pauseCycleDuration` | `bigint \| undefined` | Optional | The number of billing cycles the subscription will be paused before it is reactivated.

When this is set, a `RESUME` action is also scheduled to take place on the subscription at
the end of the specified pause cycle duration. In this case, neither `resume_effective_date`
nor `resume_change_timing` may be specified. | -| `resumeEffectiveDate` | `string \| undefined` | Optional | The date when the subscription is reactivated by a scheduled `RESUME` action.
This date must be at least one billing cycle ahead of `pause_effective_date`. | +| `pauseEffectiveDate` | `string \| null \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` action takes place on the subscription.

When this date is unspecified or falls within the current billing cycle, the subscription is paused
on the starting date of the next billing cycle. | +| `pauseCycleDuration` | `bigint \| null \| undefined` | Optional | The number of billing cycles the subscription will be paused before it is reactivated.

When this is set, a `RESUME` action is also scheduled to take place on the subscription at
the end of the specified pause cycle duration. In this case, neither `resume_effective_date`
nor `resume_change_timing` may be specified. | +| `resumeEffectiveDate` | `string \| null \| undefined` | Optional | The date when the subscription is reactivated by a scheduled `RESUME` action.
This date must be at least one billing cycle ahead of `pause_effective_date`. | | `resumeChangeTiming` | [`string \| undefined`](../../doc/models/change-timing.md) | Optional | Supported timings when a pending change, as an action, takes place to a subscription. | -| `pauseReason` | `string \| undefined` | Optional | The user-provided reason to pause the subscription.
**Constraints**: *Maximum Length*: `255` | +| `pauseReason` | `string \| null \| undefined` | Optional | The user-provided reason to pause the subscription.
**Constraints**: *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/pay-order-request.md b/doc/models/pay-order-request.md index f9628edd..72f7fce7 100644 --- a/doc/models/pay-order-request.md +++ b/doc/models/pay-order-request.md @@ -13,8 +13,8 @@ Defines the fields that are included in requests to the | Name | Type | Tags | Description | | --- | --- | --- | --- | | `idempotencyKey` | `string` | Required | A value you specify that uniquely identifies this request among requests you have sent. If
you are unsure whether a particular payment request was completed successfully, you can reattempt
it with the same idempotency key without worrying about duplicate payments.

For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `192` | -| `orderVersion` | `number \| undefined` | Optional | The version of the order being paid. If not supplied, the latest version will be paid. | -| `paymentIds` | `string[] \| undefined` | Optional | The IDs of the [payments](entity:Payment) to collect.
The payment total must match the order total. | +| `orderVersion` | `number \| null \| undefined` | Optional | The version of the order being paid. If not supplied, the latest version will be paid. | +| `paymentIds` | `string[] \| null \| undefined` | Optional | The IDs of the [payments](entity:Payment) to collect.
The payment total must match the order total. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-app-fee-refund-detail.md b/doc/models/payment-balance-activity-app-fee-refund-detail.md index a762ca34..c76f3619 100644 --- a/doc/models/payment-balance-activity-app-fee-refund-detail.md +++ b/doc/models/payment-balance-activity-app-fee-refund-detail.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `refundId` | `string \| undefined` | Optional | The ID of the refund associated with this activity. | -| `locationId` | `string \| undefined` | Optional | The ID of the location of the merchant associated with the payment refund activity | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `refundId` | `string \| null \| undefined` | Optional | The ID of the refund associated with this activity. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location of the merchant associated with the payment refund activity | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-app-fee-revenue-detail.md b/doc/models/payment-balance-activity-app-fee-revenue-detail.md index c71ef680..07dfa95a 100644 --- a/doc/models/payment-balance-activity-app-fee-revenue-detail.md +++ b/doc/models/payment-balance-activity-app-fee-revenue-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `locationId` | `string \| undefined` | Optional | The ID of the location of the merchant associated with the payment activity | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location of the merchant associated with the payment activity | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-automatic-savings-detail.md b/doc/models/payment-balance-activity-automatic-savings-detail.md index b786728d..04437a8a 100644 --- a/doc/models/payment-balance-activity-automatic-savings-detail.md +++ b/doc/models/payment-balance-activity-automatic-savings-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `payoutId` | `string \| undefined` | Optional | The ID of the payout associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `payoutId` | `string \| null \| undefined` | Optional | The ID of the payout associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-automatic-savings-reversed-detail.md b/doc/models/payment-balance-activity-automatic-savings-reversed-detail.md index 7a3644e7..94558bfd 100644 --- a/doc/models/payment-balance-activity-automatic-savings-reversed-detail.md +++ b/doc/models/payment-balance-activity-automatic-savings-reversed-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `payoutId` | `string \| undefined` | Optional | The ID of the payout associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `payoutId` | `string \| null \| undefined` | Optional | The ID of the payout associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-charge-detail.md b/doc/models/payment-balance-activity-charge-detail.md index a1569d4c..a97312ad 100644 --- a/doc/models/payment-balance-activity-charge-detail.md +++ b/doc/models/payment-balance-activity-charge-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-deposit-fee-detail.md b/doc/models/payment-balance-activity-deposit-fee-detail.md index 4edcb299..7ffe6321 100644 --- a/doc/models/payment-balance-activity-deposit-fee-detail.md +++ b/doc/models/payment-balance-activity-deposit-fee-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `payoutId` | `string \| undefined` | Optional | The ID of the payout that triggered this deposit fee activity. | +| `payoutId` | `string \| null \| undefined` | Optional | The ID of the payout that triggered this deposit fee activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-dispute-detail.md b/doc/models/payment-balance-activity-dispute-detail.md index d0b32a9f..45f0de79 100644 --- a/doc/models/payment-balance-activity-dispute-detail.md +++ b/doc/models/payment-balance-activity-dispute-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `disputeId` | `string \| undefined` | Optional | The ID of the dispute associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `disputeId` | `string \| null \| undefined` | Optional | The ID of the dispute associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-fee-detail.md b/doc/models/payment-balance-activity-fee-detail.md index 9fb8c85c..4fb8370d 100644 --- a/doc/models/payment-balance-activity-fee-detail.md +++ b/doc/models/payment-balance-activity-fee-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-free-processing-detail.md b/doc/models/payment-balance-activity-free-processing-detail.md index e546f5a6..876041fb 100644 --- a/doc/models/payment-balance-activity-free-processing-detail.md +++ b/doc/models/payment-balance-activity-free-processing-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-hold-adjustment-detail.md b/doc/models/payment-balance-activity-hold-adjustment-detail.md index 62ea7c20..1881c415 100644 --- a/doc/models/payment-balance-activity-hold-adjustment-detail.md +++ b/doc/models/payment-balance-activity-hold-adjustment-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-open-dispute-detail.md b/doc/models/payment-balance-activity-open-dispute-detail.md index f410b099..ee228253 100644 --- a/doc/models/payment-balance-activity-open-dispute-detail.md +++ b/doc/models/payment-balance-activity-open-dispute-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `disputeId` | `string \| undefined` | Optional | The ID of the dispute associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `disputeId` | `string \| null \| undefined` | Optional | The ID of the dispute associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-other-adjustment-detail.md b/doc/models/payment-balance-activity-other-adjustment-detail.md index 922aa377..707c3c05 100644 --- a/doc/models/payment-balance-activity-other-adjustment-detail.md +++ b/doc/models/payment-balance-activity-other-adjustment-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-other-detail.md b/doc/models/payment-balance-activity-other-detail.md index ba34a80b..0a0b77fb 100644 --- a/doc/models/payment-balance-activity-other-detail.md +++ b/doc/models/payment-balance-activity-other-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-refund-detail.md b/doc/models/payment-balance-activity-refund-detail.md index 95a47b20..e63f454b 100644 --- a/doc/models/payment-balance-activity-refund-detail.md +++ b/doc/models/payment-balance-activity-refund-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `refundId` | `string \| undefined` | Optional | The ID of the refund associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `refundId` | `string \| null \| undefined` | Optional | The ID of the refund associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-release-adjustment-detail.md b/doc/models/payment-balance-activity-release-adjustment-detail.md index 9f30c90b..eed1ef79 100644 --- a/doc/models/payment-balance-activity-release-adjustment-detail.md +++ b/doc/models/payment-balance-activity-release-adjustment-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-reserve-hold-detail.md b/doc/models/payment-balance-activity-reserve-hold-detail.md index 3435889a..e0e4b9ce 100644 --- a/doc/models/payment-balance-activity-reserve-hold-detail.md +++ b/doc/models/payment-balance-activity-reserve-hold-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-reserve-release-detail.md b/doc/models/payment-balance-activity-reserve-release-detail.md index d8dfb464..5059836d 100644 --- a/doc/models/payment-balance-activity-reserve-release-detail.md +++ b/doc/models/payment-balance-activity-reserve-release-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-square-capital-payment-detail.md b/doc/models/payment-balance-activity-square-capital-payment-detail.md index 905cbca0..9d2750c3 100644 --- a/doc/models/payment-balance-activity-square-capital-payment-detail.md +++ b/doc/models/payment-balance-activity-square-capital-payment-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-square-capital-reversed-payment-detail.md b/doc/models/payment-balance-activity-square-capital-reversed-payment-detail.md index 46e44811..0f9ce00b 100644 --- a/doc/models/payment-balance-activity-square-capital-reversed-payment-detail.md +++ b/doc/models/payment-balance-activity-square-capital-reversed-payment-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-tax-on-fee-detail.md b/doc/models/payment-balance-activity-tax-on-fee-detail.md index 7713fe78..730f0885 100644 --- a/doc/models/payment-balance-activity-tax-on-fee-detail.md +++ b/doc/models/payment-balance-activity-tax-on-fee-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `taxRateDescription` | `string \| undefined` | Optional | The description of the tax rate being applied. For example: "GST", "HST". | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `taxRateDescription` | `string \| null \| undefined` | Optional | The description of the tax rate being applied. For example: "GST", "HST". | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-third-party-fee-detail.md b/doc/models/payment-balance-activity-third-party-fee-detail.md index 20c5459d..2c3c3f6d 100644 --- a/doc/models/payment-balance-activity-third-party-fee-detail.md +++ b/doc/models/payment-balance-activity-third-party-fee-detail.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-balance-activity-third-party-fee-refund-detail.md b/doc/models/payment-balance-activity-third-party-fee-refund-detail.md index b91281a8..d3f6a5d8 100644 --- a/doc/models/payment-balance-activity-third-party-fee-refund-detail.md +++ b/doc/models/payment-balance-activity-third-party-fee-refund-detail.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this activity. | -| `refundId` | `string \| undefined` | Optional | The public refund id associated with this activity. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this activity. | +| `refundId` | `string \| null \| undefined` | Optional | The public refund id associated with this activity. | ## Example (as JSON) diff --git a/doc/models/payment-link-related-resources.md b/doc/models/payment-link-related-resources.md index 40b44ac6..efa2923d 100644 --- a/doc/models/payment-link-related-resources.md +++ b/doc/models/payment-link-related-resources.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `orders` | [`Order[] \| undefined`](../../doc/models/order.md) | Optional | The order associated with the payment link. | -| `subscriptionPlans` | [`CatalogObject[] \| undefined`](../../doc/models/catalog-object.md) | Optional | The subscription plan associated with the payment link. | +| `orders` | [`Order[] \| null \| undefined`](../../doc/models/order.md) | Optional | The order associated with the payment link. | +| `subscriptionPlans` | [`CatalogObject[] \| null \| undefined`](../../doc/models/catalog-object.md) | Optional | The subscription plan associated with the payment link. | ## Example (as JSON) diff --git a/doc/models/payment-link.md b/doc/models/payment-link.md index a4386e70..defac400 100644 --- a/doc/models/payment-link.md +++ b/doc/models/payment-link.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-assigned ID of the payment link. | | `version` | `number` | Required | The Square-assigned version number, which is incremented each time an update is committed to the payment link.
**Constraints**: `<= 65535` | -| `description` | `string \| undefined` | Optional | The optional description of the `payment_link` object.
It is primarily for use by your application and is not used anywhere.
**Constraints**: *Maximum Length*: `4096` | +| `description` | `string \| null \| undefined` | Optional | The optional description of the `payment_link` object.
It is primarily for use by your application and is not used anywhere.
**Constraints**: *Maximum Length*: `4096` | | `orderId` | `string \| undefined` | Optional | The ID of the order associated with the payment link.
**Constraints**: *Maximum Length*: `192` | | `checkoutOptions` | [`CheckoutOptions \| undefined`](../../doc/models/checkout-options.md) | Optional | - | | `prePopulatedData` | [`PrePopulatedData \| undefined`](../../doc/models/pre-populated-data.md) | Optional | Describes buyer data to prepopulate in the payment form.
For more information,
see [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). | @@ -19,7 +19,7 @@ | `longUrl` | `string \| undefined` | Optional | The long URL of the payment link.
**Constraints**: *Maximum Length*: `255` | | `createdAt` | `string \| undefined` | Optional | The timestamp when the payment link was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp when the payment link was last updated, in RFC 3339 format. | -| `paymentNote` | `string \| undefined` | Optional | An optional note. After Square processes the payment, this note is added to the
resulting `Payment`.
**Constraints**: *Maximum Length*: `500` | +| `paymentNote` | `string \| null \| undefined` | Optional | An optional note. After Square processes the payment, this note is added to the
resulting `Payment`.
**Constraints**: *Maximum Length*: `500` | ## Example (as JSON) diff --git a/doc/models/payment-options.md b/doc/models/payment-options.md index 8a84787d..7ebe97b3 100644 --- a/doc/models/payment-options.md +++ b/doc/models/payment-options.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `autocomplete` | `boolean \| undefined` | Optional | Indicates whether the `Payment` objects created from this `TerminalCheckout` are automatically
`COMPLETED` or left in an `APPROVED` state for later modification. | -| `delayDuration` | `string \| undefined` | Optional | The duration of time after the payment's creation when Square automatically cancels the
payment. This automatic cancellation applies only to payments that do not reach a terminal state
(COMPLETED or CANCELED) before the `delay_duration` time period.

This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value
of 1 minute.

Note: This feature is only supported for card payments. This parameter can only be set for a delayed
capture payment (`autocomplete=false`).
Default:

- Card-present payments: "PT36H" (36 hours) from the creation time.
- Card-not-present payments: "P7D" (7 days) from the creation time. | -| `acceptPartialAuthorization` | `boolean \| undefined` | Optional | If set to `true` and charging a Square Gift Card, a payment might be returned with
`amount_money` equal to less than what was requested. For example, a request for $20 when charging
a Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose
to prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card
payment.

This field cannot be `true` when `autocomplete = true`.
This field cannot be `true` when an `order_id` isn't specified.

For more information, see
[Take Partial Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards).

Default: false | +| `autocomplete` | `boolean \| null \| undefined` | Optional | Indicates whether the `Payment` objects created from this `TerminalCheckout` are automatically
`COMPLETED` or left in an `APPROVED` state for later modification. | +| `delayDuration` | `string \| null \| undefined` | Optional | The duration of time after the payment's creation when Square automatically cancels the
payment. This automatic cancellation applies only to payments that do not reach a terminal state
(COMPLETED or CANCELED) before the `delay_duration` time period.

This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value
of 1 minute.

Note: This feature is only supported for card payments. This parameter can only be set for a delayed
capture payment (`autocomplete=false`).
Default:

- Card-present payments: "PT36H" (36 hours) from the creation time.
- Card-not-present payments: "P7D" (7 days) from the creation time. | +| `acceptPartialAuthorization` | `boolean \| null \| undefined` | Optional | If set to `true` and charging a Square Gift Card, a payment might be returned with
`amount_money` equal to less than what was requested. For example, a request for $20 when charging
a Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose
to prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card
payment.

This field cannot be `true` when `autocomplete = true`.
This field cannot be `true` when an `order_id` isn't specified.

For more information, see
[Take Partial Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards).

Default: false | | `delayAction` | [`string \| undefined`](../../doc/models/payment-options-delay-action.md) | Optional | Describes the action to be applied to a delayed capture payment when the delay_duration
has elapsed. | ## Example (as JSON) diff --git a/doc/models/payment-refund.md b/doc/models/payment-refund.md index 1df1294d..8c4dbd90 100644 --- a/doc/models/payment-refund.md +++ b/doc/models/payment-refund.md @@ -13,17 +13,17 @@ the original payment and the amount of money refunded. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string` | Required | The unique ID for this refund, generated by Square.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `status` | `string \| undefined` | Optional | The refund's status:

- `PENDING` - Awaiting approval.
- `COMPLETED` - Successfully completed.
- `REJECTED` - The refund was rejected.
- `FAILED` - An error occurred.
**Constraints**: *Maximum Length*: `50` | -| `locationId` | `string \| undefined` | Optional | The location ID associated with the payment this refund is attached to.
**Constraints**: *Maximum Length*: `50` | +| `status` | `string \| null \| undefined` | Optional | The refund's status:

- `PENDING` - Awaiting approval.
- `COMPLETED` - Successfully completed.
- `REJECTED` - The refund was rejected.
- `FAILED` - An error occurred.
**Constraints**: *Maximum Length*: `50` | +| `locationId` | `string \| null \| undefined` | Optional | The location ID associated with the payment this refund is attached to.
**Constraints**: *Maximum Length*: `50` | | `unlinked` | `boolean \| undefined` | Optional | Flag indicating whether or not the refund is linked to an existing payment in Square. | -| `destinationType` | `string \| undefined` | Optional | The destination type for this refund.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`, and
`EXTERNAL`.
**Constraints**: *Maximum Length*: `50` | +| `destinationType` | `string \| null \| undefined` | Optional | The destination type for this refund.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`, and
`EXTERNAL`.
**Constraints**: *Maximum Length*: `50` | | `destinationDetails` | [`DestinationDetails \| undefined`](../../doc/models/destination-details.md) | Optional | Details about a refund's destination. | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `processingFee` | [`ProcessingFee[] \| undefined`](../../doc/models/processing-fee.md) | Optional | Processing fees and fee adjustments assessed by Square for this refund. | -| `paymentId` | `string \| undefined` | Optional | The ID of the payment associated with this refund.
**Constraints**: *Maximum Length*: `192` | -| `orderId` | `string \| undefined` | Optional | The ID of the order associated with the refund.
**Constraints**: *Maximum Length*: `192` | -| `reason` | `string \| undefined` | Optional | The reason for the refund.
**Constraints**: *Maximum Length*: `192` | +| `processingFee` | [`ProcessingFee[] \| null \| undefined`](../../doc/models/processing-fee.md) | Optional | Processing fees and fee adjustments assessed by Square for this refund. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the payment associated with this refund.
**Constraints**: *Maximum Length*: `192` | +| `orderId` | `string \| null \| undefined` | Optional | The ID of the order associated with the refund.
**Constraints**: *Maximum Length*: `192` | +| `reason` | `string \| null \| undefined` | Optional | The reason for the refund.
**Constraints**: *Maximum Length*: `192` | | `createdAt` | `string \| undefined` | Optional | The timestamp of when the refund was created, in RFC 3339 format.
**Constraints**: *Maximum Length*: `32` | | `updatedAt` | `string \| undefined` | Optional | The timestamp of when the refund was last updated, in RFC 3339 format.
**Constraints**: *Maximum Length*: `32` | | `teamMemberId` | `string \| undefined` | Optional | An optional ID of the team member associated with taking the payment.
**Constraints**: *Maximum Length*: `192` | diff --git a/doc/models/payment.md b/doc/models/payment.md index a724bacc..b7339741 100644 --- a/doc/models/payment.md +++ b/doc/models/payment.md @@ -23,15 +23,16 @@ Represents a payment processed by the Square API. | `refundedMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `status` | `string \| undefined` | Optional | Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.
**Constraints**: *Maximum Length*: `50` | | `delayDuration` | `string \| undefined` | Optional | The duration of time after the payment's creation when Square automatically applies the
`delay_action` to the payment. This automatic `delay_action` applies only to payments that
do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration`
time period.

This field is specified as a time duration, in RFC 3339 format.

Notes:
This feature is only supported for card payments.

Default:

- Card-present payments: "PT36H" (36 hours) from the creation time.
- Card-not-present payments: "P7D" (7 days) from the creation time. | -| `delayAction` | `string \| undefined` | Optional | The action to be applied to the payment when the `delay_duration` has elapsed.

Current values include `CANCEL` and `COMPLETE`. | +| `delayAction` | `string \| null \| undefined` | Optional | The action to be applied to the payment when the `delay_duration` has elapsed.

Current values include `CANCEL` and `COMPLETE`. | | `delayedUntil` | `string \| undefined` | Optional | The read-only timestamp of when the `delay_action` is automatically applied,
in RFC 3339 format.

Note that this field is calculated by summing the payment's `delay_duration` and `created_at`
fields. The `created_at` field is generated by Square and might not exactly match the
time on your local machine. | -| `sourceType` | `string \| undefined` | Optional | The source type for this payment.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`
and `EXTERNAL`. For information about these payment source types,
see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
**Constraints**: *Maximum Length*: `50` | +| `sourceType` | `string \| undefined` | Optional | The source type for this payment.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`,
`CASH` and `EXTERNAL`. For information about these payment source types,
see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
**Constraints**: *Maximum Length*: `50` | | `cardDetails` | [`CardPaymentDetails \| undefined`](../../doc/models/card-payment-details.md) | Optional | Reflects the current status of a card payment. Contains only non-confidential information. | | `cashDetails` | [`CashPaymentDetails \| undefined`](../../doc/models/cash-payment-details.md) | Optional | Stores details about a cash payment. Contains only non-confidential information. For more information, see
[Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments). | | `bankAccountDetails` | [`BankAccountPaymentDetails \| undefined`](../../doc/models/bank-account-payment-details.md) | Optional | Additional details about BANK_ACCOUNT type payments. | | `externalDetails` | [`ExternalPaymentDetails \| undefined`](../../doc/models/external-payment-details.md) | Optional | Stores details about an external payment. Contains only non-confidential information.
For more information, see
[Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). | | `walletDetails` | [`DigitalWalletDetails \| undefined`](../../doc/models/digital-wallet-details.md) | Optional | Additional details about `WALLET` type payments. Contains only non-confidential information. | | `buyNowPayLaterDetails` | [`BuyNowPayLaterDetails \| undefined`](../../doc/models/buy-now-pay-later-details.md) | Optional | Additional details about a Buy Now Pay Later payment type. | +| `squareAccountDetails` | [`SquareAccountDetails \| undefined`](../../doc/models/square-account-details.md) | Optional | Additional details about Square Account payments. | | `locationId` | `string \| undefined` | Optional | The ID of the location associated with the payment.
**Constraints**: *Maximum Length*: `50` | | `orderId` | `string \| undefined` | Optional | The ID of the order associated with the payment.
**Constraints**: *Maximum Length*: `192` | | `referenceId` | `string \| undefined` | Optional | An optional ID that associates the payment with an entity in
another system.
**Constraints**: *Maximum Length*: `40` | @@ -50,7 +51,7 @@ Represents a payment processed by the Square API. | `receiptUrl` | `string \| undefined` | Optional | The URL for the payment's receipt.
The field is only populated for COMPLETED payments.
**Constraints**: *Maximum Length*: `255` | | `deviceDetails` | [`DeviceDetails \| undefined`](../../doc/models/device-details.md) | Optional | Details about the device that took the payment. | | `applicationDetails` | [`ApplicationDetails \| undefined`](../../doc/models/application-details.md) | Optional | Details about the application that took the payment. | -| `versionToken` | `string \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies a specific version of the
`Payment` object. | +| `versionToken` | `string \| null \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies a specific version of the
`Payment` object. | ## Example (as JSON) diff --git a/doc/models/payout-entry.md b/doc/models/payout-entry.md index 9ddfd173..c3f96ff6 100644 --- a/doc/models/payout-entry.md +++ b/doc/models/payout-entry.md @@ -14,7 +14,7 @@ The total amount of the payout will equal the sum of the payout entries for a ba | --- | --- | --- | --- | | `id` | `string` | Required | A unique ID for the payout entry.
**Constraints**: *Minimum Length*: `1` | | `payoutId` | `string` | Required | The ID of the payout entries’ associated payout.
**Constraints**: *Minimum Length*: `1` | -| `effectiveAt` | `string \| undefined` | Optional | The timestamp of when the payout entry affected the balance, in RFC 3339 format. | +| `effectiveAt` | `string \| null \| undefined` | Optional | The timestamp of when the payout entry affected the balance, in RFC 3339 format. | | `type` | [`string \| undefined`](../../doc/models/activity-type.md) | Optional | - | | `grossAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `feeAmountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | diff --git a/doc/models/payout-fee.md b/doc/models/payout-fee.md index 256145c4..d218baae 100644 --- a/doc/models/payout-fee.md +++ b/doc/models/payout-fee.md @@ -12,7 +12,7 @@ Represents a payout fee that can incur as part of a payout. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `effectiveAt` | `string \| undefined` | Optional | The timestamp of when the fee takes effect, in RFC 3339 format. | +| `effectiveAt` | `string \| null \| undefined` | Optional | The timestamp of when the fee takes effect, in RFC 3339 format. | | `type` | [`string \| undefined`](../../doc/models/payout-fee-type.md) | Optional | Represents the type of payout fee that can incur as part of a payout. | ## Example (as JSON) diff --git a/doc/models/payout.md b/doc/models/payout.md index e22ff5ac..7f7f370e 100644 --- a/doc/models/payout.md +++ b/doc/models/payout.md @@ -21,9 +21,9 @@ external bank account or to the Square balance. | `destination` | [`Destination \| undefined`](../../doc/models/destination.md) | Optional | Information about the destination against which the payout was made. | | `version` | `number \| undefined` | Optional | The version number, which is incremented each time an update is made to this payout record.
The version number helps developers receive event notifications or feeds out of order. | | `type` | [`string \| undefined`](../../doc/models/payout-type.md) | Optional | The type of payout: “BATCH” or “SIMPLE”.
BATCH payouts include a list of payout entries that can be considered settled.
SIMPLE payouts do not have any payout entries associated with them
and will show up as one of the payout entries in a future BATCH payout. | -| `payoutFee` | [`PayoutFee[] \| undefined`](../../doc/models/payout-fee.md) | Optional | A list of transfer fees and any taxes on the fees assessed by Square for this payout. | -| `arrivalDate` | `string \| undefined` | Optional | The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is due to arrive in the seller’s banking destination. | -| `endToEndId` | `string \| undefined` | Optional | A unique ID for each `Payout` object that might also appear on the seller’s bank statement. You can use this ID to automate the process of reconciling each payout with the corresponding line item on the bank statement. | +| `payoutFee` | [`PayoutFee[] \| null \| undefined`](../../doc/models/payout-fee.md) | Optional | A list of transfer fees and any taxes on the fees assessed by Square for this payout. | +| `arrivalDate` | `string \| null \| undefined` | Optional | The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is due to arrive in the seller’s banking destination. | +| `endToEndId` | `string \| null \| undefined` | Optional | A unique ID for each `Payout` object that might also appear on the seller’s bank statement. You can use this ID to automate the process of reconciling each payout with the corresponding line item on the bank statement. | ## Example (as JSON) diff --git a/doc/models/phase-input.md b/doc/models/phase-input.md index ca7e6ada..bc29dc13 100644 --- a/doc/models/phase-input.md +++ b/doc/models/phase-input.md @@ -12,7 +12,7 @@ Represents the arguments used to construct a new phase. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ordinal` | `number` | Required | index of phase in total subscription plan | -| `orderTemplateId` | `string \| undefined` | Optional | id of order to be used in billing | +| `orderTemplateId` | `string \| null \| undefined` | Optional | id of order to be used in billing | ## Example (as JSON) diff --git a/doc/models/phase.md b/doc/models/phase.md index 7f5dcf60..a80c74d8 100644 --- a/doc/models/phase.md +++ b/doc/models/phase.md @@ -11,10 +11,10 @@ Represents a phase, which can override subscription phases as defined by plan_id | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | id of subscription phase | -| `ordinal` | `number \| undefined` | Optional | index of phase in total subscription plan | -| `orderTemplateId` | `string \| undefined` | Optional | id of order to be used in billing | -| `planPhaseUid` | `string \| undefined` | Optional | the uid from the plan's phase in catalog | +| `uid` | `string \| null \| undefined` | Optional | id of subscription phase | +| `ordinal` | `number \| null \| undefined` | Optional | index of phase in total subscription plan | +| `orderTemplateId` | `string \| null \| undefined` | Optional | id of order to be used in billing | +| `planPhaseUid` | `string \| null \| undefined` | Optional | the uid from the plan's phase in catalog | ## Example (as JSON) diff --git a/doc/models/pre-populated-data.md b/doc/models/pre-populated-data.md index cf521d51..4e67c827 100644 --- a/doc/models/pre-populated-data.md +++ b/doc/models/pre-populated-data.md @@ -13,8 +13,8 @@ see [Optional Checkout Configurations](https://developer.squareup.com/docs/check | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `buyerEmail` | `string \| undefined` | Optional | The buyer email to prepopulate in the payment form.
**Constraints**: *Maximum Length*: `256` | -| `buyerPhoneNumber` | `string \| undefined` | Optional | The buyer phone number to prepopulate in the payment form.
**Constraints**: *Maximum Length*: `17` | +| `buyerEmail` | `string \| null \| undefined` | Optional | The buyer email to prepopulate in the payment form.
**Constraints**: *Maximum Length*: `256` | +| `buyerPhoneNumber` | `string \| null \| undefined` | Optional | The buyer phone number to prepopulate in the payment form.
**Constraints**: *Maximum Length*: `17` | | `buyerAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | ## Example (as JSON) diff --git a/doc/models/processing-fee.md b/doc/models/processing-fee.md index 4d1f36e9..46f877ba 100644 --- a/doc/models/processing-fee.md +++ b/doc/models/processing-fee.md @@ -11,8 +11,8 @@ Represents the Square processing fee. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `effectiveAt` | `string \| undefined` | Optional | The timestamp of when the fee takes effect, in RFC 3339 format. | -| `type` | `string \| undefined` | Optional | The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`. | +| `effectiveAt` | `string \| null \| undefined` | Optional | The timestamp of when the fee takes effect, in RFC 3339 format. | +| `type` | `string \| null \| undefined` | Optional | The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`. | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/publish-invoice-request.md b/doc/models/publish-invoice-request.md index 86d63afe..0c8355d0 100644 --- a/doc/models/publish-invoice-request.md +++ b/doc/models/publish-invoice-request.md @@ -12,7 +12,7 @@ Describes a `PublishInvoice` request. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `version` | `number` | Required | The version of the [invoice](entity:Invoice) to publish.
This must match the current version of the invoice; otherwise, the request is rejected. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique string that identifies the `PublishInvoice` request. If you do not
provide `idempotency_key` (or provide an empty string as the value), the endpoint
treats each request as independent.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `128` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique string that identifies the `PublishInvoice` request. If you do not
provide `idempotency_key` (or provide an empty string as the value), the endpoint
treats each request as independent.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `128` | ## Example (as JSON) diff --git a/doc/models/quantity-ratio.md b/doc/models/quantity-ratio.md index 040a8d52..29c0f30e 100644 --- a/doc/models/quantity-ratio.md +++ b/doc/models/quantity-ratio.md @@ -11,8 +11,8 @@ A whole number or unreduced fractional ratio. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `quantity` | `number \| undefined` | Optional | The whole or fractional quantity as the numerator. | -| `quantityDenominator` | `number \| undefined` | Optional | The whole or fractional quantity as the denominator.
In the case of fractional quantity this field is the denominator and quantity is the numerator.
When unspecified, the value is `1`. For example, when `quantity=3` and `quantity_donominator` is unspecified,
the quantity ratio is `3` or `3/1`. | +| `quantity` | `number \| null \| undefined` | Optional | The whole or fractional quantity as the numerator. | +| `quantityDenominator` | `number \| null \| undefined` | Optional | The whole or fractional quantity as the denominator.
In the case of fractional quantity this field is the denominator and quantity is the numerator.
When unspecified, the value is `1`. For example, when `quantity=3` and `quantity_donominator` is unspecified,
the quantity ratio is `3` or `3/1`. | ## Example (as JSON) diff --git a/doc/models/range.md b/doc/models/range.md index aae35d64..88bf3b19 100644 --- a/doc/models/range.md +++ b/doc/models/range.md @@ -11,8 +11,8 @@ The range of a number value between the specified lower and upper bounds. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `min` | `string \| undefined` | Optional | The lower bound of the number range. At least one of `min` or `max` must be specified.
If unspecified, the results will have no minimum value. | -| `max` | `string \| undefined` | Optional | The upper bound of the number range. At least one of `min` or `max` must be specified.
If unspecified, the results will have no maximum value. | +| `min` | `string \| null \| undefined` | Optional | The lower bound of the number range. At least one of `min` or `max` must be specified.
If unspecified, the results will have no minimum value. | +| `max` | `string \| null \| undefined` | Optional | The upper bound of the number range. At least one of `min` or `max` must be specified.
If unspecified, the results will have no maximum value. | ## Example (as JSON) diff --git a/doc/models/receipt-options.md b/doc/models/receipt-options.md index 80005e02..81e78e00 100644 --- a/doc/models/receipt-options.md +++ b/doc/models/receipt-options.md @@ -12,8 +12,8 @@ Describes receipt action fields. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `paymentId` | `string` | Required | The reference to the Square payment ID for the receipt. | -| `printOnly` | `boolean \| undefined` | Optional | Instructs the device to print the receipt without displaying the receipt selection screen.
Requires `printer_enabled` set to true.
Defaults to false. | -| `isDuplicate` | `boolean \| undefined` | Optional | Identify the receipt as a reprint rather than an original receipt.
Defaults to false. | +| `printOnly` | `boolean \| null \| undefined` | Optional | Instructs the device to print the receipt without displaying the receipt selection screen.
Requires `printer_enabled` set to true.
Defaults to false. | +| `isDuplicate` | `boolean \| null \| undefined` | Optional | Identify the receipt as a reprint rather than an original receipt.
Defaults to false. | ## Example (as JSON) diff --git a/doc/models/refund-payment-request.md b/doc/models/refund-payment-request.md index bd2a01f5..6110be82 100644 --- a/doc/models/refund-payment-request.md +++ b/doc/models/refund-payment-request.md @@ -14,14 +14,14 @@ Describes a request to refund a payment using [RefundPayment](../../doc/api/refu | `idempotencyKey` | `string` | Required | A unique string that identifies this `RefundPayment` request. The key can be any valid string
but must be unique for every `RefundPayment` request.

Keys are limited to a max of 45 characters - however, the number of allowed characters might be
less than 45, if multi-byte characters are used.

For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
**Constraints**: *Minimum Length*: `1` | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `appFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `paymentId` | `string \| undefined` | Optional | The unique ID of the payment being refunded.
Required when unlinked=false, otherwise must not be set. | -| `destinationId` | `string \| undefined` | Optional | The ID indicating where funds will be refunded to, if this is an unlinked refund.
This can be any of the following: A token generated by Web Payments SDK;
a card-on-file identifier.
Required for requests specifying unlinked=true.
Otherwise, if included when `unlinked=false`, will throw an error. | -| `unlinked` | `boolean \| undefined` | Optional | Indicates that the refund is not linked to a Square payment.
If set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not
be provided. | -| `locationId` | `string \| undefined` | Optional | The location ID associated with the unlinked refund.
Required for requests specifying `unlinked=true`.
Otherwise, if included when `unlinked=false`, will throw an error.
**Constraints**: *Maximum Length*: `50` | -| `customerId` | `string \| undefined` | Optional | The [Customer](entity:Customer) ID of the customer associated with the refund.
This is required if the `destination_id` refers to a card on file created using the Cards
API. Only allowed when `unlinked=true`. | -| `reason` | `string \| undefined` | Optional | A description of the reason for the refund.
**Constraints**: *Maximum Length*: `192` | -| `paymentVersionToken` | `string \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned.
If the versions match, or the field is not provided, the refund proceeds as normal. | -| `teamMemberId` | `string \| undefined` | Optional | An optional [TeamMember](entity:TeamMember) ID to associate with this refund.
**Constraints**: *Maximum Length*: `192` | +| `paymentId` | `string \| null \| undefined` | Optional | The unique ID of the payment being refunded.
Required when unlinked=false, otherwise must not be set. | +| `destinationId` | `string \| null \| undefined` | Optional | The ID indicating where funds will be refunded to, if this is an unlinked refund.
This can be any of the following: A token generated by Web Payments SDK;
a card-on-file identifier.
Required for requests specifying unlinked=true.
Otherwise, if included when `unlinked=false`, will throw an error. | +| `unlinked` | `boolean \| null \| undefined` | Optional | Indicates that the refund is not linked to a Square payment.
If set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not
be provided. | +| `locationId` | `string \| null \| undefined` | Optional | The location ID associated with the unlinked refund.
Required for requests specifying `unlinked=true`.
Otherwise, if included when `unlinked=false`, will throw an error.
**Constraints**: *Maximum Length*: `50` | +| `customerId` | `string \| null \| undefined` | Optional | The [Customer](entity:Customer) ID of the customer associated with the refund.
This is required if the `destination_id` refers to a card on file created using the Cards
API. Only allowed when `unlinked=true`. | +| `reason` | `string \| null \| undefined` | Optional | A description of the reason for the refund.
**Constraints**: *Maximum Length*: `192` | +| `paymentVersionToken` | `string \| null \| undefined` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned.
If the versions match, or the field is not provided, the refund proceeds as normal. | +| `teamMemberId` | `string \| null \| undefined` | Optional | An optional [TeamMember](entity:TeamMember) ID to associate with this refund.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/refund.md b/doc/models/refund.md index cc16d9bc..787189e8 100644 --- a/doc/models/refund.md +++ b/doc/models/refund.md @@ -13,14 +13,14 @@ Represents a refund processed for a Square transaction. | --- | --- | --- | --- | | `id` | `string` | Required | The refund's unique ID.
**Constraints**: *Maximum Length*: `255` | | `locationId` | `string` | Required | The ID of the refund's associated location.
**Constraints**: *Maximum Length*: `50` | -| `transactionId` | `string \| undefined` | Optional | The ID of the transaction that the refunded tender is part of.
**Constraints**: *Maximum Length*: `192` | +| `transactionId` | `string \| null \| undefined` | Optional | The ID of the transaction that the refunded tender is part of.
**Constraints**: *Maximum Length*: `192` | | `tenderId` | `string` | Required | The ID of the refunded tender.
**Constraints**: *Maximum Length*: `192` | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the refund was created, in RFC 3339 format.
**Constraints**: *Maximum Length*: `32` | | `reason` | `string` | Required | The reason for the refund being issued.
**Constraints**: *Maximum Length*: `192` | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `status` | [`string`](../../doc/models/refund-status.md) | Required | Indicates a refund's current status. | | `processingFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `additionalRecipients` | [`AdditionalRecipient[] \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this refund.
For example, fees assessed on a refund of a purchase by a third party integration. | +| `additionalRecipients` | [`AdditionalRecipient[] \| null \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this refund.
For example, fees assessed on a refund of a purchase by a third party integration. | ## Example (as JSON) diff --git a/doc/models/renew-token-request.md b/doc/models/renew-token-request.md index b5bb7265..824dd6b7 100644 --- a/doc/models/renew-token-request.md +++ b/doc/models/renew-token-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `accessToken` | `string \| undefined` | Optional | The token you want to renew.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | +| `accessToken` | `string \| null \| undefined` | Optional | The token you want to renew.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | ## Example (as JSON) diff --git a/doc/models/resume-subscription-request.md b/doc/models/resume-subscription-request.md index f9aae351..f105895a 100644 --- a/doc/models/resume-subscription-request.md +++ b/doc/models/resume-subscription-request.md @@ -12,7 +12,7 @@ Defines input parameters in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `resumeEffectiveDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the subscription reactivated. | +| `resumeEffectiveDate` | `string \| null \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the subscription reactivated. | | `resumeChangeTiming` | [`string \| undefined`](../../doc/models/change-timing.md) | Optional | Supported timings when a pending change, as an action, takes place to a subscription. | ## Example (as JSON) diff --git a/doc/models/retrieve-booking-custom-attribute-request.md b/doc/models/retrieve-booking-custom-attribute-request.md index 873aea56..4dcd5718 100644 --- a/doc/models/retrieve-booking-custom-attribute-request.md +++ b/doc/models/retrieve-booking-custom-attribute-request.md @@ -11,7 +11,7 @@ Represents a [RetrieveBookingCustomAttribute](../../doc/api/booking-custom-attri | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `withDefinition` | `boolean \| undefined` | 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`. | +| `withDefinition` | `boolean \| null \| undefined` | 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`. | | `version` | `number \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-catalog-object-request.md b/doc/models/retrieve-catalog-object-request.md index a68832ca..837b9c46 100644 --- a/doc/models/retrieve-catalog-object-request.md +++ b/doc/models/retrieve-catalog-object-request.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `includeRelatedObjects` | `boolean \| undefined` | 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` | -| `catalogVersion` | `bigint \| undefined` | 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. | +| `includeRelatedObjects` | `boolean \| null \| undefined` | 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` | +| `catalogVersion` | `bigint \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-customer-custom-attribute-request.md b/doc/models/retrieve-customer-custom-attribute-request.md index 502048b0..f7b7e9e0 100644 --- a/doc/models/retrieve-customer-custom-attribute-request.md +++ b/doc/models/retrieve-customer-custom-attribute-request.md @@ -11,7 +11,7 @@ Represents a [RetrieveCustomerCustomAttribute](../../doc/api/customer-custom-att | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `withDefinition` | `boolean \| undefined` | 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`. | +| `withDefinition` | `boolean \| null \| undefined` | 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`. | | `version` | `number \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-inventory-changes-request.md b/doc/models/retrieve-inventory-changes-request.md index 9e7bbfab..f49a632c 100644 --- a/doc/models/retrieve-inventory-changes-request.md +++ b/doc/models/retrieve-inventory-changes-request.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationIds` | `string \| undefined` | Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. | -| `cursor` | `string \| undefined` | 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. | +| `locationIds` | `string \| null \| undefined` | Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. | +| `cursor` | `string \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-inventory-count-request.md b/doc/models/retrieve-inventory-count-request.md index aabb1e4a..1d1a59d4 100644 --- a/doc/models/retrieve-inventory-count-request.md +++ b/doc/models/retrieve-inventory-count-request.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationIds` | `string \| undefined` | Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. | -| `cursor` | `string \| undefined` | 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. | +| `locationIds` | `string \| null \| undefined` | Optional | The [Location](entity:Location) IDs to look up as a comma-separated
list. An empty list queries all locations. | +| `cursor` | `string \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-location-custom-attribute-request.md b/doc/models/retrieve-location-custom-attribute-request.md index 511bbb4c..6e33b5e6 100644 --- a/doc/models/retrieve-location-custom-attribute-request.md +++ b/doc/models/retrieve-location-custom-attribute-request.md @@ -11,7 +11,7 @@ Represents a [RetrieveLocationCustomAttribute](../../doc/api/location-custom-att | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `withDefinition` | `boolean \| undefined` | 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`. | +| `withDefinition` | `boolean \| null \| undefined` | 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`. | | `version` | `number \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-loyalty-promotion-response.md b/doc/models/retrieve-loyalty-promotion-response.md index 4096a0ec..11b374fe 100644 --- a/doc/models/retrieve-loyalty-promotion-response.md +++ b/doc/models/retrieve-loyalty-promotion-response.md @@ -30,6 +30,7 @@ Represents a [RetrieveLoyaltyPromotionPromotions](../../doc/api/loyalty.md#retri "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "incentive": { "points_multiplier_data": { + "multiplier": "3.000", "points_multiplier": 3 }, "type": "POINTS_MULTIPLIER", diff --git a/doc/models/retrieve-merchant-custom-attribute-request.md b/doc/models/retrieve-merchant-custom-attribute-request.md index 959f7847..edf5f310 100644 --- a/doc/models/retrieve-merchant-custom-attribute-request.md +++ b/doc/models/retrieve-merchant-custom-attribute-request.md @@ -11,7 +11,7 @@ Represents a [RetrieveMerchantCustomAttribute](../../doc/api/merchant-custom-att | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `withDefinition` | `boolean \| undefined` | 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`. | +| `withDefinition` | `boolean \| null \| undefined` | 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`. | | `version` | `number \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/retrieve-order-custom-attribute-request.md b/doc/models/retrieve-order-custom-attribute-request.md index 8f9246ee..db1402e2 100644 --- a/doc/models/retrieve-order-custom-attribute-request.md +++ b/doc/models/retrieve-order-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents a get request for an order custom attribute. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `version` | `number \| undefined` | 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` | 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`. | +| `withDefinition` | `boolean \| null \| undefined` | 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`. | ## Example (as JSON) diff --git a/doc/models/retrieve-subscription-request.md b/doc/models/retrieve-subscription-request.md index f049b4fa..af705ac4 100644 --- a/doc/models/retrieve-subscription-request.md +++ b/doc/models/retrieve-subscription-request.md @@ -12,7 +12,7 @@ Defines input parameters in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `include` | `string \| undefined` | 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. | +| `include` | `string \| null \| undefined` | 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. | ## Example (as JSON) diff --git a/doc/models/revoke-token-request.md b/doc/models/revoke-token-request.md index 165d8f78..6e961785 100644 --- a/doc/models/revoke-token-request.md +++ b/doc/models/revoke-token-request.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `clientId` | `string \| undefined` | Optional | The Square-issued ID for your application, which is available on the **OAuth** page in the
[Developer Dashboard](https://developer.squareup.com/apps).
**Constraints**: *Maximum Length*: `191` | -| `accessToken` | `string \| undefined` | Optional | The access token of the merchant whose token you want to revoke.
Do not provide a value for `merchant_id` if you provide this parameter.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | -| `merchantId` | `string \| undefined` | Optional | The ID of the merchant whose token you want to revoke.
Do not provide a value for `access_token` if you provide this parameter. | -| `revokeOnlyAccessToken` | `boolean \| undefined` | Optional | If `true`, terminate the given single access token, but do not
terminate the entire authorization.
Default: `false` | +| `clientId` | `string \| null \| undefined` | Optional | The Square-issued ID for your application, which is available on the **OAuth** page in the
[Developer Dashboard](https://developer.squareup.com/apps).
**Constraints**: *Maximum Length*: `191` | +| `accessToken` | `string \| null \| undefined` | Optional | The access token of the merchant whose token you want to revoke.
Do not provide a value for `merchant_id` if you provide this parameter.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `1024` | +| `merchantId` | `string \| null \| undefined` | Optional | The ID of the merchant whose token you want to revoke.
Do not provide a value for `access_token` if you provide this parameter. | +| `revokeOnlyAccessToken` | `boolean \| null \| undefined` | Optional | If `true`, terminate the given single access token, but do not
terminate the entire authorization.
Default: `false` | ## Example (as JSON) diff --git a/doc/models/save-card-options.md b/doc/models/save-card-options.md index de55c818..5c79eaeb 100644 --- a/doc/models/save-card-options.md +++ b/doc/models/save-card-options.md @@ -13,7 +13,7 @@ Describes save-card action fields. | --- | --- | --- | --- | | `customerId` | `string` | Required | The square-assigned ID of the customer linked to the saved card. | | `cardId` | `string \| undefined` | Optional | The id of the created card-on-file.
**Constraints**: *Maximum Length*: `64` | -| `referenceId` | `string \| undefined` | Optional | An optional user-defined reference ID that can be used to associate
this `Card` to another entity in an external system. For example, a customer
ID generated by a third-party system.
**Constraints**: *Maximum Length*: `128` | +| `referenceId` | `string \| null \| undefined` | Optional | An optional user-defined reference ID that can be used to associate
this `Card` to another entity in an external system. For example, a customer
ID generated by a third-party system.
**Constraints**: *Maximum Length*: `128` | ## Example (as JSON) diff --git a/doc/models/search-availability-filter.md b/doc/models/search-availability-filter.md index e2b16d6f..e5be38fb 100644 --- a/doc/models/search-availability-filter.md +++ b/doc/models/search-availability-filter.md @@ -12,9 +12,9 @@ A query filter to search for buyer-accessible availabilities by. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `startAtRange` | [`TimeRange`](../../doc/models/time-range.md) | Required | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | -| `locationId` | `string \| undefined` | Optional | The query expression to search for buyer-accessible availabilities with their location IDs matching the specified location ID.
This query expression cannot be set if `booking_id` is set.
**Constraints**: *Maximum Length*: `32` | -| `segmentFilters` | [`SegmentFilter[] \| undefined`](../../doc/models/segment-filter.md) | Optional | The query expression to search for buyer-accessible availabilities matching the specified list of segment filters.
If the size of the `segment_filters` list is `n`, the search returns availabilities with `n` segments per availability.

This query expression cannot be set if `booking_id` is set. | -| `bookingId` | `string \| undefined` | Optional | The query expression to search for buyer-accessible availabilities for an existing booking by matching the specified `booking_id` value.
This is commonly used to reschedule an appointment.
If this expression is set, the `location_id` and `segment_filters` expressions cannot be set.
**Constraints**: *Maximum Length*: `36` | +| `locationId` | `string \| null \| undefined` | Optional | The query expression to search for buyer-accessible availabilities with their location IDs matching the specified location ID.
This query expression cannot be set if `booking_id` is set.
**Constraints**: *Maximum Length*: `32` | +| `segmentFilters` | [`SegmentFilter[] \| null \| undefined`](../../doc/models/segment-filter.md) | Optional | The query expression to search for buyer-accessible availabilities matching the specified list of segment filters.
If the size of the `segment_filters` list is `n`, the search returns availabilities with `n` segments per availability.

This query expression cannot be set if `booking_id` is set. | +| `bookingId` | `string \| null \| undefined` | Optional | The query expression to search for buyer-accessible availabilities for an existing booking by matching the specified `booking_id` value.
This is commonly used to reschedule an appointment.
If this expression is set, the `location_id` and `segment_filters` expressions cannot be set.
**Constraints**: *Maximum Length*: `36` | ## Example (as JSON) diff --git a/doc/models/search-catalog-items-request.md b/doc/models/search-catalog-items-request.md index a25d4183..674a7c8c 100644 --- a/doc/models/search-catalog-items-request.md +++ b/doc/models/search-catalog-items-request.md @@ -20,6 +20,7 @@ Defines the request body for the [SearchCatalogItems](../../doc/api/catalog.md#s | `sortOrder` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | | `productTypes` | [`string[] \| undefined`](../../doc/models/catalog-item-product-type.md) | Optional | The product types query expression to return items or item variations having the specified product types. | | `customAttributeFilters` | [`CustomAttributeFilter[] \| undefined`](../../doc/models/custom-attribute-filter.md) | Optional | The customer-attribute filter to return items or item variations matching the specified
custom attribute expressions. A maximum number of 10 custom attribute expressions are supported in
a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. | +| `archivedState` | [`string \| undefined`](../../doc/models/archived-state.md) | Optional | Defines the values for the `archived_state` query expression
used in [SearchCatalogItems](../../doc/api/catalog.md#search-catalog-items)
to return the archived, not archived or either type of catalog items. | ## Example (as JSON) diff --git a/doc/models/search-loyalty-accounts-request-loyalty-account-query.md b/doc/models/search-loyalty-accounts-request-loyalty-account-query.md index c7f6935d..94769531 100644 --- a/doc/models/search-loyalty-accounts-request-loyalty-account-query.md +++ b/doc/models/search-loyalty-accounts-request-loyalty-account-query.md @@ -11,8 +11,8 @@ The search criteria for the loyalty accounts. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `mappings` | [`LoyaltyAccountMapping[] \| undefined`](../../doc/models/loyalty-account-mapping.md) | Optional | The set of mappings to use in the loyalty account search.

This cannot be combined with `customer_ids`.

Max: 30 mappings | -| `customerIds` | `string[] \| undefined` | Optional | The set of customer IDs to use in the loyalty account search.

This cannot be combined with `mappings`.

Max: 30 customer IDs | +| `mappings` | [`LoyaltyAccountMapping[] \| null \| undefined`](../../doc/models/loyalty-account-mapping.md) | Optional | The set of mappings to use in the loyalty account search.

This cannot be combined with `customer_ids`.

Max: 30 mappings | +| `customerIds` | `string[] \| null \| undefined` | Optional | The set of customer IDs to use in the loyalty account search.

This cannot be combined with `mappings`.

Max: 30 customer IDs | ## Example (as JSON) diff --git a/doc/models/search-orders-customer-filter.md b/doc/models/search-orders-customer-filter.md index 1599d9d7..f9a63cf5 100644 --- a/doc/models/search-orders-customer-filter.md +++ b/doc/models/search-orders-customer-filter.md @@ -13,7 +13,7 @@ associated with the order. It does not filter based on the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customerIds` | `string[] \| undefined` | Optional | A list of customer IDs to filter by.

Max: 10 customer IDs. | +| `customerIds` | `string[] \| null \| undefined` | Optional | A list of customer IDs to filter by.

Max: 10 customer IDs. | ## Example (as JSON) diff --git a/doc/models/search-orders-fulfillment-filter.md b/doc/models/search-orders-fulfillment-filter.md index 93ad8182..739f9ae7 100644 --- a/doc/models/search-orders-fulfillment-filter.md +++ b/doc/models/search-orders-fulfillment-filter.md @@ -11,8 +11,8 @@ Filter based on [order fulfillment](../../doc/models/fulfillment.md) information | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `fulfillmentTypes` | [`string[] \| undefined`](../../doc/models/fulfillment-type.md) | Optional | A list of [fulfillment types](entity:FulfillmentType) to filter
for. The list returns orders if any of its fulfillments match any of the fulfillment types
listed in this field.
See [FulfillmentType](#type-fulfillmenttype) for possible values | -| `fulfillmentStates` | [`string[] \| undefined`](../../doc/models/fulfillment-state.md) | Optional | A list of [fulfillment states](entity:FulfillmentState) to filter
for. The list returns orders if any of its fulfillments match any of the
fulfillment states listed in this field.
See [FulfillmentState](#type-fulfillmentstate) for possible values | +| `fulfillmentTypes` | [`string[] \| null \| undefined`](../../doc/models/fulfillment-type.md) | Optional | A list of [fulfillment types](entity:FulfillmentType) to filter
for. The list returns orders if any of its fulfillments match any of the fulfillment types
listed in this field.
See [FulfillmentType](#type-fulfillmenttype) for possible values | +| `fulfillmentStates` | [`string[] \| null \| undefined`](../../doc/models/fulfillment-state.md) | Optional | A list of [fulfillment states](entity:FulfillmentState) to filter
for. The list returns orders if any of its fulfillments match any of the
fulfillment states listed in this field.
See [FulfillmentState](#type-fulfillmentstate) for possible values | ## Example (as JSON) diff --git a/doc/models/search-orders-source-filter.md b/doc/models/search-orders-source-filter.md index 6192472d..93e3309b 100644 --- a/doc/models/search-orders-source-filter.md +++ b/doc/models/search-orders-source-filter.md @@ -11,7 +11,7 @@ A filter based on order `source` information. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `sourceNames` | `string[] \| undefined` | Optional | Filters by the [Source](entity:OrderSource) `name`. The filter returns any orders
with a `source.name` that matches any of the listed source names.

Max: 10 source names. | +| `sourceNames` | `string[] \| null \| undefined` | Optional | Filters by the [Source](entity:OrderSource) `name`. The filter returns any orders
with a `source.name` that matches any of the listed source names.

Max: 10 source names. | ## Example (as JSON) diff --git a/doc/models/search-subscriptions-filter.md b/doc/models/search-subscriptions-filter.md index 6fcab8a3..0361775f 100644 --- a/doc/models/search-subscriptions-filter.md +++ b/doc/models/search-subscriptions-filter.md @@ -12,9 +12,9 @@ the [SearchSubscriptions](../../doc/api/subscriptions.md#search-subscriptions) e | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `customerIds` | `string[] \| undefined` | Optional | A filter to select subscriptions based on the subscribing customer IDs. | -| `locationIds` | `string[] \| undefined` | Optional | A filter to select subscriptions based on the location. | -| `sourceNames` | `string[] \| undefined` | Optional | A filter to select subscriptions based on the source application. | +| `customerIds` | `string[] \| null \| undefined` | Optional | A filter to select subscriptions based on the subscribing customer IDs. | +| `locationIds` | `string[] \| null \| undefined` | Optional | A filter to select subscriptions based on the location. | +| `sourceNames` | `string[] \| null \| undefined` | Optional | A filter to select subscriptions based on the source application. | ## Example (as JSON) diff --git a/doc/models/search-team-members-filter.md b/doc/models/search-team-members-filter.md index dbda4004..7fcf590e 100644 --- a/doc/models/search-team-members-filter.md +++ b/doc/models/search-team-members-filter.md @@ -19,9 +19,9 @@ returns only active team members assigned to either location "A" or "B". | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationIds` | `string[] \| undefined` | Optional | When present, filters by team members assigned to the specified locations.
When empty, includes team members assigned to any location. | +| `locationIds` | `string[] \| null \| undefined` | Optional | When present, filters by team members assigned to the specified locations.
When empty, includes team members assigned to any location. | | `status` | [`string \| undefined`](../../doc/models/team-member-status.md) | Optional | Enumerates the possible statuses the team member can have within a business. | -| `isOwner` | `boolean \| undefined` | Optional | When present and set to true, returns the team member who is the owner of the Square account. | +| `isOwner` | `boolean \| null \| undefined` | Optional | When present and set to true, returns the team member who is the owner of the Square account. | ## Example (as JSON) diff --git a/doc/models/search-vendors-request-filter.md b/doc/models/search-vendors-request-filter.md index 0009a76c..167cd71f 100644 --- a/doc/models/search-vendors-request-filter.md +++ b/doc/models/search-vendors-request-filter.md @@ -11,8 +11,8 @@ Defines supported query expressions to search for vendors by. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string[] \| undefined` | Optional | The names of the [Vendor](entity:Vendor) objects to retrieve. | -| `status` | [`string[] \| undefined`](../../doc/models/vendor-status.md) | Optional | The statuses of the [Vendor](entity:Vendor) objects to retrieve.
See [VendorStatus](#type-vendorstatus) for possible values | +| `name` | `string[] \| null \| undefined` | Optional | The names of the [Vendor](entity:Vendor) objects to retrieve. | +| `status` | [`string[] \| null \| undefined`](../../doc/models/vendor-status.md) | Optional | The statuses of the [Vendor](entity:Vendor) objects to retrieve.
See [VendorStatus](#type-vendorstatus) for possible values | ## Example (as JSON) diff --git a/doc/models/shift-filter.md b/doc/models/shift-filter.md index ff2b9ad9..f2b67c13 100644 --- a/doc/models/shift-filter.md +++ b/doc/models/shift-filter.md @@ -12,13 +12,13 @@ used by Square's servers to apply each filter property specified. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `locationIds` | `string[] \| undefined` | Optional | Fetch shifts for the specified location. | -| `employeeIds` | `string[] \| undefined` | Optional | Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use `team_member_ids` instead. | +| `locationIds` | `string[] \| null \| undefined` | Optional | Fetch shifts for the specified location. | +| `employeeIds` | `string[] \| null \| undefined` | Optional | Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use `team_member_ids` instead. | | `status` | [`string \| undefined`](../../doc/models/shift-filter-status.md) | Optional | Specifies the `status` of `Shift` records to be returned. | | `start` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | | `end` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | | `workday` | [`ShiftWorkday \| undefined`](../../doc/models/shift-workday.md) | Optional | A `Shift` search query filter parameter that sets a range of days that
a `Shift` must start or end in before passing the filter condition. | -| `teamMemberIds` | `string[] \| undefined` | Optional | Fetch shifts for the specified team members. Replaced `employee_ids` at version "2020-08-26". | +| `teamMemberIds` | `string[] \| null \| undefined` | Optional | Fetch shifts for the specified team members. Replaced `employee_ids` at version "2020-08-26". | ## Example (as JSON) diff --git a/doc/models/shift-wage.md b/doc/models/shift-wage.md index f4854bad..d0ef4d8b 100644 --- a/doc/models/shift-wage.md +++ b/doc/models/shift-wage.md @@ -11,7 +11,7 @@ The hourly wage rate used to compensate an employee for this shift. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `title` | `string \| undefined` | Optional | The name of the job performed during this shift. | +| `title` | `string \| null \| undefined` | Optional | The name of the job performed during this shift. | | `hourlyRate` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `jobId` | `string \| undefined` | Optional | The id of the job performed during this shift. Square
labor-reporting UIs might group shifts together by id. This cannot be used to retrieve the job. | diff --git a/doc/models/shift-workday.md b/doc/models/shift-workday.md index 9c60b33e..2b3c1cd3 100644 --- a/doc/models/shift-workday.md +++ b/doc/models/shift-workday.md @@ -14,7 +14,7 @@ a `Shift` must start or end in before passing the filter condition. | --- | --- | --- | --- | | `dateRange` | [`DateRange \| undefined`](../../doc/models/date-range.md) | Optional | A range defined by two dates. Used for filtering a query for Connect v2
objects that have date properties. | | `matchShiftsBy` | [`string \| undefined`](../../doc/models/shift-workday-matcher.md) | Optional | Defines the logic used to apply a workday filter. | -| `defaultTimezone` | `string \| undefined` | Optional | Location-specific timezones convert workdays to datetime filters.
Every location included in the query must have a timezone or this field
must be provided as a fallback. Format: the IANA timezone database
identifier for the relevant timezone. | +| `defaultTimezone` | `string \| null \| undefined` | Optional | Location-specific timezones convert workdays to datetime filters.
Every location included in the query must have a timezone or this field
must be provided as a fallback. Format: the IANA timezone database
identifier for the relevant timezone. | ## Example (as JSON) diff --git a/doc/models/shift.md b/doc/models/shift.md index d9e91ea4..acbd1304 100644 --- a/doc/models/shift.md +++ b/doc/models/shift.md @@ -14,18 +14,18 @@ taken during the shift. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The UUID for this object.
**Constraints**: *Maximum Length*: `255` | -| `employeeId` | `string \| undefined` | Optional | The ID of the employee this shift belongs to. DEPRECATED at version 2020-08-26. Use `team_member_id` instead. | -| `locationId` | `string \| undefined` | Optional | The ID of the location this shift occurred at. The location should be based on
where the employee clocked in. | -| `timezone` | `string \| undefined` | Optional | The read-only convenience value that is calculated from the location based
on the `location_id`. Format: the IANA timezone database identifier for the
location timezone. | +| `employeeId` | `string \| null \| undefined` | Optional | The ID of the employee this shift belongs to. DEPRECATED at version 2020-08-26. Use `team_member_id` instead. | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the location this shift occurred at. The location should be based on
where the employee clocked in. | +| `timezone` | `string \| null \| undefined` | Optional | The read-only convenience value that is calculated from the location based
on the `location_id`. Format: the IANA timezone database identifier for the
location timezone. | | `startAt` | `string` | Required | RFC 3339; shifted to the location timezone + offset. Precision up to the
minute is respected; seconds are truncated.
**Constraints**: *Minimum Length*: `1` | -| `endAt` | `string \| undefined` | Optional | RFC 3339; shifted to the timezone + offset. Precision up to the minute is
respected; seconds are truncated. | +| `endAt` | `string \| null \| undefined` | Optional | RFC 3339; shifted to the timezone + offset. Precision up to the minute is
respected; seconds are truncated. | | `wage` | [`ShiftWage \| undefined`](../../doc/models/shift-wage.md) | Optional | The hourly wage rate used to compensate an employee for this shift. | -| `breaks` | [`Break[] \| undefined`](../../doc/models/break.md) | Optional | A list of all the paid or unpaid breaks that were taken during this shift. | +| `breaks` | [`Break[] \| null \| undefined`](../../doc/models/break.md) | Optional | A list of all the paid or unpaid breaks that were taken during this shift. | | `status` | [`string \| undefined`](../../doc/models/shift-status.md) | Optional | Enumerates the possible status of a `Shift`. | | `version` | `number \| undefined` | Optional | Used for resolving concurrency issues. The request fails if the version
provided does not match the server version at the time of the request. If not provided,
Square executes a blind write; potentially overwriting data from another
write. | | `createdAt` | `string \| undefined` | Optional | A read-only timestamp in RFC 3339 format; presented in UTC. | | `updatedAt` | `string \| undefined` | Optional | A read-only timestamp in RFC 3339 format; presented in UTC. | -| `teamMemberId` | `string \| undefined` | Optional | The ID of the team member this shift belongs to. Replaced `employee_id` at version "2020-08-26". | +| `teamMemberId` | `string \| null \| undefined` | Optional | The ID of the team member this shift belongs to. Replaced `employee_id` at version "2020-08-26". | ## Example (as JSON) diff --git a/doc/models/shipping-fee.md b/doc/models/shipping-fee.md index bff0769d..c6de2dea 100644 --- a/doc/models/shipping-fee.md +++ b/doc/models/shipping-fee.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name for the shipping fee. | +| `name` | `string \| null \| undefined` | Optional | The name for the shipping fee. | | `charge` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/site.md b/doc/models/site.md index 4f44043f..1b053bda 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -12,9 +12,9 @@ Represents a Square Online site, which is an online store for a Square seller. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The Square-assigned ID of the site.
**Constraints**: *Maximum Length*: `32` | -| `siteTitle` | `string \| undefined` | Optional | The title of the site. | -| `domain` | `string \| undefined` | Optional | The domain of the site (without the protocol). For example, `mysite1.square.site`. | -| `isPublished` | `boolean \| undefined` | Optional | Indicates whether the site is published. | +| `siteTitle` | `string \| null \| undefined` | Optional | The title of the site. | +| `domain` | `string \| null \| undefined` | Optional | The domain of the site (without the protocol). For example, `mysite1.square.site`. | +| `isPublished` | `boolean \| null \| undefined` | Optional | Indicates whether the site is published. | | `createdAt` | `string \| undefined` | Optional | The timestamp of when the site was created, in RFC 3339 format. | | `updatedAt` | `string \| undefined` | Optional | The timestamp of when the site was last updated, in RFC 3339 format. | diff --git a/doc/models/source-application.md b/doc/models/source-application.md index 53774199..41e9efe1 100644 --- a/doc/models/source-application.md +++ b/doc/models/source-application.md @@ -12,8 +12,8 @@ Represents information about the application used to generate a change. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product` | [`string \| undefined`](../../doc/models/product.md) | Optional | Indicates the Square product used to generate a change. | -| `applicationId` | `string \| undefined` | Optional | __Read only__ The Square-assigned ID of the application. This field is used only if the
[product](entity:Product) type is `EXTERNAL_API`. | -| `name` | `string \| undefined` | Optional | __Read only__ The display name of the application
(for example, `"Custom Application"` or `"Square POS 4.74 for Android"`). | +| `applicationId` | `string \| null \| undefined` | Optional | __Read only__ The Square-assigned ID of the application. This field is used only if the
[product](entity:Product) type is `EXTERNAL_API`. | +| `name` | `string \| null \| undefined` | Optional | __Read only__ The display name of the application
(for example, `"Custom Application"` or `"Square POS 4.74 for Android"`). | ## Example (as JSON) diff --git a/doc/models/square-account-details.md b/doc/models/square-account-details.md new file mode 100644 index 00000000..2e5e88ea --- /dev/null +++ b/doc/models/square-account-details.md @@ -0,0 +1,44 @@ + +# Square Account Details + +Additional details about Square Account payments. + +## Structure + +`SquareAccountDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `paymentSourceToken` | `string \| null \| undefined` | Optional | Unique identifier for the payment source used for this payment.
**Constraints**: *Maximum Length*: `255` | +| `errors` | [`Error[] \| null \| undefined`](../../doc/models/error.md) | Optional | Information about errors encountered during the request. | + +## Example (as JSON) + +```json +{ + "payment_source_token": "payment_source_token4", + "errors": [ + { + "category": "REFUND_ERROR", + "code": "MERCHANT_SUBSCRIPTION_NOT_FOUND", + "detail": "detail1", + "field": "field9" + }, + { + "category": "MERCHANT_SUBSCRIPTION_ERROR", + "code": "BAD_REQUEST", + "detail": "detail2", + "field": "field0" + }, + { + "category": "EXTERNAL_VENDOR_ERROR", + "code": "MISSING_REQUIRED_PARAMETER", + "detail": "detail3", + "field": "field1" + } + ] +} +``` + diff --git a/doc/models/standard-unit-description-group.md b/doc/models/standard-unit-description-group.md index 9e032172..4527c68e 100644 --- a/doc/models/standard-unit-description-group.md +++ b/doc/models/standard-unit-description-group.md @@ -11,8 +11,8 @@ Group of standard measurement units. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `standardUnitDescriptions` | [`StandardUnitDescription[] \| undefined`](../../doc/models/standard-unit-description.md) | Optional | List of standard (non-custom) measurement units in this description group. | -| `languageCode` | `string \| undefined` | Optional | IETF language tag. | +| `standardUnitDescriptions` | [`StandardUnitDescription[] \| null \| undefined`](../../doc/models/standard-unit-description.md) | Optional | List of standard (non-custom) measurement units in this description group. | +| `languageCode` | `string \| null \| undefined` | Optional | IETF language tag. | ## Example (as JSON) diff --git a/doc/models/standard-unit-description.md b/doc/models/standard-unit-description.md index acf20ffc..62a91c42 100644 --- a/doc/models/standard-unit-description.md +++ b/doc/models/standard-unit-description.md @@ -12,8 +12,8 @@ Contains the name and abbreviation for standard measurement unit. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `unit` | [`MeasurementUnit \| undefined`](../../doc/models/measurement-unit.md) | Optional | Represents a unit of measurement to use with a quantity, such as ounces
or inches. Exactly one of the following fields are required: `custom_unit`,
`area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. | -| `name` | `string \| undefined` | Optional | UI display name of the measurement unit. For example, 'Pound'. | -| `abbreviation` | `string \| undefined` | Optional | UI display abbreviation for the measurement unit. For example, 'lb'. | +| `name` | `string \| null \| undefined` | Optional | UI display name of the measurement unit. For example, 'Pound'. | +| `abbreviation` | `string \| null \| undefined` | Optional | UI display abbreviation for the measurement unit. For example, 'lb'. | ## Example (as JSON) diff --git a/doc/models/subscription-action.md b/doc/models/subscription-action.md index 9747f835..5b3cb195 100644 --- a/doc/models/subscription-action.md +++ b/doc/models/subscription-action.md @@ -13,9 +13,9 @@ Represents an action as a pending change to a subscription. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The ID of an action scoped to a subscription. | | `type` | [`string \| undefined`](../../doc/models/subscription-action-type.md) | Optional | Supported types of an action as a pending change to a subscription. | -| `effectiveDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the action occurs on the subscription. | -| `phases` | [`Phase[] \| undefined`](../../doc/models/phase.md) | Optional | A list of Phases, to pass phase-specific information used in the swap. | -| `newPlanVariationId` | `string \| undefined` | Optional | The target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action. | +| `effectiveDate` | `string \| null \| undefined` | Optional | The `YYYY-MM-DD`-formatted date when the action occurs on the subscription. | +| `phases` | [`Phase[] \| null \| undefined`](../../doc/models/phase.md) | Optional | A list of Phases, to pass phase-specific information used in the swap. | +| `newPlanVariationId` | `string \| null \| undefined` | Optional | The target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action. | ## Example (as JSON) diff --git a/doc/models/subscription-event-info.md b/doc/models/subscription-event-info.md index 2dfde8e0..343ccb25 100644 --- a/doc/models/subscription-event-info.md +++ b/doc/models/subscription-event-info.md @@ -11,7 +11,7 @@ Provides information about the subscription event. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `detail` | `string \| undefined` | Optional | A human-readable explanation for the event. | +| `detail` | `string \| null \| undefined` | Optional | A human-readable explanation for the event. | | `code` | [`string \| undefined`](../../doc/models/subscription-event-info-code.md) | Optional | Supported info codes of a subscription event. | ## Example (as JSON) diff --git a/doc/models/subscription-event.md b/doc/models/subscription-event.md index 8a085a7a..49d28380 100644 --- a/doc/models/subscription-event.md +++ b/doc/models/subscription-event.md @@ -15,7 +15,7 @@ Describes changes to a subscription and the subscription status. | `subscriptionEventType` | [`string`](../../doc/models/subscription-event-subscription-event-type.md) | Required | Supported types of an event occurred to a subscription. | | `effectiveDate` | `string` | Required | The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the subscription event occurred. | | `info` | [`SubscriptionEventInfo \| undefined`](../../doc/models/subscription-event-info.md) | Optional | Provides information about the subscription event. | -| `phases` | [`Phase[] \| undefined`](../../doc/models/phase.md) | Optional | A list of Phases, to pass phase-specific information used in the swap. | +| `phases` | [`Phase[] \| null \| undefined`](../../doc/models/phase.md) | Optional | A list of Phases, to pass phase-specific information used in the swap. | | `planVariationId` | `string` | Required | The ID of the subscription plan variation associated with the subscription. | ## Example (as JSON) diff --git a/doc/models/subscription-phase.md b/doc/models/subscription-phase.md index 33fed683..a714a4ef 100644 --- a/doc/models/subscription-phase.md +++ b/doc/models/subscription-phase.md @@ -11,11 +11,11 @@ Describes a phase in a subscription plan variation. For more information, see [S | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `string \| undefined` | Optional | The Square-assigned ID of the subscription phase. This field cannot be changed after a `SubscriptionPhase` is created. | +| `uid` | `string \| null \| undefined` | Optional | The Square-assigned ID of the subscription phase. This field cannot be changed after a `SubscriptionPhase` is created. | | `cadence` | [`string`](../../doc/models/subscription-cadence.md) | Required | Determines the billing cadence of a [Subscription](../../doc/models/subscription.md) | -| `periods` | `number \| undefined` | Optional | The number of `cadence`s the phase lasts. If not set, the phase never ends. Only the last phase can be indefinite. This field cannot be changed after a `SubscriptionPhase` is created. | +| `periods` | `number \| null \| undefined` | Optional | The number of `cadence`s the phase lasts. If not set, the phase never ends. Only the last phase can be indefinite. This field cannot be changed after a `SubscriptionPhase` is created. | | `recurringPriceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `ordinal` | `bigint \| undefined` | Optional | The position this phase appears in the sequence of phases defined for the plan, indexed from 0. This field cannot be changed after a `SubscriptionPhase` is created. | +| `ordinal` | `bigint \| null \| undefined` | Optional | The position this phase appears in the sequence of phases defined for the plan, indexed from 0. This field cannot be changed after a `SubscriptionPhase` is created. | | `pricing` | [`SubscriptionPricing \| undefined`](../../doc/models/subscription-pricing.md) | Optional | Describes the pricing for the subscription. | ## Example (as JSON) diff --git a/doc/models/subscription-pricing.md b/doc/models/subscription-pricing.md index 298ef1a3..50f8c998 100644 --- a/doc/models/subscription-pricing.md +++ b/doc/models/subscription-pricing.md @@ -12,7 +12,7 @@ Describes the pricing for the subscription. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `type` | [`string \| undefined`](../../doc/models/subscription-pricing-type.md) | Optional | Determines the pricing of a [Subscription](../../doc/models/subscription.md) | -| `discountIds` | `string[] \| undefined` | Optional | The ids of the discount catalog objects | +| `discountIds` | `string[] \| null \| undefined` | Optional | The ids of the discount catalog objects | | `priceMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/subscription-source.md b/doc/models/subscription-source.md index 819d61ef..14f73af1 100644 --- a/doc/models/subscription-source.md +++ b/doc/models/subscription-source.md @@ -11,7 +11,7 @@ The origination details of the subscription. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name used to identify the place (physical or digital) that
a subscription originates. If unset, the name defaults to the name
of the application that created the subscription.
**Constraints**: *Maximum Length*: `255` | +| `name` | `string \| null \| undefined` | Optional | The name used to identify the place (physical or digital) that
a subscription originates. If unset, the name defaults to the name
of the application that created the subscription.
**Constraints**: *Maximum Length*: `255` | ## Example (as JSON) diff --git a/doc/models/subscription-test-result.md b/doc/models/subscription-test-result.md index bf79dc17..668b222a 100644 --- a/doc/models/subscription-test-result.md +++ b/doc/models/subscription-test-result.md @@ -13,8 +13,8 @@ event types, and signature key. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A Square-generated unique ID for the subscription test result.
**Constraints**: *Maximum Length*: `64` | -| `statusCode` | `number \| undefined` | Optional | The status code returned by the subscription notification URL. | -| `payload` | `string \| undefined` | Optional | An object containing the payload of the test event. For example, a `payment.created` event. | +| `statusCode` | `number \| null \| undefined` | Optional | The status code returned by the subscription notification URL. | +| `payload` | `string \| null \| undefined` | Optional | An object containing the payload of the test event. For example, a `payment.created` event. | | `createdAt` | `string \| undefined` | Optional | The timestamp of when the subscription was created, in RFC 3339 format.
For example, "2016-09-04T23:59:33.123Z". | | `updatedAt` | `string \| undefined` | Optional | The timestamp of when the subscription was updated, in RFC 3339 format. For example, "2016-09-04T23:59:33.123Z".
Because a subscription test result is unique, this field is the same as the `created_at` field. | diff --git a/doc/models/subscription.md b/doc/models/subscription.md index b6ca6ffd..5e868881 100644 --- a/doc/models/subscription.md +++ b/doc/models/subscription.md @@ -19,18 +19,18 @@ For more information, see | `planVariationId` | `string \| undefined` | Optional | The ID of the subscribed-to [subscription plan variation](entity:CatalogSubscriptionPlanVariation). | | `customerId` | `string \| undefined` | Optional | The ID of the subscribing [customer](entity:Customer) profile. | | `startDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the subscription. | -| `canceledDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription,
when the subscription status changes to `CANCELED` and the subscription billing stops.

If this field is not set, the subscription ends according its subscription plan.

This field cannot be updated, other than being cleared. | +| `canceledDate` | `string \| null \| undefined` | Optional | The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription,
when the subscription status changes to `CANCELED` and the subscription billing stops.

If this field is not set, the subscription ends according its subscription plan.

This field cannot be updated, other than being cleared. | | `chargedThroughDate` | `string \| undefined` | Optional | The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced for the
subscription.

After the invoice is sent for a given billing period,
this date will be the last day of the billing period.
For example,
suppose for the month of May a subscriber gets an invoice
(or charged the card) on May 1. For the monthly billing scenario,
this date is then set to May 31. | | `status` | [`string \| undefined`](../../doc/models/subscription-status.md) | Optional | Supported subscription statuses. | -| `taxPercentage` | `string \| undefined` | Optional | The tax amount applied when billing the subscription. The
percentage is expressed in decimal form, using a `'.'` as the decimal
separator and without a `'%'` sign. For example, a value of `7.5`
corresponds to 7.5%. | +| `taxPercentage` | `string \| null \| undefined` | Optional | The tax amount applied when billing the subscription. The
percentage is expressed in decimal form, using a `'.'` as the decimal
separator and without a `'%'` sign. For example, a value of `7.5`
corresponds to 7.5%. | | `invoiceIds` | `string[] \| undefined` | Optional | The IDs of the [invoices](entity:Invoice) created for the
subscription, listed in order when the invoices were created
(newest invoices appear first). | | `priceOverrideMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `version` | `bigint \| undefined` | Optional | The version of the object. When updating an object, the version
supplied must match the version in the database, otherwise the write will
be rejected as conflicting. | | `createdAt` | `string \| undefined` | Optional | The timestamp when the subscription was created, in RFC 3339 format. | -| `cardId` | `string \| undefined` | Optional | The ID of the [subscriber's](entity:Customer) [card](entity:Card)
used to charge for the subscription. | +| `cardId` | `string \| null \| undefined` | Optional | The ID of the [subscriber's](entity:Customer) [card](entity:Card)
used to charge for the subscription. | | `timezone` | `string \| undefined` | Optional | Timezone that will be used in date calculations for the subscription.
Defaults to the timezone of the location based on `location_id`.
Format: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`). | | `source` | [`SubscriptionSource \| undefined`](../../doc/models/subscription-source.md) | Optional | The origination details of the subscription. | -| `actions` | [`SubscriptionAction[] \| undefined`](../../doc/models/subscription-action.md) | Optional | The list of scheduled actions on this subscription. It is set only in the response from
[RetrieveSubscription](../../doc/api/subscriptions.md#retrieve-subscription) with the query parameter
of `include=actions` or from
[SearchSubscriptions](../../doc/api/subscriptions.md#search-subscriptions) with the input parameter
of `include:["actions"]`. | +| `actions` | [`SubscriptionAction[] \| null \| undefined`](../../doc/models/subscription-action.md) | Optional | The list of scheduled actions on this subscription. It is set only in the response from
[RetrieveSubscription](../../doc/api/subscriptions.md#retrieve-subscription) with the query parameter
of `include=actions` or from
[SearchSubscriptions](../../doc/api/subscriptions.md#search-subscriptions) with the input parameter
of `include:["actions"]`. | | `phases` | [`Phase[] \| undefined`](../../doc/models/phase.md) | Optional | array of phases for this subscription | ## Example (as JSON) diff --git a/doc/models/swap-plan-request.md b/doc/models/swap-plan-request.md index 69ee6415..f698a9fb 100644 --- a/doc/models/swap-plan-request.md +++ b/doc/models/swap-plan-request.md @@ -12,8 +12,8 @@ Defines input parameters in a call to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `newPlanVariationId` | `string \| undefined` | Optional | The ID of the new subscription plan variation.

This field is required. | -| `phases` | [`PhaseInput[] \| undefined`](../../doc/models/phase-input.md) | Optional | A list of PhaseInputs, to pass phase-specific information used in the swap. | +| `newPlanVariationId` | `string \| null \| undefined` | Optional | The ID of the new subscription plan variation.

This field is required. | +| `phases` | [`PhaseInput[] \| null \| undefined`](../../doc/models/phase-input.md) | Optional | A list of PhaseInputs, to pass phase-specific information used in the swap. | ## Example (as JSON) diff --git a/doc/models/tax-ids.md b/doc/models/tax-ids.md index 62f50999..f60b164c 100644 --- a/doc/models/tax-ids.md +++ b/doc/models/tax-ids.md @@ -11,10 +11,11 @@ Identifiers for the location used by various governments for tax purposes. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `euVat` | `string \| undefined` | Optional | The EU VAT number for this location. For example, `IE3426675K`.
If the EU VAT number is present, it is well-formed and has been
validated with VIES, the VAT Information Exchange System. | -| `frSiret` | `string \| undefined` | Optional | The SIRET (Système d'Identification du Répertoire des Entreprises et de leurs Etablissements)
number is a 14-digit code issued by the French INSEE. For example, `39922799000021`. | -| `frNaf` | `string \| undefined` | Optional | The French government uses the NAF (Nomenclature des Activités Françaises) to display and
track economic statistical data. This is also called the APE (Activite Principale de l’Entreprise) code.
For example, `6910Z`. | -| `esNif` | `string \| undefined` | Optional | The NIF (Numero de Identificacion Fiscal) number is a nine-character tax identifier used in Spain.
If it is present, it has been validated. For example, `73628495A`. | +| `euVat` | `string \| null \| undefined` | Optional | The EU VAT number for this location. For example, `IE3426675K`.
If the EU VAT number is present, it is well-formed and has been
validated with VIES, the VAT Information Exchange System. | +| `frSiret` | `string \| null \| undefined` | Optional | The SIRET (Système d'Identification du Répertoire des Entreprises et de leurs Etablissements)
number is a 14-digit code issued by the French INSEE. For example, `39922799000021`. | +| `frNaf` | `string \| null \| undefined` | Optional | The French government uses the NAF (Nomenclature des Activités Françaises) to display and
track economic statistical data. This is also called the APE (Activite Principale de l’Entreprise) code.
For example, `6910Z`. | +| `esNif` | `string \| null \| undefined` | Optional | The NIF (Numero de Identificacion Fiscal) number is a nine-character tax identifier used in Spain.
If it is present, it has been validated. For example, `73628495A`. | +| `jpQii` | `string \| undefined` | Optional | The QII (Qualified Invoice Issuer) number is a 14-character tax identifier used in Japan.
If it is present, it has been validated. For example, `T1234567890123`. | ## Example (as JSON) @@ -23,7 +24,8 @@ Identifiers for the location used by various governments for tax purposes. "eu_vat": "eu_vat2", "fr_siret": "fr_siret0", "fr_naf": "fr_naf0", - "es_nif": "es_nif4" + "es_nif": "es_nif4", + "jp_qii": "jp_qii0" } ``` diff --git a/doc/models/team-member-assigned-locations.md b/doc/models/team-member-assigned-locations.md index 6a34f6e6..fca71b45 100644 --- a/doc/models/team-member-assigned-locations.md +++ b/doc/models/team-member-assigned-locations.md @@ -12,7 +12,7 @@ An object that represents a team member's assignment to locations. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `assignmentType` | [`string \| undefined`](../../doc/models/team-member-assigned-locations-assignment-type.md) | Optional | Enumerates the possible assignment types that the team member can have. | -| `locationIds` | `string[] \| undefined` | Optional | The explicit locations that the team member is assigned to. | +| `locationIds` | `string[] \| null \| undefined` | Optional | The explicit locations that the team member is assigned to. | ## Example (as JSON) diff --git a/doc/models/team-member-booking-profile.md b/doc/models/team-member-booking-profile.md index bbf70774..52032442 100644 --- a/doc/models/team-member-booking-profile.md +++ b/doc/models/team-member-booking-profile.md @@ -14,7 +14,7 @@ The booking profile of a seller's team member, including the team member's ID, d | `teamMemberId` | `string \| undefined` | Optional | The ID of the [TeamMember](entity:TeamMember) object for the team member associated with the booking profile.
**Constraints**: *Maximum Length*: `32` | | `description` | `string \| undefined` | Optional | The description of the team member.
**Constraints**: *Maximum Length*: `65536` | | `displayName` | `string \| undefined` | Optional | The display name of the team member.
**Constraints**: *Maximum Length*: `512` | -| `isBookable` | `boolean \| undefined` | Optional | Indicates whether the team member can be booked through the Bookings API or the seller's online booking channel or site (`true) or not (`false`). | +| `isBookable` | `boolean \| null \| undefined` | Optional | Indicates whether the team member can be booked through the Bookings API or the seller's online booking channel or site (`true) or not (`false`). | | `profileImageUrl` | `string \| undefined` | Optional | The URL of the team member's image for the bookings profile.
**Constraints**: *Maximum Length*: `2048` | ## Example (as JSON) diff --git a/doc/models/team-member-wage.md b/doc/models/team-member-wage.md index 825433c8..6d193dab 100644 --- a/doc/models/team-member-wage.md +++ b/doc/models/team-member-wage.md @@ -13,10 +13,10 @@ specified by the `title` property of this object. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The UUID for this object. | -| `teamMemberId` | `string \| undefined` | Optional | The `TeamMember` that this wage is assigned to. | -| `title` | `string \| undefined` | Optional | The job title that this wage relates to. | +| `teamMemberId` | `string \| null \| undefined` | Optional | The `TeamMember` that this wage is assigned to. | +| `title` | `string \| null \| undefined` | Optional | The job title that this wage relates to. | | `hourlyRate` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `jobId` | `string \| undefined` | Optional | An identifier for the job that this wage relates to. This cannot be
used to retrieve the job. | +| `jobId` | `string \| null \| undefined` | Optional | An identifier for the job that this wage relates to. This cannot be
used to retrieve the job. | ## Example (as JSON) diff --git a/doc/models/team-member.md b/doc/models/team-member.md index 6edeff11..f8c699b2 100644 --- a/doc/models/team-member.md +++ b/doc/models/team-member.md @@ -12,13 +12,13 @@ A record representing an individual team member for a business. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The unique ID for the team member. | -| `referenceId` | `string \| undefined` | Optional | A second ID used to associate the team member with an entity in another system. | +| `referenceId` | `string \| null \| undefined` | Optional | A second ID used to associate the team member with an entity in another system. | | `isOwner` | `boolean \| undefined` | Optional | Whether the team member is the owner of the Square account. | | `status` | [`string \| undefined`](../../doc/models/team-member-status.md) | Optional | Enumerates the possible statuses the team member can have within a business. | -| `givenName` | `string \| undefined` | Optional | The given name (that is, the first name) associated with the team member. | -| `familyName` | `string \| undefined` | Optional | The family name (that is, the last name) associated with the team member. | -| `emailAddress` | `string \| undefined` | Optional | The email address associated with the team member. | -| `phoneNumber` | `string \| undefined` | Optional | The team member's phone number, in E.164 format. For example:
+14155552671 - the country code is 1 for US
+551155256325 - the country code is 55 for BR | +| `givenName` | `string \| null \| undefined` | Optional | The given name (that is, the first name) associated with the team member. | +| `familyName` | `string \| null \| undefined` | Optional | The family name (that is, the last name) associated with the team member. | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address associated with the team member. | +| `phoneNumber` | `string \| null \| undefined` | Optional | The team member's phone number, in E.164 format. For example:
+14155552671 - the country code is 1 for US
+551155256325 - the country code is 55 for BR | | `createdAt` | `string \| undefined` | Optional | The timestamp, in RFC 3339 format, describing when the team member was created.
For example, "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z". | | `updatedAt` | `string \| undefined` | Optional | The timestamp, in RFC 3339 format, describing when the team member was last updated.
For example, "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z". | | `assignedLocations` | [`TeamMemberAssignedLocations \| undefined`](../../doc/models/team-member-assigned-locations.md) | Optional | An object that represents a team member's assignment to locations. | diff --git a/doc/models/tender-bank-account-details-status.md b/doc/models/tender-bank-account-details-status.md new file mode 100644 index 00000000..29b0c1f1 --- /dev/null +++ b/doc/models/tender-bank-account-details-status.md @@ -0,0 +1,17 @@ + +# Tender Bank Account Details Status + +Indicates the bank account payment's current status. + +## Enumeration + +`TenderBankAccountDetailsStatus` + +## Fields + +| Name | Description | +| --- | --- | +| `PENDING` | The bank account payment is in progress. | +| `COMPLETED` | The bank account payment has been completed. | +| `FAILED` | The bank account payment failed. | + diff --git a/doc/models/tender-bank-account-details.md b/doc/models/tender-bank-account-details.md new file mode 100644 index 00000000..8819dbc9 --- /dev/null +++ b/doc/models/tender-bank-account-details.md @@ -0,0 +1,26 @@ + +# Tender Bank Account Details + +Represents the details of a tender with `type` `BANK_ACCOUNT`. + +See [BankAccountPaymentDetails](../../doc/models/bank-account-payment-details.md) +for more exposed details of a bank account payment. + +## Structure + +`TenderBankAccountDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`string \| undefined`](../../doc/models/tender-bank-account-details-status.md) | Optional | Indicates the bank account payment's current status. | + +## Example (as JSON) + +```json +{ + "status": "FAILED" +} +``` + diff --git a/doc/models/tender-buy-now-pay-later-details-brand.md b/doc/models/tender-buy-now-pay-later-details-brand.md new file mode 100644 index 00000000..49e6ff57 --- /dev/null +++ b/doc/models/tender-buy-now-pay-later-details-brand.md @@ -0,0 +1,14 @@ + +# Tender Buy Now Pay Later Details Brand + +## Enumeration + +`TenderBuyNowPayLaterDetailsBrand` + +## Fields + +| Name | +| --- | +| `OTHER_BRAND` | +| `AFTERPAY` | + diff --git a/doc/models/tender-buy-now-pay-later-details-status.md b/doc/models/tender-buy-now-pay-later-details-status.md new file mode 100644 index 00000000..2dacca32 --- /dev/null +++ b/doc/models/tender-buy-now-pay-later-details-status.md @@ -0,0 +1,16 @@ + +# Tender Buy Now Pay Later Details Status + +## Enumeration + +`TenderBuyNowPayLaterDetailsStatus` + +## Fields + +| Name | Description | +| --- | --- | +| `AUTHORIZED` | The buy now pay later payment has been authorized but not yet captured. | +| `CAPTURED` | The buy now pay later payment was authorized and subsequently captured (i.e., completed). | +| `VOIDED` | The buy now pay later payment was authorized and subsequently voided (i.e., canceled). | +| `FAILED` | The buy now pay later payment failed. | + diff --git a/doc/models/tender-buy-now-pay-later-details.md b/doc/models/tender-buy-now-pay-later-details.md new file mode 100644 index 00000000..32e75a05 --- /dev/null +++ b/doc/models/tender-buy-now-pay-later-details.md @@ -0,0 +1,25 @@ + +# Tender Buy Now Pay Later Details + +Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. + +## Structure + +`TenderBuyNowPayLaterDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `buyNowPayLaterBrand` | [`string \| undefined`](../../doc/models/tender-buy-now-pay-later-details-brand.md) | Optional | - | +| `status` | [`string \| undefined`](../../doc/models/tender-buy-now-pay-later-details-status.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "buy_now_pay_later_brand": "OTHER_BRAND", + "status": "AUTHORIZED" +} +``` + diff --git a/doc/models/tender-square-account-details-status.md b/doc/models/tender-square-account-details-status.md new file mode 100644 index 00000000..8c46abdf --- /dev/null +++ b/doc/models/tender-square-account-details-status.md @@ -0,0 +1,16 @@ + +# Tender Square Account Details Status + +## Enumeration + +`TenderSquareAccountDetailsStatus` + +## Fields + +| Name | Description | +| --- | --- | +| `AUTHORIZED` | The Square Account payment has been authorized but not yet captured. | +| `CAPTURED` | The Square Account payment was authorized and subsequently captured (i.e., completed). | +| `VOIDED` | The Square Account payment was authorized and subsequently voided (i.e., canceled). | +| `FAILED` | The Square Account payment failed. | + diff --git a/doc/models/tender-square-account-details.md b/doc/models/tender-square-account-details.md new file mode 100644 index 00000000..7b2da076 --- /dev/null +++ b/doc/models/tender-square-account-details.md @@ -0,0 +1,23 @@ + +# Tender Square Account Details + +Represents the details of a tender with `type` `SQUARE_ACCOUNT`. + +## Structure + +`TenderSquareAccountDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`string \| undefined`](../../doc/models/tender-square-account-details-status.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "status": "AUTHORIZED" +} +``` + diff --git a/doc/models/tender-type.md b/doc/models/tender-type.md index 639c584d..4deb583e 100644 --- a/doc/models/tender-type.md +++ b/doc/models/tender-type.md @@ -16,6 +16,9 @@ Indicates a tender's type. | `THIRD_PARTY_CARD` | A credit card processed with a card processor other than Square.

This value applies only to merchants in countries where Square does not
yet provide card processing. | | `SQUARE_GIFT_CARD` | A Square gift card. | | `NO_SALE` | This tender represents the register being opened for a "no sale" event. | +| `BANK_ACCOUNT` | A bank account payment. | | `WALLET` | A payment from a digital wallet, e.g. Cash App.

Note: Some "digital wallets", including Google Pay and Apple Pay, facilitate
card payments. Those payments have the `CARD` type. | +| `BUY_NOW_PAY_LATER` | A Buy Now Pay Later payment. | +| `SQUARE_ACCOUNT` | A Square House Account payment. | | `OTHER` | A form of tender that does not match any other value. | diff --git a/doc/models/tender.md b/doc/models/tender.md index d6ff924b..3530bd5f 100644 --- a/doc/models/tender.md +++ b/doc/models/tender.md @@ -12,19 +12,22 @@ Represents a tender (i.e., a method of payment) used in a Square transaction. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The tender's unique ID. It is the associated payment ID.
**Constraints**: *Maximum Length*: `192` | -| `locationId` | `string \| undefined` | Optional | The ID of the transaction's associated location.
**Constraints**: *Maximum Length*: `50` | -| `transactionId` | `string \| undefined` | Optional | The ID of the tender's associated transaction.
**Constraints**: *Maximum Length*: `192` | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the transaction's associated location.
**Constraints**: *Maximum Length*: `50` | +| `transactionId` | `string \| null \| undefined` | Optional | The ID of the tender's associated transaction.
**Constraints**: *Maximum Length*: `192` | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the tender was created, in RFC 3339 format.
**Constraints**: *Maximum Length*: `32` | -| `note` | `string \| undefined` | Optional | An optional note associated with the tender at the time of payment.
**Constraints**: *Maximum Length*: `500` | +| `note` | `string \| null \| undefined` | Optional | An optional note associated with the tender at the time of payment.
**Constraints**: *Maximum Length*: `500` | | `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `tipMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `processingFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `customerId` | `string \| undefined` | Optional | If the tender is associated with a customer or represents a customer's card on file,
this is the ID of the associated customer.
**Constraints**: *Maximum Length*: `191` | +| `customerId` | `string \| null \| undefined` | Optional | If the tender is associated with a customer or represents a customer's card on file,
this is the ID of the associated customer.
**Constraints**: *Maximum Length*: `191` | | `type` | [`string`](../../doc/models/tender-type.md) | Required | Indicates a tender's type. | | `cardDetails` | [`TenderCardDetails \| undefined`](../../doc/models/tender-card-details.md) | Optional | Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD` | | `cashDetails` | [`TenderCashDetails \| undefined`](../../doc/models/tender-cash-details.md) | Optional | Represents the details of a tender with `type` `CASH`. | -| `additionalRecipients` | [`AdditionalRecipient[] \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this tender.
For example, fees assessed on the purchase by a third party integration. | -| `paymentId` | `string \| undefined` | Optional | The ID of the [Payment](entity:Payment) that corresponds to this tender.
This value is only present for payments created with the v2 Payments API.
**Constraints**: *Maximum Length*: `192` | +| `bankAccountDetails` | [`TenderBankAccountDetails \| undefined`](../../doc/models/tender-bank-account-details.md) | Optional | Represents the details of a tender with `type` `BANK_ACCOUNT`.

See [BankAccountPaymentDetails](../../doc/models/bank-account-payment-details.md)
for more exposed details of a bank account payment. | +| `buyNowPayLaterDetails` | [`TenderBuyNowPayLaterDetails \| undefined`](../../doc/models/tender-buy-now-pay-later-details.md) | Optional | Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. | +| `squareAccountDetails` | [`TenderSquareAccountDetails \| undefined`](../../doc/models/tender-square-account-details.md) | Optional | Represents the details of a tender with `type` `SQUARE_ACCOUNT`. | +| `additionalRecipients` | [`AdditionalRecipient[] \| null \| undefined`](../../doc/models/additional-recipient.md) | Optional | Additional recipients (other than the merchant) receiving a portion of this tender.
For example, fees assessed on the purchase by a third party integration. | +| `paymentId` | `string \| null \| undefined` | Optional | The ID of the [Payment](entity:Payment) that corresponds to this tender.
This value is only present for payments created with the v2 Payments API.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) @@ -35,7 +38,7 @@ Represents a tender (i.e., a method of payment) used in a Square transaction. "transaction_id": "transaction_id8", "created_at": "created_at2", "note": "note4", - "type": "WALLET" + "type": "CARD" } ``` diff --git a/doc/models/terminal-action-query-filter.md b/doc/models/terminal-action-query-filter.md index ed44a89a..7fa547f7 100644 --- a/doc/models/terminal-action-query-filter.md +++ b/doc/models/terminal-action-query-filter.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `deviceId` | `string \| undefined` | Optional | `TerminalAction`s associated with a specific device. If no device is specified then all
`TerminalAction`s for the merchant will be displayed. | +| `deviceId` | `string \| null \| undefined` | Optional | `TerminalAction`s associated with a specific device. If no device is specified then all
`TerminalAction`s for the merchant will be displayed. | | `createdAt` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | -| `status` | `string \| undefined` | Optional | Filter results with the desired status of the `TerminalAction`
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | +| `status` | `string \| null \| undefined` | Optional | Filter results with the desired status of the `TerminalAction`
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | | `type` | [`string \| undefined`](../../doc/models/terminal-action-action-type.md) | Optional | Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum. | ## Example (as JSON) diff --git a/doc/models/terminal-action.md b/doc/models/terminal-action.md index bc2ce229..7b325d29 100644 --- a/doc/models/terminal-action.md +++ b/doc/models/terminal-action.md @@ -12,8 +12,8 @@ Represents an action processed by the Square Terminal. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique ID for this `TerminalAction`.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `255` | -| `deviceId` | `string \| undefined` | Optional | The unique Id of the device intended for this `TerminalAction`.
The Id can be retrieved from /v2/devices api. | -| `deadlineDuration` | `string \| undefined` | Optional | The duration as an RFC 3339 duration, after which the action will be automatically canceled.
TerminalActions that are `PENDING` will be automatically `CANCELED` and have a cancellation reason
of `TIMED_OUT`

Default: 5 minutes from creation

Maximum: 5 minutes | +| `deviceId` | `string \| null \| undefined` | Optional | The unique Id of the device intended for this `TerminalAction`.
The Id can be retrieved from /v2/devices api. | +| `deadlineDuration` | `string \| null \| undefined` | Optional | The duration as an RFC 3339 duration, after which the action will be automatically canceled.
TerminalActions that are `PENDING` will be automatically `CANCELED` and have a cancellation reason
of `TIMED_OUT`

Default: 5 minutes from creation

Maximum: 5 minutes | | `status` | `string \| undefined` | Optional | The status of the `TerminalAction`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | | `cancelReason` | [`string \| undefined`](../../doc/models/action-cancel-reason.md) | Optional | - | | `createdAt` | `string \| undefined` | Optional | The time when the `TerminalAction` was created as an RFC 3339 timestamp. | @@ -29,8 +29,8 @@ Represents an action processed by the Square Terminal. | `dataCollectionOptions` | [`DataCollectionOptions \| undefined`](../../doc/models/data-collection-options.md) | Optional | - | | `selectOptions` | [`SelectOptions \| undefined`](../../doc/models/select-options.md) | Optional | - | | `deviceMetadata` | [`DeviceMetadata \| undefined`](../../doc/models/device-metadata.md) | Optional | - | -| `awaitNextAction` | `boolean \| undefined` | Optional | Indicates the action will be linked to another action and requires a waiting dialog to be
displayed instead of returning to the idle screen on completion of the action.

Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT types. | -| `awaitNextActionDuration` | `string \| undefined` | Optional | The timeout duration of the waiting dialog as an RFC 3339 duration, after which the
waiting dialog will no longer be displayed and the Terminal will return to the idle screen.

Default: 5 minutes from when the waiting dialog is displayed

Maximum: 5 minutes | +| `awaitNextAction` | `boolean \| null \| undefined` | Optional | Indicates the action will be linked to another action and requires a waiting dialog to be
displayed instead of returning to the idle screen on completion of the action.

Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT types. | +| `awaitNextActionDuration` | `string \| null \| undefined` | Optional | The timeout duration of the waiting dialog as an RFC 3339 duration, after which the
waiting dialog will no longer be displayed and the Terminal will return to the idle screen.

Default: 5 minutes from when the waiting dialog is displayed

Maximum: 5 minutes | ## Example (as JSON) diff --git a/doc/models/terminal-checkout-query-filter.md b/doc/models/terminal-checkout-query-filter.md index 975ba575..3177b5f9 100644 --- a/doc/models/terminal-checkout-query-filter.md +++ b/doc/models/terminal-checkout-query-filter.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `deviceId` | `string \| undefined` | Optional | The `TerminalCheckout` objects associated with a specific device. If no device is specified, then all
`TerminalCheckout` objects for the merchant are displayed. | +| `deviceId` | `string \| null \| undefined` | Optional | The `TerminalCheckout` objects associated with a specific device. If no device is specified, then all
`TerminalCheckout` objects for the merchant are displayed. | | `createdAt` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | -| `status` | `string \| undefined` | Optional | Filtered results with the desired status of the `TerminalCheckout`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | +| `status` | `string \| null \| undefined` | Optional | Filtered results with the desired status of the `TerminalCheckout`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | ## Example (as JSON) diff --git a/doc/models/terminal-checkout.md b/doc/models/terminal-checkout.md index eba906cb..b9634b22 100644 --- a/doc/models/terminal-checkout.md +++ b/doc/models/terminal-checkout.md @@ -13,12 +13,12 @@ Represents a checkout processed by the Square Terminal. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique ID for this `TerminalCheckout`.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `255` | | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `referenceId` | `string \| undefined` | Optional | An optional user-defined reference ID that can be used to associate
this `TerminalCheckout` to another entity in an external system. For example, an order
ID generated by a third-party shopping cart. The ID is also associated with any payments
used to complete the checkout.
**Constraints**: *Maximum Length*: `40` | -| `note` | `string \| undefined` | Optional | An optional note to associate with the checkout, as well as with any payments used to complete the checkout.
Note: maximum 500 characters
**Constraints**: *Maximum Length*: `500` | -| `orderId` | `string \| undefined` | Optional | The reference to the Square order ID for the checkout request. Supported only in the US. | +| `referenceId` | `string \| null \| undefined` | Optional | An optional user-defined reference ID that can be used to associate
this `TerminalCheckout` to another entity in an external system. For example, an order
ID generated by a third-party shopping cart. The ID is also associated with any payments
used to complete the checkout.
**Constraints**: *Maximum Length*: `40` | +| `note` | `string \| null \| undefined` | Optional | An optional note to associate with the checkout, as well as with any payments used to complete the checkout.
Note: maximum 500 characters
**Constraints**: *Maximum Length*: `500` | +| `orderId` | `string \| null \| undefined` | Optional | The reference to the Square order ID for the checkout request. Supported only in the US. | | `paymentOptions` | [`PaymentOptions \| undefined`](../../doc/models/payment-options.md) | Optional | - | | `deviceOptions` | [`DeviceCheckoutOptions`](../../doc/models/device-checkout-options.md) | Required | - | -| `deadlineDuration` | `string \| undefined` | Optional | An RFC 3339 duration, after which the checkout is automatically canceled.
A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
of `TIMED_OUT`.

Default: 5 minutes from creation

Maximum: 5 minutes | +| `deadlineDuration` | `string \| null \| undefined` | Optional | An RFC 3339 duration, after which the checkout is automatically canceled.
A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
of `TIMED_OUT`.

Default: 5 minutes from creation

Maximum: 5 minutes | | `status` | `string \| undefined` | Optional | The status of the `TerminalCheckout`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` | | `cancelReason` | [`string \| undefined`](../../doc/models/action-cancel-reason.md) | Optional | - | | `paymentIds` | `string[] \| undefined` | Optional | A list of IDs for payments created by this `TerminalCheckout`. | @@ -27,10 +27,10 @@ Represents a checkout processed by the Square Terminal. | `appId` | `string \| undefined` | Optional | The ID of the application that created the checkout. | | `locationId` | `string \| undefined` | Optional | The location of the device where the `TerminalCheckout` was directed.
**Constraints**: *Maximum Length*: `64` | | `paymentType` | [`string \| undefined`](../../doc/models/checkout-options-payment-type.md) | Optional | - | -| `teamMemberId` | `string \| undefined` | Optional | An optional ID of the team member associated with creating the checkout. | -| `customerId` | `string \| undefined` | Optional | An optional ID of the customer associated with the checkout. | +| `teamMemberId` | `string \| null \| undefined` | Optional | An optional ID of the team member associated with creating the checkout. | +| `customerId` | `string \| null \| undefined` | Optional | An optional ID of the customer associated with the checkout. | | `appFeeMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | -| `statementDescriptionIdentifier` | `string \| undefined` | Optional | Optional additional payment information to include on the customer's card statement as
part of the statement description. This can be, for example, an invoice number, ticket number,
or short description that uniquely identifies the purchase. Supported only in the US.
**Constraints**: *Maximum Length*: `20` | +| `statementDescriptionIdentifier` | `string \| null \| undefined` | Optional | Optional additional payment information to include on the customer's card statement as
part of the statement description. This can be, for example, an invoice number, ticket number,
or short description that uniquely identifies the purchase. Supported only in the US.
**Constraints**: *Maximum Length*: `20` | | `tipMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | ## Example (as JSON) diff --git a/doc/models/terminal-refund-query-filter.md b/doc/models/terminal-refund-query-filter.md index be3517fd..22987180 100644 --- a/doc/models/terminal-refund-query-filter.md +++ b/doc/models/terminal-refund-query-filter.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `deviceId` | `string \| undefined` | Optional | `TerminalRefund` objects associated with a specific device. If no device is specified, then all
`TerminalRefund` objects for the signed-in account are displayed. | +| `deviceId` | `string \| null \| undefined` | Optional | `TerminalRefund` objects associated with a specific device. If no device is specified, then all
`TerminalRefund` objects for the signed-in account are displayed. | | `createdAt` | [`TimeRange \| undefined`](../../doc/models/time-range.md) | Optional | Represents a generic time range. The start and end values are
represented in RFC 3339 format. Time ranges are customized to be
inclusive or exclusive based on the needs of a particular endpoint.
Refer to the relevant endpoint-specific documentation to determine
how time ranges are handled. | -| `status` | `string \| undefined` | Optional | Filtered results with the desired status of the `TerminalRefund`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`. | +| `status` | `string \| null \| undefined` | Optional | Filtered results with the desired status of the `TerminalRefund`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`. | ## Example (as JSON) diff --git a/doc/models/terminal-refund-query-sort.md b/doc/models/terminal-refund-query-sort.md index 42a0a65a..9c596f95 100644 --- a/doc/models/terminal-refund-query-sort.md +++ b/doc/models/terminal-refund-query-sort.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `sortOrder` | `string \| undefined` | Optional | The order in which results are listed.

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | +| `sortOrder` | `string \| null \| undefined` | Optional | The order in which results are listed.

- `ASC` - Oldest to newest.
- `DESC` - Newest to oldest (default). | ## Example (as JSON) diff --git a/doc/models/terminal-refund.md b/doc/models/terminal-refund.md index c6db16d7..0b90ec7e 100644 --- a/doc/models/terminal-refund.md +++ b/doc/models/terminal-refund.md @@ -18,7 +18,7 @@ Represents a payment refund processed by the Square Terminal. Only supports Inte | `amountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | | `reason` | `string` | Required | A description of the reason for the refund.
**Constraints**: *Maximum Length*: `192` | | `deviceId` | `string` | Required | The unique ID of the device intended for this `TerminalRefund`.
The Id can be retrieved from /v2/devices api. | -| `deadlineDuration` | `string \| undefined` | Optional | The RFC 3339 duration, after which the refund is automatically canceled.
A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
of `TIMED_OUT`.

Default: 5 minutes from creation.

Maximum: 5 minutes | +| `deadlineDuration` | `string \| null \| undefined` | Optional | The RFC 3339 duration, after which the refund is automatically canceled.
A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
of `TIMED_OUT`.

Default: 5 minutes from creation.

Maximum: 5 minutes | | `status` | `string \| undefined` | Optional | The status of the `TerminalRefund`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`. | | `cancelReason` | [`string \| undefined`](../../doc/models/action-cancel-reason.md) | Optional | - | | `createdAt` | `string \| undefined` | Optional | The time when the `TerminalRefund` was created, as an RFC 3339 timestamp. | diff --git a/doc/models/test-webhook-subscription-request.md b/doc/models/test-webhook-subscription-request.md index 448a7045..40546136 100644 --- a/doc/models/test-webhook-subscription-request.md +++ b/doc/models/test-webhook-subscription-request.md @@ -11,7 +11,7 @@ Tests a [Subscription](../../doc/models/webhook-subscription.md) by sending a te | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `eventType` | `string \| undefined` | Optional | The event type that will be used to test the [Subscription](entity:WebhookSubscription). The event type must be
contained in the list of event types in the [Subscription](entity:WebhookSubscription). | +| `eventType` | `string \| null \| undefined` | Optional | The event type that will be used to test the [Subscription](entity:WebhookSubscription). The event type must be
contained in the list of event types in the [Subscription](entity:WebhookSubscription). | ## Example (as JSON) diff --git a/doc/models/time-range.md b/doc/models/time-range.md index eea31777..8e1775f1 100644 --- a/doc/models/time-range.md +++ b/doc/models/time-range.md @@ -15,8 +15,8 @@ how time ranges are handled. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `startAt` | `string \| undefined` | Optional | A datetime value in RFC 3339 format indicating when the time range
starts. | -| `endAt` | `string \| undefined` | Optional | A datetime value in RFC 3339 format indicating when the time range
ends. | +| `startAt` | `string \| null \| undefined` | Optional | A datetime value in RFC 3339 format indicating when the time range
starts. | +| `endAt` | `string \| null \| undefined` | Optional | A datetime value in RFC 3339 format indicating when the time range
ends. | ## Example (as JSON) diff --git a/doc/models/tip-settings.md b/doc/models/tip-settings.md index 6ca87c8e..a6fb5d3e 100644 --- a/doc/models/tip-settings.md +++ b/doc/models/tip-settings.md @@ -9,11 +9,11 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `allowTipping` | `boolean \| undefined` | Optional | Indicates whether tipping is enabled for this checkout. Defaults to false. | -| `separateTipScreen` | `boolean \| undefined` | Optional | Indicates whether tip options should be presented on the screen before presenting
the signature screen during card payment. Defaults to false. | -| `customTipField` | `boolean \| undefined` | Optional | Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false. | -| `tipPercentages` | `number[] \| undefined` | Optional | A list of tip percentages that should be presented during the checkout flow, specified as
up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to 15, 20, and 25. | -| `smartTipping` | `boolean \| undefined` | Optional | Enables the "Smart Tip Amounts" behavior.
Exact tipping options depend on the region in which the Square seller is active.

For payments under 10.00, in the Australia, Canada, Ireland, United Kingdom, and United States, tipping options are presented as no tip, .50, 1.00 or 2.00.

For payment amounts of 10.00 or greater, tipping options are presented as the following percentages: 0%, 5%, 10%, 15%.

If set to true, the `tip_percentages` settings is ignored.
Defaults to false.

To learn more about smart tipping, see [Accept Tips with the Square App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app). | +| `allowTipping` | `boolean \| null \| undefined` | Optional | Indicates whether tipping is enabled for this checkout. Defaults to false. | +| `separateTipScreen` | `boolean \| null \| undefined` | Optional | Indicates whether tip options should be presented on the screen before presenting
the signature screen during card payment. Defaults to false. | +| `customTipField` | `boolean \| null \| undefined` | Optional | Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false. | +| `tipPercentages` | `number[] \| null \| undefined` | Optional | A list of tip percentages that should be presented during the checkout flow, specified as
up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to 15, 20, and 25. | +| `smartTipping` | `boolean \| null \| undefined` | Optional | Enables the "Smart Tip Amounts" behavior.
Exact tipping options depend on the region in which the Square seller is active.

For payments under 10.00, in the Australia, Canada, Ireland, United Kingdom, and United States, tipping options are presented as no tip, .50, 1.00 or 2.00.

For payment amounts of 10.00 or greater, tipping options are presented as the following percentages: 0%, 5%, 10%, 15%.

If set to true, the `tip_percentages` settings is ignored.
Defaults to false.

To learn more about smart tipping, see [Accept Tips with the Square App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app). | ## Example (as JSON) diff --git a/doc/models/transaction.md b/doc/models/transaction.md index 46e9ad20..6217b8ca 100644 --- a/doc/models/transaction.md +++ b/doc/models/transaction.md @@ -16,15 +16,15 @@ the transaction. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The transaction's unique ID, issued by Square payments servers.
**Constraints**: *Maximum Length*: `192` | -| `locationId` | `string \| undefined` | Optional | The ID of the transaction's associated location.
**Constraints**: *Maximum Length*: `50` | +| `locationId` | `string \| null \| undefined` | Optional | The ID of the transaction's associated location.
**Constraints**: *Maximum Length*: `50` | | `createdAt` | `string \| undefined` | Optional | The timestamp for when the transaction was created, in RFC 3339 format.
**Constraints**: *Maximum Length*: `32` | -| `tenders` | [`Tender[] \| undefined`](../../doc/models/tender.md) | Optional | The tenders used to pay in the transaction. | -| `refunds` | [`Refund[] \| undefined`](../../doc/models/refund.md) | Optional | Refunds that have been applied to any tender in the transaction. | -| `referenceId` | `string \| undefined` | Optional | If the transaction was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint, this value is the same as the value provided for the `reference_id`
parameter in the request to that endpoint. Otherwise, it is not set.
**Constraints**: *Maximum Length*: `40` | +| `tenders` | [`Tender[] \| null \| undefined`](../../doc/models/tender.md) | Optional | The tenders used to pay in the transaction. | +| `refunds` | [`Refund[] \| null \| undefined`](../../doc/models/refund.md) | Optional | Refunds that have been applied to any tender in the transaction. | +| `referenceId` | `string \| null \| undefined` | Optional | If the transaction was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint, this value is the same as the value provided for the `reference_id`
parameter in the request to that endpoint. Otherwise, it is not set.
**Constraints**: *Maximum Length*: `40` | | `product` | [`string \| undefined`](../../doc/models/transaction-product.md) | Optional | Indicates the Square product used to process a transaction. | -| `clientId` | `string \| undefined` | Optional | If the transaction was created in the Square Point of Sale app, this value
is the ID generated for the transaction by Square Point of Sale.

This ID has no relationship to the transaction's canonical `id`, which is
generated by Square's backend servers. This value is generated for bookkeeping
purposes, in case the transaction cannot immediately be completed (for example,
if the transaction is processed in offline mode).

It is not currently possible with the Connect API to perform a transaction
lookup by this value.
**Constraints**: *Maximum Length*: `192` | +| `clientId` | `string \| null \| undefined` | Optional | If the transaction was created in the Square Point of Sale app, this value
is the ID generated for the transaction by Square Point of Sale.

This ID has no relationship to the transaction's canonical `id`, which is
generated by Square's backend servers. This value is generated for bookkeeping
purposes, in case the transaction cannot immediately be completed (for example,
if the transaction is processed in offline mode).

It is not currently possible with the Connect API to perform a transaction
lookup by this value.
**Constraints**: *Maximum Length*: `192` | | `shippingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `orderId` | `string \| undefined` | Optional | The order_id is an identifier for the order associated with this transaction, if any.
**Constraints**: *Maximum Length*: `192` | +| `orderId` | `string \| null \| undefined` | Optional | The order_id is an identifier for the order associated with this transaction, if any.
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) @@ -40,7 +40,7 @@ the transaction. "transaction_id": "transaction_id0", "created_at": "created_at0", "note": "note8", - "type": "OTHER" + "type": "THIRD_PARTY_CARD" }, { "id": "id3", @@ -48,7 +48,7 @@ the transaction. "transaction_id": "transaction_id1", "created_at": "created_at1", "note": "note9", - "type": "CARD" + "type": "SQUARE_GIFT_CARD" }, { "id": "id4", @@ -56,7 +56,7 @@ the transaction. "transaction_id": "transaction_id2", "created_at": "created_at2", "note": "note0", - "type": "CASH" + "type": "NO_SALE" } ], "refunds": [ diff --git a/doc/models/update-booking-custom-attribute-definition-request.md b/doc/models/update-booking-custom-attribute-definition-request.md index cbf989b0..4039e99f 100644 --- a/doc/models/update-booking-custom-attribute-definition-request.md +++ b/doc/models/update-booking-custom-attribute-definition-request.md @@ -12,7 +12,7 @@ Represents an [UpdateBookingCustomAttributeDefinition](../../doc/api/booking-cus | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttributeDefinition` | [`CustomAttributeDefinition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-booking-request.md b/doc/models/update-booking-request.md index 251d9e89..f5eacbcd 100644 --- a/doc/models/update-booking-request.md +++ b/doc/models/update-booking-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `idempotencyKey` | `string \| undefined` | Optional | A unique key to make this request an idempotent operation.
**Constraints**: *Maximum Length*: `255` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique key to make this request an idempotent operation.
**Constraints**: *Maximum Length*: `255` | | `booking` | [`Booking`](../../doc/models/booking.md) | Required | Represents a booking as a time-bound service contract for a seller's staff member to provide a specified service
at a given location to a requesting customer in one or more appointment segments. | ## Example (as JSON) diff --git a/doc/models/update-customer-custom-attribute-definition-request.md b/doc/models/update-customer-custom-attribute-definition-request.md index d8cf447b..f7410a87 100644 --- a/doc/models/update-customer-custom-attribute-definition-request.md +++ b/doc/models/update-customer-custom-attribute-definition-request.md @@ -12,7 +12,7 @@ Represents an [UpdateCustomerCustomAttributeDefinition](../../doc/api/customer-c | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttributeDefinition` | [`CustomAttributeDefinition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-customer-request.md b/doc/models/update-customer-request.md index 7edba6b8..1019f731 100644 --- a/doc/models/update-customer-request.md +++ b/doc/models/update-customer-request.md @@ -12,16 +12,16 @@ Defines the body parameters that can be included in a request to the | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `givenName` | `string \| undefined` | Optional | The given name (that is, the first name) associated with the customer profile.

The maximum length for this value is 300 characters. | -| `familyName` | `string \| undefined` | Optional | The family name (that is, the last name) associated with the customer profile.

The maximum length for this value is 300 characters. | -| `companyName` | `string \| undefined` | Optional | A business name associated with the customer profile.

The maximum length for this value is 500 characters. | -| `nickname` | `string \| undefined` | Optional | A nickname for the customer profile.

The maximum length for this value is 100 characters. | -| `emailAddress` | `string \| undefined` | Optional | The email address associated with the customer profile.

The maximum length for this value is 254 characters. | +| `givenName` | `string \| null \| undefined` | Optional | The given name (that is, the first name) associated with the customer profile.

The maximum length for this value is 300 characters. | +| `familyName` | `string \| null \| undefined` | Optional | The family name (that is, the last name) associated with the customer profile.

The maximum length for this value is 300 characters. | +| `companyName` | `string \| null \| undefined` | Optional | A business name associated with the customer profile.

The maximum length for this value is 500 characters. | +| `nickname` | `string \| null \| undefined` | Optional | A nickname for the customer profile.

The maximum length for this value is 100 characters. | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address associated with the customer profile.

The maximum length for this value is 254 characters. | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `phoneNumber` | `string \| undefined` | Optional | The phone number associated with the customer profile. The phone number must be valid and can contain
9–16 digits, with an optional `+` prefix and country code. For more information, see
[Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). | -| `referenceId` | `string \| undefined` | Optional | An optional second ID used to associate the customer profile with an
entity in another system.

The maximum length for this value is 100 characters. | -| `note` | `string \| undefined` | Optional | A custom note associated with the customer profile. | -| `birthday` | `string \| undefined` | Optional | The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,
specify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`
format, where `YYYY` is the specified birth year or `0000` if a birth year is not specified. | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number associated with the customer profile. The phone number must be valid and can contain
9–16 digits, with an optional `+` prefix and country code. For more information, see
[Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number). | +| `referenceId` | `string \| null \| undefined` | Optional | An optional second ID used to associate the customer profile with an
entity in another system.

The maximum length for this value is 100 characters. | +| `note` | `string \| null \| undefined` | Optional | A custom note associated with the customer profile. | +| `birthday` | `string \| null \| undefined` | Optional | The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,
specify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`
format, where `YYYY` is the specified birth year or `0000` if a birth year is not specified. | | `version` | `bigint \| undefined` | Optional | The current version of the customer profile.

As a best practice, you should include this field to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Update a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#update-a-customer-profile). | | `taxIds` | [`CustomerTaxIds \| undefined`](../../doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a [customer profile](../../doc/models/customer.md). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.
For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). | diff --git a/doc/models/update-invoice-request.md b/doc/models/update-invoice-request.md index 75f858e7..bf6691ce 100644 --- a/doc/models/update-invoice-request.md +++ b/doc/models/update-invoice-request.md @@ -12,8 +12,8 @@ Describes a `UpdateInvoice` request. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | Stores information about an invoice. You use the Invoices API to create and manage
invoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview). | -| `idempotencyKey` | `string \| undefined` | Optional | A unique string that identifies the `UpdateInvoice` request. If you do not
provide `idempotency_key` (or provide an empty string as the value), the endpoint
treats each request as independent.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `128` | -| `fieldsToClear` | `string[] \| undefined` | Optional | The list of fields to clear.
For examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique string that identifies the `UpdateInvoice` request. If you do not
provide `idempotency_key` (or provide an empty string as the value), the endpoint
treats each request as independent.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `128` | +| `fieldsToClear` | `string[] \| null \| undefined` | Optional | The list of fields to clear.
For examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). | ## Example (as JSON) diff --git a/doc/models/update-item-modifier-lists-request.md b/doc/models/update-item-modifier-lists-request.md index 097efa54..8686442d 100644 --- a/doc/models/update-item-modifier-lists-request.md +++ b/doc/models/update-item-modifier-lists-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `itemIds` | `string[]` | Required | The IDs of the catalog items associated with the CatalogModifierList objects being updated. | -| `modifierListsToEnable` | `string[] \| undefined` | Optional | The IDs of the CatalogModifierList objects to enable for the CatalogItem.
At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified. | -| `modifierListsToDisable` | `string[] \| undefined` | Optional | The IDs of the CatalogModifierList objects to disable for the CatalogItem.
At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified. | +| `modifierListsToEnable` | `string[] \| null \| undefined` | Optional | The IDs of the CatalogModifierList objects to enable for the CatalogItem.
At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified. | +| `modifierListsToDisable` | `string[] \| null \| undefined` | Optional | The IDs of the CatalogModifierList objects to disable for the CatalogItem.
At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified. | ## Example (as JSON) diff --git a/doc/models/update-item-modifier-lists-response.md b/doc/models/update-item-modifier-lists-response.md index 52d45a49..7fa1c6a5 100644 --- a/doc/models/update-item-modifier-lists-response.md +++ b/doc/models/update-item-modifier-lists-response.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | -| `updatedAt` | `string \| undefined` | Optional | The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. | +| `updatedAt` | `string \| undefined` | Optional | The database [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. | ## Example (as JSON) diff --git a/doc/models/update-item-taxes-request.md b/doc/models/update-item-taxes-request.md index 7eb1fd76..e9b23900 100644 --- a/doc/models/update-item-taxes-request.md +++ b/doc/models/update-item-taxes-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `itemIds` | `string[]` | Required | IDs for the CatalogItems associated with the CatalogTax objects being updated.
No more than 1,000 IDs may be provided. | -| `taxesToEnable` | `string[] \| undefined` | Optional | IDs of the CatalogTax objects to enable.
At least one of `taxes_to_enable` or `taxes_to_disable` must be specified. | -| `taxesToDisable` | `string[] \| undefined` | Optional | IDs of the CatalogTax objects to disable.
At least one of `taxes_to_enable` or `taxes_to_disable` must be specified. | +| `taxesToEnable` | `string[] \| null \| undefined` | Optional | IDs of the CatalogTax objects to enable.
At least one of `taxes_to_enable` or `taxes_to_disable` must be specified. | +| `taxesToDisable` | `string[] \| null \| undefined` | Optional | IDs of the CatalogTax objects to disable.
At least one of `taxes_to_enable` or `taxes_to_disable` must be specified. | ## Example (as JSON) diff --git a/doc/models/update-location-custom-attribute-definition-request.md b/doc/models/update-location-custom-attribute-definition-request.md index e4433a3f..707cfc96 100644 --- a/doc/models/update-location-custom-attribute-definition-request.md +++ b/doc/models/update-location-custom-attribute-definition-request.md @@ -12,7 +12,7 @@ Represents an [UpdateLocationCustomAttributeDefinition](../../doc/api/location-c | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttributeDefinition` | [`CustomAttributeDefinition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-merchant-custom-attribute-definition-request.md b/doc/models/update-merchant-custom-attribute-definition-request.md index 3571b498..629fade5 100644 --- a/doc/models/update-merchant-custom-attribute-definition-request.md +++ b/doc/models/update-merchant-custom-attribute-definition-request.md @@ -12,7 +12,7 @@ Represents an [UpdateMerchantCustomAttributeDefinition](../../doc/api/merchant-c | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttributeDefinition` | [`CustomAttributeDefinition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-order-custom-attribute-definition-request.md b/doc/models/update-order-custom-attribute-definition-request.md index 0e9e1f56..ff6366e6 100644 --- a/doc/models/update-order-custom-attribute-definition-request.md +++ b/doc/models/update-order-custom-attribute-definition-request.md @@ -12,7 +12,7 @@ Represents an update request for an order custom attribute definition. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttributeDefinition` | [`CustomAttributeDefinition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-order-request.md b/doc/models/update-order-request.md index 7ecc3f21..28e09654 100644 --- a/doc/models/update-order-request.md +++ b/doc/models/update-order-request.md @@ -13,8 +13,8 @@ Defines the fields that are included in requests to the | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`Order \| undefined`](../../doc/models/order.md) | Optional | Contains all information related to a single order to process with Square,
including line items that specify the products to purchase. `Order` objects also
include information about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated
itemization data. | -| `fieldsToClear` | `string[] \| undefined` | Optional | The [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete)
fields to clear. For example, `line_items[uid].note`.
For more information, see [Deleting fields](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#deleting-fields). | -| `idempotencyKey` | `string \| undefined` | Optional | A value you specify that uniquely identifies this update request.

If you are unsure whether a particular update was applied to an order successfully,
you can reattempt it with the same idempotency key without
worrying about creating duplicate updates to the order.
The latest order version is returned.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `192` | +| `fieldsToClear` | `string[] \| null \| undefined` | Optional | The [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete)
fields to clear. For example, `line_items[uid].note`.
For more information, see [Deleting fields](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#deleting-fields). | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A value you specify that uniquely identifies this update request.

If you are unsure whether a particular update was applied to an order successfully,
you can reattempt it with the same idempotency key without
worrying about creating duplicate updates to the order.
The latest order version is returned.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `192` | ## Example (as JSON) diff --git a/doc/models/update-payment-request.md b/doc/models/update-payment-request.md index 8cb09307..7488f442 100644 --- a/doc/models/update-payment-request.md +++ b/doc/models/update-payment-request.md @@ -13,7 +13,7 @@ Describes a request to update a payment using | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment` | [`Payment \| undefined`](../../doc/models/payment.md) | Optional | Represents a payment processed by the Square API. | -| `idempotencyKey` | `string` | Required | A unique string that identifies this `UpdatePayment` request. Keys can be any valid string
but must be unique for every `UpdatePayment` request.

For more information, see [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | +| `idempotencyKey` | `string` | Required | A unique string that identifies this `UpdatePayment` request. Keys can be any valid string
but must be unique for every `UpdatePayment` request.

For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/update-vendor-request.md b/doc/models/update-vendor-request.md index 17a3f5ce..86aa922b 100644 --- a/doc/models/update-vendor-request.md +++ b/doc/models/update-vendor-request.md @@ -11,7 +11,7 @@ Represents an input to a call to [UpdateVendor](../../doc/api/vendors.md#update- | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `idempotencyKey` | `string \| undefined` | Optional | A client-supplied, universally unique identifier (UUID) for the
request.

See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
information.
**Constraints**: *Maximum Length*: `128` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A client-supplied, universally unique identifier (UUID) for the
request.

See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
information.
**Constraints**: *Maximum Length*: `128` | | `vendor` | [`Vendor`](../../doc/models/vendor.md) | Required | Represents a supplier to a seller. | ## Example (as JSON) diff --git a/doc/models/update-webhook-subscription-signature-key-request.md b/doc/models/update-webhook-subscription-signature-key-request.md index 6793e743..99e1fc85 100644 --- a/doc/models/update-webhook-subscription-signature-key-request.md +++ b/doc/models/update-webhook-subscription-signature-key-request.md @@ -11,7 +11,7 @@ Updates a [Subscription](../../doc/models/webhook-subscription.md) by replacing | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `idempotencyKey` | `string \| undefined` | Optional | A unique string that identifies the [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) request.
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique string that identifies the [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) request.
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/upsert-booking-custom-attribute-request.md b/doc/models/upsert-booking-custom-attribute-request.md index f4a5f4e9..93681d64 100644 --- a/doc/models/upsert-booking-custom-attribute-request.md +++ b/doc/models/upsert-booking-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents an [UpsertBookingCustomAttribute](../../doc/api/booking-custom-attrib | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/upsert-customer-custom-attribute-request.md b/doc/models/upsert-customer-custom-attribute-request.md index 9055bf85..10682726 100644 --- a/doc/models/upsert-customer-custom-attribute-request.md +++ b/doc/models/upsert-customer-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents an [UpsertCustomerCustomAttribute](../../doc/api/customer-custom-attr | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/upsert-location-custom-attribute-request.md b/doc/models/upsert-location-custom-attribute-request.md index 07938062..423ab54d 100644 --- a/doc/models/upsert-location-custom-attribute-request.md +++ b/doc/models/upsert-location-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents an [UpsertLocationCustomAttribute](../../doc/api/location-custom-attr | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/upsert-merchant-custom-attribute-request.md b/doc/models/upsert-merchant-custom-attribute-request.md index 6ef98b29..eb3877d8 100644 --- a/doc/models/upsert-merchant-custom-attribute-request.md +++ b/doc/models/upsert-merchant-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents an [UpsertMerchantCustomAttribute](../../doc/api/merchant-custom-attr | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/upsert-order-custom-attribute-request.md b/doc/models/upsert-order-custom-attribute-request.md index 70a8d560..86cf566a 100644 --- a/doc/models/upsert-order-custom-attribute-request.md +++ b/doc/models/upsert-order-custom-attribute-request.md @@ -12,7 +12,7 @@ Represents an upsert request for an order custom attribute. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding
`CustomAttributeDefinition` object. | -| `idempotencyKey` | `string \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | +| `idempotencyKey` | `string \| null \| undefined` | Optional | A unique identifier for this request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | ## Example (as JSON) diff --git a/doc/models/v1-create-refund-request.md b/doc/models/v1-create-refund-request.md index 77aeca04..8f4a7b6c 100644 --- a/doc/models/v1-create-refund-request.md +++ b/doc/models/v1-create-refund-request.md @@ -15,7 +15,7 @@ V1CreateRefundRequest | `type` | [`string`](../../doc/models/v1-create-refund-request-type.md) | Required | - | | `reason` | `string` | Required | The reason for the refund. | | `refundedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `requestIdempotenceKey` | `string \| undefined` | Optional | An optional key to ensure idempotence if you issue the same PARTIAL refund request more than once. | +| `requestIdempotenceKey` | `string \| null \| undefined` | Optional | An optional key to ensure idempotence if you issue the same PARTIAL refund request more than once. | ## Example (as JSON) diff --git a/doc/models/v1-list-orders-request.md b/doc/models/v1-list-orders-request.md index b2db3d32..3939a103 100644 --- a/doc/models/v1-list-orders-request.md +++ b/doc/models/v1-list-orders-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `limit` | `number \| undefined` | Optional | The maximum number of payments to return in a single response. This value cannot exceed 200. | -| `batchToken` | `string \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of payments to return in a single response. This value cannot exceed 200. | +| `batchToken` | `string \| null \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | ## Example (as JSON) diff --git a/doc/models/v1-list-payments-request.md b/doc/models/v1-list-payments-request.md index 9552a9a2..f4d477b5 100644 --- a/doc/models/v1-list-payments-request.md +++ b/doc/models/v1-list-payments-request.md @@ -10,11 +10,11 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `beginTime` | `string \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | -| `endTime` | `string \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | -| `limit` | `number \| undefined` | Optional | The maximum number of payments to return in a single response. This value cannot exceed 200. | -| `batchToken` | `string \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | -| `includePartial` | `boolean \| undefined` | Optional | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. | +| `beginTime` | `string \| null \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | +| `endTime` | `string \| null \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of payments to return in a single response. This value cannot exceed 200. | +| `batchToken` | `string \| null \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | +| `includePartial` | `boolean \| null \| undefined` | Optional | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. | ## Example (as JSON) diff --git a/doc/models/v1-list-refunds-request.md b/doc/models/v1-list-refunds-request.md index 9436ed7c..c8d21399 100644 --- a/doc/models/v1-list-refunds-request.md +++ b/doc/models/v1-list-refunds-request.md @@ -10,10 +10,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `beginTime` | `string \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | -| `endTime` | `string \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | -| `limit` | `number \| undefined` | Optional | The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. | -| `batchToken` | `string \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | +| `beginTime` | `string \| null \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | +| `endTime` | `string \| null \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | +| `limit` | `number \| null \| undefined` | Optional | The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. | +| `batchToken` | `string \| null \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | ## Example (as JSON) diff --git a/doc/models/v1-list-settlements-request.md b/doc/models/v1-list-settlements-request.md index d1abae08..c4bf0bbb 100644 --- a/doc/models/v1-list-settlements-request.md +++ b/doc/models/v1-list-settlements-request.md @@ -10,11 +10,11 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `order` | [`string \| undefined`](../../doc/models/sort-order.md) | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. | -| `beginTime` | `string \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | -| `endTime` | `string \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | -| `limit` | `number \| undefined` | Optional | The maximum number of settlements to return in a single response. This value cannot exceed 200. | +| `beginTime` | `string \| null \| undefined` | Optional | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | +| `endTime` | `string \| null \| undefined` | Optional | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | +| `limit` | `number \| null \| undefined` | Optional | The maximum number of settlements to return in a single response. This value cannot exceed 200. | | `status` | [`string \| undefined`](../../doc/models/v1-list-settlements-request-status.md) | Optional | - | -| `batchToken` | `string \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | +| `batchToken` | `string \| null \| undefined` | Optional | A pagination cursor to retrieve the next set of results for your
original query to the endpoint. | ## Example (as JSON) diff --git a/doc/models/v1-money.md b/doc/models/v1-money.md index 862382e8..dfd7d115 100644 --- a/doc/models/v1-money.md +++ b/doc/models/v1-money.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `amount` | `number \| undefined` | Optional | Amount in the lowest denominated value of this Currency. E.g. in USD
these are cents, in JPY they are Yen (which do not have a 'cent' concept). | +| `amount` | `number \| null \| undefined` | Optional | Amount in the lowest denominated value of this Currency. E.g. in USD
these are cents, in JPY they are Yen (which do not have a 'cent' concept). | | `currencyCode` | [`string \| undefined`](../../doc/models/currency.md) | Optional | Indicates the associated currency for an amount of money. Values correspond
to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). | ## Example (as JSON) diff --git a/doc/models/v1-order.md b/doc/models/v1-order.md index 24f2689d..cd9b451a 100644 --- a/doc/models/v1-order.md +++ b/doc/models/v1-order.md @@ -11,11 +11,11 @@ V1Order | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | +| `errors` | [`Error[] \| null \| undefined`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | | `id` | `string \| undefined` | Optional | The order's unique identifier. | -| `buyerEmail` | `string \| undefined` | Optional | The email address of the order's buyer. | -| `recipientName` | `string \| undefined` | Optional | The name of the order's buyer. | -| `recipientPhoneNumber` | `string \| undefined` | Optional | The phone number to use for the order's delivery. | +| `buyerEmail` | `string \| null \| undefined` | Optional | The email address of the order's buyer. | +| `recipientName` | `string \| null \| undefined` | Optional | The name of the order's buyer. | +| `recipientPhoneNumber` | `string \| null \| undefined` | Optional | The phone number to use for the order's delivery. | | `state` | [`string \| undefined`](../../doc/models/v1-order-state.md) | Optional | - | | `shippingAddress` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | | `subtotalMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | @@ -25,17 +25,17 @@ V1Order | `totalDiscountMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `createdAt` | `string \| undefined` | Optional | The time when the order was created, in ISO 8601 format. | | `updatedAt` | `string \| undefined` | Optional | The time when the order was last modified, in ISO 8601 format. | -| `expiresAt` | `string \| undefined` | Optional | The time when the order expires if no action is taken, in ISO 8601 format. | -| `paymentId` | `string \| undefined` | Optional | The unique identifier of the payment associated with the order. | -| `buyerNote` | `string \| undefined` | Optional | A note provided by the buyer when the order was created, if any. | -| `completedNote` | `string \| undefined` | Optional | A note provided by the merchant when the order's state was set to COMPLETED, if any | -| `refundedNote` | `string \| undefined` | Optional | A note provided by the merchant when the order's state was set to REFUNDED, if any. | -| `canceledNote` | `string \| undefined` | Optional | A note provided by the merchant when the order's state was set to CANCELED, if any. | +| `expiresAt` | `string \| null \| undefined` | Optional | The time when the order expires if no action is taken, in ISO 8601 format. | +| `paymentId` | `string \| null \| undefined` | Optional | The unique identifier of the payment associated with the order. | +| `buyerNote` | `string \| null \| undefined` | Optional | A note provided by the buyer when the order was created, if any. | +| `completedNote` | `string \| null \| undefined` | Optional | A note provided by the merchant when the order's state was set to COMPLETED, if any | +| `refundedNote` | `string \| null \| undefined` | Optional | A note provided by the merchant when the order's state was set to REFUNDED, if any. | +| `canceledNote` | `string \| null \| undefined` | Optional | A note provided by the merchant when the order's state was set to CANCELED, if any. | | `tender` | [`V1Tender \| undefined`](../../doc/models/v1-tender.md) | Optional | A tender represents a discrete monetary exchange. Square represents this
exchange as a money object with a specific currency and amount, where the
amount is given in the smallest denomination of the given currency.

Square POS can accept more than one form of tender for a single payment (such
as by splitting a bill between a credit card and a gift card). The `tender`
field of the Payment object lists all forms of tender used for the payment.

Split tender payments behave slightly differently from single tender payments:

The receipt_url for a split tender corresponds only to the first tender listed
in the tender field. To get the receipt URLs for the remaining tenders, use
the receipt_url fields of the corresponding Tender objects.

*A note on gift cards**: when a customer purchases a Square gift card from a
merchant, the merchant receives the full amount of the gift card in the
associated payment.

When that gift card is used as a tender, the balance of the gift card is
reduced and the merchant receives no funds. A `Tender` object with a type of
`SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the
associated payment. | -| `orderHistory` | [`V1OrderHistoryEntry[] \| undefined`](../../doc/models/v1-order-history-entry.md) | Optional | The history of actions associated with the order. | -| `promoCode` | `string \| undefined` | Optional | The promo code provided by the buyer, if any. | -| `btcReceiveAddress` | `string \| undefined` | Optional | For Bitcoin transactions, the address that the buyer sent Bitcoin to. | -| `btcPriceSatoshi` | `number \| undefined` | Optional | For Bitcoin transactions, the price of the buyer's order in satoshi (100 million satoshi equals 1 BTC). | +| `orderHistory` | [`V1OrderHistoryEntry[] \| null \| undefined`](../../doc/models/v1-order-history-entry.md) | Optional | The history of actions associated with the order. | +| `promoCode` | `string \| null \| undefined` | Optional | The promo code provided by the buyer, if any. | +| `btcReceiveAddress` | `string \| null \| undefined` | Optional | For Bitcoin transactions, the address that the buyer sent Bitcoin to. | +| `btcPriceSatoshi` | `number \| null \| undefined` | Optional | For Bitcoin transactions, the price of the buyer's order in satoshi (100 million satoshi equals 1 BTC). | ## Example (as JSON) diff --git a/doc/models/v1-payment-discount.md b/doc/models/v1-payment-discount.md index 0f575038..3a6eaf1f 100644 --- a/doc/models/v1-payment-discount.md +++ b/doc/models/v1-payment-discount.md @@ -11,9 +11,9 @@ V1PaymentDiscount | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The discount's name. | +| `name` | `string \| null \| undefined` | Optional | The discount's name. | | `appliedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `discountId` | `string \| undefined` | Optional | The ID of the applied discount, if available. Discounts applied in older versions of Square Register might not have an ID. | +| `discountId` | `string \| null \| undefined` | Optional | The ID of the applied discount, if available. Discounts applied in older versions of Square Register might not have an ID. | ## Example (as JSON) diff --git a/doc/models/v1-payment-item-detail.md b/doc/models/v1-payment-item-detail.md index 46c513df..32ca6e74 100644 --- a/doc/models/v1-payment-item-detail.md +++ b/doc/models/v1-payment-item-detail.md @@ -11,10 +11,10 @@ V1PaymentItemDetail | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `categoryName` | `string \| undefined` | Optional | The name of the item's merchant-defined category, if any. | -| `sku` | `string \| undefined` | Optional | The item's merchant-defined SKU, if any. | -| `itemId` | `string \| undefined` | Optional | The unique ID of the item purchased, if any. | -| `itemVariationId` | `string \| undefined` | Optional | The unique ID of the item variation purchased, if any. | +| `categoryName` | `string \| null \| undefined` | Optional | The name of the item's merchant-defined category, if any. | +| `sku` | `string \| null \| undefined` | Optional | The item's merchant-defined SKU, if any. | +| `itemId` | `string \| null \| undefined` | Optional | The unique ID of the item purchased, if any. | +| `itemVariationId` | `string \| null \| undefined` | Optional | The unique ID of the item variation purchased, if any. | ## Example (as JSON) diff --git a/doc/models/v1-payment-itemization.md b/doc/models/v1-payment-itemization.md index b7f8b42e..165ace3c 100644 --- a/doc/models/v1-payment-itemization.md +++ b/doc/models/v1-payment-itemization.md @@ -26,20 +26,20 @@ price of items might have changed since the payment was processed. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The item's name. | -| `quantity` | `number \| undefined` | Optional | The quantity of the item purchased. This can be a decimal value. | +| `name` | `string \| null \| undefined` | Optional | The item's name. | +| `quantity` | `number \| null \| undefined` | Optional | The quantity of the item purchased. This can be a decimal value. | | `itemizationType` | [`string \| undefined`](../../doc/models/v1-payment-itemization-itemization-type.md) | Optional | - | | `itemDetail` | [`V1PaymentItemDetail \| undefined`](../../doc/models/v1-payment-item-detail.md) | Optional | V1PaymentItemDetail | -| `notes` | `string \| undefined` | Optional | Notes entered by the merchant about the item at the time of payment, if any. | -| `itemVariationName` | `string \| undefined` | Optional | The name of the item variation purchased, if any. | +| `notes` | `string \| null \| undefined` | Optional | Notes entered by the merchant about the item at the time of payment, if any. | +| `itemVariationName` | `string \| null \| undefined` | Optional | The name of the item variation purchased, if any. | | `totalMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `singleQuantityMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `grossSalesMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `discountMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `netSalesMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `taxes` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All taxes applied to this itemization. | -| `discounts` | [`V1PaymentDiscount[] \| undefined`](../../doc/models/v1-payment-discount.md) | Optional | All discounts applied to this itemization. | -| `modifiers` | [`V1PaymentModifier[] \| undefined`](../../doc/models/v1-payment-modifier.md) | Optional | All modifier options applied to this itemization. | +| `taxes` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All taxes applied to this itemization. | +| `discounts` | [`V1PaymentDiscount[] \| null \| undefined`](../../doc/models/v1-payment-discount.md) | Optional | All discounts applied to this itemization. | +| `modifiers` | [`V1PaymentModifier[] \| null \| undefined`](../../doc/models/v1-payment-modifier.md) | Optional | All modifier options applied to this itemization. | ## Example (as JSON) diff --git a/doc/models/v1-payment-modifier.md b/doc/models/v1-payment-modifier.md index 251f7493..53260902 100644 --- a/doc/models/v1-payment-modifier.md +++ b/doc/models/v1-payment-modifier.md @@ -11,9 +11,9 @@ V1PaymentModifier | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The modifier option's name. | +| `name` | `string \| null \| undefined` | Optional | The modifier option's name. | | `appliedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `modifierOptionId` | `string \| undefined` | Optional | The ID of the applied modifier option, if available. Modifier options applied in older versions of Square Register might not have an ID. | +| `modifierOptionId` | `string \| null \| undefined` | Optional | The ID of the applied modifier option, if available. Modifier options applied in older versions of Square Register might not have an ID. | ## Example (as JSON) diff --git a/doc/models/v1-payment-surcharge.md b/doc/models/v1-payment-surcharge.md index 74b7521c..63a5d39a 100644 --- a/doc/models/v1-payment-surcharge.md +++ b/doc/models/v1-payment-surcharge.md @@ -11,14 +11,14 @@ V1PaymentSurcharge | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name of the surcharge. | +| `name` | `string \| null \| undefined` | Optional | The name of the surcharge. | | `appliedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `rate` | `string \| undefined` | Optional | The amount of the surcharge as a percentage. The percentage is provided as a string representing the decimal equivalent of the percentage. For example, "0.7" corresponds to a 7% surcharge. Exactly one of rate or amount_money should be set. | +| `rate` | `string \| null \| undefined` | Optional | The amount of the surcharge as a percentage. The percentage is provided as a string representing the decimal equivalent of the percentage. For example, "0.7" corresponds to a 7% surcharge. Exactly one of rate or amount_money should be set. | | `amountMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `type` | [`string \| undefined`](../../doc/models/v1-payment-surcharge-type.md) | Optional | - | -| `taxable` | `boolean \| undefined` | Optional | Indicates whether the surcharge is taxable. | -| `taxes` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | The list of taxes that should be applied to the surcharge. | -| `surchargeId` | `string \| undefined` | Optional | A Square-issued unique identifier associated with the surcharge. | +| `taxable` | `boolean \| null \| undefined` | Optional | Indicates whether the surcharge is taxable. | +| `taxes` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | The list of taxes that should be applied to the surcharge. | +| `surchargeId` | `string \| null \| undefined` | Optional | A Square-issued unique identifier associated with the surcharge. | ## Example (as JSON) diff --git a/doc/models/v1-payment-tax.md b/doc/models/v1-payment-tax.md index 80bf4eea..104729ed 100644 --- a/doc/models/v1-payment-tax.md +++ b/doc/models/v1-payment-tax.md @@ -11,12 +11,12 @@ V1PaymentTax | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `errors` | [`Error[] \| undefined`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | -| `name` | `string \| undefined` | Optional | The merchant-defined name of the tax. | +| `errors` | [`Error[] \| null \| undefined`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | +| `name` | `string \| null \| undefined` | Optional | The merchant-defined name of the tax. | | `appliedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `rate` | `string \| undefined` | Optional | The rate of the tax, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. | +| `rate` | `string \| null \| undefined` | Optional | The rate of the tax, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. | | `inclusionType` | [`string \| undefined`](../../doc/models/v1-payment-tax-inclusion-type.md) | Optional | - | -| `feeId` | `string \| undefined` | Optional | The ID of the tax, if available. Taxes applied in older versions of Square Register might not have an ID. | +| `feeId` | `string \| null \| undefined` | Optional | The ID of the tax, if available. Taxes applied in older versions of Square Register might not have an ID. | ## Example (as JSON) diff --git a/doc/models/v1-payment.md b/doc/models/v1-payment.md index e4221402..41116a48 100644 --- a/doc/models/v1-payment.md +++ b/doc/models/v1-payment.md @@ -31,12 +31,12 @@ Monetary values are negative if they represent an | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The payment's unique identifier. | -| `merchantId` | `string \| undefined` | Optional | The unique identifier of the merchant that took the payment. | +| `merchantId` | `string \| null \| undefined` | Optional | The unique identifier of the merchant that took the payment. | | `createdAt` | `string \| undefined` | Optional | The time when the payment was created, in ISO 8601 format. Reflects the time of the first payment if the object represents an incomplete partial payment, and the time of the last or complete payment otherwise. | -| `creatorId` | `string \| undefined` | Optional | The unique identifier of the Square account that took the payment. | +| `creatorId` | `string \| null \| undefined` | Optional | The unique identifier of the Square account that took the payment. | | `device` | [`Device \| undefined`](../../doc/models/device.md) | Optional | - | -| `paymentUrl` | `string \| undefined` | Optional | The URL of the payment's detail page in the merchant dashboard. The merchant must be signed in to the merchant dashboard to view this page. | -| `receiptUrl` | `string \| undefined` | Optional | The URL of the receipt for the payment. Note that for split tender
payments, this URL corresponds to the receipt for the first tender
listed in the payment's tender field. Each Tender object has its own
receipt_url field you can use to get the other receipts associated with
a split tender payment. | +| `paymentUrl` | `string \| null \| undefined` | Optional | The URL of the payment's detail page in the merchant dashboard. The merchant must be signed in to the merchant dashboard to view this page. | +| `receiptUrl` | `string \| null \| undefined` | Optional | The URL of the receipt for the payment. Note that for split tender
payments, this URL corresponds to the receipt for the first tender
listed in the payment's tender field. Each Tender object has its own
receipt_url field you can use to get the other receipts associated with
a split tender payment. | | `inclusiveTaxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `additiveTaxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `taxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | @@ -49,14 +49,14 @@ Monetary values are negative if they represent an | `swedishRoundingMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `grossSalesMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `netSalesMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `inclusiveTax` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the inclusive taxes associated with the payment. | -| `additiveTax` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the additive taxes associated with the payment. | -| `tender` | [`V1Tender[] \| undefined`](../../doc/models/v1-tender.md) | Optional | All of the tenders associated with the payment. | -| `refunds` | [`V1Refund[] \| undefined`](../../doc/models/v1-refund.md) | Optional | All of the refunds applied to the payment. Note that the value of all refunds on a payment can exceed the value of all tenders if a merchant chooses to refund money to a tender after previously accepting returned goods as part of an exchange. | -| `itemizations` | [`V1PaymentItemization[] \| undefined`](../../doc/models/v1-payment-itemization.md) | Optional | The items purchased in the payment. | +| `inclusiveTax` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the inclusive taxes associated with the payment. | +| `additiveTax` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the additive taxes associated with the payment. | +| `tender` | [`V1Tender[] \| null \| undefined`](../../doc/models/v1-tender.md) | Optional | All of the tenders associated with the payment. | +| `refunds` | [`V1Refund[] \| null \| undefined`](../../doc/models/v1-refund.md) | Optional | All of the refunds applied to the payment. Note that the value of all refunds on a payment can exceed the value of all tenders if a merchant chooses to refund money to a tender after previously accepting returned goods as part of an exchange. | +| `itemizations` | [`V1PaymentItemization[] \| null \| undefined`](../../doc/models/v1-payment-itemization.md) | Optional | The items purchased in the payment. | | `surchargeMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `surcharges` | [`V1PaymentSurcharge[] \| undefined`](../../doc/models/v1-payment-surcharge.md) | Optional | A list of all surcharges associated with the payment. | -| `isPartial` | `boolean \| undefined` | Optional | Indicates whether or not the payment is only partially paid for.
If true, this payment will have the tenders collected so far, but the
itemizations will be empty until the payment is completed. | +| `surcharges` | [`V1PaymentSurcharge[] \| null \| undefined`](../../doc/models/v1-payment-surcharge.md) | Optional | A list of all surcharges associated with the payment. | +| `isPartial` | `boolean \| null \| undefined` | Optional | Indicates whether or not the payment is only partially paid for.
If true, this payment will have the tenders collected so far, but the
itemizations will be empty until the payment is completed. | ## Example (as JSON) diff --git a/doc/models/v1-refund.md b/doc/models/v1-refund.md index cccf7b86..f1c84d9c 100644 --- a/doc/models/v1-refund.md +++ b/doc/models/v1-refund.md @@ -12,23 +12,23 @@ V1Refund | Name | Type | Tags | Description | | --- | --- | --- | --- | | `type` | [`string \| undefined`](../../doc/models/v1-refund-type.md) | Optional | - | -| `reason` | `string \| undefined` | Optional | The merchant-specified reason for the refund. | +| `reason` | `string \| null \| undefined` | Optional | The merchant-specified reason for the refund. | | `refundedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedProcessingFeeMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedTaxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedAdditiveTaxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `refundedAdditiveTax` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the additive taxes associated with the refund. | +| `refundedAdditiveTax` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the additive taxes associated with the refund. | | `refundedInclusiveTaxMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `refundedInclusiveTax` | [`V1PaymentTax[] \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the inclusive taxes associated with the refund. | +| `refundedInclusiveTax` | [`V1PaymentTax[] \| null \| undefined`](../../doc/models/v1-payment-tax.md) | Optional | All of the inclusive taxes associated with the refund. | | `refundedTipMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedDiscountMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedSurchargeMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `refundedSurcharges` | [`V1PaymentSurcharge[] \| undefined`](../../doc/models/v1-payment-surcharge.md) | Optional | A list of all surcharges associated with the refund. | +| `refundedSurcharges` | [`V1PaymentSurcharge[] \| null \| undefined`](../../doc/models/v1-payment-surcharge.md) | Optional | A list of all surcharges associated with the refund. | | `createdAt` | `string \| undefined` | Optional | The time when the merchant initiated the refund for Square to process, in ISO 8601 format. | -| `processedAt` | `string \| undefined` | Optional | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | -| `paymentId` | `string \| undefined` | Optional | A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders. | -| `merchantId` | `string \| undefined` | Optional | - | -| `isExchange` | `boolean \| undefined` | Optional | Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded. | +| `processedAt` | `string \| null \| undefined` | Optional | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | +| `paymentId` | `string \| null \| undefined` | Optional | A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders. | +| `merchantId` | `string \| null \| undefined` | Optional | - | +| `isExchange` | `boolean \| null \| undefined` | Optional | Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded. | ## Example (as JSON) diff --git a/doc/models/v1-settlement-entry.md b/doc/models/v1-settlement-entry.md index 7a9eff4b..4a690fc5 100644 --- a/doc/models/v1-settlement-entry.md +++ b/doc/models/v1-settlement-entry.md @@ -11,7 +11,7 @@ V1SettlementEntry | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `paymentId` | `string \| undefined` | Optional | The settlement's unique identifier. | +| `paymentId` | `string \| null \| undefined` | Optional | The settlement's unique identifier. | | `type` | [`string \| undefined`](../../doc/models/v1-settlement-entry-type.md) | Optional | - | | `amountMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `feeMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | diff --git a/doc/models/v1-settlement.md b/doc/models/v1-settlement.md index 29f44e7b..c1a6e8a5 100644 --- a/doc/models/v1-settlement.md +++ b/doc/models/v1-settlement.md @@ -14,9 +14,9 @@ V1Settlement | `id` | `string \| undefined` | Optional | The settlement's unique identifier. | | `status` | [`string \| undefined`](../../doc/models/v1-settlement-status.md) | Optional | - | | `totalMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `initiatedAt` | `string \| undefined` | Optional | The time when the settlement was submitted for deposit or withdrawal, in ISO 8601 format. | -| `bankAccountId` | `string \| undefined` | Optional | The Square-issued unique identifier for the bank account associated with the settlement. | -| `entries` | [`V1SettlementEntry[] \| undefined`](../../doc/models/v1-settlement-entry.md) | Optional | The entries included in this settlement. | +| `initiatedAt` | `string \| null \| undefined` | Optional | The time when the settlement was submitted for deposit or withdrawal, in ISO 8601 format. | +| `bankAccountId` | `string \| null \| undefined` | Optional | The Square-issued unique identifier for the bank account associated with the settlement. | +| `entries` | [`V1SettlementEntry[] \| null \| undefined`](../../doc/models/v1-settlement-entry.md) | Optional | The entries included in this settlement. | ## Example (as JSON) diff --git a/doc/models/v1-tender.md b/doc/models/v1-tender.md index 466da7b3..3280dac6 100644 --- a/doc/models/v1-tender.md +++ b/doc/models/v1-tender.md @@ -34,20 +34,20 @@ associated payment. | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | The tender's unique ID. | | `type` | [`string \| undefined`](../../doc/models/v1-tender-type.md) | Optional | - | -| `name` | `string \| undefined` | Optional | A human-readable description of the tender. | -| `employeeId` | `string \| undefined` | Optional | The ID of the employee that processed the tender. | -| `receiptUrl` | `string \| undefined` | Optional | The URL of the receipt for the tender. | +| `name` | `string \| null \| undefined` | Optional | A human-readable description of the tender. | +| `employeeId` | `string \| null \| undefined` | Optional | The ID of the employee that processed the tender. | +| `receiptUrl` | `string \| null \| undefined` | Optional | The URL of the receipt for the tender. | | `cardBrand` | [`string \| undefined`](../../doc/models/v1-tender-card-brand.md) | Optional | The brand of a credit card. | -| `panSuffix` | `string \| undefined` | Optional | The last four digits of the provided credit card's account number. | +| `panSuffix` | `string \| null \| undefined` | Optional | The last four digits of the provided credit card's account number. | | `entryMethod` | [`string \| undefined`](../../doc/models/v1-tender-entry-method.md) | Optional | - | -| `paymentNote` | `string \| undefined` | Optional | Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER. | +| `paymentNote` | `string \| null \| undefined` | Optional | Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER. | | `totalMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `tenderedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `tenderedAt` | `string \| undefined` | Optional | The time when the tender was created, in ISO 8601 format. | -| `settledAt` | `string \| undefined` | Optional | The time when the tender was settled, in ISO 8601 format. | +| `tenderedAt` | `string \| null \| undefined` | Optional | The time when the tender was created, in ISO 8601 format. | +| `settledAt` | `string \| null \| undefined` | Optional | The time when the tender was settled, in ISO 8601 format. | | `changeBackMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | | `refundedMoney` | [`V1Money \| undefined`](../../doc/models/v1-money.md) | Optional | - | -| `isExchange` | `boolean \| undefined` | Optional | Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange. | +| `isExchange` | `boolean \| null \| undefined` | Optional | Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange. | ## Example (as JSON) diff --git a/doc/models/v1-update-order-request.md b/doc/models/v1-update-order-request.md index 3edce8a6..94a1fb48 100644 --- a/doc/models/v1-update-order-request.md +++ b/doc/models/v1-update-order-request.md @@ -12,10 +12,10 @@ V1UpdateOrderRequest | Name | Type | Tags | Description | | --- | --- | --- | --- | | `action` | [`string`](../../doc/models/v1-update-order-request-action.md) | Required | - | -| `shippedTrackingNumber` | `string \| undefined` | Optional | The tracking number of the shipment associated with the order. Only valid if action is COMPLETE. | -| `completedNote` | `string \| undefined` | Optional | A merchant-specified note about the completion of the order. Only valid if action is COMPLETE. | -| `refundedNote` | `string \| undefined` | Optional | A merchant-specified note about the refunding of the order. Only valid if action is REFUND. | -| `canceledNote` | `string \| undefined` | Optional | A merchant-specified note about the canceling of the order. Only valid if action is CANCEL. | +| `shippedTrackingNumber` | `string \| null \| undefined` | Optional | The tracking number of the shipment associated with the order. Only valid if action is COMPLETE. | +| `completedNote` | `string \| null \| undefined` | Optional | A merchant-specified note about the completion of the order. Only valid if action is COMPLETE. | +| `refundedNote` | `string \| null \| undefined` | Optional | A merchant-specified note about the refunding of the order. Only valid if action is REFUND. | +| `canceledNote` | `string \| null \| undefined` | Optional | A merchant-specified note about the canceling of the order. Only valid if action is CANCEL. | ## Example (as JSON) diff --git a/doc/models/vendor-contact.md b/doc/models/vendor-contact.md index b96c0bca..d9028eeb 100644 --- a/doc/models/vendor-contact.md +++ b/doc/models/vendor-contact.md @@ -12,10 +12,10 @@ Represents a contact of a [Vendor](../../doc/models/vendor.md). | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A unique Square-generated ID for the [VendorContact](entity:VendorContact).
This field is required when attempting to update a [VendorContact](entity:VendorContact).
**Constraints**: *Maximum Length*: `100` | -| `name` | `string \| undefined` | Optional | The name of the [VendorContact](entity:VendorContact).
This field is required when attempting to create a [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `255` | -| `emailAddress` | `string \| undefined` | Optional | The email address of the [VendorContact](entity:VendorContact).
**Constraints**: *Maximum Length*: `255` | -| `phoneNumber` | `string \| undefined` | Optional | The phone number of the [VendorContact](entity:VendorContact).
**Constraints**: *Maximum Length*: `255` | -| `removed` | `boolean \| undefined` | Optional | The state of the [VendorContact](entity:VendorContact). | +| `name` | `string \| null \| undefined` | Optional | The name of the [VendorContact](entity:VendorContact).
This field is required when attempting to create a [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `255` | +| `emailAddress` | `string \| null \| undefined` | Optional | The email address of the [VendorContact](entity:VendorContact).
**Constraints**: *Maximum Length*: `255` | +| `phoneNumber` | `string \| null \| undefined` | Optional | The phone number of the [VendorContact](entity:VendorContact).
**Constraints**: *Maximum Length*: `255` | +| `removed` | `boolean \| null \| undefined` | Optional | The state of the [VendorContact](entity:VendorContact). | | `ordinal` | `number` | Required | The ordinal of the [VendorContact](entity:VendorContact). | ## Example (as JSON) diff --git a/doc/models/vendor.md b/doc/models/vendor.md index b83f853d..98ad9203 100644 --- a/doc/models/vendor.md +++ b/doc/models/vendor.md @@ -14,11 +14,11 @@ Represents a supplier to a seller. | `id` | `string \| undefined` | Optional | A unique Square-generated ID for the [Vendor](entity:Vendor).
This field is required when attempting to update a [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `100` | | `createdAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when the
[Vendor](entity:Vendor) was created.
**Constraints**: *Maximum Length*: `34` | | `updatedAt` | `string \| undefined` | Optional | An RFC 3339-formatted timestamp that indicates when the
[Vendor](entity:Vendor) was last updated.
**Constraints**: *Maximum Length*: `34` | -| `name` | `string \| undefined` | Optional | The name of the [Vendor](entity:Vendor).
This field is required when attempting to create or update a [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `100` | +| `name` | `string \| null \| undefined` | Optional | The name of the [Vendor](entity:Vendor).
This field is required when attempting to create or update a [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `100` | | `address` | [`Address \| undefined`](../../doc/models/address.md) | Optional | Represents a postal address in a country.
For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). | -| `contacts` | [`VendorContact[] \| undefined`](../../doc/models/vendor-contact.md) | Optional | The contacts of the [Vendor](entity:Vendor). | -| `accountNumber` | `string \| undefined` | Optional | The account number of the [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `100` | -| `note` | `string \| undefined` | Optional | A note detailing information about the [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `4096` | +| `contacts` | [`VendorContact[] \| null \| undefined`](../../doc/models/vendor-contact.md) | Optional | The contacts of the [Vendor](entity:Vendor). | +| `accountNumber` | `string \| null \| undefined` | Optional | The account number of the [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `100` | +| `note` | `string \| null \| undefined` | Optional | A note detailing information about the [Vendor](entity:Vendor).
**Constraints**: *Maximum Length*: `4096` | | `version` | `number \| undefined` | Optional | The version of the [Vendor](entity:Vendor). | | `status` | [`string \| undefined`](../../doc/models/vendor-status.md) | Optional | The status of the [Vendor](../../doc/models/vendor.md),
whether a [Vendor](../../doc/models/vendor.md) is active or inactive. | diff --git a/doc/models/wage-setting.md b/doc/models/wage-setting.md index 1b2df46d..14e9ba0f 100644 --- a/doc/models/wage-setting.md +++ b/doc/models/wage-setting.md @@ -11,9 +11,9 @@ An object representing a team member's wage information. | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `teamMemberId` | `string \| undefined` | Optional | The unique ID of the `TeamMember` whom this wage setting describes. | -| `jobAssignments` | [`JobAssignment[] \| undefined`](../../doc/models/job-assignment.md) | Optional | Required. The ordered list of jobs that the team member is assigned to.
The first job assignment is considered the team member's primary job.

The minimum length is 1 and the maximum length is 12. | -| `isOvertimeExempt` | `boolean \| undefined` | Optional | Whether the team member is exempt from the overtime rules of the seller's country. | +| `teamMemberId` | `string \| null \| undefined` | Optional | The unique ID of the `TeamMember` whom this wage setting describes. | +| `jobAssignments` | [`JobAssignment[] \| null \| undefined`](../../doc/models/job-assignment.md) | Optional | Required. The ordered list of jobs that the team member is assigned to.
The first job assignment is considered the team member's primary job.

The minimum length is 1 and the maximum length is 12. | +| `isOvertimeExempt` | `boolean \| null \| undefined` | Optional | Whether the team member is exempt from the overtime rules of the seller's country. | | `version` | `number \| undefined` | Optional | Used for resolving concurrency issues. The request fails if the version
provided does not match the server version at the time of the request. If not provided,
Square executes a blind write, potentially overwriting data from another write. For more information,
see [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency). | | `createdAt` | `string \| undefined` | Optional | The timestamp, in RFC 3339 format, describing when the wage setting object was created.
For example, "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z". | | `updatedAt` | `string \| undefined` | Optional | The timestamp, in RFC 3339 format, describing when the wage setting object was last updated.
For example, "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z". | diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index 68cda4ee..4f5e6866 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -13,11 +13,11 @@ event types, and signature key. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `string \| undefined` | Optional | A Square-generated unique ID for the subscription.
**Constraints**: *Maximum Length*: `64` | -| `name` | `string \| undefined` | Optional | The name of this subscription.
**Constraints**: *Maximum Length*: `64` | -| `enabled` | `boolean \| undefined` | Optional | Indicates whether the subscription is enabled (`true`) or not (`false`). | -| `eventTypes` | `string[] \| undefined` | Optional | The event types associated with this subscription. | -| `notificationUrl` | `string \| undefined` | Optional | The URL to which webhooks are sent. | -| `apiVersion` | `string \| undefined` | Optional | The API version of the subscription.
This field is optional for `CreateWebhookSubscription`.
The value defaults to the API version used by the application. | +| `name` | `string \| null \| undefined` | Optional | The name of this subscription.
**Constraints**: *Maximum Length*: `64` | +| `enabled` | `boolean \| null \| undefined` | Optional | Indicates whether the subscription is enabled (`true`) or not (`false`). | +| `eventTypes` | `string[] \| null \| undefined` | Optional | The event types associated with this subscription. | +| `notificationUrl` | `string \| null \| undefined` | Optional | The URL to which webhooks are sent. | +| `apiVersion` | `string \| null \| undefined` | Optional | The API version of the subscription.
This field is optional for `CreateWebhookSubscription`.
The value defaults to the API version used by the application. | | `signatureKey` | `string \| undefined` | Optional | The Square-generated signature key used to validate the origin of the webhook event. | | `createdAt` | `string \| undefined` | Optional | The timestamp of when the subscription was created, in RFC 3339 format. For example, "2016-09-04T23:59:33.123Z". | | `updatedAt` | `string \| undefined` | Optional | The timestamp of when the subscription was last updated, in RFC 3339 format.
For example, "2016-09-04T23:59:33.123Z". | diff --git a/package.json b/package.json index 60b9571d..ea4c9c8f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "license": "MIT", "sideEffects": false, "main": "dist/cjs/index.js", diff --git a/src/api/bookingsApi.ts b/src/api/bookingsApi.ts index 9946074a..e296f1e8 100644 --- a/src/api/bookingsApi.ts +++ b/src/api/bookingsApi.ts @@ -1,4 +1,12 @@ import { ApiResponse, RequestOptions } from '../core'; +import { + BulkRetrieveBookingsRequest, + bulkRetrieveBookingsRequestSchema, +} from '../models/bulkRetrieveBookingsRequest'; +import { + BulkRetrieveBookingsResponse, + bulkRetrieveBookingsResponseSchema, +} from '../models/bulkRetrieveBookingsResponse'; import { CancelBookingRequest, cancelBookingRequestSchema, @@ -65,6 +73,8 @@ export class BookingsApi extends BaseApi { * @param limit The maximum number of results per page to return in a paged response. * @param cursor 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. + * @param customerId The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, + * bookings for all customers are retrieved. * @param teamMemberId The team member for whom to retrieve bookings. If this is not set, bookings of * all members are retrieved. * @param locationId The location for which to retrieve bookings. If this is not set, all locations' @@ -78,6 +88,7 @@ export class BookingsApi extends BaseApi { async listBookings( limit?: number, cursor?: string, + customerId?: string, teamMemberId?: string, locationId?: string, startAtMin?: string, @@ -88,6 +99,7 @@ export class BookingsApi extends BaseApi { const mapped = req.prepareArgs({ limit: [limit, optional(number())], cursor: [cursor, optional(string())], + customerId: [customerId, optional(string())], teamMemberId: [teamMemberId, optional(string())], locationId: [locationId, optional(string())], startAtMin: [startAtMin, optional(string())], @@ -95,6 +107,7 @@ export class BookingsApi extends BaseApi { }); req.query('limit', mapped.limit); req.query('cursor', mapped.cursor); + req.query('customer_id', mapped.customerId); req.query('team_member_id', mapped.teamMemberId); req.query('location_id', mapped.locationId); req.query('start_at_min', mapped.startAtMin); @@ -161,6 +174,31 @@ export class BookingsApi extends BaseApi { return req.callAsJson(searchAvailabilityResponseSchema, requestOptions); } + /** + * 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. + * + * @param body An object containing the fields to POST for the request. + * See the corresponding object definition for field + * details. + * @return Response from the API call + */ + async bulkRetrieveBookings( + body: BulkRetrieveBookingsRequest, + requestOptions?: RequestOptions + ): Promise> { + const req = this.createRequest('POST', '/v2/bookings/bulk-retrieve'); + const mapped = req.prepareArgs({ + body: [body, bulkRetrieveBookingsRequestSchema], + }); + req.header('Content-Type', 'application/json'); + req.json(mapped.body); + return req.callAsJson(bulkRetrieveBookingsResponseSchema, requestOptions); + } + /** * Retrieves a seller's booking profile. * diff --git a/src/api/giftCardsApi.ts b/src/api/giftCardsApi.ts index 2cb7e0e1..30d58176 100644 --- a/src/api/giftCardsApi.ts +++ b/src/api/giftCardsApi.ts @@ -60,8 +60,8 @@ export class GiftCardsApi extends BaseApi { * @param state 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. * @param limit If a limit is provided, the endpoint returns only the specified number of results - * per page. The maximum value is 50. The default value is 30. For more information, see - * [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + * 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). * @param cursor A pagination cursor returned by a previous call to this endpoint. Provide this * cursor to retrieve the next set of results for the original query. If a cursor is not * provided, the endpoint returns the first page of the results. For more information, diff --git a/src/client.ts b/src/client.ts index a9e276bc..205aa896 100644 --- a/src/client.ts +++ b/src/client.ts @@ -67,7 +67,7 @@ import { import { HttpClient } from './clientAdapter'; /** Current SDK version */ -export const SDK_VERSION = '29.0.0'; +export const SDK_VERSION = '30.0.0'; export class Client implements ClientInterface { private _config: Readonly; private _timeout: number; @@ -131,7 +131,7 @@ export class Client implements ClientInterface { ? this._config.httpClientOptions.timeout : this._config.timeout; this._userAgent = updateUserAgent( - 'Square-TypeScript-SDK/29.0.0 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}', + 'Square-TypeScript-SDK/30.0.0 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}', this._config.squareVersion, this._config.userAgentDetail ); diff --git a/src/defaultConfiguration.ts b/src/defaultConfiguration.ts index 80e1e801..4510a2a2 100644 --- a/src/defaultConfiguration.ts +++ b/src/defaultConfiguration.ts @@ -4,7 +4,7 @@ import { RetryConfiguration } from './core'; /** Default values for the configuration parameters of the client. */ export const DEFAULT_CONFIGURATION: Configuration = { timeout: 60000, - squareVersion: '2023-07-20', + squareVersion: '2023-08-16', additionalHeaders: {}, userAgentDetail: '', environment: Environment.Production, diff --git a/src/index.ts b/src/index.ts index b08db7b1..f2f532f3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -107,6 +107,8 @@ export type { BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeD export type { BulkDeleteOrderCustomAttributesRequest } from './models/bulkDeleteOrderCustomAttributesRequest'; export type { BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute } from './models/bulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute'; export type { BulkDeleteOrderCustomAttributesResponse } from './models/bulkDeleteOrderCustomAttributesResponse'; +export type { BulkRetrieveBookingsRequest } from './models/bulkRetrieveBookingsRequest'; +export type { BulkRetrieveBookingsResponse } from './models/bulkRetrieveBookingsResponse'; export type { BulkRetrieveVendorsRequest } from './models/bulkRetrieveVendorsRequest'; export type { BulkRetrieveVendorsResponse } from './models/bulkRetrieveVendorsResponse'; export type { BulkUpdateTeamMembersRequest } from './models/bulkUpdateTeamMembersRequest'; @@ -303,6 +305,7 @@ export type { CustomerCreationSourceFilter } from './models/customerCreationSour export type { CustomerCustomAttributeFilter } from './models/customerCustomAttributeFilter'; export type { CustomerCustomAttributeFilters } from './models/customerCustomAttributeFilters'; export type { CustomerCustomAttributeFilterValue } from './models/customerCustomAttributeFilterValue'; +export type { CustomerDetails } from './models/customerDetails'; export type { CustomerFilter } from './models/customerFilter'; export type { CustomerGroup } from './models/customerGroup'; export type { CustomerPreferences } from './models/customerPreferences'; @@ -787,6 +790,7 @@ export type { Site } from './models/site'; export type { Snippet } from './models/snippet'; export type { SnippetResponse } from './models/snippetResponse'; export type { SourceApplication } from './models/sourceApplication'; +export type { SquareAccountDetails } from './models/squareAccountDetails'; export type { StandardUnitDescription } from './models/standardUnitDescription'; export type { StandardUnitDescriptionGroup } from './models/standardUnitDescriptionGroup'; export type { SubmitEvidenceResponse } from './models/submitEvidenceResponse'; @@ -806,8 +810,11 @@ export type { TeamMemberAssignedLocations } from './models/teamMemberAssignedLoc export type { TeamMemberBookingProfile } from './models/teamMemberBookingProfile'; export type { TeamMemberWage } from './models/teamMemberWage'; export type { Tender } from './models/tender'; +export type { TenderBankAccountDetails } from './models/tenderBankAccountDetails'; +export type { TenderBuyNowPayLaterDetails } from './models/tenderBuyNowPayLaterDetails'; export type { TenderCardDetails } from './models/tenderCardDetails'; export type { TenderCashDetails } from './models/tenderCashDetails'; +export type { TenderSquareAccountDetails } from './models/tenderSquareAccountDetails'; export type { TerminalAction } from './models/terminalAction'; export type { TerminalActionQuery } from './models/terminalActionQuery'; export type { TerminalActionQueryFilter } from './models/terminalActionQueryFilter'; diff --git a/src/models/bulkRetrieveBookingsRequest.ts b/src/models/bulkRetrieveBookingsRequest.ts new file mode 100644 index 00000000..0c7412f9 --- /dev/null +++ b/src/models/bulkRetrieveBookingsRequest.ts @@ -0,0 +1,11 @@ +import { array, object, Schema, string } from '../schema'; + +/** Request payload for bulk retrieval of bookings. */ +export interface BulkRetrieveBookingsRequest { + /** A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve. */ + bookingIds: string[]; +} + +export const bulkRetrieveBookingsRequestSchema: Schema = object( + { bookingIds: ['booking_ids', array(string())] } +); diff --git a/src/models/bulkRetrieveBookingsResponse.ts b/src/models/bulkRetrieveBookingsResponse.ts new file mode 100644 index 00000000..575a7df8 --- /dev/null +++ b/src/models/bulkRetrieveBookingsResponse.ts @@ -0,0 +1,24 @@ +import { array, dict, lazy, object, optional, Schema } from '../schema'; +import { Error, errorSchema } from './error'; +import { + RetrieveBookingResponse, + retrieveBookingResponseSchema, +} from './retrieveBookingResponse'; + +/** Response payload for bulk retrieval of bookings. */ +export interface BulkRetrieveBookingsResponse { + /** Requested bookings returned as a map containing `booking_id` as the key and `RetrieveBookingResponse` as the value. */ + bookings?: Record; + /** Errors that occurred during the request. */ + errors?: Error[]; +} + +export const bulkRetrieveBookingsResponseSchema: Schema = object( + { + bookings: [ + 'bookings', + optional(dict(lazy(() => retrieveBookingResponseSchema))), + ], + errors: ['errors', optional(array(lazy(() => errorSchema)))], + } +); diff --git a/src/models/catalogItem.ts b/src/models/catalogItem.ts index ca0fbec3..54c805da 100644 --- a/src/models/catalogItem.ts +++ b/src/models/catalogItem.ts @@ -119,6 +119,8 @@ export interface CatalogItem { descriptionHtml?: string | null; /** A server-generated plaintext version of the `description_html` field, without formatting tags. */ descriptionPlaintext?: string; + /** Indicates whether this item is archived (`true`) or not (`false`). */ + isArchived?: boolean | null; } export const catalogItemSchema: Schema = object({ @@ -152,4 +154,5 @@ export const catalogItemSchema: Schema = object({ sortName: ['sort_name', optional(nullable(string()))], descriptionHtml: ['description_html', optional(nullable(string()))], descriptionPlaintext: ['description_plaintext', optional(string())], + isArchived: ['is_archived', optional(nullable(boolean()))], }); diff --git a/src/models/catalogItemVariation.ts b/src/models/catalogItemVariation.ts index e5270bfa..9be342d3 100644 --- a/src/models/catalogItemVariation.ts +++ b/src/models/catalogItemVariation.ts @@ -132,11 +132,6 @@ export interface CatalogItemVariation { * share the same underlying stock. */ stockableConversion?: CatalogStockConversion; - /** - * A list of ids of [CatalogItemVariationVendorInfo](entity:CatalogItemVariationVendorInfo) objects that - * reference this ItemVariation. (Deprecated in favor of item_variation_vendor_infos) - */ - itemVariationVendorInfoIds?: string[] | null; } export const catalogItemVariationSchema: Schema = object({ @@ -175,8 +170,4 @@ export const catalogItemVariationSchema: Schema = object({ 'stockable_conversion', optional(lazy(() => catalogStockConversionSchema)), ], - itemVariationVendorInfoIds: [ - 'item_variation_vendor_info_ids', - optional(nullable(array(string()))), - ], }); diff --git a/src/models/catalogObject.ts b/src/models/catalogObject.ts index 01597184..5d9a6c91 100644 --- a/src/models/catalogObject.ts +++ b/src/models/catalogObject.ts @@ -72,7 +72,7 @@ import { CatalogV1Id, catalogV1IdSchema } from './catalogV1Id'; export interface CatalogObject { /** * Possible types of CatalogObjects returned from the catalog, each - * containing type-specific properties in the `*_data` field corresponding to the specfied object type. + * containing type-specific properties in the `*_data` field corresponding to the specified object type. */ type: string; /** diff --git a/src/models/createPaymentRequest.ts b/src/models/createPaymentRequest.ts index 7873bb32..73afaef9 100644 --- a/src/models/createPaymentRequest.ts +++ b/src/models/createPaymentRequest.ts @@ -4,6 +4,7 @@ import { CashPaymentDetails, cashPaymentDetailsSchema, } from './cashPaymentDetails'; +import { CustomerDetails, customerDetailsSchema } from './customerDetails'; import { ExternalPaymentDetails, externalPaymentDetailsSchema, @@ -163,6 +164,8 @@ export interface CreatePaymentRequest { * [Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). */ externalDetails?: ExternalPaymentDetails; + /** Details about the customer making the payment. */ + customerDetails?: CustomerDetails; } export const createPaymentRequestSchema: Schema = object({ @@ -197,4 +200,8 @@ export const createPaymentRequestSchema: Schema = object({ 'external_details', optional(lazy(() => externalPaymentDetailsSchema)), ], + customerDetails: [ + 'customer_details', + optional(lazy(() => customerDetailsSchema)), + ], }); diff --git a/src/models/customerDetails.ts b/src/models/customerDetails.ts new file mode 100644 index 00000000..006d59fb --- /dev/null +++ b/src/models/customerDetails.ts @@ -0,0 +1,17 @@ +import { boolean, nullable, object, optional, Schema } from '../schema'; + +/** Details about the customer making the payment. */ +export interface CustomerDetails { + /** Indicates whether the customer initiated the payment. */ + customerInitiated?: boolean | null; + /** + * Indicates that the seller keyed in payment details on behalf of the customer. + * This is used to flag a payment as Mail Order / Telephone Order (MOTO). + */ + sellerKeyedIn?: boolean | null; +} + +export const customerDetailsSchema: Schema = object({ + customerInitiated: ['customer_initiated', optional(nullable(boolean()))], + sellerKeyedIn: ['seller_keyed_in', optional(nullable(boolean()))], +}); diff --git a/src/models/listBookingsRequest.ts b/src/models/listBookingsRequest.ts index 60139b4e..e265c901 100644 --- a/src/models/listBookingsRequest.ts +++ b/src/models/listBookingsRequest.ts @@ -5,6 +5,8 @@ export interface ListBookingsRequest { limit?: number | null; /** 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. */ cursor?: string | null; + /** The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved. */ + customerId?: string | null; /** The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved. */ teamMemberId?: string | null; /** The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved. */ @@ -18,6 +20,7 @@ export interface ListBookingsRequest { export const listBookingsRequestSchema: Schema = object({ limit: ['limit', optional(nullable(number()))], cursor: ['cursor', optional(nullable(string()))], + customerId: ['customer_id', optional(nullable(string()))], teamMemberId: ['team_member_id', optional(nullable(string()))], locationId: ['location_id', optional(nullable(string()))], startAtMin: ['start_at_min', optional(nullable(string()))], diff --git a/src/models/listGiftCardsRequest.ts b/src/models/listGiftCardsRequest.ts index 1011a7b1..8ceade6e 100644 --- a/src/models/listGiftCardsRequest.ts +++ b/src/models/listGiftCardsRequest.ts @@ -17,7 +17,7 @@ export interface ListGiftCardsRequest { state?: string | null; /** * If a limit is provided, the endpoint returns only the specified number of results per page. - * The maximum value is 50. The default value is 30. + * The maximum value is 200. The default value is 30. * For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). */ limit?: number | null; diff --git a/src/models/loyaltyPromotionIncentivePointsMultiplierData.ts b/src/models/loyaltyPromotionIncentivePointsMultiplierData.ts index 80530786..1f1db0e6 100644 --- a/src/models/loyaltyPromotionIncentivePointsMultiplierData.ts +++ b/src/models/loyaltyPromotionIncentivePointsMultiplierData.ts @@ -1,4 +1,4 @@ -import { number, object, Schema } from '../schema'; +import { nullable, number, object, optional, Schema, string } from '../schema'; /** Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion incentive]($m/LoyaltyPromotionIncentive). */ export interface LoyaltyPromotionIncentivePointsMultiplierData { @@ -7,10 +7,31 @@ export interface LoyaltyPromotionIncentivePointsMultiplierData { * is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program. * If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier` * of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points). + * DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. + * One of the following is required when specifying a points multiplier: + * - (Recommended) The `multiplier` field. + * - This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` + * with the equivalent value. */ - pointsMultiplier: number; + pointsMultiplier?: number | null; + /** + * The multiplier used to calculate the number of points earned each time the promotion is triggered, + * specified as a string representation of a decimal. Square supports multipliers up to 10x, with three + * point precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the + * base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a + * `multiplier` of "1.5", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier = 6 points). + * Fractional points are dropped. + * One of the following is required when specifying a points multiplier: + * - (Recommended) This `multiplier` field. + * - The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier` + * with the equivalent value. + */ + multiplier?: string | null; } export const loyaltyPromotionIncentivePointsMultiplierDataSchema: Schema = object( - { pointsMultiplier: ['points_multiplier', number()] } + { + pointsMultiplier: ['points_multiplier', optional(nullable(number()))], + multiplier: ['multiplier', optional(nullable(string()))], + } ); diff --git a/src/models/payment.ts b/src/models/payment.ts index 96a8ec97..ab6cab20 100644 --- a/src/models/payment.ts +++ b/src/models/payment.ts @@ -40,6 +40,10 @@ import { import { Money, moneySchema } from './money'; import { ProcessingFee, processingFeeSchema } from './processingFee'; import { RiskEvaluation, riskEvaluationSchema } from './riskEvaluation'; +import { + SquareAccountDetails, + squareAccountDetailsSchema, +} from './squareAccountDetails'; /** Represents a payment processed by the Square API. */ export interface Payment { @@ -135,8 +139,8 @@ export interface Payment { delayedUntil?: string; /** * The source type for this payment. - * Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH` - * and `EXTERNAL`. For information about these payment source types, + * Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`, + * `CASH` and `EXTERNAL`. For information about these payment source types, * see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments). */ sourceType?: string; @@ -159,6 +163,8 @@ export interface Payment { walletDetails?: DigitalWalletDetails; /** Additional details about a Buy Now Pay Later payment type. */ buyNowPayLaterDetails?: BuyNowPayLaterDetails; + /** Additional details about Square Account payments. */ + squareAccountDetails?: SquareAccountDetails; /** The ID of the location associated with the payment. */ locationId?: string; /** The ID of the order associated with the payment. */ @@ -290,6 +296,10 @@ export const paymentSchema: Schema = object({ 'buy_now_pay_later_details', optional(lazy(() => buyNowPayLaterDetailsSchema)), ], + squareAccountDetails: [ + 'square_account_details', + optional(lazy(() => squareAccountDetailsSchema)), + ], locationId: ['location_id', optional(string())], orderId: ['order_id', optional(string())], referenceId: ['reference_id', optional(string())], diff --git a/src/models/searchCatalogItemsRequest.ts b/src/models/searchCatalogItemsRequest.ts index 0257a99c..8f3d5da3 100644 --- a/src/models/searchCatalogItemsRequest.ts +++ b/src/models/searchCatalogItemsRequest.ts @@ -43,6 +43,12 @@ export interface SearchCatalogItemsRequest { * a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. */ customAttributeFilters?: CustomAttributeFilter[]; + /** + * Defines the values for the `archived_state` query expression + * used in [SearchCatalogItems]($e/Catalog/SearchCatalogItems) + * to return the archived, not archived or either type of catalog items. + */ + archivedState?: string; } export const searchCatalogItemsRequestSchema: Schema = object( @@ -59,5 +65,6 @@ export const searchCatalogItemsRequestSchema: Schema 'custom_attribute_filters', optional(array(lazy(() => customAttributeFilterSchema))), ], + archivedState: ['archived_state', optional(string())], } ); diff --git a/src/models/squareAccountDetails.ts b/src/models/squareAccountDetails.ts new file mode 100644 index 00000000..a0c205a6 --- /dev/null +++ b/src/models/squareAccountDetails.ts @@ -0,0 +1,23 @@ +import { + array, + lazy, + nullable, + object, + optional, + Schema, + string, +} from '../schema'; +import { Error, errorSchema } from './error'; + +/** Additional details about Square Account payments. */ +export interface SquareAccountDetails { + /** Unique identifier for the payment source used for this payment. */ + paymentSourceToken?: string | null; + /** Information about errors encountered during the request. */ + errors?: Error[] | null; +} + +export const squareAccountDetailsSchema: Schema = object({ + paymentSourceToken: ['payment_source_token', optional(nullable(string()))], + errors: ['errors', optional(nullable(array(lazy(() => errorSchema))))], +}); diff --git a/src/models/taxIds.ts b/src/models/taxIds.ts index bad69b31..b8b9a8c2 100644 --- a/src/models/taxIds.ts +++ b/src/models/taxIds.ts @@ -24,6 +24,11 @@ export interface TaxIds { * If it is present, it has been validated. For example, `73628495A`. */ esNif?: string | null; + /** + * The QII (Qualified Invoice Issuer) number is a 14-character tax identifier used in Japan. + * If it is present, it has been validated. For example, `T1234567890123`. + */ + jpQii?: string; } export const taxIdsSchema: Schema = object({ @@ -31,4 +36,5 @@ export const taxIdsSchema: Schema = object({ frSiret: ['fr_siret', optional(nullable(string()))], frNaf: ['fr_naf', optional(nullable(string()))], esNif: ['es_nif', optional(nullable(string()))], + jpQii: ['jp_qii', optional(string())], }); diff --git a/src/models/tender.ts b/src/models/tender.ts index 9ea29653..6b0cdebd 100644 --- a/src/models/tender.ts +++ b/src/models/tender.ts @@ -12,8 +12,20 @@ import { additionalRecipientSchema, } from './additionalRecipient'; import { Money, moneySchema } from './money'; +import { + TenderBankAccountDetails, + tenderBankAccountDetailsSchema, +} from './tenderBankAccountDetails'; +import { + TenderBuyNowPayLaterDetails, + tenderBuyNowPayLaterDetailsSchema, +} from './tenderBuyNowPayLaterDetails'; import { TenderCardDetails, tenderCardDetailsSchema } from './tenderCardDetails'; import { TenderCashDetails, tenderCashDetailsSchema } from './tenderCashDetails'; +import { + TenderSquareAccountDetails, + tenderSquareAccountDetailsSchema, +} from './tenderSquareAccountDetails'; /** Represents a tender (i.e., a method of payment) used in a Square transaction. */ export interface Tender { @@ -65,6 +77,16 @@ export interface Tender { cardDetails?: TenderCardDetails; /** Represents the details of a tender with `type` `CASH`. */ cashDetails?: TenderCashDetails; + /** + * Represents the details of a tender with `type` `BANK_ACCOUNT`. + * See [BankAccountPaymentDetails]($m/BankAccountPaymentDetails) + * for more exposed details of a bank account payment. + */ + bankAccountDetails?: TenderBankAccountDetails; + /** Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. */ + buyNowPayLaterDetails?: TenderBuyNowPayLaterDetails; + /** Represents the details of a tender with `type` `SQUARE_ACCOUNT`. */ + squareAccountDetails?: TenderSquareAccountDetails; /** * Additional recipients (other than the merchant) receiving a portion of this tender. * For example, fees assessed on the purchase by a third party integration. @@ -93,6 +115,18 @@ export const tenderSchema: Schema = object({ type: ['type', string()], cardDetails: ['card_details', optional(lazy(() => tenderCardDetailsSchema))], cashDetails: ['cash_details', optional(lazy(() => tenderCashDetailsSchema))], + bankAccountDetails: [ + 'bank_account_details', + optional(lazy(() => tenderBankAccountDetailsSchema)), + ], + buyNowPayLaterDetails: [ + 'buy_now_pay_later_details', + optional(lazy(() => tenderBuyNowPayLaterDetailsSchema)), + ], + squareAccountDetails: [ + 'square_account_details', + optional(lazy(() => tenderSquareAccountDetailsSchema)), + ], additionalRecipients: [ 'additional_recipients', optional(nullable(array(lazy(() => additionalRecipientSchema)))), diff --git a/src/models/tenderBankAccountDetails.ts b/src/models/tenderBankAccountDetails.ts new file mode 100644 index 00000000..4d33742e --- /dev/null +++ b/src/models/tenderBankAccountDetails.ts @@ -0,0 +1,15 @@ +import { object, optional, Schema, string } from '../schema'; + +/** + * Represents the details of a tender with `type` `BANK_ACCOUNT`. + * See [BankAccountPaymentDetails]($m/BankAccountPaymentDetails) + * for more exposed details of a bank account payment. + */ +export interface TenderBankAccountDetails { + /** Indicates the bank account payment's current status. */ + status?: string; +} + +export const tenderBankAccountDetailsSchema: Schema = object( + { status: ['status', optional(string())] } +); diff --git a/src/models/tenderBuyNowPayLaterDetails.ts b/src/models/tenderBuyNowPayLaterDetails.ts new file mode 100644 index 00000000..39858faa --- /dev/null +++ b/src/models/tenderBuyNowPayLaterDetails.ts @@ -0,0 +1,14 @@ +import { object, optional, Schema, string } from '../schema'; + +/** Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. */ +export interface TenderBuyNowPayLaterDetails { + buyNowPayLaterBrand?: string; + status?: string; +} + +export const tenderBuyNowPayLaterDetailsSchema: Schema = object( + { + buyNowPayLaterBrand: ['buy_now_pay_later_brand', optional(string())], + status: ['status', optional(string())], + } +); diff --git a/src/models/tenderSquareAccountDetails.ts b/src/models/tenderSquareAccountDetails.ts new file mode 100644 index 00000000..711431f7 --- /dev/null +++ b/src/models/tenderSquareAccountDetails.ts @@ -0,0 +1,10 @@ +import { object, optional, Schema, string } from '../schema'; + +/** Represents the details of a tender with `type` `SQUARE_ACCOUNT`. */ +export interface TenderSquareAccountDetails { + status?: string; +} + +export const tenderSquareAccountDetailsSchema: Schema = object( + { status: ['status', optional(string())] } +); diff --git a/src/models/updateItemModifierListsResponse.ts b/src/models/updateItemModifierListsResponse.ts index e4a32c28..53c33bba 100644 --- a/src/models/updateItemModifierListsResponse.ts +++ b/src/models/updateItemModifierListsResponse.ts @@ -4,7 +4,7 @@ import { Error, errorSchema } from './error'; export interface UpdateItemModifierListsResponse { /** Any errors that occurred during the request. */ errors?: Error[]; - /** The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. */ + /** The database [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. */ updatedAt?: string; } diff --git a/src/models/updatePaymentRequest.ts b/src/models/updatePaymentRequest.ts index 8e9b8877..22df1e31 100644 --- a/src/models/updatePaymentRequest.ts +++ b/src/models/updatePaymentRequest.ts @@ -11,7 +11,7 @@ export interface UpdatePaymentRequest { /** * A unique string that identifies this `UpdatePayment` request. Keys can be any valid string * but must be unique for every `UpdatePayment` request. - * For more information, see [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency). + * For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). */ idempotencyKey: string; }